Explorar o código

Merge Android 14 QPR3 to AOSP main

Bug: 346855327
Merged-In: I26415dd5ec8ac8f57aa6b45f14dd0fd1bfbd28c8
Change-Id: I35045d153844e8a784e0b90c0681d39fb0d174d9
Xin Li hai 9 meses
pai
achega
48dfdebfd5

+ 1 - 1
audio/lynx/config/audio_policy_configuration.xml

@@ -90,7 +90,7 @@
                              samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
                 </mixPort>
-                <mixPort name="incall capture" role="sink">
+                <mixPort name="incall capture" role="sink" maxActiveCount="2" maxOpenCount="2">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO"/>

+ 1 - 1
audio/lynx/config/audio_policy_configuration_a2dp_offload_disabled.xml

@@ -90,7 +90,7 @@
                              samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
                 </mixPort>
-                <mixPort name="incall capture" role="sink">
+                <mixPort name="incall capture" role="sink" maxActiveCount="2" maxOpenCount="2">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO"/>

+ 1 - 1
audio/lynx/config/audio_policy_configuration_bluetooth_legacy_hal.xml

@@ -90,7 +90,7 @@
                              samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
                 </mixPort>
-                <mixPort name="incall capture" role="sink">
+                <mixPort name="incall capture" role="sink" maxActiveCount="2" maxOpenCount="2">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO"/>

+ 1 - 1
audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml

@@ -94,7 +94,7 @@
                              samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
                 </mixPort>
-                <mixPort name="incall capture" role="sink">
+                <mixPort name="incall capture" role="sink" maxActiveCount="2" maxOpenCount="2">
                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                              samplingRates="48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO"/>

+ 4 - 4
audio/lynx/config/mixer_paths.xml

@@ -726,8 +726,8 @@
 
     <path name="voice-handset-mic">
         <ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
-        <ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="2"/>
-        <ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="-1"/>
+        <ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="3"/>
+        <ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
         <ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
         <ctl name="MIC DC Blocker" value="1"/>
         <ctl name="MIC HW Gain At High Power Mode (cB)" value="130"/>
@@ -752,8 +752,8 @@
 
     <path name="voice-speaker-mic">
         <ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
-        <ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="2"/>
-        <ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="-1"/>
+        <ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="3"/>
+        <ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
         <ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
         <ctl name="MIC DC Blocker" value="1"/>
         <ctl name="MIC HW Gain At High Power Mode (cB)" value="130"/>

+ 10 - 10
conf/init.lynx.rc

@@ -97,15 +97,15 @@ on property:vendor.all.modules.ready=1
     chown system system /mnt/vendor/persist/haptics
     chown system system /mnt/vendor/persist/haptics/cs40l26.cal
 
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/f0_stored
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/q_stored
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/redc_stored
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/vibe_state
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/num_waves
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_offset
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/owt_free_space
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_comp_enable
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/redc_comp_enable
-    chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/delay_before_stop_playback_us
+    chown system system /sys/bus/i2c/devices/8-0043/calibration/f0_stored
+    chown system system /sys/bus/i2c/devices/8-0043/calibration/q_stored
+    chown system system /sys/bus/i2c/devices/8-0043/calibration/redc_stored
+    chown system system /sys/bus/i2c/devices/8-0043/default/vibe_state
+    chown system system /sys/bus/i2c/devices/8-0043/default/num_waves
+    chown system system /sys/bus/i2c/devices/8-0043/default/f0_offset
+    chown system system /sys/bus/i2c/devices/8-0043/default/owt_free_space
+    chown system system /sys/bus/i2c/devices/8-0043/default/f0_comp_enable
+    chown system system /sys/bus/i2c/devices/8-0043/default/redc_comp_enable
+    chown system system /sys/bus/i2c/devices/8-0043/default/delay_before_stop_playback_us
 
     enable vendor.vibrator.cs40l26

+ 12 - 3
device-lynx.mk

@@ -17,6 +17,15 @@
 TARGET_KERNEL_DIR ?= device/google/lynx-kernel
 TARGET_BOARD_KERNEL_HEADERS := device/google/lynx-kernel/kernel-headers
 
