Merge tag 'android-15.0.0_r6' of https://android.googlesource.com/device/google/gs101 into HEAD

Android 15.0.0 Release 6 (AP4A.241205.013)

Change-Id: I00ccf5ecebec8351ad1d21b8801fb50f462cb495
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index 22a3c97..e77b270 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -289,9 +289,6 @@
 #CURL
 BOARD_USES_CURL := true
 
-# Sensor HAL
-BOARD_USES_EXYNOS_SENSORS_DUMMY := true
-
 # VISION
 # Exynos vision framework (EVF)
 #TARGET_USES_EVF := true
@@ -393,3 +390,5 @@
 BOARD_PVMFWIMAGE_PARTITION_SIZE := 0x00100000
 
 -include vendor/google_devices/gs-common/proprietary/BoardConfigVendor.mk
+
+include device/google/gs101/BoardConfig-omni.mk
diff --git a/BoardConfig-omni.mk b/BoardConfig-omni.mk
new file mode 100644
index 0000000..fd7a595
--- /dev/null
+++ b/BoardConfig-omni.mk
@@ -0,0 +1,24 @@
+BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
+
+# Manifests
+DEVICE_MANIFEST_FILE += device/google/gs101/manifest_radio.xml
+
+# Partitions
+AB_OTA_PARTITIONS += \
+	vendor \
+	vendor_dlkm \
+	vbmeta_vendor
+
+BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm
+BOARD_USES_VENDOR_DLKMIMAGE := true
+
+# Enable chained vbmeta for vendor
+BOARD_AVB_VBMETA_VENDOR := vendor
+BOARD_AVB_VBMETA_VENDOR_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
+BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA2048
+BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
+BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 3
+
+include vendor/omni/sepolicy/sepolicy.mk
diff --git a/aosp_common.mk b/aosp_common.mk
index d4d8d94..5ba9882 100644
--- a/aosp_common.mk
+++ b/aosp_common.mk
@@ -53,7 +53,3 @@
 
 # TODO: fix
 # PRODUCT_RESTRICT_VENDOR_FILES := all
-
-# Exclude features that are not available on AOSP devices.
-PRODUCT_COPY_FILES += \
-    frameworks/native/data/etc/aosp_excluded_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/aosp_excluded_hardware.xml
\ No newline at end of file
diff --git a/default-permissions.xml b/default-permissions.xml
index 4a3e1c6..30276c2 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -33,24 +33,6 @@
 
 <exceptions>
 
-    <!-- This is an example of an exception:
-    <exception
-        package="foo.bar.permission"
-      <permission name="android.permission.READ_CONTACTS" fixed="true"/>
-      <permission name="android.permission.READ_CALENDAR" fixed="false"/>
-    </exception>
-    -->
-
-    <exception package="com.google.android.settings.intelligence">
-        <!-- Calendar -->
-        <permission name="android.permission.READ_CALENDAR" fixed="true"/>
-        <!-- Location -->
-        <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false"/>
-        <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false"/>
-        <!-- Battery Widget -->
-        <permission name="android.permission.BLUETOOTH_CONNECT" fixed="false"/>
-    </exception>
-
     <exception package="com.google.android.apps.camera.services">
         <!-- Camera -->
         <permission name="android.permission.CAMERA" fixed="false"/>
@@ -60,122 +42,11 @@
         <permission name="android.permission.BLUETOOTH_SCAN" fixed="false"/>
     </exception>
 
-    <exception package="com.google.android.apps.cbrsnetworkmonitor">
-        <!-- Location access to create CBRS geofences-->
-        <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="true"/>
-        <permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="true"/>
-        <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="true"/>
-    </exception>
-
-    <exception package="com.google.android.apps.scone">
-        <!-- Used to call ActivityTransition API for Smart PNO -->
-        <permission name="android.permission.ACTIVITY_RECOGNITION" fixed="false"/>
+    <exception package="com.google.android.euicc">
         <!-- Notifications -->
         <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
         <!-- Used by Bluetooth Module to collect bluetooth info -->
         <permission name="android.permission.BLUETOOTH_CONNECT" fixed="false"/>
     </exception>
 
