From efeae17b03e43c24e33a7a9829d08530e714f31e Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Wed, 13 Sep 2023 18:20:41 +0100 Subject: [PATCH] feat: Sync with latest sources of TrebleDroid and Pixel Experience (ci-20230830,ci-20230905) --- ...003-treble-Force-enable-WifiDisplay.patch} | 14 +- ...ners-padding-overridable-with-persis.patch | 63 ------ ...s-Allow-disabling-of-fingerprint-cle.patch | 2 +- ...tore-illumination-dot-for-global-hbm.patch | 2 +- ...ce-Add-support-for-workaround-side-f.patch | 2 +- ...llow-wildcard-in-RRO-system-property.patch | 49 ++++ ...0001-Disable-vendor-mismatch-warning.patch | 2 +- ...id-autobrightness-if-brightness-valu.patch | 2 +- ...Fix-env-empty-string-ANDROID_STORAGE.patch | 2 +- ...d-support-for-app-signature-spoofing.patch | 2 +- ...h-if-there-is-IR-HAL-is-not-declared.patch | 2 +- ...istent-property-to-override-the-defa.patch | 2 +- ...-Show-APN-Settings-for-CDMA-carriers.patch | 2 +- ...s-so-that-it-works-even-without-qtag.patch | 2 +- ...-Support-samsung-Pie-and-Q-light-hal.patch | 2 +- ...samsung-touch-physical-and-hover-pro.patch | 2 +- ...erriding-the-number-of-work-profiles.patch | 2 +- ...-wake-up-devices-just-as-well-as-bac.patch | 2 +- ...e-proximity-sensor-reporting-NaN-as-.patch | 2 +- ...ange-not-being-complete-on-Samsung-d.patch | 2 +- ...atch-like-behaviour-for-RRO-java-sid.patch | 2 +- ...otification-about-console-service-be.patch | 2 +- ...t-Remove-unused-SystemProperties.set.patch | 2 +- ...nyManager-bring-back-getNetworkClass.patch | 2 +- ...-add-API-annotations-for-setTelephon.patch | 2 +- .../0021-Fix-Wakelock-issue.patch | 2 +- ...tect-pick-up-sensor-so-that-an-overl.patch | 2 +- ...nBuiltInDisplayCutoutRectApproximati.patch | 2 +- ...t-Fix-backlight-control-on-Galaxy-S9.patch | 2 +- ...ch-long-press-power-behavior-in-AOSP.patch | 2 +- ...e-Samsung-Power-hal-in-libpowermanag.patch | 2 +- ...of-fingerprint-cleanups-needed-on-so.patch | 2 +- ...of-udfps-enroll-progress-bar.-Some-d.patch | 2 +- ...ze-boot-animation-to-match-screen-si.patch | 2 +- ...more-FDE-methods-from-StorageManager.patch | 2 +- ...ngerprint-sensors-to-security-strong.patch | 2 +- ...SehSysInputDev-to-report-screen-stat.patch | 2 +- ...original-commit-only-cares-about-R-v.patch | 2 +- ...ort-for-Asus-ZF8-and-Samsung-devices.patch | 2 +- ...fingerprint-config-Galaxy-A53-is-mis.patch | 2 +- ...nt-alternate-brightness-path-for-FOD.patch | 2 +- ...x-bootanimation-when-using-mask-shin.patch | 2 +- ...-constrainNitsAndBacklightArrays-and.patch | 2 +- ...40-Add-Mediatek-power-hints-on-touch.patch | 2 +- ...Detect-Moto-dynamic-hardware-feature.patch | 2 +- ...mi-FOD-implementation-for-recent-Xia.patch | 209 ++++++++++++++++++ pe.mk | 3 - 47 files changed, 307 insertions(+), 115 deletions(-) rename patches/personal/device_phh_treble/{0003-treble-Force-enable-Wireless-Display.patch => 0003-treble-Force-enable-WifiDisplay.patch} (52%) delete mode 100644 patches/personal/platform_frameworks_base/0001-Make-rounded-corners-padding-overridable-with-persis.patch create mode 100644 patches/prerequisite/platform_frameworks_base/0004-Revert-core-pm-Allow-wildcard-in-RRO-system-property.patch create mode 100644 patches/trebledroid/platform_frameworks_base/0042-Add-initial-Xiaomi-FOD-implementation-for-recent-Xia.patch diff --git a/patches/personal/device_phh_treble/0003-treble-Force-enable-Wireless-Display.patch b/patches/personal/device_phh_treble/0003-treble-Force-enable-WifiDisplay.patch similarity index 52% rename from patches/personal/device_phh_treble/0003-treble-Force-enable-Wireless-Display.patch rename to patches/personal/device_phh_treble/0003-treble-Force-enable-WifiDisplay.patch index 651ca971..304bb4c8 100644 --- a/patches/personal/device_phh_treble/0003-treble-Force-enable-Wireless-Display.patch +++ b/patches/personal/device_phh_treble/0003-treble-Force-enable-WifiDisplay.patch @@ -1,22 +1,22 @@ From 965a8782b744b61291b827ee5506d449aa6e94f4 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Sun, 7 May 2023 22:39:30 +0000 -Subject: [PATCH 3/3] treble: Force enable Wireless Display +Subject: [PATCH 3/3] treble: Force enable WifiDisplay --- system.prop | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system.prop b/system.prop -index fa2a5c9..6270c41 100644 +index 986cb09..0ac85e3 100644 --- a/system.prop +++ b/system.prop -@@ -49,3 +49,6 @@ bluetooth.profile.sap.server.enabled?=true - - # Samsung vendors default to a Samsung-specific gadget for MTP. Set this to use AOSP's functionfs MTP - vendor.usb.use_ffs_mtp=1 +@@ -53,3 +53,6 @@ vendor.usb.use_ffs_mtp=1 + # Override media volume steps + ro.config.media_vol_steps=25 + ro.config.media_vol_default=8 + -+# Wireless Display ++# WifiDisplay +persist.debug.wfd.enable=1 -- 2.34.1 diff --git a/patches/personal/platform_frameworks_base/0001-Make-rounded-corners-padding-overridable-with-persis.patch b/patches/personal/platform_frameworks_base/0001-Make-rounded-corners-padding-overridable-with-persis.patch deleted file mode 100644 index e7896046..00000000 --- a/patches/personal/platform_frameworks_base/0001-Make-rounded-corners-padding-overridable-with-persis.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 780d66240e6de18aeadfa53e42d790fa5e74619c Mon Sep 17 00:00:00 2001 -From: Pierre-Hugues Husson -Date: Sun, 6 Dec 2020 12:20:08 +0100 -Subject: [PATCH] Make rounded corners padding overridable with - persist.sys.phh.rounded_corners_padding - -Change-Id: I481c1c8849b2f22a7cdfb2896a6d3c2e7e3b44d9 ---- - .../systemui/statusbar/phone/KeyguardStatusBarView.java | 7 +++++-- - .../statusbar/phone/StatusBarContentInsetsProvider.kt | 5 ++++- - 2 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java -index 13566ef8c630..58af9e36bfc9 100644 ---- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java -+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java -@@ -29,6 +29,7 @@ import android.graphics.drawable.Drawable; - import android.os.Trace; - import android.util.AttributeSet; - import android.util.Pair; -+import android.os.SystemProperties; - import android.util.TypedValue; - import android.view.DisplayCutout; - import android.view.Gravity; -@@ -198,8 +199,10 @@ public class KeyguardStatusBarView extends RelativeLayout { - R.dimen.display_cutout_margin_consumption); - mShowPercentAvailable = getContext().getResources().getBoolean( - com.android.internal.R.bool.config_battery_percentage_setting_available); -- mRoundedCornerPadding = res.getDimensionPixelSize( -- R.dimen.rounded_corner_content_padding); -+ mRoundedCornerPadding = SystemProperties.getInt("persist.sys.phh.rounded_corners_padding", -1); -+ if(mRoundedCornerPadding == -1) -+ mRoundedCornerPadding = res.getDimensionPixelSize( -+ R.dimen.rounded_corner_content_padding); - } - - private void updateVisibilities() { -diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt -index c850d4f9c56b..af12f592398b 100644 ---- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt -+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt -@@ -39,6 +39,7 @@ import com.android.systemui.util.leak.RotationUtils.Rotation - import com.android.systemui.util.leak.RotationUtils.getExactRotation - import com.android.systemui.util.leak.RotationUtils.getResourcesForRotation - import com.android.systemui.util.traceSection -+import android.os.SystemProperties - - import java.io.PrintWriter - import java.lang.Math.max -@@ -231,7 +232,9 @@ class StatusBarContentInsetsProvider @Inject constructor( - ): Rect { - val currentRotation = getExactRotation(context) - -- val roundedCornerPadding = rotatedResources -+ var roundedCornerPadding = SystemProperties.getInt("persist.sys.phh.rounded_corners_padding", -1); -+ if(roundedCornerPadding == -1) -+ roundedCornerPadding = rotatedResources - .getDimensionPixelSize(R.dimen.rounded_corner_content_padding) - val minDotPadding = if (isPrivacyDotEnabled) - rotatedResources.getDimensionPixelSize(R.dimen.ongoing_appops_dot_min_padding) --- -2.25.1 - diff --git a/patches/prerequisite/platform_frameworks_base/0001-Revert-Biometrics-Allow-disabling-of-fingerprint-cle.patch b/patches/prerequisite/platform_frameworks_base/0001-Revert-Biometrics-Allow-disabling-of-fingerprint-cle.patch index 8fcef9b5..be653b74 100644 --- a/patches/prerequisite/platform_frameworks_base/0001-Revert-Biometrics-Allow-disabling-of-fingerprint-cle.patch +++ b/patches/prerequisite/platform_frameworks_base/0001-Revert-Biometrics-Allow-disabling-of-fingerprint-cle.patch @@ -1,7 +1,7 @@ From 5c9cd9cce43b6f3b1f0f5d5002631f00ee007fce Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Sun, 16 Oct 2022 16:46:23 +0100 -Subject: [PATCH 1/3] Revert "Biometrics: Allow disabling of fingerprint cleanups" +Subject: [PATCH 1/4] Revert "Biometrics: Allow disabling of fingerprint cleanups" This reverts commit f4d94e695e8107fd5fcd043a3174c4d9583277a9. --- diff --git a/patches/prerequisite/platform_frameworks_base/0002-Revert-udfps-Restore-illumination-dot-for-global-hbm.patch b/patches/prerequisite/platform_frameworks_base/0002-Revert-udfps-Restore-illumination-dot-for-global-hbm.patch index ae8e4c31..f1a14be0 100644 --- a/patches/prerequisite/platform_frameworks_base/0002-Revert-udfps-Restore-illumination-dot-for-global-hbm.patch +++ b/patches/prerequisite/platform_frameworks_base/0002-Revert-udfps-Restore-illumination-dot-for-global-hbm.patch @@ -1,7 +1,7 @@ From b26431544c2188cf29d44ec628338fca735a1c11 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Wed, 4 Jan 2023 09:59:33 +0000 -Subject: [PATCH 2/3] Revert "udfps: Restore illumination dot for global hbm" +Subject: [PATCH 2/4] Revert "udfps: Restore illumination dot for global hbm" This reverts commit 845824efebf4ac6d24dfa702a37b11706031fd06. diff --git a/patches/prerequisite/platform_frameworks_base/0003-Revert-AuthService-Add-support-for-workaround-side-f.patch b/patches/prerequisite/platform_frameworks_base/0003-Revert-AuthService-Add-support-for-workaround-side-f.patch index c4fe58d9..7938f4cc 100644 --- a/patches/prerequisite/platform_frameworks_base/0003-Revert-AuthService-Add-support-for-workaround-side-f.patch +++ b/patches/prerequisite/platform_frameworks_base/0003-Revert-AuthService-Add-support-for-workaround-side-f.patch @@ -1,7 +1,7 @@ From 634e1840fad216d8950e0098d971ff4a35d176e0 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Mon, 23 Jan 2023 16:28:11 +0000 -Subject: [PATCH 3/3] Revert "AuthService: Add support for workaround side fps +Subject: [PATCH 3/4] Revert "AuthService: Add support for workaround side fps props" This reverts commit 065de1bce99b5be01f967beb5f573e616bcb4f15. diff --git a/patches/prerequisite/platform_frameworks_base/0004-Revert-core-pm-Allow-wildcard-in-RRO-system-property.patch b/patches/prerequisite/platform_frameworks_base/0004-Revert-core-pm-Allow-wildcard-in-RRO-system-property.patch new file mode 100644 index 00000000..8596101f --- /dev/null +++ b/patches/prerequisite/platform_frameworks_base/0004-Revert-core-pm-Allow-wildcard-in-RRO-system-property.patch @@ -0,0 +1,49 @@ +From 7bba06b86b03fcf3f673f4099f61c3ef043c9d1c Mon Sep 17 00:00:00 2001 +From: Alberto Ponces +Date: Wed, 13 Sep 2023 11:24:15 +0000 +Subject: [PATCH 4/4] Revert "core: pm: Allow wildcard in RRO system property + value checks" + +This reverts commit 2d8e30614ff873ee83203a92eba62f263a001eee. +--- + .../pm/parsing/FrameworkParsingPackageUtils.java | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +diff --git a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java +index b75ba82ad091..3e1c5bb3d7ec 100644 +--- a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java ++++ b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java +@@ -186,8 +186,8 @@ public class FrameworkParsingPackageUtils { + * Returns {@code true} if both the property name and value are empty or if the given system + * property is set to the specified value. Properties can be one or more, and if properties are + * more than one, they must be separated by comma, and count of names and values must be equal, +- * and also every given system property must be set to the corresponding value or it's a +- * wildcard. In all other cases, returns {@code false} ++ * and also every given system property must be set to the corresponding value. ++ * In all other cases, returns {@code false} + */ + public static boolean checkRequiredSystemProperties(@Nullable String rawPropNames, + @Nullable String rawPropValues) { +@@ -213,17 +213,9 @@ public class FrameworkParsingPackageUtils { + return false; + } + for (int i = 0; i < propNames.length; i++) { ++ // Check property value: make sure it is both set and equal to expected value + final String currValue = SystemProperties.get(propNames[i]); +- // 1. Make sure prop is set. +- if (currValue == null) { +- return false; +- } +- // 2. Check next prop if expected value is a wildcard. +- if ("*".equals(propValues[i])) { +- continue; +- } +- // 3. Check if prop is equal to expected value. +- if (!currValue.equals(propValues[i])) { ++ if (!TextUtils.equals(currValue, propValues[i])) { + return false; + } + } +-- +2.34.1 + diff --git a/patches/trebledroid/platform_frameworks_base/0001-Disable-vendor-mismatch-warning.patch b/patches/trebledroid/platform_frameworks_base/0001-Disable-vendor-mismatch-warning.patch index d3cd7fd4..dfc9e815 100644 --- a/patches/trebledroid/platform_frameworks_base/0001-Disable-vendor-mismatch-warning.patch +++ b/patches/trebledroid/platform_frameworks_base/0001-Disable-vendor-mismatch-warning.patch @@ -1,7 +1,7 @@ From dd5f04527f516b9d29f0880c369850c988bf5954 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 5 Apr 2018 10:01:19 +0800 -Subject: [PATCH 01/41] Disable vendor mismatch warning +Subject: [PATCH 01/42] Disable vendor mismatch warning Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b --- diff --git a/patches/trebledroid/platform_frameworks_base/0002-Fallback-to-stupid-autobrightness-if-brightness-valu.patch b/patches/trebledroid/platform_frameworks_base/0002-Fallback-to-stupid-autobrightness-if-brightness-valu.patch index 9c2fcde1..9749b6e3 100644 --- a/patches/trebledroid/platform_frameworks_base/0002-Fallback-to-stupid-autobrightness-if-brightness-valu.patch +++ b/patches/trebledroid/platform_frameworks_base/0002-Fallback-to-stupid-autobrightness-if-brightness-valu.patch @@ -1,7 +1,7 @@ From 3cb9a996acd0b18c8e8fc795a6ad0d2a16b86192 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 5 Oct 2021 17:59:16 -0400 -Subject: [PATCH 02/41] Fallback to stupid autobrightness if brightness values +Subject: [PATCH 02/42] Fallback to stupid autobrightness if brightness values are broken This is needed because of: diff --git a/patches/trebledroid/platform_frameworks_base/0003-Fix-env-empty-string-ANDROID_STORAGE.patch b/patches/trebledroid/platform_frameworks_base/0003-Fix-env-empty-string-ANDROID_STORAGE.patch index 575873d1..c4200b9e 100644 --- a/patches/trebledroid/platform_frameworks_base/0003-Fix-env-empty-string-ANDROID_STORAGE.patch +++ b/patches/trebledroid/platform_frameworks_base/0003-Fix-env-empty-string-ANDROID_STORAGE.patch @@ -1,7 +1,7 @@ From cad0be943e66c3699978426224aa88fdccc76f57 Mon Sep 17 00:00:00 2001 From: Raphael Mounier Date: Sat, 6 Aug 2022 18:08:36 +0200 -Subject: [PATCH 03/41] Fix env empty string - ANDROID_STORAGE +Subject: [PATCH 03/42] Fix env empty string - ANDROID_STORAGE Huawei hi6250 define in init.hi6250.rc ANDROID_STORAGE to "", so check empty string and replace with default path. Apply change for all env directory --- diff --git a/patches/trebledroid/platform_frameworks_base/0005-Add-support-for-app-signature-spoofing.patch b/patches/trebledroid/platform_frameworks_base/0005-Add-support-for-app-signature-spoofing.patch index a1b2d27c..1b219095 100644 --- a/patches/trebledroid/platform_frameworks_base/0005-Add-support-for-app-signature-spoofing.patch +++ b/patches/trebledroid/platform_frameworks_base/0005-Add-support-for-app-signature-spoofing.patch @@ -1,7 +1,7 @@ From 6e1730890226b81f066bc406d252eca2755bbf1a Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sat, 16 Oct 2021 05:27:57 -0700 -Subject: [PATCH 05/41] Add support for app signature spoofing +Subject: [PATCH 05/42] Add support for app signature spoofing This is needed by microG GmsCore to pretend to be the official Google Play Services package, because client apps check the package signature diff --git a/patches/trebledroid/platform_frameworks_base/0006-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch b/patches/trebledroid/platform_frameworks_base/0006-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch index 63dfdc1b..918f0d42 100644 --- a/patches/trebledroid/platform_frameworks_base/0006-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch +++ b/patches/trebledroid/platform_frameworks_base/0006-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch @@ -1,7 +1,7 @@ From c50f5495f8354163524edd70a1b0486b5b2c0ba5 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 17 May 2018 20:28:35 +0200 -Subject: [PATCH 06/41] Don't crash if there is IR HAL is not declared +Subject: [PATCH 06/42] Don't crash if there is IR HAL is not declared Change-Id: I3afded27441bbee8244d5fda544b3e6d1238dc1b --- diff --git a/patches/trebledroid/platform_frameworks_base/0007-Implement-a-persistent-property-to-override-the-defa.patch b/patches/trebledroid/platform_frameworks_base/0007-Implement-a-persistent-property-to-override-the-defa.patch index e1a8b1b9..e3834014 100644 --- a/patches/trebledroid/platform_frameworks_base/0007-Implement-a-persistent-property-to-override-the-defa.patch +++ b/patches/trebledroid/platform_frameworks_base/0007-Implement-a-persistent-property-to-override-the-defa.patch @@ -1,7 +1,7 @@ From 4989f0c12573887465bdec33d79725b0af3d0895 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 1 Jun 2022 16:56:20 -0400 -Subject: [PATCH 07/41] Implement a persistent property to override the default +Subject: [PATCH 07/42] Implement a persistent property to override the default primary camera (0) Change-Id: I49b45d00bf71d7932591b3516d49a680e1b6568b diff --git a/patches/trebledroid/platform_frameworks_base/0008-Show-APN-Settings-for-CDMA-carriers.patch b/patches/trebledroid/platform_frameworks_base/0008-Show-APN-Settings-for-CDMA-carriers.patch index 6429ffde..031add7b 100644 --- a/patches/trebledroid/platform_frameworks_base/0008-Show-APN-Settings-for-CDMA-carriers.patch +++ b/patches/trebledroid/platform_frameworks_base/0008-Show-APN-Settings-for-CDMA-carriers.patch @@ -1,7 +1,7 @@ From 24a73637a51b62872071165d3270591b8b60aca1 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 6 Aug 2018 12:49:00 +0200 -Subject: [PATCH 08/41] Show APN Settings for CDMA carriers +Subject: [PATCH 08/42] Show APN Settings for CDMA carriers --- telephony/java/android/telephony/CarrierConfigManager.java | 2 +- diff --git a/patches/trebledroid/platform_frameworks_base/0009-Re-order-services-so-that-it-works-even-without-qtag.patch b/patches/trebledroid/platform_frameworks_base/0009-Re-order-services-so-that-it-works-even-without-qtag.patch index 9dad0c2a..626c05db 100644 --- a/patches/trebledroid/platform_frameworks_base/0009-Re-order-services-so-that-it-works-even-without-qtag.patch +++ b/patches/trebledroid/platform_frameworks_base/0009-Re-order-services-so-that-it-works-even-without-qtag.patch @@ -1,7 +1,7 @@ From eb97b9394d81ca4cc349189870849aa104bb9235 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 8 Nov 2018 23:04:03 +0100 -Subject: [PATCH 09/41] Re-order services so that it works even without qtaguid +Subject: [PATCH 09/42] Re-order services so that it works even without qtaguid Change-Id: I0c0f527b3ae151d45c68f7ac6c205da3f34e74df --- diff --git a/patches/trebledroid/platform_frameworks_base/0010-Support-samsung-Pie-and-Q-light-hal.patch b/patches/trebledroid/platform_frameworks_base/0010-Support-samsung-Pie-and-Q-light-hal.patch index 80c2c145..f0cf9247 100644 --- a/patches/trebledroid/platform_frameworks_base/0010-Support-samsung-Pie-and-Q-light-hal.patch +++ b/patches/trebledroid/platform_frameworks_base/0010-Support-samsung-Pie-and-Q-light-hal.patch @@ -1,7 +1,7 @@ From 40d6977f78106d0d7cd425b17dded76d2514b9f8 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 24 Mar 2019 23:05:14 +0100 -Subject: [PATCH 10/41] Support samsung Pie and Q light hal +Subject: [PATCH 10/42] Support samsung Pie and Q light hal Change-Id: I01f94acd7d0672733e48854d80368f9ac6f861c6 --- diff --git a/patches/trebledroid/platform_frameworks_base/0011-Add-support-for-samsung-touch-physical-and-hover-pro.patch b/patches/trebledroid/platform_frameworks_base/0011-Add-support-for-samsung-touch-physical-and-hover-pro.patch index aa1927cb..3baeb1a1 100644 --- a/patches/trebledroid/platform_frameworks_base/0011-Add-support-for-samsung-touch-physical-and-hover-pro.patch +++ b/patches/trebledroid/platform_frameworks_base/0011-Add-support-for-samsung-touch-physical-and-hover-pro.patch @@ -1,7 +1,7 @@ From 1de28985fd66076c88e5f0f940f53570d14ed359 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 12 Aug 2019 23:08:26 +0200 -Subject: [PATCH 11/41] Add support for samsung touch, physical and hover +Subject: [PATCH 11/42] Add support for samsung touch, physical and hover proximity sensor as fallback to real proximity sensor Change-Id: I7a0f8b4665c802140d19197d850b77b2a7ac1865 diff --git a/patches/trebledroid/platform_frameworks_base/0012-Always-allow-overriding-the-number-of-work-profiles.patch b/patches/trebledroid/platform_frameworks_base/0012-Always-allow-overriding-the-number-of-work-profiles.patch index bf348236..34feeb28 100644 --- a/patches/trebledroid/platform_frameworks_base/0012-Always-allow-overriding-the-number-of-work-profiles.patch +++ b/patches/trebledroid/platform_frameworks_base/0012-Always-allow-overriding-the-number-of-work-profiles.patch @@ -1,7 +1,7 @@ From 164389e58c9c7bde6c6227f794e6c02753e42a4b Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 5 Apr 2020 16:32:46 +0200 -Subject: [PATCH 12/41] Always allow overriding the number of work profiles +Subject: [PATCH 12/42] Always allow overriding the number of work profiles Change-Id: I6eb09aa71663c6fbe7563e3038bffcabdba0ff6a --- diff --git a/patches/trebledroid/platform_frameworks_base/0013-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch b/patches/trebledroid/platform_frameworks_base/0013-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch index 0c06415f..7e56fd79 100644 --- a/patches/trebledroid/platform_frameworks_base/0013-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch +++ b/patches/trebledroid/platform_frameworks_base/0013-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch @@ -1,7 +1,7 @@ From af7c4f8dbb3df3e0fa72a270aea6e99844cb4475 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 6 Jun 2020 18:21:56 +0200 -Subject: [PATCH 13/41] HOME deserves to wake-up devices just as well as back +Subject: [PATCH 13/42] HOME deserves to wake-up devices just as well as back and menu Change-Id: Ia562bafd8c620d00c17e8eb338e4701c6c4a3c3a diff --git a/patches/trebledroid/platform_frameworks_base/0014-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch b/patches/trebledroid/platform_frameworks_base/0014-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch index c01447e2..e0c37f9e 100644 --- a/patches/trebledroid/platform_frameworks_base/0014-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch +++ b/patches/trebledroid/platform_frameworks_base/0014-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch @@ -1,7 +1,7 @@ From 8d3db32e7e61573363d5d22215e1776bdf63c503 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 29 Sep 2020 22:39:47 +0200 -Subject: [PATCH 14/41] Some devices have proximity sensor reporting NaN as max +Subject: [PATCH 14/42] Some devices have proximity sensor reporting NaN as max range for some reason. Make them behave standard way by setting 5 cm Change-Id: I3c39e3e914a05903c140235702e0480d2d58a612 diff --git a/patches/trebledroid/platform_frameworks_base/0015-Fix-brightness-range-not-being-complete-on-Samsung-d.patch b/patches/trebledroid/platform_frameworks_base/0015-Fix-brightness-range-not-being-complete-on-Samsung-d.patch index 3b62c804..b987e281 100644 --- a/patches/trebledroid/platform_frameworks_base/0015-Fix-brightness-range-not-being-complete-on-Samsung-d.patch +++ b/patches/trebledroid/platform_frameworks_base/0015-Fix-brightness-range-not-being-complete-on-Samsung-d.patch @@ -1,7 +1,7 @@ From a976f4f5c99d23bf747a95f8d4ae6b57d64d5a97 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 29 Sep 2020 22:40:10 +0200 -Subject: [PATCH 15/41] Fix brightness range not being complete on Samsung +Subject: [PATCH 15/42] Fix brightness range not being complete on Samsung devices On some devices, minimum brightness is 0, which totally messes with diff --git a/patches/trebledroid/platform_frameworks_base/0016-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch b/patches/trebledroid/platform_frameworks_base/0016-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch index 8dd025e3..eb73ec7c 100644 --- a/patches/trebledroid/platform_frameworks_base/0016-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch +++ b/patches/trebledroid/platform_frameworks_base/0016-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch @@ -1,7 +1,7 @@ From 0bfbc4c831e0bddc0c6f6632e8c75523ffc908f9 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 25 Oct 2020 23:57:26 +0100 -Subject: [PATCH 16/41] Re-implement fnmatch-like behaviour for RRO java-side +Subject: [PATCH 16/42] Re-implement fnmatch-like behaviour for RRO java-side T: Also apply to FrameworkParsingPackageUtils (@PeterCxy) diff --git a/patches/trebledroid/platform_frameworks_base/0017-Remove-useless-notification-about-console-service-be.patch b/patches/trebledroid/platform_frameworks_base/0017-Remove-useless-notification-about-console-service-be.patch index cddf0ccd..bbdc5e30 100644 --- a/patches/trebledroid/platform_frameworks_base/0017-Remove-useless-notification-about-console-service-be.patch +++ b/patches/trebledroid/platform_frameworks_base/0017-Remove-useless-notification-about-console-service-be.patch @@ -1,7 +1,7 @@ From eddf53831fcaa84a5fc8c8598a4b896a53f3f8ae Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 11 Dec 2020 14:41:09 +0100 -Subject: [PATCH 17/41] Remove useless notification about "console" service +Subject: [PATCH 17/42] Remove useless notification about "console" service being running --- diff --git a/patches/trebledroid/platform_frameworks_base/0018-Revert-Remove-unused-SystemProperties.set.patch b/patches/trebledroid/platform_frameworks_base/0018-Revert-Remove-unused-SystemProperties.set.patch index a2f8da2d..a04ac369 100644 --- a/patches/trebledroid/platform_frameworks_base/0018-Revert-Remove-unused-SystemProperties.set.patch +++ b/patches/trebledroid/platform_frameworks_base/0018-Revert-Remove-unused-SystemProperties.set.patch @@ -1,7 +1,7 @@ From 08ec5bf7b6de453cf5f9298ae8387a1aa67cc09c Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 21:24:12 +0800 -Subject: [PATCH 18/41] Revert "Remove unused SystemProperties.set" +Subject: [PATCH 18/42] Revert "Remove unused SystemProperties.set" This reverts commit debb4616ef67f9ed5054eca51ec58592358ff55f. diff --git a/patches/trebledroid/platform_frameworks_base/0019-TelephonyManager-bring-back-getNetworkClass.patch b/patches/trebledroid/platform_frameworks_base/0019-TelephonyManager-bring-back-getNetworkClass.patch index af8ebca4..9626b82b 100644 --- a/patches/trebledroid/platform_frameworks_base/0019-TelephonyManager-bring-back-getNetworkClass.patch +++ b/patches/trebledroid/platform_frameworks_base/0019-TelephonyManager-bring-back-getNetworkClass.patch @@ -1,7 +1,7 @@ From 176c48078adb48eadc003661c5511e099562af29 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 13:46:15 +0800 -Subject: [PATCH 19/41] TelephonyManager: bring back getNetworkClass() +Subject: [PATCH 19/42] TelephonyManager: bring back getNetworkClass() This partially reverts commit c058cac051ab083dc7fb7ea6aa85699110b2e9bf. diff --git a/patches/trebledroid/platform_frameworks_base/0020-TelephonyManager-add-API-annotations-for-setTelephon.patch b/patches/trebledroid/platform_frameworks_base/0020-TelephonyManager-add-API-annotations-for-setTelephon.patch index 33d60e9c..e9f9a2bc 100644 --- a/patches/trebledroid/platform_frameworks_base/0020-TelephonyManager-add-API-annotations-for-setTelephon.patch +++ b/patches/trebledroid/platform_frameworks_base/0020-TelephonyManager-add-API-annotations-for-setTelephon.patch @@ -1,7 +1,7 @@ From 4d4e1b0cdbb31a848e744f3c1fc988a56a0c478c Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 21:26:45 +0800 -Subject: [PATCH 20/41] TelephonyManager: add API annotations for +Subject: [PATCH 20/42] TelephonyManager: add API annotations for setTelephonyProperty * This method was added back by reverting commit diff --git a/patches/trebledroid/platform_frameworks_base/0021-Fix-Wakelock-issue.patch b/patches/trebledroid/platform_frameworks_base/0021-Fix-Wakelock-issue.patch index b37f4e15..29d7bf34 100644 --- a/patches/trebledroid/platform_frameworks_base/0021-Fix-Wakelock-issue.patch +++ b/patches/trebledroid/platform_frameworks_base/0021-Fix-Wakelock-issue.patch @@ -1,7 +1,7 @@ From 3c0faf6ba0cf4ee36ede539e0ebcf617549afeef Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Tue, 2 Feb 2021 10:20:51 +0000 -Subject: [PATCH 21/41] Fix Wakelock issue +Subject: [PATCH 21/42] Fix Wakelock issue Prevent SystemUI crash due to "WakeLock under-locked Doze" (issue #12) by only releasing a wakelock that was not already released --- diff --git a/patches/trebledroid/platform_frameworks_base/0022-Automatically-detect-pick-up-sensor-so-that-an-overl.patch b/patches/trebledroid/platform_frameworks_base/0022-Automatically-detect-pick-up-sensor-so-that-an-overl.patch index d6a36fd1..67fe52a9 100644 --- a/patches/trebledroid/platform_frameworks_base/0022-Automatically-detect-pick-up-sensor-so-that-an-overl.patch +++ b/patches/trebledroid/platform_frameworks_base/0022-Automatically-detect-pick-up-sensor-so-that-an-overl.patch @@ -1,7 +1,7 @@ From 214975755dfae5f2b2a265b89214d3e1fd1bdd54 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 20 Mar 2021 14:31:01 +0100 -Subject: [PATCH 22/41] Automatically detect pick up sensor, so that an overlay +Subject: [PATCH 22/42] Automatically detect pick up sensor, so that an overlay is required for the sole purpose of enabling pulse doze on pick up sensor --- diff --git a/patches/trebledroid/platform_frameworks_base/0023-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch b/patches/trebledroid/platform_frameworks_base/0023-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch index 61305caa..16fb6da8 100644 --- a/patches/trebledroid/platform_frameworks_base/0023-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch +++ b/patches/trebledroid/platform_frameworks_base/0023-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch @@ -1,7 +1,7 @@ From 7193d2f219f5b6feedc689d06b50ae7e43a7c433 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 23 Mar 2021 19:43:26 +0100 -Subject: [PATCH 23/41] Catch broken mainBuiltInDisplayCutoutRectApproximation +Subject: [PATCH 23/42] Catch broken mainBuiltInDisplayCutoutRectApproximation Some devices (Redmi Note 9T) have: mainBuiltInDisplayCutoutRectApproximation = @android:mainBuiltInDisplayCutout diff --git a/patches/trebledroid/platform_frameworks_base/0024-backlight-Fix-backlight-control-on-Galaxy-S9.patch b/patches/trebledroid/platform_frameworks_base/0024-backlight-Fix-backlight-control-on-Galaxy-S9.patch index 776bd4d6..56dd9f88 100644 --- a/patches/trebledroid/platform_frameworks_base/0024-backlight-Fix-backlight-control-on-Galaxy-S9.patch +++ b/patches/trebledroid/platform_frameworks_base/0024-backlight-Fix-backlight-control-on-Galaxy-S9.patch @@ -1,7 +1,7 @@ From 33670e08f9a40421e081345be63cec5f11d597f7 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 24 Mar 2018 08:01:48 +0100 -Subject: [PATCH 24/41] backlight: Fix backlight control on Galaxy S9(+) +Subject: [PATCH 24/42] backlight: Fix backlight control on Galaxy S9(+) Change-Id: I1fbbb47939c377597ef8ad6b88b2acea5f4acaa6 diff --git a/patches/trebledroid/platform_frameworks_base/0025-Revert-Switch-long-press-power-behavior-in-AOSP.patch b/patches/trebledroid/platform_frameworks_base/0025-Revert-Switch-long-press-power-behavior-in-AOSP.patch index 1aaea1e8..3598a36d 100644 --- a/patches/trebledroid/platform_frameworks_base/0025-Revert-Switch-long-press-power-behavior-in-AOSP.patch +++ b/patches/trebledroid/platform_frameworks_base/0025-Revert-Switch-long-press-power-behavior-in-AOSP.patch @@ -1,7 +1,7 @@ From 4be42d7a0e772a3aa13e44744c01ad2c7432f5b8 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 4 Sep 2021 08:26:30 +0000 -Subject: [PATCH 25/41] Revert "Switch long-press power behavior in AOSP." +Subject: [PATCH 25/42] Revert "Switch long-press power behavior in AOSP." This reverts commit 803c77a0a24624111944832098c6f65158051dc4. --- diff --git a/patches/trebledroid/platform_frameworks_base/0026-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch b/patches/trebledroid/platform_frameworks_base/0026-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch index be676bc5..751c674a 100644 --- a/patches/trebledroid/platform_frameworks_base/0026-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch +++ b/patches/trebledroid/platform_frameworks_base/0026-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch @@ -1,7 +1,7 @@ From 61cf5dadd82d5378ddda800a9b3b5ad77e679a7d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 27 Dec 2021 17:57:11 -0500 -Subject: [PATCH 26/41] Once we integrate Samsung Power hal in libpowermanager, +Subject: [PATCH 26/42] Once we integrate Samsung Power hal in libpowermanager, libpowermanager and its deps require linking against vendor.samsung.hardware.miscpower@2.0 diff --git a/patches/trebledroid/platform_frameworks_base/0027-Allow-disabling-of-fingerprint-cleanups-needed-on-so.patch b/patches/trebledroid/platform_frameworks_base/0027-Allow-disabling-of-fingerprint-cleanups-needed-on-so.patch index 443342f2..7d43144c 100644 --- a/patches/trebledroid/platform_frameworks_base/0027-Allow-disabling-of-fingerprint-cleanups-needed-on-so.patch +++ b/patches/trebledroid/platform_frameworks_base/0027-Allow-disabling-of-fingerprint-cleanups-needed-on-so.patch @@ -1,7 +1,7 @@ From 865d6d98996995628dba6f9abf8a8cb398cf2216 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 2 Apr 2022 18:04:01 -0400 -Subject: [PATCH 27/41] Allow disabling of fingerprint cleanups, needed on some +Subject: [PATCH 27/42] Allow disabling of fingerprint cleanups, needed on some Realme devices that cant enumerate --- diff --git a/patches/trebledroid/platform_frameworks_base/0028-Reduce-the-size-of-udfps-enroll-progress-bar.-Some-d.patch b/patches/trebledroid/platform_frameworks_base/0028-Reduce-the-size-of-udfps-enroll-progress-bar.-Some-d.patch index 65da7cae..c937a730 100644 --- a/patches/trebledroid/platform_frameworks_base/0028-Reduce-the-size-of-udfps-enroll-progress-bar.-Some-d.patch +++ b/patches/trebledroid/platform_frameworks_base/0028-Reduce-the-size-of-udfps-enroll-progress-bar.-Some-d.patch @@ -1,7 +1,7 @@ From 3b668048f88b9b9659a1056fb6a31ba61c685ea4 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 17 Dec 2021 17:16:14 -0500 -Subject: [PATCH 28/41] Reduce the size of udfps enroll progress bar. Some +Subject: [PATCH 28/42] Reduce the size of udfps enroll progress bar. Some devices have their udfps pretty low, and the progress bar would make the icon at the wrong place diff --git a/patches/trebledroid/platform_frameworks_base/0029-Dynamically-resize-boot-animation-to-match-screen-si.patch b/patches/trebledroid/platform_frameworks_base/0029-Dynamically-resize-boot-animation-to-match-screen-si.patch index d0bdba76..1bd9decc 100644 --- a/patches/trebledroid/platform_frameworks_base/0029-Dynamically-resize-boot-animation-to-match-screen-si.patch +++ b/patches/trebledroid/platform_frameworks_base/0029-Dynamically-resize-boot-animation-to-match-screen-si.patch @@ -1,7 +1,7 @@ From 8d0a5df772234c6ebcda0af344a01c215b86a337 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 20 Dec 2021 15:01:41 -0500 -Subject: [PATCH 29/41] Dynamically resize boot animation to match screen size +Subject: [PATCH 29/42] Dynamically resize boot animation to match screen size Change-Id: I54e49fc6b8c670103852e212d1416e27ff976205 --- diff --git a/patches/trebledroid/platform_frameworks_base/0030-Revert-Remove-more-FDE-methods-from-StorageManager.patch b/patches/trebledroid/platform_frameworks_base/0030-Revert-Remove-more-FDE-methods-from-StorageManager.patch index 7fb4c63a..d783a186 100644 --- a/patches/trebledroid/platform_frameworks_base/0030-Revert-Remove-more-FDE-methods-from-StorageManager.patch +++ b/patches/trebledroid/platform_frameworks_base/0030-Revert-Remove-more-FDE-methods-from-StorageManager.patch @@ -1,7 +1,7 @@ From d15211925a6de00f60a62162591af66589567a9a Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 15 Oct 2022 09:33:56 +0000 -Subject: [PATCH 30/41] Revert "Remove more FDE methods from StorageManager" +Subject: [PATCH 30/42] Revert "Remove more FDE methods from StorageManager" This reverts commit bd13f84152449a3ead6fa8604fd31f48c0224676. --- diff --git a/patches/trebledroid/platform_frameworks_base/0032-Set-old-fingerprint-sensors-to-security-strong.patch b/patches/trebledroid/platform_frameworks_base/0032-Set-old-fingerprint-sensors-to-security-strong.patch index fcc99970..30516bcf 100644 --- a/patches/trebledroid/platform_frameworks_base/0032-Set-old-fingerprint-sensors-to-security-strong.patch +++ b/patches/trebledroid/platform_frameworks_base/0032-Set-old-fingerprint-sensors-to-security-strong.patch @@ -1,7 +1,7 @@ From 011a49d754b789ead651f9e0db56bd8181c112ab Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 3 Dec 2022 17:13:24 -0500 -Subject: [PATCH 32/41] Set old fingerprint sensors to security "strong" +Subject: [PATCH 32/42] Set old fingerprint sensors to security "strong" This allows removing config_biometric_sensors from overlays, which led to Pixels not booting, because they are using AIDL biometric sensor, and diff --git a/patches/trebledroid/platform_frameworks_base/0033-Call-Samsung-s-ISehSysInputDev-to-report-screen-stat.patch b/patches/trebledroid/platform_frameworks_base/0033-Call-Samsung-s-ISehSysInputDev-to-report-screen-stat.patch index 7fd66e40..b929b7a9 100644 --- a/patches/trebledroid/platform_frameworks_base/0033-Call-Samsung-s-ISehSysInputDev-to-report-screen-stat.patch +++ b/patches/trebledroid/platform_frameworks_base/0033-Call-Samsung-s-ISehSysInputDev-to-report-screen-stat.patch @@ -1,7 +1,7 @@ From b7c6cfe1188eee531acc949a6bf680137a38e0c3 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 14 Dec 2022 17:21:00 -0500 -Subject: [PATCH 33/41] Call Samsung's ISehSysInputDev to report screen state +Subject: [PATCH 33/42] Call Samsung's ISehSysInputDev to report screen state to touchscreen driver This fixes touchscreen not waking up on Galaxy F23 diff --git a/patches/trebledroid/platform_frameworks_base/0034-Fixup-of-c50777-original-commit-only-cares-about-R-v.patch b/patches/trebledroid/platform_frameworks_base/0034-Fixup-of-c50777-original-commit-only-cares-about-R-v.patch index dfed3069..b00d21d0 100644 --- a/patches/trebledroid/platform_frameworks_base/0034-Fixup-of-c50777-original-commit-only-cares-about-R-v.patch +++ b/patches/trebledroid/platform_frameworks_base/0034-Fixup-of-c50777-original-commit-only-cares-about-R-v.patch @@ -1,7 +1,7 @@ From 177fd4fc057dfddeaec1686abfb58939e19b85bb Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 15 Dec 2022 15:54:50 -0500 -Subject: [PATCH 34/41] Fixup of c50777 -- original commit only cares about R +Subject: [PATCH 34/42] Fixup of c50777 -- original commit only cares about R vendors, but not about older ones. Apply that on older ones as well --- diff --git a/patches/trebledroid/platform_frameworks_base/0035-FOD-support-for-Asus-ZF8-and-Samsung-devices.patch b/patches/trebledroid/platform_frameworks_base/0035-FOD-support-for-Asus-ZF8-and-Samsung-devices.patch index c3a2d9fd..02d610e8 100644 --- a/patches/trebledroid/platform_frameworks_base/0035-FOD-support-for-Asus-ZF8-and-Samsung-devices.patch +++ b/patches/trebledroid/platform_frameworks_base/0035-FOD-support-for-Asus-ZF8-and-Samsung-devices.patch @@ -1,7 +1,7 @@ From 1b410accdac5f412bf34ec8064382d1595226097 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 18 Dec 2022 18:20:40 -0500 -Subject: [PATCH 35/41] FOD support for Asus ZF8 and Samsung devices +Subject: [PATCH 35/42] FOD support for Asus ZF8 and Samsung devices Thanks Asus for providing a free device to make this support And thanks @davigamer987 for donating enough to get a Samsung FOD device diff --git a/patches/trebledroid/platform_frameworks_base/0036-Always-add-HIDL-fingerprint-config-Galaxy-A53-is-mis.patch b/patches/trebledroid/platform_frameworks_base/0036-Always-add-HIDL-fingerprint-config-Galaxy-A53-is-mis.patch index a5c96f70..86e7385b 100644 --- a/patches/trebledroid/platform_frameworks_base/0036-Always-add-HIDL-fingerprint-config-Galaxy-A53-is-mis.patch +++ b/patches/trebledroid/platform_frameworks_base/0036-Always-add-HIDL-fingerprint-config-Galaxy-A53-is-mis.patch @@ -1,7 +1,7 @@ From 52b9f87be5545b05bdac641fc2646f89a1bbce7a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 3 Jan 2023 17:59:00 -0500 -Subject: [PATCH 36/41] Always add HIDL fingerprint config (Galaxy A53 is +Subject: [PATCH 36/42] Always add HIDL fingerprint config (Galaxy A53 is missing it on A12 vendor) -- but first enumerate AIDL --- diff --git a/patches/trebledroid/platform_frameworks_base/0037-SystemUI-Implement-alternate-brightness-path-for-FOD.patch b/patches/trebledroid/platform_frameworks_base/0037-SystemUI-Implement-alternate-brightness-path-for-FOD.patch index 6c01c6ab..3196c8be 100644 --- a/patches/trebledroid/platform_frameworks_base/0037-SystemUI-Implement-alternate-brightness-path-for-FOD.patch +++ b/patches/trebledroid/platform_frameworks_base/0037-SystemUI-Implement-alternate-brightness-path-for-FOD.patch @@ -1,7 +1,7 @@ From 76ac493824964c94ac2b4d172ebbb0220592a688 Mon Sep 17 00:00:00 2001 From: ItsLynix <71310187+ItsLynix@users.noreply.github.com> Date: Sat, 28 Jan 2023 10:25:16 +0100 -Subject: [PATCH 37/41] SystemUI: Implement alternate brightness path for FOD +Subject: [PATCH 37/42] SystemUI: Implement alternate brightness path for FOD --- .../com/android/systemui/biometrics/UdfpsView.kt | 15 +++++++++++++-- diff --git a/patches/trebledroid/platform_frameworks_base/0038-bootanimation-Fix-bootanimation-when-using-mask-shin.patch b/patches/trebledroid/platform_frameworks_base/0038-bootanimation-Fix-bootanimation-when-using-mask-shin.patch index c11c4b64..cfc7f6b4 100644 --- a/patches/trebledroid/platform_frameworks_base/0038-bootanimation-Fix-bootanimation-when-using-mask-shin.patch +++ b/patches/trebledroid/platform_frameworks_base/0038-bootanimation-Fix-bootanimation-when-using-mask-shin.patch @@ -1,7 +1,7 @@ From 17fcd67ba118704047fb48be063edbdfa1ccfc11 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 10 May 2023 11:28:27 -0400 -Subject: [PATCH 38/41] bootanimation: Fix bootanimation when using mask+shine +Subject: [PATCH 38/42] bootanimation: Fix bootanimation when using mask+shine rather than animation This was broken by the commit that automatically resizes animations diff --git a/patches/trebledroid/platform_frameworks_base/0039-Try-catch-around-constrainNitsAndBacklightArrays-and.patch b/patches/trebledroid/platform_frameworks_base/0039-Try-catch-around-constrainNitsAndBacklightArrays-and.patch index 5ec4650a..4c146c1b 100644 --- a/patches/trebledroid/platform_frameworks_base/0039-Try-catch-around-constrainNitsAndBacklightArrays-and.patch +++ b/patches/trebledroid/platform_frameworks_base/0039-Try-catch-around-constrainNitsAndBacklightArrays-and.patch @@ -1,7 +1,7 @@ From 5188699d352b60340773d110c43a3a8e2e047630 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 2 Jun 2023 19:19:31 -0400 -Subject: [PATCH 39/41] Try catch around constrainNitsAndBacklightArrays, and +Subject: [PATCH 39/42] Try catch around constrainNitsAndBacklightArrays, and falls back to dumb curve. It crashes on Xperia 1 IV. --- diff --git a/patches/trebledroid/platform_frameworks_base/0040-Add-Mediatek-power-hints-on-touch.patch b/patches/trebledroid/platform_frameworks_base/0040-Add-Mediatek-power-hints-on-touch.patch index ae353cce..24f94faa 100644 --- a/patches/trebledroid/platform_frameworks_base/0040-Add-Mediatek-power-hints-on-touch.patch +++ b/patches/trebledroid/platform_frameworks_base/0040-Add-Mediatek-power-hints-on-touch.patch @@ -1,7 +1,7 @@ From a3e26c35f72fcf53f7ac99182570c6300ee40664 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 17 Jun 2023 08:31:55 -0400 -Subject: [PATCH 40/41] Add Mediatek power hints on touch +Subject: [PATCH 40/42] Add Mediatek power hints on touch Mediatek has multiple HALs (which existed concurrently), so it is a bit of a mess. diff --git a/patches/trebledroid/platform_frameworks_base/0041-Detect-Moto-dynamic-hardware-feature.patch b/patches/trebledroid/platform_frameworks_base/0041-Detect-Moto-dynamic-hardware-feature.patch index 497f8773..4b993d12 100644 --- a/patches/trebledroid/platform_frameworks_base/0041-Detect-Moto-dynamic-hardware-feature.patch +++ b/patches/trebledroid/platform_frameworks_base/0041-Detect-Moto-dynamic-hardware-feature.patch @@ -1,7 +1,7 @@ From 5b9136a99bdfe96381f1c6a7286232ec82ce2ff6 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 5 Jul 2023 10:50:36 -0400 -Subject: [PATCH 41/41] Detect Moto dynamic hardware feature +Subject: [PATCH 41/42] Detect Moto dynamic hardware feature Moto added a custom node in sysconfig XMLs: diff --git a/patches/trebledroid/platform_frameworks_base/0042-Add-initial-Xiaomi-FOD-implementation-for-recent-Xia.patch b/patches/trebledroid/platform_frameworks_base/0042-Add-initial-Xiaomi-FOD-implementation-for-recent-Xia.patch new file mode 100644 index 00000000..b0fc242c --- /dev/null +++ b/patches/trebledroid/platform_frameworks_base/0042-Add-initial-Xiaomi-FOD-implementation-for-recent-Xia.patch @@ -0,0 +1,209 @@ +From 77c645d927a5a58dba3f4bf07313fe27e7f13750 Mon Sep 17 00:00:00 2001 +From: jgudec +Date: Fri, 18 Aug 2023 08:41:49 +0100 +Subject: [PATCH 42/42] Add initial Xiaomi FOD implementation for recent Xiaomi + devices + +Huge thanks to phhusson for the help and guidance. +--- + packages/SystemUI/Android.bp | 2 + + .../android/systemui/biometrics/UdfpsView.kt | 43 +++++++++++++++++ + services/core/Android.bp | 1 + + .../server/biometrics/AuthService.java | 46 +++++++++++++++++++ + 4 files changed, 92 insertions(+) + +diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp +index dc2244c94080..8927c967c7d0 100644 +--- a/packages/SystemUI/Android.bp ++++ b/packages/SystemUI/Android.bp +@@ -178,6 +178,8 @@ android_library { + "vendor.lineage.powershare-V1.0-java", + "faceunlock_framework", + "vendor.goodix.hardware.biometrics.fingerprint-V2.1-java", ++ "vendor.xiaomi.hw.touchfeature-V1.0-java", ++ "vendor.xiaomi.hardware.fingerprintextension-V1.0-java" + ], + manifest: "AndroidManifest.xml", + +diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt +index 6cc9ab3da570..8ab00fc34f0d 100644 +--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt ++++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt +@@ -37,6 +37,12 @@ import java.io.File + + import vendor.goodix.hardware.biometrics.fingerprint.V2_1.IGoodixFingerprintDaemon + ++import vendor.xiaomi.hw.touchfeature.V1_0.ITouchFeature ++import vendor.xiaomi.hardware.fingerprintextension.V1_0.IXiaomiFingerprint ++ ++import android.os.Handler ++import android.os.HandlerThread ++ + private const val TAG = "UdfpsView" + + +@@ -220,6 +226,12 @@ Log.d("PHH", "Surface destroyed!") + val hasSamsungMask = File(samsungActualMaskBrightness).exists() + var fodFileObserver: FileObserver? = null + ++ val xiaomiDispParam = "/sys/class/mi_display/disp-DSI-0/disp_param" ++ var hasXiaomiLhbm = File(xiaomiDispParam).exists() ++ ++ private val handlerThread = HandlerThread("UDFPS").also { it.start() } ++ val myHandler = Handler(handlerThread.looper) ++ + fun configureDisplay(onDisplayConfigured: Runnable) { + isDisplayConfigured = true + animationViewController?.onDisplayConfiguring() +@@ -255,6 +267,34 @@ Log.d("PHH", "Surface destroyed!") + if(android.os.SystemProperties.get("ro.vendor.build.fingerprint").contains("ASUS")) { + goodixCmd(200001) + } ++ ++ if(hasXiaomiLhbm){ ++ Log.d("PHH-Enroll", "Xiaomi scenario in UdfpsView reached!") ++ mySurfaceView.setVisibility(INVISIBLE) ++ ++ IXiaomiFingerprint.getService().extCmd(android.os.SystemProperties.getInt("persist.phh.xiaomi.fod.enrollment.id", 4), 1); ++ var res = ITouchFeature.getService().setTouchMode(0, 10, 1); ++ if(res != 0){ ++ Log.d("PHH-Enroll", "SetTouchMode 10,1 was NOT executed successfully. Res is " + res) ++ } ++ ++ myHandler.postDelayed({ ++ var ret200 = ITouchFeature.getService().setTouchMode(0, 10, 1); ++ ++ if(ret200 != 0){ ++ Log.d("PHH-Enroll", "myHandler.postDelayed 200ms -SetTouchMode was NOT executed successfully. Ret is " + ret200) ++ } ++ ++ myHandler.postDelayed({ ++ Log.d("PHH-Enroll", "myHandler.postDelayed 600ms - line prior to setTouchMode 10,0") ++ var ret600 = ITouchFeature.getService().setTouchMode(0, 10, 0); ++ ++ if(ret600 != 0){ ++ Log.d("PHH-Enroll", "myHandler.postDelayed 600ms -SetTouchMode 10,0 was NOT executed successfully. Ret is " + ret600) ++ } ++ }, 600) ++ }, 200) ++ } + } + + fun unconfigureDisplay() { +@@ -296,6 +336,9 @@ Log.d("PHH", "Surface destroyed!") + } + }; + fodFileObserver?.startWatching(); ++ } else if(hasXiaomiLhbm) { ++ IXiaomiFingerprint.getService().extCmd(android.os.SystemProperties.getInt("persist.phh.xiaomi.fod.enrollment.id", 4), 0); ++ ITouchFeature.getService().setTouchMode(0, 10, 0); + } else { + dimUpdate(0.0f) + } +diff --git a/services/core/Android.bp b/services/core/Android.bp +index 145a74a43464..b99d95713731 100644 +--- a/services/core/Android.bp ++++ b/services/core/Android.bp +@@ -180,6 +180,7 @@ java_library_static { + "vendor.samsung.hardware.biometrics.fingerprint-V3.0-java", + "vendor.oplus.hardware.biometrics.fingerprint-V2.1-java", + "vendor.oppo.hardware.biometrics.fingerprint-V2.1-java", ++ "vendor.xiaomi.hardware.fingerprintextension-V1.0-java", + ], + javac_shard_size: 50, + } +diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java +index b47b47c41f76..696d5b42cd46 100644 +--- a/services/core/java/com/android/server/biometrics/AuthService.java ++++ b/services/core/java/com/android/server/biometrics/AuthService.java +@@ -64,6 +64,7 @@ import android.os.ServiceManager; + import android.os.SystemProperties; + import android.os.UserHandle; + import android.provider.Settings; ++import android.text.TextUtils; + import android.util.Slog; + + import com.android.internal.R; +@@ -91,6 +92,7 @@ import vendor.samsung.hardware.biometrics.fingerprint.V3_0.ISehBiometricsFingerp + import vendor.goodix.hardware.biometrics.fingerprint.V2_1.IGoodixFingerprintDaemon; + import vendor.samsung.hardware.sysinput.V1_0.ISehSysInputDev; + ++import vendor.xiaomi.hardware.fingerprintextension.V1_0.IXiaomiFingerprint; + /** + * System service that provides an interface for authenticating with biometrics and + * PIN/pattern/password to BiometricPrompt and lock screen. +@@ -112,6 +114,7 @@ public class AuthService extends SystemService { + private FileObserver fodFileObserver = null; + private ISehBiometricsFingerprint mSamsungFingerprint = null; + ++ private IXiaomiFingerprint mXiaomiFingerprint = null; + /** + * Class for injecting dependencies into AuthService. + * TODO(b/141025588): Replace with a dependency injection framework (e.g. Guice, Dagger). +@@ -675,6 +678,12 @@ public class AuthService extends SystemService { + } catch(Exception e) { + android.util.Log.e("PHH", "Failed getting Samsung fingerprint HAL", e); + } ++ try { ++ mXiaomiFingerprint = IXiaomiFingerprint.getService(); ++ android.util.Log.e("PHH", "Got xiaomi fingerprint HAL"); ++ } catch(Exception e) { ++ android.util.Log.e("PHH", "Failed getting xiaomi fingerprint HAL", e); ++ } + if(samsungHasCmd("fod_enable") && mSamsungFingerprint != null) { + samsungCmd("fod_enable,1,1,0"); + String actualMaskBrightnessPath = "/sys/class/lcd/panel/actual_mask_brightness"; +@@ -735,6 +744,31 @@ public class AuthService extends SystemService { + fodFileObserver.startWatching(); + } + ++ String xiaomiFodPressedStatusPath = "/sys/class/touch/touch_dev/fod_press_status"; ++ if(new File(xiaomiFodPressedStatusPath).exists() && mXiaomiFingerprint != null) { ++ fodFileObserver = new FileObserver(xiaomiFodPressedStatusPath, FileObserver.MODIFY) { ++ @Override ++ public void onEvent(int event, String path) { ++ String isFodPressed = readFile(xiaomiFodPressedStatusPath); ++ Slog.d("PHH-Enroll", "Fod pressed status: " + isFodPressed); ++ Slog.d("PHH-Enroll", "Within xiaomi scenario for FOD"); ++ ++ try { ++ if("0".equals(isFodPressed)) { ++ Slog.d("PHH-Enroll", "Fod un-pressed!"); ++ mXiaomiFingerprint.extCmd(android.os.SystemProperties.getInt("phh.xiaomi.fod.enrollment.id", 4), 0); ++ } else if("1".equals(isFodPressed)) { ++ Slog.d("PHH-Enroll", "Fod pressed!"); ++ mXiaomiFingerprint.extCmd(android.os.SystemProperties.getInt("phh.xiaomi.fod.enrollment.id", 4), 1); ++ } ++ } catch(Exception e) { ++ Slog.d("PHH-Enroll", "Failed Xiaomi async extcmd", e); ++ } ++ } ++ }; ++ fodFileObserver.startWatching(); ++ } ++ + } + + /** +@@ -936,6 +970,18 @@ public class AuthService extends SystemService { + return udfpsProps; + } + ++ if(!TextUtils.isEmpty(android.os.SystemProperties.get("persist.vendor.sys.fp.fod.location.X_Y"))) { ++ int[] udfpsProps = new int[3]; ++ String[] coordinates = android.os.SystemProperties.get("persist.vendor.sys.fp.fod.location.X_Y").split(","); ++ udfpsProps[0] = displayRealSize.x/2; ++ udfpsProps[1] = Integer.parseInt(coordinates[1]) + 100; ++ ++ String[] widthHeight = android.os.SystemProperties.get("persist.vendor.sys.fp.fod.size.width_height").split(","); ++ ++ udfpsProps[2] = (Integer.parseInt(widthHeight[0]) /2); ++ return udfpsProps; ++ } ++ + return new int[0]; + } + +-- +2.25.1 + diff --git a/pe.mk b/pe.mk index 620d18f3..2282a5d0 100644 --- a/pe.mk +++ b/pe.mk @@ -13,8 +13,5 @@ TARGET_SUPPORTS_CALL_RECORDING := true TARGET_USES_PREBUILT_VENDOR_SEPOLICY := true TARGET_HAS_FUSEBLK_SEPOLICY_ON_VENDOR := true -PRODUCT_PACKAGES += \ - androidx.window.extensions - PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ ro.system.ota.json_url=https://raw.githubusercontent.com/ponces/treble_build_pe/thirteen/ota.json