+ifdef RELEASE_GOOGLE_LYNX_KERNEL_VERSION
+TARGET_LINUX_KERNEL_VERSION := $(RELEASE_GOOGLE_LYNX_KERNEL_VERSION)
+endif
+
+ifdef RELEASE_GOOGLE_LYNX_KERNEL_DIR
+TARGET_KERNEL_DIR := $(RELEASE_GOOGLE_LYNX_KERNEL_DIR)
+TARGET_BOARD_KERNEL_HEADERS := $(RELEASE_GOOGLE_LYNX_KERNEL_DIR)/kernel-headers
+endif
+
 $(call inherit-product-if-exists, vendor/google_devices/lynx/prebuilts/device-vendor-lynx.mk)
 $(call inherit-product-if-exists, vendor/google_devices/gs201/prebuilts/device-vendor.mk)
 $(call inherit-product-if-exists, vendor/google_devices/gs201/proprietary/device-vendor.mk)
@@ -150,7 +159,7 @@ include device/google/lynx/bluetooth/qti_default.mk
 GOODIX_CONFIG_BUILD_VERSION := g7_trusty
 ifneq (,$(filter AP1%,$(RELEASE_PLATFORM_VERSION)))
 PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts/firmware/fingerprint/24Q1
-else ifneq (,$(filter AP2%,$(RELEASE_PLATFORM_VERSION)))
+else ifneq (,$(filter AP2% AP3%,$(RELEASE_PLATFORM_VERSION)))
 PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts/firmware/fingerprint/24Q2
 else
 PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts/firmware/fingerprint/trunk
@@ -178,7 +187,7 @@ PRODUCT_VENDOR_PROPERTIES += \
 PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts
 ifneq (,$(filter AP1%,$(RELEASE_PLATFORM_VERSION)))
 PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts/trusty/24Q1
-else ifneq (,$(filter AP2%,$(RELEASE_PLATFORM_VERSION)))
+else ifneq (,$(filter AP2% AP3%,$(RELEASE_PLATFORM_VERSION)))
 PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts/trusty/24Q2
 else
 PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts/trusty/trunk
@@ -223,7 +232,7 @@ PRODUCT_VENDOR_PROPERTIES += \
 
 # Increment the SVN for any official public releases
 PRODUCT_VENDOR_PROPERTIES += \
-    ro.vendor.build.svn=29
+    ro.vendor.build.svn=42
 
 # Set support hide display cutout feature
 PRODUCT_PRODUCT_PROPERTIES += \

+ 4 - 2
location/gps.xml.l10

@@ -35,7 +35,7 @@
        SuplVersion="2"
        SuplMinorVersion="0"
        SuplOtdoaCapable="true"
-       SuplOtdoaCapable2="true"
+       SuplOtdoaCapable2="false"
        SuplGlonassCapable = "true"
        SuplGalileoCapable = "true"
        SuplBdsCapable = "true"
@@ -60,7 +60,7 @@
        CpLppeUseAgnssLocForEmptyDbh="true"
        CpLppHighAccuracyShapeMode="1"
        ReAidingOnHotStart="false"
-       ReAidingIntervalSec="1200"
+       ReAidingIntervalSec="3600"
        RuntimeSwLteFilterEnable="true"
        PpsDevice="/sys/class/pps/pps0/assert_elapsed"
        SensorsMask="0x244"
@@ -90,6 +90,8 @@
        MinGpsWeekNumber="2216"
        OnChipAccMask="50"
        EnableB1C="false"
+
+       RTICacheTimeoutSec="3600"
   />
 
   <gll_features

+ 4 - 2
location/gps_user.xml.l10

@@ -34,7 +34,7 @@
        SuplVersion="2"
        SuplMinorVersion="0"
        SuplOtdoaCapable="true"
-       SuplOtdoaCapable2="true"
+       SuplOtdoaCapable2="false"
        SuplGlonassCapable = "true"
        SuplGalileoCapable = "true"
        SuplBdsCapable = "true"
@@ -59,7 +59,7 @@
        CpLppeUseAgnssLocForEmptyDbh="true"
        CpLppHighAccuracyShapeMode="1"
        ReAidingOnHotStart="false"
-       ReAidingIntervalSec="1200"
+       ReAidingIntervalSec="3600"
        RuntimeSwLteFilterEnable="true"
        PpsDevice="/sys/class/pps/pps0/assert_elapsed"
        SensorsMask="0x244"
