[automerger skipped] Merge RQ1A.210105.003 to aosp-master - DO NOT MERGE am: 32e7b51a73 am: 4e22eb60e2 -s ours

am skip reason: Change-Id Ieda6582f5cb3fc08bb92b4402bcd98c03503864e with SHA-1 0229ad9907 is in history

Original change: https://android-review.googlesource.com/c/device/google/redbull/+/1540548

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7b53e68575747fb18984e6995a276c20247697fb
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index 6e0e59f..add7bbc 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -493,7 +493,11 @@
 TARGET_BOARD_COMMON_PATH := $(TARGET_BOARD_NAME_DIR)/sm7250
 
 # Common kernel file handling
-TARGET_KERNEL_DIR := $(TARGET_BOARD_NAME_DIR:%/=%)-kernel
+ifneq (,$(filter $(TARGET_DEVICE),bramble redfin))
+    TARGET_KERNEL_DIR := device/google/redbull-kernel
+else
+    TARGET_KERNEL_DIR := $(TARGET_BOARD_NAME_DIR:%/=%)-kernel
+endif
 
 # DTBO partition definitions
 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
diff --git a/component-overrides.xml b/component-overrides.xml
index bb3419d..c682a7b 100644
--- a/component-overrides.xml
+++ b/component-overrides.xml
@@ -17,4 +17,7 @@
     <component-override package="com.android.bluetooth" >
         <component class=".sap.SapService" enabled="true" />
     </component-override>
-</config>
\ No newline at end of file
+    <component-override package="com.google.android.apps.tips" >
+        <component class=".TipsMain" enabled="true" />
+    </component-override>
+</config>
diff --git a/default-permissions.xml b/default-permissions.xml
index a004b7c..23b83b4 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -109,7 +109,7 @@
     </exception>
 
     <exception package="com.google.android.apps.scone">
-        <!-- NLP Location access to determine proximity to country border -->
+        <!-- Location access to determine proximity to a CBRS network coverage area -->
         <permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false"/>
         <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false"/>
         <!-- Used to call ActivityTransition API for Smart OOS & Smart PNO -->
diff --git a/device-common.mk b/device-common.mk
index 7260337..352a283 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -648,7 +648,7 @@
 
 # Subsystem silent restart
 PRODUCT_PROPERTY_OVERRIDES += \
-    persist.vendor.sys.ssr.restart_level=modem,adsp,slpi
+    persist.vendor.sys.ssr.restart_level=modem,adsp
 
 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
 # Sensor debug flag
@@ -830,8 +830,10 @@
 PRODUCT_PACKAGES += $(HIDL_WRAPPER)
 
 # Increment the SVN for any official public releases
+ifeq ($(PRODUCT_DEVICE_SVN_OVERRIDE),)
 PRODUCT_PROPERTY_OVERRIDES += \
-	ro.vendor.build.svn=15
+	ro.vendor.build.svn=21
+endif
 
 # Enable iwlan service logging for debug
 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
diff --git a/device_framework_matrix.xml b/device_framework_matrix.xml
index a6e7991..45799ed 100644
--- a/device_framework_matrix.xml
+++ b/device_framework_matrix.xml
@@ -101,7 +101,7 @@
     </hal>
     <hal format="hidl" optional="true">
         <name>vendor.google.google_battery</name>
-        <version>1.0</version>
+        <version>1.1</version>
         <interface>
             <name>IGoogleBattery</name>
             <instance>default</instance>
