Merge SQ1A.220205.002

Bug: 213904741
Merged-In: I0d90a80d66f3ae37acb90eb5bd237bd716268ed6
Change-Id: I2b6175e363e6c0185c2a220649927cf3793520d2
diff --git a/init.hardware.rc b/init.hardware.rc
index 2159dbf..5cde92d 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -357,9 +357,6 @@
     # Wait for insmod_sh to finish all modules
     wait_for_prop vendor.all.modules.ready 1
 
-    # Update dm-verity state and set partition.*.verified properties
-    verity_update_state
-
     # Wait for insmod_sh to finish all boot devices
     wait_for_prop vendor.all.devices.ready 1
 
@@ -716,7 +713,7 @@
     class core
     user root
     group root
-    writepid /dev/cpuset/system-background/tasks
+    task_profiles ServiceCapacityLow
 
 service pd_mapper /vendor/bin/pd-mapper
      class core
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 51ed73a..c39936f 100755
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -117,9 +117,6 @@
     <!--  Maximum number of supported users -->
     <integer name="config_multiuserMaximumUsers">4</integer>
 
-    <!-- Whether Hearing Aid profile is supported -->
-    <bool name="config_hearing_aid_profile_supported">true</bool>
-
     <!-- List of regexpressions describing the interface (if any) that represent tetherable
          USB interfaces.  If the device doesn't want to support tething over USB this should
          be empty.  An example would be "usb.*" -->
@@ -149,9 +146,6 @@
            <item>"bt-pan"</item>
     </string-array>
 
-    <!-- Boolean indicating if current platform supports HFP inband ringing -->
-    <bool name="config_bluetooth_hfp_inband_ringing_support">true</bool>
-
     <bool translatable="false" name="config_tether_upstream_automatic">true</bool>
 
     <!-- This string array should be overridden by the device to present a list of network
@@ -292,7 +286,6 @@
         <item>"/system/framework/services.jar"</item>
         <item>"/apex/com.android.art/javalib/core-oj.jar"</item>
         <item>"/apex/com.android.art/javalib/core-libart.jar"</item>
-        <item>"/apex/com.android.media/javalib/updatable-media.jar"</item>
         <item>"/system/bin/surfaceflinger"</item>
         <item>"/system_ext/priv-app/SystemUIGoogle/SystemUIGoogle.apk"</item>
     </string-array>
diff --git a/powerstats/service.cpp b/powerstats/service.cpp
index c4d4c4f..4a76e4a 100644
--- a/powerstats/service.cpp
+++ b/powerstats/service.cpp
@@ -128,6 +128,30 @@
         std::vector<std::string>{"Off", "LP", "1080x2340@60"});
     service->addStateResidencyDataProvider(displaySdp);
 
+    // Add NFC power entity
+    StateResidencyConfig nfcStateConfig = {
+        .entryCountSupported = true,
+        .entryCountPrefix = "Cumulative count:",
+        .totalTimeSupported = true,
+        .totalTimePrefix = "Cumulative duration msec:",
+        .lastEntrySupported = true,
+        .lastEntryPrefix = "Last entry timestamp msec:"
+    };
+    std::vector<std::pair<std::string, std::string>> nfcStateHeaders = {
+        std::make_pair("Idle", "Idle mode:"),
+        std::make_pair("Active", "Active mode:"),
+        std::make_pair("Active-RW", "Active Reader/Writer mode:"),
+    };
+
+    sp<GenericStateResidencyDataProvider> nfcSdp =
+            new GenericStateResidencyDataProvider("/sys/class/misc/st21nfc/device/power_stats");
+
+    uint32_t nfcId = service->addPowerEntity("NFC", PowerEntityType::SUBSYSTEM);
+    nfcSdp->addEntity(nfcId,
+        PowerEntityConfig(generateGenericStateResidencyConfigs(nfcStateConfig, nfcStateHeaders)));
+
+    service->addStateResidencyDataProvider(nfcSdp);
+
     // Add Power Entities that require the Aidl data provider
     auto aidlSdp = sp<AidlStateResidencyDataProvider>::make();
     uint32_t citadelId = service->addPowerEntity("Citadel", PowerEntityType::SUBSYSTEM);