@@ -89,6 +89,8 @@
        MinGpsWeekNumber="2216"
        OnChipAccMask="50"
        EnableB1C="false"
+
+       RTICacheTimeoutSec="3600"
   />
 
   <gll_features

+ 1 - 1
lynx/BoardConfig.mk

@@ -20,7 +20,7 @@ TARGET_BOOTLOADER_BOARD_NAME := lynx
 RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_LYNX_RADIO_DIR)
 ifneq (,$(filter AP1%,$(RELEASE_PLATFORM_VERSION)))
 RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/24Q1
-else ifneq (,$(filter AP2%,$(RELEASE_PLATFORM_VERSION)))
+else ifneq (,$(filter AP2% AP3%,$(RELEASE_PLATFORM_VERSION)))
 RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/24Q2
 else
 RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/trunk

+ 9 - 3
lynx/overlay/frameworks/base/core/res/res/values/config.xml

@@ -32,6 +32,15 @@
     <!-- Minimum screen brightness allowed by the power manager. -->
     <integer name="config_screenBrightnessDim">6</integer>
 
+     <!-- Default strength, in percentage, of bright color reduction when activated. -->
+    <integer name="config_reduceBrightColorsStrengthDefault">35</integer>
+
+    <!-- Minimum strength, in percentage, supported by bright color reduction. -->
+    <integer name="config_reduceBrightColorsStrengthMin">25</integer>
+
+    <!-- Maximum strength, in percentage, supported by bright color reduction. -->
+    <integer name="config_reduceBrightColorsStrengthMax">50</integer>
+
     <!-- Minimum screen brightness setting allowed by power manager.
          The user is forbidden from setting the brightness below this level.  -->
     <item name="config_screenBrightnessSettingMinimumFloat" format="float" type="dimen">0.0</item>
@@ -313,7 +322,4 @@
     <!-- Boolean indicating whether allow sending null to modem to clear the previous initial attach
          data profile -->
     <bool name="allow_clear_initial_attach_data_profile">true</bool>
-
-    <!-- The integer index of the selected option in config_udfps_touch_detection_options -->
-    <integer name="config_selected_udfps_touch_detection">6</integer>
 </resources>

+ 2 - 0
lynx/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml

@@ -46,5 +46,7 @@
     <dimen name="physical_volume_up_button_center_screen_location_y">1064px</dimen>
     <dimen name="physical_volume_down_button_center_screen_location_y">1232px</dimen>
 
+    <!-- Pixel pitch of the device. um/px -->
+    <item name="pixel_pitch" format="float" type="dimen">59.2</item>
   </resources>
 

+ 1 - 1
nfc/libnfc-hal-st.conf

@@ -8,7 +8,7 @@ NFC_DEBUG_ENABLED=0
 
 ###############################################################################
 # Vendor specific mode to enable FW (RF & SWP) traces.
-STNFC_FW_DEBUG_ENABLED=0
+STNFC_FW_DEBUG_ENABLED=1
 
 ###############################################################################
 # File used for NFA storage

+ 20 - 25
powerstats/service.cpp

@@ -36,17 +36,24 @@ using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
 
 void addDisplay(std::shared_ptr<PowerStats> p) {
     // Add display residency stats
-    std::vector<std::string> states = {
-        "Off",
-        "LP: 1080x2400@30",
-        "On: 1080x2400@60",
-        "On: 1080x2400@90",
-        "HBM: 1080x2400@60",
-        "HBM: 1080x2400@90"};
-
-    p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>("Display",
-            "/sys/class/backlight/panel0-backlight/state",
-            states));
+    struct stat buffer;
+    if (!stat("/sys/class/drm/card0/device/primary-panel/time_in_state", &buffer)) {
+        // time_in_state exists
+        addDisplayMrr(p);
+    } else {
+        // time_in_state doesn't exist
+        std::vector<std::string> states = {
+            "Off",
+            "LP: 1080x2400@30",
+            "On: 1080x2400@60",
+            "On: 1080x2400@90",
+            "HBM: 1080x2400@60",
+            "HBM: 1080x2400@90"};
+
+        p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>("Display",
+                "/sys/class/backlight/panel0-backlight/state",
+                states));
+    }
 
     // Add display energy consumer
     p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndEntityConsumer(p,
@@ -110,20 +117,8 @@ int main() {
     addWlan(p);
     addTPU(p);
     addUfs(p);
-    if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-2/i2c-st21nfc/power_stats", &buffer)) {
-        addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-2/i2c-st21nfc/power_stats");
-    } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-3/i2c-st21nfc/power_stats", &buffer)) {
-        addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-3/i2c-st21nfc/power_stats");
-    } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-4/i2c-st21nfc/power_stats", &buffer)) {
-        addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-4/i2c-st21nfc/power_stats");
-    } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-5/i2c-st21nfc/power_stats", &buffer)) {
-        addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-5/i2c-st21nfc/power_stats");
-    } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-6/i2c-st21nfc/power_stats", &buffer)) {
-        addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-6/i2c-st21nfc/power_stats");
-    } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-7/i2c-st21nfc/power_stats", &buffer)) {
-        addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-7/i2c-st21nfc/power_stats");
-    } else {
-        addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-8/i2c-st21nfc/power_stats");
+    if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-8/8-0008/power_stats", &buffer)) {
+        addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-8/8-0008/power_stats");
     }
     addPowerDomains(p);
     addDevfreq(p);