-    <exception
-            package="com.google.android.apps.restore">
-        <!-- External storage -->
-        <permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
-        <permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="false"/>
-        <!-- Contacts -->
-        <permission name="android.permission.READ_CONTACTS" fixed="false"/>
-        <permission name="android.permission.WRITE_CONTACTS" fixed="false"/>
-        <!-- Call logs -->
-        <permission name="android.permission.READ_CALL_LOG" fixed="false"/>
-        <permission name="android.permission.WRITE_CALL_LOG" fixed="false"/>
-        <!-- Used to set up a Wi-Fi P2P network -->
-        <permission name="android.permission.NEARBY_WIFI_DEVICES" fixed="false"/>
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-
-    <exception
-            package="com.verizon.mips.services">
-        <!-- Call -->
-        <permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false"/>
-        <!-- Phone -->
-        <permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
-        <!-- SMS -->
-        <permission name="android.permission.RECEIVE_SMS" fixed="false"/>
-    </exception>
-
-    <exception
-        package="com.google.android.factorytest">
-        <!-- Camera -->
-        <permission name="android.permission.CAMERA" fixed="false"/>
-        <!-- Microphone -->
-        <permission name="android.permission.RECORD_AUDIO" fixed="false"/>
-        <!-- Storage -->
-        <permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
-        <permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="false"/>
-    </exception>
-
-    <exception package="com.google.android.wfcactivation">
-        <!-- SMS -->
-        <permission name="android.permission.RECEIVE_WAP_PUSH" fixed="false"/>
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-
-    <exception package="com.google.android.apps.accessibility.voiceaccess">
-        <!-- Voice Access: A11y app to allow users to setup & control their devices with voice -->
-        <!-- Approved android bug for pregrant permissions: b/182307492 -->
-
-        <!-- Phone state to turn off Voice Access when user is in a phone call -->
-        <permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
-
-        <!-- Microphone: To hear user's voice commands -->
-        <permission name="android.permission.RECORD_AUDIO" fixed="false"/>
-    </exception>
-    <exception
-        package="com.google.android.deskclock">
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-    <exception
-        package="com.google.android.apps.tips">
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-    <exception
-        package="com.google.android.adservices">
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-    <exception
-        package="com.google.android.apps.mediashell">
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-    <exception
-        package="com.google.android.apps.pixelmigrate">
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-    <exception
-        package="com.google.android.apps.work.oobconfig">
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="true"/>
-    </exception>
-    <exception
-        package="com.google.android.apps.turbo">
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-    <exception
-        package="com.google.android.euicc">
-        <!-- Notifications -->
-        <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
-    </exception>
-
-    <exception package="com.google.android.apps.pixel.relationships">
-        <!-- Contacts -->
-        <permission name="android.permission.READ_CALL_LOG" fixed="false"/>
-        <permission name="android.permission.READ_CONTACTS" fixed="false"/>
-        <permission name="android.permission.WRITE_CONTACTS" fixed="false"/>
-    </exception>
 </exceptions>
diff --git a/device-omni.mk b/device-omni.mk
new file mode 100644
index 0000000..2ed29e5
--- /dev/null
+++ b/device-omni.mk
@@ -0,0 +1,23 @@
+DEVICE_PACKAGE_OVERLAYS += device/google/gs101/overlay-omni
+
+# Camera
+PRODUCT_PRODUCT_PROPERTIES += \
+    ro.vendor.camera.extensions.package=com.google.android.apps.camera.services \
+    ro.vendor.camera.extensions.service=com.google.android.apps.camera.services.extensions.service.PixelExtensions
+
+PRODUCT_SYSTEM_PROPERTIES += \
+    ro.camerax.extensions.enabled=true
+
+# EUICC
+PRODUCT_PACKAGES += \
+    EuiccSupportPixelOverlay
+
+# custom A/B postinstall
+PRODUCT_PACKAGES += \
+    omnipreopt_script
+
+AB_OTA_POSTINSTALL_CONFIG += \
+    RUN_POSTINSTALL_system=true \
+    POSTINSTALL_PATH_system=system/bin/omnipreopt_script \
+    FILESYSTEM_TYPE_system=ext4 \
+    POSTINSTALL_OPTIONAL_system=true
diff --git a/device.mk b/device.mk
index b0cd066..0f52403 100644
--- a/device.mk
+++ b/device.mk
@@ -50,7 +50,8 @@
 LOCAL_64ONLY := _64
 endif
 