diff --git a/product.prop b/product.prop
index 6e19c33..7cb421d 100644
--- a/product.prop
+++ b/product.prop
@@ -93,3 +93,5 @@
 persist.bluetooth.bqr.event_mask=14
 # BQR minimum report interval configuration
 persist.bluetooth.bqr.min_interval_ms=500
+# Hearing Aid Audio Support Using Bluetooth LE
+bluetooth.profile.asha.central=true
diff --git a/self-extractors/qcom/staging/Android.mk b/self-extractors/qcom/staging/Android.mk
index 2f308ea..aaa6f9c 100644
--- a/self-extractors/qcom/staging/Android.mk
+++ b/self-extractors/qcom/staging/Android.mk
@@ -15,6 +15,10 @@
 LOCAL_MODULE_CLASS := APPS
 LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
 LOCAL_CERTIFICATE := platform
+# Disable dexpreopt and <uses-library> check because the APK depends on
+# libraries that are not present as modules in the build system.
+LOCAL_ENFORCE_USES_LIBRARIES := false
+LOCAL_DEX_PREOPT := false
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
@@ -31,6 +35,10 @@
 LOCAL_MODULE_CLASS := APPS
 LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
 LOCAL_CERTIFICATE := platform
+# Disable dexpreopt and <uses-library> check because the APK depends on
+# libraries that are not present as modules in the build system.
+LOCAL_ENFORCE_USES_LIBRARIES := false
+LOCAL_DEX_PREOPT := false
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
@@ -46,5 +54,9 @@
 LOCAL_MODULE_CLASS := APPS
 LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
 LOCAL_CERTIFICATE := platform
+# Disable dexpreopt and <uses-library> check because the APK depends on
+# libraries that are not present as modules in the build system.
+LOCAL_ENFORCE_USES_LIBRARIES := false
+LOCAL_DEX_PREOPT := false
 include $(BUILD_PREBUILT)
 endif
diff --git a/self-extractors/root/proprietary/BoardConfigVendor.mk b/self-extractors/root/proprietary/BoardConfigVendor.mk
index fbf6e0f..6a023d4 100644
--- a/self-extractors/root/proprietary/BoardConfigVendor.mk
+++ b/self-extractors/root/proprietary/BoardConfigVendor.mk
@@ -12,7 +12,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_STEM := sunfish/BoardConfigPartial.mk
-
--include vendor/google_devices/$(LOCAL_STEM)
--include vendor/qcom/$(LOCAL_STEM)
+-include vendor/google_devices/sunfish/BoardConfigPartial.mk
+-include vendor/qcom/sunfish/BoardConfigPartial.mk
diff --git a/self-extractors/root/proprietary/device-vendor.mk b/self-extractors/root/proprietary/device-vendor.mk
index 7b0de3f..c75a411 100644
--- a/self-extractors/root/proprietary/device-vendor.mk
+++ b/self-extractors/root/proprietary/device-vendor.mk
@@ -12,7 +12,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_STEM := sunfish/device-partial.mk
-
-$(call inherit-product-if-exists, vendor/google_devices/$(LOCAL_STEM))
-$(call inherit-product-if-exists, vendor/qcom/$(LOCAL_STEM))
+$(call inherit-product-if-exists, vendor/google_devices/sunfish/device-partial.mk)
+$(call inherit-product-if-exists, vendor/qcom/sunfish/device-partial.mk)
diff --git a/sunfish/BoardConfig.mk b/sunfish/BoardConfig.mk
index a8b0f8e..7a10b56 100644
--- a/sunfish/BoardConfig.mk
+++ b/sunfish/BoardConfig.mk
@@ -14,8 +14,8 @@
 # limitations under the License.
 #
 
-ifdef PHONE_CAR_BOARD_CONFIG
-  include $(PHONE_CAR_BOARD_CONFIG)
+ifdef PHONE_CAR_BOARD_PRODUCT
+  include device/google_car/$(PHONE_CAR_BOARD_PRODUCT)/BoardConfig.mk
 else
   TARGET_BOOTLOADER_BOARD_NAME := sunfish
   TARGET_SCREEN_DENSITY := 440