+ 1 - 0
rro_overlays/NfcOverlay/res/values/config.xml

@@ -32,4 +32,5 @@
   <integer-array name="antenna_y">
     <item>102</item>
   </integer-array>
+  <bool name="nfc_observe_mode_supported">true</bool>
 </resources>

+ 6 - 0
rro_overlays/WifiOverlay/res/values/config.xml

@@ -151,4 +151,10 @@
          regulatory approval (for example, FCC pre-approval is required according to "594280 D01
          Software Configuration Control v02r01").-->
     <bool translatable="false" name ="config_wifiUpdateCountryCodeFromScanResultGeneric">true</bool>
+
+    <!-- Boolean indicating performing a partial initial scan is enabled -->
+    <bool translatable="false" name="config_wifiEnablePartialInitialScan">true</bool>
+    <!-- Configure the max number of new channels to add into the initial partial scan list per network.
+         If equals to 0, it means there's no limit on the max number of channels to include per network.-->
+    <integer translatable="false" name="config_wifiInitialPartialScanMaxNewChannelsPerNetwork">3</integer>
 </resources>

+ 0 - 1
self-extractors/extract-lists.txt

@@ -10,7 +10,6 @@
             system_ext/lib64/libmediaadaptor.so \
             system_ext/priv-app/ShannonRcs/ShannonRcs.apk \
             system_ext/priv-app/ShannonIms/ShannonIms.apk \
-            system_ext/priv-app/PixelQualifiedNetworksService/PixelQualifiedNetworksService.apk \
             "
     ;;
 

+ 1 - 17
self-extractors/google_devices/staging/Android.mk.template

@@ -22,22 +22,6 @@ ifneq ($(filter lynx,$(TARGET_DEVICE)),)
 endif
 
 ifneq ($(filter lynx,$(TARGET_DEVICE)),)
-include $(CLEAR_VARS)
-LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
-LOCAL_MODULE := PixelQualifiedNetworksService
-LOCAL_MODULE_TAGS := optional
-LOCAL_BUILT_MODULE_STEM := package.apk
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_MODULE_OWNER := google
-LOCAL_MODULE_CLASS := APPS
-LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
-LOCAL_CERTIFICATE := platform
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../COPYRIGHT $(LOCAL_PATH)/../LICENSE
-include $(BUILD_PREBUILT)
-
 include $(CLEAR_VARS)
 LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
 LOCAL_MODULE := ShannonIms
@@ -64,7 +48,7 @@ LOCAL_PRIVILEGED_MODULE := true
 LOCAL_MODULE_OWNER := samsung
 LOCAL_MODULE_CLASS := APPS
 LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
-LOCAL_CERTIFICATE := platform
+LOCAL_CERTIFICATE := PRESIGNED
 LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
 LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../COPYRIGHT $(LOCAL_PATH)/../LICENSE

+ 0 - 1
self-extractors/google_devices/staging/device-partial.mk

@@ -17,7 +17,6 @@ PRODUCT_SOONG_NAMESPACES += \
 
 # AOSP packages required by the blobs
 PRODUCT_PACKAGES := \
-    PixelQualifiedNetworksService \
     ShannonIms \
     ShannonRcs \