diff --git a/health/Health.cpp b/health/Health.cpp
index 664dd7b..12cf599 100644
--- a/health/Health.cpp
+++ b/health/Health.cpp
@@ -118,7 +118,6 @@
 void private_healthd_board_init(struct healthd_config *hc) {
   hc->ignorePowerSupplyNames.push_back(android::String8(kTCPMPSYName));
   needs_wlc_updates = FileExists(kWlcCapacity);
-  battDefender.update();
 }
 
 int private_healthd_board_battery_update(struct android::BatteryProperties *props) {
@@ -126,7 +125,7 @@
   battThermalControl.updateThermalState(props);
   battMetricsLogger.logBatteryProperties(props);
   shutdownMetrics.logShutdownVoltage(props);
-  battDefender.update();
+  battDefender.update(props);
 
   if (needs_wlc_updates &&
       !android::base::WriteStringToFile(std::to_string(props->batteryLevel), kWlcCapacity))
diff --git a/init.hardware.rc b/init.hardware.rc
index a003b87..288990e 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -162,6 +162,23 @@
     # Battery Defender
     chown system system /sys/devices/platform/soc/soc:google,charger/charge_stop_level
     chown system system /sys/devices/platform/soc/soc:google,charger/charge_start_level
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_drainto_soc
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_recharge_soc
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_recharge_voltage
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_abs_temp
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_soc
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_temp
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_time
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_temp
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_time
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_voltage
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_temp_enable
+    chown system system /sys/devices/platform/soc/soc:google,charger/bd_temp_dry_run
+    chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_enable
+    chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_recharge_soc
+    chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_cnt
+    chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_dry_run
+    chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_reset_sec
 
     # report max frequency to unity tasks.
     write /proc/sys/kernel/sched_lib_name "UnityMain,libunity.so"
@@ -170,13 +187,13 @@
     # Charge stats (write 0)
     chown system system /sys/class/power_supply/battery/charge_stats
 
+    # NFC streset tool name
+    setprop persist.vendor.nfc.streset libstreset
+    setprop persist.vendor.se.streset libstreset
+
 on late-init
-    chown system system /sys/devices/virtual/thermal/tz-by-name/skin-therm-monitor/trip_point_0_temp
-    chown system system /sys/devices/virtual/thermal/tz-by-name/skin-therm-monitor/trip_point_0_hyst
     chown system system /sys/devices/virtual/thermal/tz-by-name/cellular-emergency/trip_point_0_temp
     chown system system /sys/devices/virtual/thermal/tz-by-name/cellular-emergency/trip_point_0_hyst
-    chown system system /sys/devices/virtual/thermal/tz-by-name/usbc-therm-monitor/trip_point_0_temp
-    chown system system /sys/devices/virtual/thermal/tz-by-name/usbc-therm-monitor/trip_point_0_hyst
     chown system system /sys/devices/virtual/thermal/tz-by-name/soc/mode
 
 on fs
@@ -657,41 +674,12 @@
    user system
    group system
 
-service vendor.imsqmidaemon /system/vendor/bin/imsqmidaemon
-    class main
-    user radio
-    socket ims_qmid stream 0660 system radio
-    group radio log diag
-
-service vendor.imsdatadaemon /system/vendor/bin/imsdatadaemon
-    class main
-    user radio
-    socket ims_datad stream 0660 system radio
-    group radio wifi inet log diag
-    disabled
-
-service vendor.imsrcsservice /system/vendor/bin/imsrcsd
-    class main
-    user radio
-    group radio diag inet log wakelock
-
-on property:vendor.ims.QMI_DAEMON_STATUS=1
-    start vendor.imsdatadaemon
-
-service vendor.ims_rtp_daemon /system/vendor/bin/ims_rtp_daemon
-   class main
-   user radio
-   group radio inet log
-
 service wait_for_strongbox /vendor/bin/hw/wait_for_strongbox
     user root
     group root system
     priority -20
     ioprio rt 0
 
-on property:vendor.ims.DATA_DAEMON_STATUS=1
-    restart vendor.ims_rtp_daemon
-
 service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
    class core
    user vendor_qrtr
diff --git a/manifest.xml b/manifest.xml
index e4c85cc..2de8ef4 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -111,7 +111,7 @@
     <hal format="hidl">
       <name>vendor.google.google_battery</name>
       <transport>hwbinder</transport>
-      <version>1.0</version>
+      <version>1.1</version>
       <interface>
         <name>IGoogleBattery</name>
         <instance>default</instance>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 1075216..974f39d 100755
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -307,16 +307,6 @@
     <!-- True if Unprocessed audio source supports the required frequency range and level -->
     <bool name="config_supportAudioSourceUnprocessed">true</bool>
 
-    <!-- An array of device capabilities defined by GSMA SGP.22 v2.0, and their corresponding major
-         version. -->
-    <string-array translatable="false" name="config_telephonyEuiccDeviceCapabilities">
-        <item>"gsm,11"</item>
-        <item>"utran,11"</item>
-        <item>"cdma1x,1"</item>
-        <item>"hrpd,3"</item>
-        <item>"ehrpd,12"</item>
-        <item>"eutran,11"</item>
-    </string-array>
 
     <!-- Whether the new Auto Selection Network UI should be shown -->
     <bool name="config_enableNewAutoSelectNetworkUI">true</bool>
diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp
index 47ba130..d6c0e36 100644
--- a/pixelstats/service.cpp
+++ b/pixelstats/service.cpp
@@ -43,6 +43,7 @@
     .UFSLifetimeB = UFSHC_PATH(health_descriptor/life_time_estimation_b),
     .UFSLifetimeC = UFSHC_PATH(health_descriptor/life_time_estimation_c),
     .F2fsStatsPath = "/sys/fs/f2fs/",
+    .EEPROMPath = "/dev/battery_history"
 };
 
 const char *const kAudioUevent = "/kernel/q6audio/q6voice_uevent";
diff --git a/product.prop b/product.prop
index ebee6fe..81171da 100644
--- a/product.prop
+++ b/product.prop
@@ -42,7 +42,6 @@
 
 # system props for perfetto
 persist.traced.enable=1
-persist.heapprofd.enable=1
 
 # System prop to turn on CdmaLTEPhone always
 telephony.lteOnCdmaDevice=1