-AB_OTA_POSTINSTALL_CONFIG += \
+# replaced from device-omni.mk
+#AB_OTA_POSTINSTALL_CONFIG += \
 	RUN_POSTINSTALL_system=true \
 	POSTINSTALL_PATH_system=system/bin/otapreopt_script \
 	FILESYSTEM_TYPE_system=ext4 \
@@ -559,7 +560,6 @@
 
 # WiFi
 PRODUCT_PACKAGES += \
-	android.hardware.wifi-service \
 	wificond \
 	libwpa_client \
 	WifiOverlay \
diff --git a/manifest_radio.xml b/manifest_radio.xml
new file mode 100644
index 0000000..c2554b0
--- /dev/null
+++ b/manifest_radio.xml
@@ -0,0 +1,26 @@
+<manifest version="1.0" type="device">
+    <hal format="hidl">
+        <name>android.hardware.radio</name>
+        <transport>hwbinder</transport>
+        <fqname>@1.2::ISap/slot1</fqname>
+        <fqname>@1.2::ISap/slot2</fqname>
+        <fqname>@1.6::IRadio/slot1</fqname>
+        <fqname>@1.6::IRadio/slot2</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.radio.config</name>
+        <transport>hwbinder</transport>
+        <fqname>@1.1::IRadioConfig/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.secure_element</name>
+        <transport>hwbinder</transport>
+        <fqname>@1.2::ISecureElement/SIM1</fqname>
+        <fqname>@1.2::ISecureElement/SIM2</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>vendor.samsung_slsi.telephony.hardware.radioExternal</name>
+        <transport>hwbinder</transport>
+        <fqname>@1.1::IOemSlsiRadioExternal/rilExternal</fqname>
+    </hal>
+</manifest>
diff --git a/overlay-omni/frameworks/base/core/res/res/values/config.xml b/overlay-omni/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..902175e
--- /dev/null
+++ b/overlay-omni/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2016, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Whether device supports increased touch sensitvity -->
+    <bool name="config_supportGloveMode">true</bool>
+
+    <!-- Exempt ImsService from privacy (location) indicators -->
+    <string name="config_systemTelephonyPackage" translatable="false">com.shannon.imsservice</string>
+
+    <string-array name="config_nightDisplayColorTemperatureCoefficients">
+        <!-- R a-coefficient --> <item>0.0</item>
+        <!-- R b-coefficient --> <item>0.0</item>
+        <!-- R y-intercept --> <item>1.0</item>
+        <!-- G a-coefficient --> <item>-0.000000014365268757</item>
+        <!-- G b-coefficient --> <item>0.000255092801250106</item>
+        <!-- G y-intercept --> <item>-0.064156942434907716</item>
+        <!-- B a-coefficient --> <item>-0.000000000910931179</item>
+        <!-- B b-coefficient --> <item>0.000207598323269139</item>
+        <!-- B y-intercept --> <item>-0.349361641294833436</item>
+    </string-array>
+</resources>
diff --git a/overlay-omni/frameworks/base/core/res/res/values/config_device_idle.xml b/overlay-omni/frameworks/base/core/res/res/values/config_device_idle.xml
new file mode 100644
index 0000000..3d4e942
--- /dev/null
+++ b/overlay-omni/frameworks/base/core/res/res/values/config_device_idle.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2022, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds.  Do not translate.
+
+     NOTE: The naming convention is "config_camelCaseValue". Some legacy
+     entries do not follow the convention, but all new entries should. -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <integer name="device_idle_idle_after_inactive_to_ms">15000</integer>
+  <integer name="device_idle_inactive_to_ms">15000</integer>
+  <integer name="device_idle_locating_to_ms">15000</integer>
+  <integer name="device_idle_motion_inactive_to_ms">30000</integer>
+  <integer name="device_idle_sensing_to_ms">15000</integer>
+</resources>
+
diff --git a/overlay-omni/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay-omni/frameworks/base/packages/SystemUI/res/values/config.xml
new file mode 100644
index 0000000..127ffc7
--- /dev/null
+++ b/overlay-omni/frameworks/base/packages/SystemUI/res/values/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+
+    <!-- Should we vibrate on an icon animation of the shelf. This should only be active if the
+     vibrator is capable of subtle vibrations -->
+    <bool name="config_vibrateOnIconAnimation">true</bool>
+
+    <!-- Whether to show a warning notification when device's skin temperature is high. -->
+    <integer name="config_showTemperatureWarning">1</integer>
+
+    <!-- Whether to show a alarm dialog when device's usb port is overheating. -->
+    <integer name="config_showUsbPortAlarm">1</integer>
+
+</resources>
diff --git a/overlay-omni/packages/apps/Settings/res/values/config.xml b/overlay-omni/packages/apps/Settings/res/values/config.xml
new file mode 100755
index 0000000..e42442e
--- /dev/null
+++ b/overlay-omni/packages/apps/Settings/res/values/config.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2021 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <!-- Whether to show Smooth Display feature in Settings Options -->
+    <bool name="config_show_smooth_display">true</bool>
+
+    <!-- Display settings screen, Color mode options. Must be the same length and order as
+         config_color_mode_options_strings above. Only the values that also appear in
+         frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
+    <integer-array name="config_color_mode_options_values" translatable="false">
+        <item>0</item>
+        <item>256</item>
+        <item>2</item>
+        <item>3</item>
+    </integer-array>
+
+    <!-- The number of vibration intensity levels supported by the device.
+
+         Note that this should correspond to the ability to vary the vibration amplitude, with
+         enough dynamic range to have at least as many distinct intensity levels as defined here.
+
+         Supported values are 1, 2, 3. If '1', the settings app will use a toggle for the settings,
+         otherwise a slider. If '3', the settings app maps intensities directly to the levels
+         supported by the Vibrator HAL APIs. If '2', then the levels will be mapped to
+         VIBRATION_INTENSITY_LOW and VIBRATION_INTENSITY_HIGH, which gives the most range for
+         scaling vibrations. The medium intensity will be skipped.
+
+         The default intensity values are configured at
+         frameworks/base/core/res/res/values/config.xml's config_default[type]VibrationIntensity.
+         Make sure that each default intensity value is consistent with the supported levels set
+         here. If this settings supports only 2 levels, for example, then the default intensity
+         should be either LOW (1) or HIGH (3).
+    -->
+    <integer name="config_vibration_supported_intensity_levels">3</integer>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 964ebf6..3406a42 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -103,11 +103,6 @@
     <dimen name="status_bar_height_default">28dp</dimen>
     <dimen name="status_bar_height_portrait">28dp</dimen>
 
-    <!-- Height of area above QQS where battery/time go (equal to status bar height if > 48dp) -->
-    <dimen name="quick_qs_offset_height">171px</dimen>
-    <!-- Total height of QQS (quick_qs_offset_height + 128dp) -->
-    <dimen name="quick_qs_total_height">177dp</dimen>
-
     <!-- Shutdown if the battery temperature exceeds (this value * 0.1) Celsius. -->
     <integer name="config_shutdownBatteryTemperature">600</integer>
 
@@ -182,6 +177,7 @@
     <integer-array name="config_availableColorModes">
         <item>0</item> <!-- COLOR_MODE_NATURAL -->
         <item>256</item> <!-- vendor color mode boosted -->
+        <item>2</item> <!-- COLOR_MODE_SATURATED -->
         <item>3</item> <!-- COLOR_MODE_AUTOMATIC -->
     </integer-array>
 
@@ -231,12 +227,9 @@
         <item>"/system/framework/framework.jar"</item>
         <item>"/system/framework/services.jar"</item>
         <item>"/system/bin/surfaceflinger"</item>
-        <item>"/system_ext/priv-app/SystemUIGoogle/SystemUIGoogle.apk"</item>
+        <item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
     </string-array>
 
-    <!-- Should the pinner service pin the Camera application? -->
-    <bool name="config_pinnerCameraApp">true</bool>
-
     <!-- Bytes that the PinnerService will pin for Home app -->
     <integer name="config_pinnerHomePinBytes">6291456</integer>
 
diff --git a/telephony/user.mk b/telephony/user.mk
index f75596f..526af0e 100644
--- a/telephony/user.mk
+++ b/telephony/user.mk
@@ -1,2 +1,4 @@
+ifneq ($(wildcard vendor/samsung_slsi/telephony/),)
 PRODUCT_COPY_FILES += vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device/samsung/init.radio.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.radio.sh
+endif
 BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs101-sepolicy/telephony/user/