diff --git a/patches_platform/frameworks_base/0001-Add-SPenPointerOverlay.patch b/patches_platform/frameworks_base/0001-Add-SPenPointerOverlay.patch index 051a38f..5ec2af4 100644 --- a/patches_platform/frameworks_base/0001-Add-SPenPointerOverlay.patch +++ b/patches_platform/frameworks_base/0001-Add-SPenPointerOverlay.patch @@ -1,7 +1,7 @@ -From e37d16ac9d6d84412f64243dee1c48d8b1eb6ed5 Mon Sep 17 00:00:00 2001 +From 9644e048f2a52b51195003bb90a45c3a0efb67c8 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 13 Jan 2022 14:22:24 +0000 -Subject: [PATCH 01/21] Add SPenPointerOverlay +Subject: [PATCH 01/19] Add SPenPointerOverlay Toggle this overlay with property "persist.ui.spen.pointer" @@ -114,15 +114,15 @@ HcmV?d00001 diff --git a/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml b/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml new file mode 100644 -index 000000000000..6db08716fc62 +index 000000000000..f35255c5f961 --- /dev/null +++ b/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml @@ -0,0 +1,5 @@ -+ -+ ++ ++ -- 2.25.1 diff --git a/patches_platform/frameworks_base/0002-Disable-vendor-mismatch-warning.patch b/patches_platform/frameworks_base/0002-Disable-vendor-mismatch-warning.patch index 3038e8d..4b3c817 100644 --- a/patches_platform/frameworks_base/0002-Disable-vendor-mismatch-warning.patch +++ b/patches_platform/frameworks_base/0002-Disable-vendor-mismatch-warning.patch @@ -1,7 +1,7 @@ -From 6379c3431defb061fbc793982c1ba88b9d475e99 Mon Sep 17 00:00:00 2001 +From 160ca5e73a2d075c5514db911180d4523fedf860 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 5 Apr 2018 10:01:19 +0800 -Subject: [PATCH 02/21] Disable vendor mismatch warning +Subject: [PATCH 02/19] Disable vendor mismatch warning Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b --- diff --git a/patches_platform/frameworks_base/0003-UI-Adjust-default-navbar-layouts.patch b/patches_platform/frameworks_base/0003-UI-Adjust-default-navbar-layouts.patch index 5b5b977..e1b42a0 100644 --- a/patches_platform/frameworks_base/0003-UI-Adjust-default-navbar-layouts.patch +++ b/patches_platform/frameworks_base/0003-UI-Adjust-default-navbar-layouts.patch @@ -1,7 +1,7 @@ -From f7b8284284e3eb360a2403fc6782ccfff96bb99b Mon Sep 17 00:00:00 2001 +From 79e4311950c147ce85983a7088f4d921050f3f74 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 16 Oct 2021 02:23:48 +0000 -Subject: [PATCH 03/21] UI: Adjust default navbar layouts +Subject: [PATCH 03/19] UI: Adjust default navbar layouts - Slightly tighten nodpi layout - Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify @@ -45,7 +45,7 @@ index 07b797a32428..000000000000 - left[.25W],back[.5WC];home;recent[.5WC],right[.25W] - diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml -index d0098b32f384..62e4e27dca2a 100644 +index ebf7b8407727..557699b35aa8 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -350,7 +350,7 @@ diff --git a/patches_platform/frameworks_base/0004-UI-Disable-left-seascape-navigation-bar-optionally.patch b/patches_platform/frameworks_base/0004-UI-Disable-left-seascape-navigation-bar-optionally.patch index 43bfa00..e9b016f 100644 --- a/patches_platform/frameworks_base/0004-UI-Disable-left-seascape-navigation-bar-optionally.patch +++ b/patches_platform/frameworks_base/0004-UI-Disable-left-seascape-navigation-bar-optionally.patch @@ -1,7 +1,7 @@ -From b6ee471eb9405c82d26fc2cddc4c1446fa872467 Mon Sep 17 00:00:00 2001 +From 47b42ba04a71792b6a0d9bcfa6fe515593d4bcc8 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Fri, 9 Mar 2018 15:41:26 +0800 -Subject: [PATCH 04/21] UI: Disable left (seascape) navigation bar optionally +Subject: [PATCH 04/19] UI: Disable left (seascape) navigation bar optionally Toggle this behaviour with property "persist.ui.seascape.disable" diff --git a/patches_platform/frameworks_base/0005-UI-Disable-wallpaper-zoom.patch b/patches_platform/frameworks_base/0005-UI-Disable-wallpaper-zoom.patch index a915fd4..f66dbc6 100644 --- a/patches_platform/frameworks_base/0005-UI-Disable-wallpaper-zoom.patch +++ b/patches_platform/frameworks_base/0005-UI-Disable-wallpaper-zoom.patch @@ -1,7 +1,7 @@ -From a8f18ce03f513f63f98c14b89918011e8e30ca93 Mon Sep 17 00:00:00 2001 +From 66956ebbdb5645ff2cfb2a010d4371faa7c41554 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 10 Jan 2021 11:44:29 +0000 -Subject: [PATCH 05/21] UI: Disable wallpaper zoom +Subject: [PATCH 05/19] UI: Disable wallpaper zoom It does little more than inducing motion sickness diff --git a/patches_platform/frameworks_base/0006-UI-Increase-default-status-bar-height.patch b/patches_platform/frameworks_base/0006-UI-Increase-default-status-bar-height.patch index 4bc5b20..a76e6a0 100644 --- a/patches_platform/frameworks_base/0006-UI-Increase-default-status-bar-height.patch +++ b/patches_platform/frameworks_base/0006-UI-Increase-default-status-bar-height.patch @@ -1,7 +1,7 @@ -From b2a7f77623b07fbea767605ba8ad5bbe6ed94c70 Mon Sep 17 00:00:00 2001 +From 04b13419bb9446b5b25fe329be88804e297050b2 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 3 Jun 2020 01:31:34 +0000 -Subject: [PATCH 06/21] UI: Increase default status bar height +Subject: [PATCH 06/19] UI: Increase default status bar height Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07 --- diff --git a/patches_platform/frameworks_base/0007-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch b/patches_platform/frameworks_base/0007-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch index da2b75d..09823aa 100644 --- a/patches_platform/frameworks_base/0007-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch +++ b/patches_platform/frameworks_base/0007-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch @@ -1,7 +1,7 @@ -From a77071568a33266c3f93db359d865eddd2b38313 Mon Sep 17 00:00:00 2001 +From 65e25646ab0c3cbfdc7199a791cd5e8bcccbaffe Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 6 Oct 2020 01:41:16 +0000 -Subject: [PATCH 07/21] UI: Revive navbar layout tuning via sysui_nav_bar +Subject: [PATCH 07/19] UI: Revive navbar layout tuning via sysui_nav_bar tunable Google keeps fixing what ain't broken. diff --git a/patches_platform/frameworks_base/0008-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch b/patches_platform/frameworks_base/0008-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch index c86e180..e61e66e 100644 --- a/patches_platform/frameworks_base/0008-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch +++ b/patches_platform/frameworks_base/0008-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch @@ -1,7 +1,7 @@ -From 064121d33cea08c574f5bd80b10bd3b3721241cc Mon Sep 17 00:00:00 2001 +From e2774d80fc6cd0de872259c555f21ae2e8f8bf2c Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 26 Apr 2020 08:56:13 +0000 -Subject: [PATCH 08/21] UI: Use SNAP_FIXED_RATIO for multi-window globally +Subject: [PATCH 08/19] UI: Use SNAP_FIXED_RATIO for multi-window globally Enables multiple snap targets under landscape for phone UI diff --git a/patches_platform/frameworks_base/0009-UI-Unblock-alarm-status-bar-icon.patch b/patches_platform/frameworks_base/0009-UI-Unblock-alarm-status-bar-icon.patch index e2cb231..b7c01d0 100644 --- a/patches_platform/frameworks_base/0009-UI-Unblock-alarm-status-bar-icon.patch +++ b/patches_platform/frameworks_base/0009-UI-Unblock-alarm-status-bar-icon.patch @@ -1,7 +1,7 @@ -From 2e11990cb2b10f0fe3c87273d76b3875da3b2e8f Mon Sep 17 00:00:00 2001 +From 5bfabfbe5d9b44e85f18151fa1f29ed59b505dd5 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 14 Oct 2021 15:45:24 +0000 -Subject: [PATCH 09/21] UI: Unblock alarm status bar icon +Subject: [PATCH 09/19] UI: Unblock alarm status bar icon That's very Zen of you, Google... diff --git a/patches_platform/frameworks_base/0010-core-Remove-old-app-target-SDK-dialog.patch b/patches_platform/frameworks_base/0010-core-Remove-old-app-target-SDK-dialog.patch index d27522d..b4f6840 100644 --- a/patches_platform/frameworks_base/0010-core-Remove-old-app-target-SDK-dialog.patch +++ b/patches_platform/frameworks_base/0010-core-Remove-old-app-target-SDK-dialog.patch @@ -1,7 +1,7 @@ -From 4247002faaf6768550040aec3132ca2015c6543c Mon Sep 17 00:00:00 2001 +From 262b65f0ca1c307215c538c378775874c054ef01 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Tue, 3 Nov 2020 22:43:12 -0800 -Subject: [PATCH 10/21] core: Remove old app target SDK dialog +Subject: [PATCH 10/19] core: Remove old app target SDK dialog If an app is old, users should already know that, and there's usually no point in warning them about it because they would already be using a diff --git a/patches_platform/frameworks_base/0011-SystemUI-Always-refresh-power-menu-on-UI-mode-change.patch b/patches_platform/frameworks_base/0011-SystemUI-Always-refresh-power-menu-on-UI-mode-change.patch index 96eeed6..16f9a92 100644 --- a/patches_platform/frameworks_base/0011-SystemUI-Always-refresh-power-menu-on-UI-mode-change.patch +++ b/patches_platform/frameworks_base/0011-SystemUI-Always-refresh-power-menu-on-UI-mode-change.patch @@ -1,7 +1,7 @@ -From 5403541355fe9d511591a10850d4e141f038a30b Mon Sep 17 00:00:00 2001 +From 69866119d54b6e5aee80530f4030980ef0ab28c1 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Tue, 5 Oct 2021 21:01:15 -0700 -Subject: [PATCH 11/21] SystemUI: Always refresh power menu on UI mode change +Subject: [PATCH 11/19] SystemUI: Always refresh power menu on UI mode change This is necessary for reliably theming the global actions dialog with dynamic colors and adapting it to light/dark themes. @@ -15,7 +15,7 @@ Change-Id: Id6f6623096ed231e841ca3794b47f8a0ab54dae6 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java -index 65c520ef2ff4..43a1084540f6 100644 +index 11da4f5ca39e..afe2629fd53d 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java @@ -762,7 +762,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene diff --git a/patches_platform/frameworks_base/0012-SystemUI-Use-Monet-colors-for-power-menu.patch b/patches_platform/frameworks_base/0012-SystemUI-Use-Monet-colors-for-power-menu.patch index ede66c3..06fee5d 100644 --- a/patches_platform/frameworks_base/0012-SystemUI-Use-Monet-colors-for-power-menu.patch +++ b/patches_platform/frameworks_base/0012-SystemUI-Use-Monet-colors-for-power-menu.patch @@ -1,7 +1,7 @@ -From 19c047cf3be7c3bcd1254c0b62fa3e9d5d0ae733 Mon Sep 17 00:00:00 2001 +From a08e7b27c44c384da58a118f5a0f3290a37f07da Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sat, 9 Oct 2021 14:39:38 -0700 -Subject: [PATCH 12/21] SystemUI: Use Monet colors for power menu +Subject: [PATCH 12/19] SystemUI: Use Monet colors for power menu It's odd that the power menu doesn't use Monet colors, unlike most of System UI. This makes it feel more integrated with the rest of the diff --git a/patches_platform/frameworks_base/0013-Revert-Make-QS-always-use-dark-theme-colors.patch b/patches_platform/frameworks_base/0013-Revert-Make-QS-always-use-dark-theme-colors.patch index 2387ffa..c7b1715 100644 --- a/patches_platform/frameworks_base/0013-Revert-Make-QS-always-use-dark-theme-colors.patch +++ b/patches_platform/frameworks_base/0013-Revert-Make-QS-always-use-dark-theme-colors.patch @@ -1,7 +1,7 @@ -From a3d2feb6e711e9a96cec4fa19276be18bdda118c Mon Sep 17 00:00:00 2001 +From 09ea8e6106959f6c8a6399227ee029d1feace6b2 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 6 Oct 2021 18:40:30 -0700 -Subject: [PATCH 13/21] Revert "Make QS always use dark theme colors" +Subject: [PATCH 13/19] Revert "Make QS always use dark theme colors" This reverts commit d62f7249f9e3222da95ecf6816601c408aac6be5. diff --git a/patches_platform/frameworks_base/0014-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch b/patches_platform/frameworks_base/0014-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch index e99f525..c7c03ab 100644 --- a/patches_platform/frameworks_base/0014-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch +++ b/patches_platform/frameworks_base/0014-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch @@ -1,7 +1,7 @@ -From aadd3892d31154fd43307f3ac1293b9a1ed011b6 Mon Sep 17 00:00:00 2001 +From 9bce4fe471a1d7c107fad69b9285525041feed72 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 6 Oct 2021 18:41:11 -0700 -Subject: [PATCH 14/21] Revert "Do not re-inflate QS and SB when +Subject: [PATCH 14/19] Revert "Do not re-inflate QS and SB when CONFIG_UI_MODE" This reverts commit 8a40ff855b86bc86e23367017002289920855a4e. diff --git a/patches_platform/frameworks_base/0015-SystemUI-Follow-light-dark-theme-in-quick-settings.patch b/patches_platform/frameworks_base/0015-SystemUI-Follow-light-dark-theme-in-quick-settings.patch index 0ef0667..d38a685 100644 --- a/patches_platform/frameworks_base/0015-SystemUI-Follow-light-dark-theme-in-quick-settings.patch +++ b/patches_platform/frameworks_base/0015-SystemUI-Follow-light-dark-theme-in-quick-settings.patch @@ -1,7 +1,7 @@ -From a9bd8968c9baae389fd4e5cc54d2c4403d603690 Mon Sep 17 00:00:00 2001 +From c87db4a6ea8c4c399dd92923dd28f2533246c293 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Mon, 11 Oct 2021 19:24:58 -0700 -Subject: [PATCH 15/21] SystemUI: Follow light/dark theme in quick settings +Subject: [PATCH 15/19] SystemUI: Follow light/dark theme in quick settings Android 12's dual-tone style where the quick settings panel is always dark makes the light theme look like a second-class citizen. Pure black @@ -82,7 +82,7 @@ index 860d23b11439..8f12b95ed4f6 100644 diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml -index ffcc3a821d36..a9fa9f3f9fde 100644 +index dd999837a1ba..3fd6f9cc5454 100644 --- a/packages/SystemUI/res/values-night/styles.xml +++ b/packages/SystemUI/res/values-night/styles.xml @@ -24,6 +24,18 @@ @@ -102,7 +102,7 @@ index ffcc3a821d36..a9fa9f3f9fde 100644 + + - - - --- -2.25.1 - diff --git a/patches_platform/packages_apps_LineageParts/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch b/patches_platform/packages_apps_LineageParts/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch index 104146f..4856a7a 100644 --- a/patches_platform/packages_apps_LineageParts/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch +++ b/patches_platform/packages_apps_LineageParts/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch @@ -1,4 +1,4 @@ -From 9fd08fb7ecb602afd3a5f1f19ccc1b20d1cbbe9c Mon Sep 17 00:00:00 2001 +From 10a8d7cb2306f928abc91fbeb24f3b6fc6aa9057 Mon Sep 17 00:00:00 2001 From: AndyCGYan Date: Sun, 13 Jan 2019 21:44:48 +0800 Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen @@ -44,11 +44,11 @@ index 37d129d..97600b8 100644 启用充电提示音 连接或断开电源时发出声音 diff --git a/res/values/strings.xml b/res/values/strings.xml -index 8421fce..b9f140a 100644 +index efb9fbf..dda3125 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml -@@ -575,9 +575,9 @@ - Never +@@ -563,9 +563,9 @@ + 270 degrees - Full screen apps @@ -73,11 +73,11 @@ index ec947fa..20da90a 100644 diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml -index 2d8dca7..1e6ace4 100644 +index 803b214..6f61e9d 100644 --- a/res/xml/parts_catalog.xml +++ b/res/xml/parts_catalog.xml -@@ -87,8 +87,8 @@ - lineage:xmlRes="@xml/perf_profile_settings" /> +@@ -81,8 +81,8 @@ + lineage:xmlRes="@xml/power_menu_settings" /> -Date: Thu, 13 Jan 2022 02:24:07 +0000 -Subject: [PATCH] [TEMP] LineageParts: Fix DisplayColor dialog - -Change-Id: I5cc300037286d34f03f511d935d26361b029817a ---- - .../lineageparts/livedisplay/DisplayColor.java | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/org/lineageos/lineageparts/livedisplay/DisplayColor.java b/src/org/lineageos/lineageparts/livedisplay/DisplayColor.java -index a000ba9..334055a 100644 ---- a/src/org/lineageos/lineageparts/livedisplay/DisplayColor.java -+++ b/src/org/lineageos/lineageparts/livedisplay/DisplayColor.java -@@ -79,6 +79,18 @@ public class DisplayColor extends CustomDialogPreference { - public void onClick(DialogInterface dialog, int which) { - } - }); -+ builder.setNegativeButton(R.string.cancel, -+ new DialogInterface.OnClickListener() { -+ @Override -+ public void onClick(DialogInterface dialog, int which) { -+ } -+ }); -+ builder.setPositiveButton(R.string.dlg_ok, -+ new DialogInterface.OnClickListener() { -+ @Override -+ public void onClick(DialogInterface dialog, int which) { -+ } -+ }); - } - - @Override --- -2.25.1 - diff --git a/patches_platform/vendor_partner_gms/0001-SearchLauncher-Adapt-to-Trebuchet.patch b/patches_platform/vendor_partner_gms/0001-SearchLauncher-Adapt-to-Trebuchet.patch index 9d8bcc3..fc265ee 100644 --- a/patches_platform/vendor_partner_gms/0001-SearchLauncher-Adapt-to-Trebuchet.patch +++ b/patches_platform/vendor_partner_gms/0001-SearchLauncher-Adapt-to-Trebuchet.patch @@ -1,12 +1,13 @@ -From c4eac79c4f34e34e793f19e50d97a74daa05ec69 Mon Sep 17 00:00:00 2001 +From facde4b2b88c2ced8092714df21c4e09751ca1da Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 30 Nov 2021 12:58:00 +0000 Subject: [PATCH] SearchLauncher: Adapt to Trebuchet --- - apps/SearchLauncher/Android.mk | 4 ++-- - apps/SearchLauncher/AndroidManifest.xml | 3 ++- - 2 files changed, 4 insertions(+), 3 deletions(-) + apps/SearchLauncher/Android.mk | 4 ++-- + apps/SearchLauncher/AndroidManifest.xml | 3 ++- + .../quickstep/res/layout/search_container_all_apps.xml | 2 +- + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/SearchLauncher/Android.mk b/apps/SearchLauncher/Android.mk index a9f182a..6b90364 100644 @@ -44,6 +45,19 @@ index d5ffded..a9b5597 100644 + -- 2.25.1 diff --git a/patches_platform_personal/frameworks_base/0001-Add-LineageMonetAccentOverlay.patch b/patches_platform_personal/frameworks_base/0001-Add-LineageMonetAccentOverlay.patch index 8879a4b..5697463 100644 --- a/patches_platform_personal/frameworks_base/0001-Add-LineageMonetAccentOverlay.patch +++ b/patches_platform_personal/frameworks_base/0001-Add-LineageMonetAccentOverlay.patch @@ -1,4 +1,4 @@ -From d72fc12143501bfa376db5fd888b9115e0c279e7 Mon Sep 17 00:00:00 2001 +From 5598980edbd93751dc3c006d9d88b1b0e70170cc Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 27 Oct 2021 14:38:37 +0000 Subject: [PATCH 01/16] Add LineageMonetAccentOverlay diff --git a/patches_platform_personal/frameworks_base/0002-Add-MiuiNavbarOverlay.patch b/patches_platform_personal/frameworks_base/0002-Add-MiuiNavbarOverlay.patch index f37d215..1cc2c1d 100644 --- a/patches_platform_personal/frameworks_base/0002-Add-MiuiNavbarOverlay.patch +++ b/patches_platform_personal/frameworks_base/0002-Add-MiuiNavbarOverlay.patch @@ -1,4 +1,4 @@ -From 9b99205d455b3628d4ab017c77649e116fff182a Mon Sep 17 00:00:00 2001 +From d8f26074114f9bb4e9a57ece4cb39d42e0ffa90c Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 20 Jun 2021 03:39:32 +0000 Subject: [PATCH 02/16] Add MiuiNavbarOverlay diff --git a/patches_platform_personal/frameworks_base/0003-Disable-cursor-drag-by-default-for-editable-TextView.patch b/patches_platform_personal/frameworks_base/0003-Disable-cursor-drag-by-default-for-editable-TextView.patch index 7c0da88..00b2351 100644 --- a/patches_platform_personal/frameworks_base/0003-Disable-cursor-drag-by-default-for-editable-TextView.patch +++ b/patches_platform_personal/frameworks_base/0003-Disable-cursor-drag-by-default-for-editable-TextView.patch @@ -1,4 +1,4 @@ -From a18c07c4fa6a3a3e776b40b13c1e666958fa0549 Mon Sep 17 00:00:00 2001 +From 2b7f5a1ca1c43ae5d7af48eeb07afa08f581e49b Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Mon, 27 Sep 2021 16:30:00 +0000 Subject: [PATCH 03/16] Disable cursor drag by default for editable TextViews diff --git a/patches_platform_personal/frameworks_base/0004-Disable-FP-lockouts.patch b/patches_platform_personal/frameworks_base/0004-Disable-FP-lockouts.patch index 8c2d400..996f25a 100644 --- a/patches_platform_personal/frameworks_base/0004-Disable-FP-lockouts.patch +++ b/patches_platform_personal/frameworks_base/0004-Disable-FP-lockouts.patch @@ -1,4 +1,4 @@ -From 6b4d66980ecb2a61e959bf256ae3f72ec448945e Mon Sep 17 00:00:00 2001 +From 26f39b897540abbdc64f25f671de87b9df33c04d Mon Sep 17 00:00:00 2001 From: AndyCGYan Date: Fri, 22 Mar 2019 00:41:20 +0800 Subject: [PATCH 04/16] Disable FP lockouts diff --git a/patches_platform_personal/frameworks_base/0005-Keyguard-Adjust-clock-style.patch b/patches_platform_personal/frameworks_base/0005-Keyguard-Adjust-clock-style.patch index bd79099..931b34e 100644 --- a/patches_platform_personal/frameworks_base/0005-Keyguard-Adjust-clock-style.patch +++ b/patches_platform_personal/frameworks_base/0005-Keyguard-Adjust-clock-style.patch @@ -1,4 +1,4 @@ -From 80f4784fd42852d15b2bf815e8f068bc5c4977dd Mon Sep 17 00:00:00 2001 +From 1da3b1d0155f06373057ee7b08691da664e94da8 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 2 Sep 2021 16:15:19 +0000 Subject: [PATCH 05/16] Keyguard: Adjust clock style diff --git a/patches_platform_personal/frameworks_base/0006-Keyguard-Hide-padlock-unless-UDFPS-is-in-use.patch b/patches_platform_personal/frameworks_base/0006-Keyguard-Hide-padlock-unless-UDFPS-is-in-use.patch index 5bb6bf2..ab5142c 100644 --- a/patches_platform_personal/frameworks_base/0006-Keyguard-Hide-padlock-unless-UDFPS-is-in-use.patch +++ b/patches_platform_personal/frameworks_base/0006-Keyguard-Hide-padlock-unless-UDFPS-is-in-use.patch @@ -1,4 +1,4 @@ -From cd9ff5604ed0420eb6e4317370a22293a40f2800 Mon Sep 17 00:00:00 2001 +From e6b6d26e1a86a3ff38630121164f83b653f20199 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 2 Nov 2019 06:41:03 +0000 Subject: [PATCH 06/16] Keyguard: Hide padlock unless UDFPS is in use diff --git a/patches_platform_personal/frameworks_base/0007-Keyguard-Never-switch-to-large-clock.patch b/patches_platform_personal/frameworks_base/0007-Keyguard-Never-switch-to-large-clock.patch index 13593b7..0deafd9 100644 --- a/patches_platform_personal/frameworks_base/0007-Keyguard-Never-switch-to-large-clock.patch +++ b/patches_platform_personal/frameworks_base/0007-Keyguard-Never-switch-to-large-clock.patch @@ -1,4 +1,4 @@ -From 87bc53364912c939e19465304593cf7f03b96b54 Mon Sep 17 00:00:00 2001 +From 66149d4057081df5f550cad82db44b5c0f2bd0c7 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 1 Sep 2021 14:41:53 +0000 Subject: [PATCH 07/16] Keyguard: Never switch to large clock diff --git a/patches_platform_personal/frameworks_base/0008-Keyguard-Refine-indication-text.patch b/patches_platform_personal/frameworks_base/0008-Keyguard-Refine-indication-text.patch index a483cb6..1874bbd 100644 --- a/patches_platform_personal/frameworks_base/0008-Keyguard-Refine-indication-text.patch +++ b/patches_platform_personal/frameworks_base/0008-Keyguard-Refine-indication-text.patch @@ -1,4 +1,4 @@ -From ce11b93da782f5bd95c0f5c7ce02aa6ace01e6eb Mon Sep 17 00:00:00 2001 +From 2c4a2751c3ecee97883a3b8606e479ec2068f8c8 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 2 Nov 2019 08:31:36 +0000 Subject: [PATCH 08/16] Keyguard: Refine indication text diff --git a/patches_platform_personal/frameworks_base/0009-Keyguard-UI-Fix-status-bar-quick-settings-margins-an.patch b/patches_platform_personal/frameworks_base/0009-Keyguard-UI-Fix-status-bar-quick-settings-margins-an.patch index 1d91d57..b8ba210 100644 --- a/patches_platform_personal/frameworks_base/0009-Keyguard-UI-Fix-status-bar-quick-settings-margins-an.patch +++ b/patches_platform_personal/frameworks_base/0009-Keyguard-UI-Fix-status-bar-quick-settings-margins-an.patch @@ -1,4 +1,4 @@ -From 3ead32747cd79901a272ed399e88ce957370f0e0 Mon Sep 17 00:00:00 2001 +From cca9cb4645f5aa079c5ed39339f02f78a7e68695 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 20 Mar 2021 10:35:14 +0000 Subject: [PATCH 09/16] Keyguard/UI: Fix status bar / quick settings margins diff --git a/patches_platform_personal/frameworks_base/0010-Revert-monet-Add-support-for-monet-cam16.patch b/patches_platform_personal/frameworks_base/0010-Revert-monet-Add-support-for-monet-cam16.patch index eeb59de..bf383ea 100644 --- a/patches_platform_personal/frameworks_base/0010-Revert-monet-Add-support-for-monet-cam16.patch +++ b/patches_platform_personal/frameworks_base/0010-Revert-monet-Add-support-for-monet-cam16.patch @@ -1,4 +1,4 @@ -From 9fa5b43574c485faebf2806584f82311fa220b16 Mon Sep 17 00:00:00 2001 +From da27cecc0366133f80c38aa479da212faa503181 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 19 Oct 2021 12:11:24 +0000 Subject: [PATCH 10/16] Revert "monet: Add support for monet (cam16)" diff --git a/patches_platform_personal/frameworks_base/0011-Revert-Update-RAT-icons-to-match-Silk-design.patch b/patches_platform_personal/frameworks_base/0011-Revert-Update-RAT-icons-to-match-Silk-design.patch index 2b086ef..b74d051 100644 --- a/patches_platform_personal/frameworks_base/0011-Revert-Update-RAT-icons-to-match-Silk-design.patch +++ b/patches_platform_personal/frameworks_base/0011-Revert-Update-RAT-icons-to-match-Silk-design.patch @@ -1,4 +1,4 @@ -From a1a23648cb1a916a9a6da88d68a41a01f6eceb06 Mon Sep 17 00:00:00 2001 +From b8fe4a2e79bd273f69bb0331eb0d07ad0454d43f Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 5 Sep 2021 01:20:12 +0000 Subject: [PATCH 11/16] Revert "Update RAT icons to match Silk design" diff --git a/patches_platform_personal/frameworks_base/0012-UI-Always-render-windows-into-cutouts.patch b/patches_platform_personal/frameworks_base/0012-UI-Always-render-windows-into-cutouts.patch index cb712bc..65e8439 100644 --- a/patches_platform_personal/frameworks_base/0012-UI-Always-render-windows-into-cutouts.patch +++ b/patches_platform_personal/frameworks_base/0012-UI-Always-render-windows-into-cutouts.patch @@ -1,4 +1,4 @@ -From 1d8c1d751b1bb0b5d36a00eceec1308d6e83523d Mon Sep 17 00:00:00 2001 +From fe5e86fc264bf9ca5d6cfa89d28d51bd123c2966 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 7 Oct 2020 14:00:35 +0000 Subject: [PATCH 12/16] UI: Always render windows into cutouts diff --git a/patches_platform_personal/frameworks_base/0013-UI-Kill-rounded-corners-in-notification-scrim.patch b/patches_platform_personal/frameworks_base/0013-UI-Kill-rounded-corners-in-notification-scrim.patch index 7e0e8cb..0679eb8 100644 --- a/patches_platform_personal/frameworks_base/0013-UI-Kill-rounded-corners-in-notification-scrim.patch +++ b/patches_platform_personal/frameworks_base/0013-UI-Kill-rounded-corners-in-notification-scrim.patch @@ -1,4 +1,4 @@ -From e79fe0c08cb680f1c2855caa877acacdf0bdb3dd Mon Sep 17 00:00:00 2001 +From e2fe18aa9aab73594414b11164ed180ca8b16cd1 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 1 Sep 2021 14:10:50 +0000 Subject: [PATCH 13/16] UI: Kill rounded corners in notification scrim diff --git a/patches_platform_personal/frameworks_base/0014-UI-Reconfigure-power-menu-items.patch b/patches_platform_personal/frameworks_base/0014-UI-Reconfigure-power-menu-items.patch index 604e0ef..2fbd6c8 100644 --- a/patches_platform_personal/frameworks_base/0014-UI-Reconfigure-power-menu-items.patch +++ b/patches_platform_personal/frameworks_base/0014-UI-Reconfigure-power-menu-items.patch @@ -1,4 +1,4 @@ -From f0d1748dc95cb747329c816153d68954255be322 Mon Sep 17 00:00:00 2001 +From 81538d4126c99a86cb8f3ea13becca665db468e8 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Mon, 26 Oct 2020 14:06:56 +0000 Subject: [PATCH 14/16] UI: Reconfigure power menu items diff --git a/patches_platform_personal/frameworks_base/0015-UI-Relax-requirement-for-HINT_SUPPORTS_DARK_TEXT.patch b/patches_platform_personal/frameworks_base/0015-UI-Relax-requirement-for-HINT_SUPPORTS_DARK_TEXT.patch index 3556d92..ddb7286 100644 --- a/patches_platform_personal/frameworks_base/0015-UI-Relax-requirement-for-HINT_SUPPORTS_DARK_TEXT.patch +++ b/patches_platform_personal/frameworks_base/0015-UI-Relax-requirement-for-HINT_SUPPORTS_DARK_TEXT.patch @@ -1,4 +1,4 @@ -From ec1007b99324812eebc112d12f6f56666cd54cae Mon Sep 17 00:00:00 2001 +From 39e52d3177af783e0fdb08f997d1a4971485b896 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 29 Jun 2021 22:57:01 +0000 Subject: [PATCH 15/16] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT diff --git a/patches_platform_personal/frameworks_base/0016-UI-Remove-privacy-dot-padding.patch b/patches_platform_personal/frameworks_base/0016-UI-Remove-privacy-dot-padding.patch index dea5ed0..b0c7ffe 100644 --- a/patches_platform_personal/frameworks_base/0016-UI-Remove-privacy-dot-padding.patch +++ b/patches_platform_personal/frameworks_base/0016-UI-Remove-privacy-dot-padding.patch @@ -1,4 +1,4 @@ -From ac98eee7ee113a71ae05e00c23b14e94c3539f73 Mon Sep 17 00:00:00 2001 +From 9248a81745f91699e2b6891746536deaab96dbf0 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 19 Oct 2021 12:09:34 +0000 Subject: [PATCH 16/16] UI: Remove privacy dot padding diff --git a/patches_platform_personal/packages_apps_DeskClock/0001-DeskClock-Adjust-colors-and-layout.patch b/patches_platform_personal/packages_apps_DeskClock/0001-DeskClock-Adjust-colors-and-layout.patch index b3444f9..464f9e7 100644 --- a/patches_platform_personal/packages_apps_DeskClock/0001-DeskClock-Adjust-colors-and-layout.patch +++ b/patches_platform_personal/packages_apps_DeskClock/0001-DeskClock-Adjust-colors-and-layout.patch @@ -1,7 +1,7 @@ -From 82f334dccb2d14c1415ad31ec955b646b5ef0903 Mon Sep 17 00:00:00 2001 +From 912c63f44eb3e5c9dbdeea2ec344544b065e524f Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Mon, 5 Mar 2018 23:12:46 +0800 -Subject: [PATCH 1/3] DeskClock: Adjust colors and layout +Subject: [PATCH 1/4] DeskClock: Adjust colors and layout Change-Id: I6e876ddf94bdf63062630764beb9b5139110fe4d --- diff --git a/patches_platform_personal/packages_apps_DeskClock/0003-DeskClock-Remove-night-mode.patch b/patches_platform_personal/packages_apps_DeskClock/0002-DeskClock-Remove-night-mode.patch similarity index 87% rename from patches_platform_personal/packages_apps_DeskClock/0003-DeskClock-Remove-night-mode.patch rename to patches_platform_personal/packages_apps_DeskClock/0002-DeskClock-Remove-night-mode.patch index e9c02ec..3002408 100644 --- a/patches_platform_personal/packages_apps_DeskClock/0003-DeskClock-Remove-night-mode.patch +++ b/patches_platform_personal/packages_apps_DeskClock/0002-DeskClock-Remove-night-mode.patch @@ -1,7 +1,7 @@ -From 5778373cb0bfbf81bfb264930a61435a1c5eda2a Mon Sep 17 00:00:00 2001 +From ced2463ffce1b064312ac607fcab72ef3a7a3c3c Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 5 Sep 2021 00:30:33 +0000 -Subject: [PATCH 3/3] DeskClock: Remove night mode +Subject: [PATCH 2/4] DeskClock: Remove night mode Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a --- @@ -28,10 +28,10 @@ index 1680aab83..73375dcfa 100644 \ No newline at end of file + diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java -index 7f01d880a..b295d7a77 100644 +index 49530d44c..864a41575 100644 --- a/src/com/android/deskclock/Screensaver.java +++ b/src/com/android/deskclock/Screensaver.java -@@ -166,9 +166,8 @@ public final class Screensaver extends DreamService { +@@ -164,9 +164,8 @@ public final class Screensaver extends DreamService { private void setClockStyle() { Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock); @@ -44,10 +44,10 @@ index 7f01d880a..b295d7a77 100644 /** diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java -index 14c9bab00..912d59b2c 100644 +index e1db8c5ff..a735263b3 100644 --- a/src/com/android/deskclock/ScreensaverActivity.java +++ b/src/com/android/deskclock/ScreensaverActivity.java -@@ -119,7 +119,7 @@ public class ScreensaverActivity extends BaseActivity { +@@ -117,7 +117,7 @@ public class ScreensaverActivity extends BaseActivity { Utils.setClockIconTypeface(mMainClockView); Utils.setTimeFormat((TextClock) digitalClock, false); Utils.setClockStyle(digitalClock, analogClock); diff --git a/patches_platform_personal/packages_apps_DeskClock/0002-DeskClock-Revert-date-and-clock-to-Lollipop-style.patch b/patches_platform_personal/packages_apps_DeskClock/0002-DeskClock-Revert-date-and-clock-to-Lollipop-style.patch deleted file mode 100644 index 52f6e95..0000000 --- a/patches_platform_personal/packages_apps_DeskClock/0002-DeskClock-Revert-date-and-clock-to-Lollipop-style.patch +++ /dev/null @@ -1,561 +0,0 @@ -From 9dbc9d8105c3df1efe714d509622d338e7b9413f Mon Sep 17 00:00:00 2001 -From: AndyCGYan -Date: Wed, 26 Dec 2018 22:38:54 +0800 -Subject: [PATCH 2/3] DeskClock: Revert date and clock to Lollipop style - -Also added dynamic date format based on alarm presence - -Change-Id: I04ce41d4817c794edb1579dc3a493a1cf1e8d658 ---- - res/layout-land/main_clock_frame.xml | 1 + - res/layout/date_and_next_alarm_time.xml | 6 ++---- - res/layout/digital_widget.xml | 4 ++-- - res/layout/digital_widget_sizer.xml | 2 -- - res/layout/main_clock_frame.xml | 1 + - res/layout/stopwatch_time.xml | 1 - - res/layout/timer_setup_time.xml | 2 +- - res/layout/world_clock_remote_list_item.xml | 8 +++---- - res/values-h560dp/dimens.xml | 2 +- - res/values-h650dp/dimens.xml | 2 +- - res/values-v21/styles.xml | 8 +++---- - res/values-v23/styles.xml | 2 -- - res/values/dimens.xml | 10 ++++----- - res/values/styles.xml | 5 +++-- - .../alarmclock/DigitalAppWidgetProvider.java | 10 +++++++-- - src/com/android/deskclock/ClockFragment.java | 21 ++++++++++++------- - src/com/android/deskclock/Screensaver.java | 8 ++++--- - .../deskclock/ScreensaverActivity.java | 8 ++++--- - src/com/android/deskclock/Utils.java | 16 ++++++++++++-- - 19 files changed, 70 insertions(+), 47 deletions(-) - -diff --git a/res/layout-land/main_clock_frame.xml b/res/layout-land/main_clock_frame.xml -index b72f62333..a1fa3557d 100644 ---- a/res/layout-land/main_clock_frame.xml -+++ b/res/layout-land/main_clock_frame.xml -@@ -38,6 +38,7 @@ - -+ android:layout_height="wrap_content" /> - - -+ android:layout_height="wrap_content" /> - - -\ No newline at end of file -diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml -index c5b4837a6..7e2bae454 100644 ---- a/res/layout/digital_widget.xml -+++ b/res/layout/digital_widget.xml -@@ -43,13 +43,13 @@ - - - - - -diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml -index f524cf536..7b08ca590 100644 ---- a/res/layout/digital_widget_sizer.xml -+++ b/res/layout/digital_widget_sizer.xml -@@ -46,7 +46,6 @@ - android:includeFontPadding="false" - android:ellipsize="none" - android:singleLine="true" -- android:textAllCaps="true" - android:textColor="@color/white" /> - - -@@ -71,7 +70,6 @@ - android:includeFontPadding="false" - android:ellipsize="none" - android:singleLine="true" -- android:textAllCaps="true" - android:textColor="@color/white" /> - - -diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml -index ab960728f..2042c5b04 100644 ---- a/res/layout/main_clock_frame.xml -+++ b/res/layout/main_clock_frame.xml -@@ -51,6 +51,7 @@ - - -@@ -73,6 +73,7 @@ - - -@@ -120,13 +120,13 @@ - - -@@ -135,6 +135,7 @@ - - -diff --git a/res/values-h560dp/dimens.xml b/res/values-h560dp/dimens.xml -index 003a5ad9f..6e25621ab 100644 ---- a/res/values-h560dp/dimens.xml -+++ b/res/values-h560dp/dimens.xml -@@ -16,5 +16,5 @@ - - - -- 96dp -+ 88dp - -\ No newline at end of file -diff --git a/res/values-h650dp/dimens.xml b/res/values-h650dp/dimens.xml -index 2cc58cb32..6e25621ab 100644 ---- a/res/values-h650dp/dimens.xml -+++ b/res/values-h650dp/dimens.xml -@@ -16,5 +16,5 @@ - - - -- 100dp -+ 88dp - -\ No newline at end of file -diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml -index f1dca16c0..7bc382a4d 100644 ---- a/res/values-v21/styles.xml -+++ b/res/values-v21/styles.xml -@@ -18,17 +18,17 @@ - - - - - - - - - -diff --git a/res/values-v23/styles.xml b/res/values-v23/styles.xml -index 34dcf5d73..6bf964256 100644 ---- a/res/values-v23/styles.xml -+++ b/res/values-v23/styles.xml -@@ -26,8 +26,6 @@ - - - - - - - + ++ ++ ++ ++ + +diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java +index 80a724e85..52685f1f4 100644 +--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java ++++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java +@@ -211,7 +211,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + if (Utils.isWidgetClickable(wm, widgetId)) { + final Intent openApp = new Intent(context, DeskClock.class); + final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, 0); +- rv.setOnClickPendingIntent(R.id.digital_widget, pi); ++ rv.setOnClickPendingIntent(R.id.digital_widget_actual, pi); + } + + // Configure child views of the remote view. +@@ -243,7 +243,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + final int targetWidthPx = portrait ? minWidthPx : maxWidthPx; + final int targetHeightPx = portrait ? maxHeightPx : minHeightPx; + final int largestClockFontSizePx = +- resources.getDimensionPixelSize(R.dimen.widget_max_clock_font_size); ++ resources.getDimensionPixelSize(R.dimen.sc_keyguard_clock_text_size); + + // Create a size template that describes the widget bounds. + final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx); +@@ -314,13 +314,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + } + + // Measure the widget at the largest possible size. +- Sizes high = measure(template, template.getLargestClockFontSizePx(), sizer); ++ Sizes high = measure(context, template, template.getLargestClockFontSizePx(), sizer); + if (!high.hasViolations()) { + return high; + } + + // Measure the widget at the smallest possible size. +- Sizes low = measure(template, template.getSmallestClockFontSizePx(), sizer); ++ Sizes low = measure(context, template, template.getSmallestClockFontSizePx(), sizer); + if (low.hasViolations()) { + return low; + } +@@ -332,7 +332,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + return low; + } + +- final Sizes midSize = measure(template, midFontSize, sizer); ++ final Sizes midSize = measure(context, template, midFontSize, sizer); + if (midSize.hasViolations()) { + high = midSize; + } else { +@@ -395,7 +395,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + * the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting + * size measurements. + */ +- private static Sizes measure(Sizes template, int clockFontSize, View sizer) { ++ private static Sizes measure(Context context, Sizes template, int clockFontSize, View sizer) { + // Create a copy of the given template sizes. + final Sizes measuredSizes = template.newSize(); + +@@ -406,13 +406,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + final TextView nextAlarmIcon = (TextView) sizer.findViewById(R.id.nextAlarmIcon); + + // Adjust the font sizes. +- measuredSizes.setClockFontSizePx(clockFontSize); ++ measuredSizes.setClockFontSizePx(context, clockFontSize); + clock.setText(getLongestTimeString(clock)); + clock.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mClockFontSizePx); + date.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mFontSizePx); + nextAlarm.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mFontSizePx); + nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx); +- nextAlarmIcon.setPadding(measuredSizes.mIconPaddingPx, 0, measuredSizes.mIconPaddingPx, 0); ++ nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0); + + // Measure and layout the sizer. + final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx); +@@ -493,11 +493,16 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; } + private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; } + private int getClockFontSizePx() { return mClockFontSizePx; } +- private void setClockFontSizePx(int clockFontSizePx) { ++ private void setClockFontSizePx(Context context, int clockFontSizePx) { ++ final Resources resources = context.getResources(); ++ int keyguardClockTextSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_clock_text_size); ++ int keyguardRowTextSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_row_text_size); ++ int keyguardAlarmIconSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_alarm_icon_size); ++ int alarmIconPaddingPx = resources.getDimensionPixelSize(R.dimen.alarm_icon_padding); + mClockFontSizePx = clockFontSizePx; +- mFontSizePx = max(1, round(clockFontSizePx / 7.5f)); +- mIconFontSizePx = (int) (mFontSizePx * 1.4f); +- mIconPaddingPx = mFontSizePx / 3; ++ mFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardRowTextSizePx)); ++ mIconFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardAlarmIconSizePx)); ++ mIconPaddingPx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) alarmIconPaddingPx)); + } + + /** +diff --git a/src/com/android/deskclock/AlarmUtils.java b/src/com/android/deskclock/AlarmUtils.java +index db60ace95..43767d313 100644 +--- a/src/com/android/deskclock/AlarmUtils.java ++++ b/src/com/android/deskclock/AlarmUtils.java +@@ -37,7 +37,7 @@ import java.util.Locale; + public class AlarmUtils { + + public static String getFormattedTime(Context context, Calendar time) { +- final String skeleton = DateFormat.is24HourFormat(context) ? "EHm" : "Ehma"; ++ final String skeleton = DateFormat.is24HourFormat(context) ? "Hm" : "hma"; + final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton); + return (String) DateFormat.format(pattern, time); + } +-- +2.25.1 + diff --git a/patches_platform_personal/packages_apps_DeskClock/0004-DeskClock-Wallpaper-based-text-coloring-for-digital-.patch b/patches_platform_personal/packages_apps_DeskClock/0004-DeskClock-Wallpaper-based-text-coloring-for-digital-.patch new file mode 100644 index 0000000..808eac7 --- /dev/null +++ b/patches_platform_personal/packages_apps_DeskClock/0004-DeskClock-Wallpaper-based-text-coloring-for-digital-.patch @@ -0,0 +1,118 @@ +From 1ed07dfbc441e06da971a04d6a40eaff13c27b3a Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Thu, 20 Jan 2022 04:42:03 +0000 +Subject: [PATCH 4/4] DeskClock: Wallpaper-based text coloring for digital + clock widget + +RemoteViews is such a restrictive PITA + +Change-Id: Ie22c4980526575f73ebb4e56780d4c2193cc45d3 +--- + .../alarmclock/DigitalAppWidgetProvider.java | 57 +++++++++++++++++++ + 1 file changed, 57 insertions(+) + +diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java +index 52685f1f4..fec78bed7 100644 +--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java ++++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java +@@ -19,6 +19,8 @@ package com.android.alarmclock; + import android.annotation.SuppressLint; + import android.app.AlarmManager; + import android.app.PendingIntent; ++import android.app.WallpaperColors; ++import android.app.WallpaperManager; + import android.appwidget.AppWidgetManager; + import android.appwidget.AppWidgetProvider; + import android.content.ComponentName; +@@ -108,12 +110,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + /** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */ + private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE); + ++ private static WallpaperManager mWallpaperManager; ++ private static boolean mDarkText; ++ ++ private static void relayoutAllWidgets(Context context) { ++ final AppWidgetManager wm = AppWidgetManager.getInstance(context); ++ final ComponentName provider = new ComponentName(context, DigitalAppWidgetProvider.class); ++ final int[] widgetIds = wm.getAppWidgetIds(provider); ++ for (int widgetId : widgetIds) { ++ relayoutWidget(context, wm, widgetId, wm.getAppWidgetOptions(widgetId)); ++ } ++ } ++ ++ private static void addOnColorsChangedListener(Context context) { ++ mWallpaperManager.addOnColorsChangedListener(new WallpaperManager.OnColorsChangedListener() { ++ @Override ++ public void onColorsChanged(WallpaperColors colors, int which) { ++ relayoutAllWidgets(context); ++ } ++ }, null); ++ } ++ + @Override + public void onEnabled(Context context) { + super.onEnabled(context); + + // Schedule the day-change callback if necessary. + updateDayChangeCallback(context); ++ ++ // Listen for wallpaper color changes ++ mWallpaperManager = WallpaperManager.getInstance(context); ++ addOnColorsChangedListener(context); ++ ++ // Force a relayout to pick up initial colors ++ relayoutAllWidgets(context); + } + + @Override +@@ -203,6 +233,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + */ + private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId, + Bundle options, boolean portrait) { ++ // Determine text colors. ++ if (mWallpaperManager == null) { ++ mWallpaperManager = WallpaperManager.getInstance(context); ++ addOnColorsChangedListener(context); ++ } ++ WallpaperColors wallpaperColors = mWallpaperManager.getWallpaperColors(WallpaperManager.FLAG_SYSTEM); ++ // Live wallpapers might not implement the WallpaperColors API. ++ if (wallpaperColors == null) { ++ mDarkText = false; ++ } else { ++ mDarkText = (wallpaperColors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) != 0; ++ } ++ + // Create a remote view for the digital clock. + final String packageName = context.getPackageName(); + final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget); +@@ -260,6 +303,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx); + rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx); + ++ // Apply the text color to the remote views. ++ if (mDarkText) { ++ rv.setTextColor(R.id.clock, resources.getColor(R.color.black)); ++ rv.setTextColor(R.id.date, resources.getColor(R.color.black)); ++ rv.setTextColor(R.id.nextAlarm, resources.getColor(R.color.black)); ++ } else { ++ rv.setTextColor(R.id.clock, resources.getColor(R.color.white)); ++ rv.setTextColor(R.id.date, resources.getColor(R.color.white)); ++ rv.setTextColor(R.id.nextAlarm, resources.getColor(R.color.white)); ++ } ++ + final int smallestWorldCityListSizePx = + resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size); + if (sizes.getListHeight() <= smallestWorldCityListSizePx) { +@@ -414,6 +468,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider { + nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx); + nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0); + ++ // Adjust the alarm icon text color before generating its bitmap. ++ nextAlarmIcon.setTextColor(context.getResources().getColor(mDarkText ? R.color.black : R.color.white)); ++ + // Measure and layout the sizer. + final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx); + final int heightSize = View.MeasureSpec.getSize(measuredSizes.mTargetHeightPx); +-- +2.25.1 + diff --git a/patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch b/patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch index 07e170c..8ad7f6d 100644 --- a/patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch +++ b/patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch @@ -1,4 +1,4 @@ -From d884ed740455da2dc943c14b7c2c41b5a2236c74 Mon Sep 17 00:00:00 2001 +From 978be1fd8202655676e335cdd611f9c6756c0025 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 8 Aug 2021 01:43:40 +0000 Subject: [PATCH 1/4] treble: Lineage-ify @@ -30,7 +30,7 @@ index 6a317e4..e69de29 100644 -PRODUCT_COPY_FILES += \ - device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml diff --git a/base.mk b/base.mk -index 3655b72..ce99bcc 100644 +index 73abbab..057ad0c 100644 --- a/base.mk +++ b/base.mk @@ -8,12 +8,14 @@ PRODUCT_COPY_FILES := \ @@ -68,7 +68,7 @@ index 3655b72..ce99bcc 100644 #VNDK config files PRODUCT_COPY_FILES += \ diff --git a/generate.sh b/generate.sh -index b9647b9..66a48a6 100644 +index 352fe12..7e4f137 100644 --- a/generate.sh +++ b/generate.sh @@ -65,6 +65,9 @@ for part in a ab;do @@ -169,7 +169,7 @@ index 0000000..8df673a + 127 + diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml -index 2d5c21e..7a15163 100644 +index 89be3f6..bad8f29 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -22,7 +22,6 @@ @@ -181,12 +181,12 @@ index 2d5c21e..7a15163 100644 5 true diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts -index 4ae5095..5e39d5b 100644 +index 999ff97..11dd447 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts -@@ -6,9 +6,6 @@ - /system/bin/phh-on-data.sh u:object_r:phhsu_exec:s0 +@@ -7,9 +7,6 @@ /system/bin/asus-motor u:object_r:phhsu_exec:s0 + /system/bin/xiaomi-touch u:object_r:phhsu_exec:s0 -#/system/bin/fsck\.exfat u:object_r:fsck_exec:s0 -/system/bin/fsck\.ntfs u:object_r:fsck_exec:s0 diff --git a/patches_treble/device_phh_treble/0002-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch b/patches_treble/device_phh_treble/0002-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch index 4f7013e..d69a802 100644 --- a/patches_treble/device_phh_treble/0002-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch +++ b/patches_treble/device_phh_treble/0002-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch @@ -1,4 +1,4 @@ -From 0150110fafdb657a9074b484be4d7e4e1dd50c95 Mon Sep 17 00:00:00 2001 +From 7ebb3f6332087fb5243955bb28c656e14a411660 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 8 Aug 2021 09:29:32 +0000 Subject: [PATCH 2/4] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly diff --git a/patches_treble/device_phh_treble/0003-treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch b/patches_treble/device_phh_treble/0003-treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch index a3d3cba..b91558a 100644 --- a/patches_treble/device_phh_treble/0003-treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch +++ b/patches_treble/device_phh_treble/0003-treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch @@ -1,4 +1,4 @@ -From 882eaf34cd14cbf1c9617498f0318bcaffca8632 Mon Sep 17 00:00:00 2001 +From 56c20273ac8c3c34de36f80edc2e94fc5f60b78a Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 20 Oct 2021 11:30:25 +0000 Subject: [PATCH 3/4] treble: Set TARGET_NO_KERNEL_OVERRIDE diff --git a/patches_treble/device_phh_treble/0004-add-offline-charger-sepolicy.patch b/patches_treble/device_phh_treble/0004-add-offline-charger-sepolicy.patch index 397a970..7290d0b 100644 --- a/patches_treble/device_phh_treble/0004-add-offline-charger-sepolicy.patch +++ b/patches_treble/device_phh_treble/0004-add-offline-charger-sepolicy.patch @@ -1,4 +1,4 @@ -From 53e8034ca13a7e82beeba0f92d75495836ec0061 Mon Sep 17 00:00:00 2001 +From 39c3d994822d367cad58827e6cfa8dcd7e13b519 Mon Sep 17 00:00:00 2001 From: Victor Bo Date: Tue, 15 Sep 2020 21:26:45 -0400 Subject: [PATCH 4/4] add offline charger sepolicy diff --git a/patches_treble_personal/device_phh_treble/0001-Add-Meizu-18-vibrator-support.patch b/patches_treble_personal/device_phh_treble/0001-Add-Meizu-18-vibrator-support.patch index 11f524e..2702e97 100644 --- a/patches_treble_personal/device_phh_treble/0001-Add-Meizu-18-vibrator-support.patch +++ b/patches_treble_personal/device_phh_treble/0001-Add-Meizu-18-vibrator-support.patch @@ -1,4 +1,4 @@ -From d18f52a69d550666acab021aa3d6261c83cf9299 Mon Sep 17 00:00:00 2001 +From d457d9a320d5b87cb994b2e0d09fc1ef35fad1fc Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 22 Jun 2021 13:38:31 +0000 Subject: [PATCH 1/4] Add Meizu 18 vibrator support @@ -10,7 +10,7 @@ Thanks to: Change-Id: Iecf12cd814e8773abfd78a19f98e31125a73761a --- - base.mk | 3 + + base.mk | 5 +- framework_manifest.xml | 10 ++ hal/meizu-vibrator/Android.bp | 31 ++++ hal/meizu-vibrator/Vibrator.cpp | 140 ++++++++++++++++++ @@ -19,7 +19,7 @@ Change-Id: Iecf12cd814e8773abfd78a19f98e31125a73761a hal/meizu-vibrator/service.cpp | 72 +++++++++ sepolicy/file_contexts | 1 + sepolicy/hal.te | 11 ++ - 9 files changed, 332 insertions(+) + 9 files changed, 333 insertions(+), 1 deletion(-) create mode 100644 hal/meizu-vibrator/Android.bp create mode 100644 hal/meizu-vibrator/Vibrator.cpp create mode 100644 hal/meizu-vibrator/Vibrator.h @@ -27,16 +27,19 @@ Change-Id: Iecf12cd814e8773abfd78a19f98e31125a73761a create mode 100644 hal/meizu-vibrator/service.cpp diff --git a/base.mk b/base.mk -index a372603..a537411 100644 +index 057ad0c..7e1cdc9 100644 --- a/base.mk +++ b/base.mk -@@ -218,4 +218,7 @@ PRODUCT_COPY_FILES += \ - device/phh/treble/proprietary-files/gome/fs16xx_01s_right.preset:system/phh/gome/fs16xx_01s_right.preset \ - device/phh/treble/proprietary-files/umidigi/fs16xx_01s_mono.preset:system/phh/umidigi/fs16xx_01s_mono.preset +@@ -221,6 +221,9 @@ PRODUCT_COPY_FILES += \ + PRODUCT_PACKAGES += phh-ota + PRODUCT_PACKAGES += \ +- xiaomi-touch ++ xiaomi-touch ++ +PRODUCT_PACKAGES += \ + android.hardware.vibrator@1.3-service.meizu -+ + include build/make/target/product/gsi_release.mk diff --git a/framework_manifest.xml b/framework_manifest.xml index cb37b49..1b45b4a 100644 @@ -396,10 +399,10 @@ index 0000000..1405dfb + joinRpcThreadpool(); +} diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts -index 5e39d5b..41d395d 100644 +index 11dd447..faa7256 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ /system/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.oppo.compat u:object_r:hal_fingerprint_oppo_compat_exec:s0 /system/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.oplus.compat u:object_r:hal_fingerprint_oppo_compat_exec:s0 diff --git a/patches_treble_personal/device_phh_treble/0002-Only-use-meizu-vibrator-on-Meizu-18.patch b/patches_treble_personal/device_phh_treble/0002-Only-use-meizu-vibrator-on-Meizu-18.patch index 3965cd8..fee2760 100644 --- a/patches_treble_personal/device_phh_treble/0002-Only-use-meizu-vibrator-on-Meizu-18.patch +++ b/patches_treble_personal/device_phh_treble/0002-Only-use-meizu-vibrator-on-Meizu-18.patch @@ -1,4 +1,4 @@ -From 0cca559de53a92eac0e6810ebed31967d70d4ca0 Mon Sep 17 00:00:00 2001 +From 72db86f75fae20fef140c4760383acf21902002a Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 27 Jun 2021 05:21:38 +0000 Subject: [PATCH 2/4] Only use meizu-vibrator on Meizu 18 @@ -12,8 +12,8 @@ Change-Id: I97fc52a98a77aa72bbd5601f36abc0cf18efbaea hal/meizu-vibrator/Android.bp | 1 + .../android.hardware.vibrator@1.3-service.meizu.xml | 11 +++++++++++ hal/meizu-vibrator/manifest_dummy.xml | 3 +++ - rw-system.sh | 10 ++++++++-- - 5 files changed, 23 insertions(+), 12 deletions(-) + rw-system.sh | 6 ++++++ + 5 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.xml create mode 100644 hal/meizu-vibrator/manifest_dummy.xml @@ -76,10 +76,10 @@ index 0000000..b34a10b + + diff --git a/rw-system.sh b/rw-system.sh -index ee4df70..3ed1cdd 100644 +index 5e275af..e8bd30b 100644 --- a/rw-system.sh +++ b/rw-system.sh -@@ -356,6 +356,12 @@ if [ "$foundFingerprint" = false ];then +@@ -355,6 +355,12 @@ if [ "$foundFingerprint" = false ];then mount -o bind system/phh/empty /system/etc/permissions/android.hardware.fingerprint.xml fi @@ -92,24 +92,6 @@ index ee4df70..3ed1cdd 100644 if ! grep android.hardware.bluetooth /vendor/manifest.xml && ! grep android.hardware.bluetooth /vendor/etc/vintf/manifest.xml; then mount -o bind system/phh/empty /system/etc/permissions/android.hardware.bluetooth.xml mount -o bind system/phh/empty /system/etc/permissions/android.hardware.bluetooth_le.xml -@@ -427,7 +433,7 @@ if getprop ro.build.overlay.deviceid |grep -q -e CPH1859 -e CPH1861 -e RMX1811 - - setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)" - fi - --if getprop ro.build.overlay.deviceid |grep -iq -e RMX2020 -e RMX2027 -e RMX2040 -e RMX2193 -e RMX2191;then -+if getprop ro.build.overlay.deviceid |grep -iq -e RMX2020 -e RMX2027 -e RMX2040 -e RMX2193 -e RMX2191;then - setprop persist.sys.qcom-brightness 2047 - setprop persist.sys.overlay.devinputjack true - setprop persist.sys.phh.fingerprint.nocleanup true -@@ -940,7 +946,7 @@ if (getprop ro.vendor.build.fingerprint;getprop ro.odm.build.fingerprint) |grep - setprop persist.sys.phh.fod.bbk true - fi - --if getprop ro.build.overlay.deviceid |grep -iq -e RMX1941 -e RMX1945 -e RMX1943 -e RMX1942;then -+if getprop ro.build.overlay.deviceid |grep -iq -e RMX1941 -e RMX1945 -e RMX1943 -e RMX1942;then - setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)" - setprop persist.sys.phh.mainkeys 0 - fi -- 2.25.1 diff --git a/patches_treble_personal/device_phh_treble/0003-Revert-Include-sim-toolkit-app.patch b/patches_treble_personal/device_phh_treble/0003-Revert-Include-sim-toolkit-app.patch index c5aad18..8fdb1ec 100644 --- a/patches_treble_personal/device_phh_treble/0003-Revert-Include-sim-toolkit-app.patch +++ b/patches_treble_personal/device_phh_treble/0003-Revert-Include-sim-toolkit-app.patch @@ -1,4 +1,4 @@ -From 0ff36ed6acdc7addbc61fff048b6f2b028f615c0 Mon Sep 17 00:00:00 2001 +From a13abcf3906e73f9a7a1310cbab867488e7627d5 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 28 Oct 2021 01:51:27 +0000 Subject: [PATCH 3/4] Revert "Include sim toolkit app" @@ -11,7 +11,7 @@ Change-Id: I1eb7f4bb070eea649b4cea6280299e629d1edb3d 1 file changed, 3 deletions(-) diff --git a/base.mk b/base.mk -index a537411..bc5ba37 100644 +index 7e1cdc9..09952c8 100644 --- a/base.mk +++ b/base.mk @@ -157,9 +157,6 @@ PRODUCT_PACKAGES += \ diff --git a/patches_treble_personal/device_phh_treble/0004-Revert-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explic.patch b/patches_treble_personal/device_phh_treble/0004-Revert-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explic.patch index aa1894b..cd23b43 100644 --- a/patches_treble_personal/device_phh_treble/0004-Revert-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explic.patch +++ b/patches_treble_personal/device_phh_treble/0004-Revert-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explic.patch @@ -1,4 +1,4 @@ -From dfb80c5cb89c33b2be845fec1cca084399a7f71f Mon Sep 17 00:00:00 2001 +From 43e4d35bd355a04b3e1692f03400fe853b581ee5 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 8 Aug 2021 09:31:01 +0000 Subject: [PATCH 4/4] Revert "treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS diff --git a/patches_treble_phh/platform_frameworks_av/0001-Fix-BT-in-call-on-CAF-devices.patch b/patches_treble_phh/platform_frameworks_av/0001-Fix-BT-in-call-on-CAF-devices.patch index 13e6791..fd46f31 100644 --- a/patches_treble_phh/platform_frameworks_av/0001-Fix-BT-in-call-on-CAF-devices.patch +++ b/patches_treble_phh/platform_frameworks_av/0001-Fix-BT-in-call-on-CAF-devices.patch @@ -1,7 +1,7 @@ -From 4c452bb5ff1f23279efa5200c1c9b04d563bed8f Mon Sep 17 00:00:00 2001 +From 2109e8f28ad6b0dd9ed1e6aea80d8f96bcfc6856 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 5 Aug 2019 18:09:50 +0200 -Subject: [PATCH 01/18] Fix BT in-call on CAF devices +Subject: [PATCH 01/19] Fix BT in-call on CAF devices See https://github.com/phhusson/treble_experimentations/issues/374 diff --git a/patches_treble_phh/platform_frameworks_av/0002-Add-partial-cam-id-is-hardcoded-support-for-Asus-ZF6.patch b/patches_treble_phh/platform_frameworks_av/0002-Add-partial-cam-id-is-hardcoded-support-for-Asus-ZF6.patch index 2801c84..86aa1c2 100644 --- a/patches_treble_phh/platform_frameworks_av/0002-Add-partial-cam-id-is-hardcoded-support-for-Asus-ZF6.patch +++ b/patches_treble_phh/platform_frameworks_av/0002-Add-partial-cam-id-is-hardcoded-support-for-Asus-ZF6.patch @@ -1,7 +1,7 @@ -From 8ee7ce7f56c8f45288e9a0135a8ee20f18d79b57 Mon Sep 17 00:00:00 2001 +From efb1576f000a7bf89e53381c5863dbe5e407f77e Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 1 Oct 2019 13:35:49 +0200 -Subject: [PATCH 02/18] Add (partial, cam id is hardcoded) support for Asus ZF6 +Subject: [PATCH 02/19] Add (partial, cam id is hardcoded) support for Asus ZF6 motor camera Change-Id: Iea6e1370780a1d16f728748d1d948d092532d8fe @@ -11,7 +11,7 @@ Change-Id: Iea6e1370780a1d16f728748d1d948d092532d8fe 2 files changed, 29 insertions(+) diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp -index d0d3a9d81b..6705186fdd 100644 +index 04b56048e0..24b022226f 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -26,6 +26,7 @@ @@ -66,7 +66,7 @@ index d0d3a9d81b..6705186fdd 100644 Status CameraService::setTorchMode(const String16& cameraId, bool enabled, const sp& clientBinder) { Mutex::Autolock lock(mServiceLock); -@@ -3049,6 +3073,8 @@ binder::Status CameraService::BasicClient::disconnect() { +@@ -3054,6 +3078,8 @@ binder::Status CameraService::BasicClient::disconnect() { } mDisconnected = true; diff --git a/patches_treble_phh/platform_frameworks_av/0003-audiopolicy-try-again-with-trimmed-audio-port-name-i.patch b/patches_treble_phh/platform_frameworks_av/0003-audiopolicy-try-again-with-trimmed-audio-port-name-i.patch index 8045ee4..fcc93de 100644 --- a/patches_treble_phh/platform_frameworks_av/0003-audiopolicy-try-again-with-trimmed-audio-port-name-i.patch +++ b/patches_treble_phh/platform_frameworks_av/0003-audiopolicy-try-again-with-trimmed-audio-port-name-i.patch @@ -1,7 +1,7 @@ -From 307bf28e8863d55291bb52cf5724fa0f541adfcd Mon Sep 17 00:00:00 2001 +From 9f19a75cd2c476e071f61bea35d8f082943c3522 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Thu, 23 Jan 2020 11:13:43 +0800 -Subject: [PATCH 03/18] audiopolicy: try again with trimmed audio port name if +Subject: [PATCH 03/19] audiopolicy: try again with trimmed audio port name if not found * In Spreadtrum BSP, some audio routes may contain ports with extra diff --git a/patches_treble_phh/platform_frameworks_av/0004-There-are-three-SCO-devices.-Fallback-from-one-to-th.patch b/patches_treble_phh/platform_frameworks_av/0004-There-are-three-SCO-devices.-Fallback-from-one-to-th.patch index 43265d5..db64434 100644 --- a/patches_treble_phh/platform_frameworks_av/0004-There-are-three-SCO-devices.-Fallback-from-one-to-th.patch +++ b/patches_treble_phh/platform_frameworks_av/0004-There-are-three-SCO-devices.-Fallback-from-one-to-th.patch @@ -1,7 +1,7 @@ -From be6b7ba5a52fda8a3dba06e4b58cf7f91b1f166e Mon Sep 17 00:00:00 2001 +From 94c8075354ae12fabd2c7c3cef2a3623bb38813f Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 13 Apr 2020 21:01:16 +0200 -Subject: [PATCH 04/18] There are three SCO devices. Fallback from one to the +Subject: [PATCH 04/19] There are three SCO devices. Fallback from one to the others if needed Change-Id: I414dcb6b154855c00cb8520b23dc1069827864b2 diff --git a/patches_treble_phh/platform_frameworks_av/0005-Add-persist.sys.phh.samsung.camera_ids-property-to-a.patch b/patches_treble_phh/platform_frameworks_av/0005-Add-persist.sys.phh.samsung.camera_ids-property-to-a.patch index 866e01b..c56657f 100644 --- a/patches_treble_phh/platform_frameworks_av/0005-Add-persist.sys.phh.samsung.camera_ids-property-to-a.patch +++ b/patches_treble_phh/platform_frameworks_av/0005-Add-persist.sys.phh.samsung.camera_ids-property-to-a.patch @@ -1,7 +1,7 @@ -From 9e9c10692262d752934e2343dfe76b0582c23601 Mon Sep 17 00:00:00 2001 +From d729bbcff505ed46d6e8251475d5662a4207d935 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 14 May 2020 19:54:55 +0200 -Subject: [PATCH 05/18] Add persist.sys.phh.samsung.camera_ids property to +Subject: [PATCH 05/19] Add persist.sys.phh.samsung.camera_ids property to access hidden Samsung cameras Change-Id: I2c7bf535272acc28ed2277e96c78ddd28a0b4593 diff --git a/patches_treble_phh/platform_frameworks_av/0006-Add-a-property-to-force-camera-timestamp-source.patch b/patches_treble_phh/platform_frameworks_av/0006-Add-a-property-to-force-camera-timestamp-source.patch index 0cd7ac1..1dfc11e 100644 --- a/patches_treble_phh/platform_frameworks_av/0006-Add-a-property-to-force-camera-timestamp-source.patch +++ b/patches_treble_phh/platform_frameworks_av/0006-Add-a-property-to-force-camera-timestamp-source.patch @@ -1,7 +1,7 @@ -From 13f93488d8f5f2ebf9e350cd9f0f0cc0f7e8313d Mon Sep 17 00:00:00 2001 +From 7ff037ed35bbb81e8834b762248fea580e1f7dea Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 19 May 2020 14:01:14 +0200 -Subject: [PATCH 06/18] Add a property to force camera timestamp source +Subject: [PATCH 06/19] Add a property to force camera timestamp source Some devices wrongly report their timesource Camera's timesource can either be CLOCK_MONOTONIC, or CLOCK_BOOTTIME @@ -18,7 +18,7 @@ timestamp source. 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp -index fd645c7a72..4a6a922c43 100644 +index 87c1c750ed..b4a58ec749 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -346,8 +346,16 @@ status_t Camera3Device::initializeCommonLocked() { diff --git a/patches_treble_phh/platform_frameworks_av/0007-FIH-devices-Fix-Earpiece-audio-output.patch b/patches_treble_phh/platform_frameworks_av/0007-FIH-devices-Fix-Earpiece-audio-output.patch index 980adb7..3e6c589 100644 --- a/patches_treble_phh/platform_frameworks_av/0007-FIH-devices-Fix-Earpiece-audio-output.patch +++ b/patches_treble_phh/platform_frameworks_av/0007-FIH-devices-Fix-Earpiece-audio-output.patch @@ -1,7 +1,7 @@ -From ccc5945c9b22dd3e96cf8ed602d8fc1697dedb87 Mon Sep 17 00:00:00 2001 +From 39f279a2575ea4bf23672224c9b7b37dbe199007 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 24 Apr 2018 00:14:28 +0200 -Subject: [PATCH 07/18] FIH devices: Fix "Earpiece" audio output +Subject: [PATCH 07/19] FIH devices: Fix "Earpiece" audio output On some FIH devices (confirmed on Razer, and probably on Aquos SS2), Earpiece is not listed in attachedDevices, and devicePort's profile diff --git a/patches_treble_phh/platform_frameworks_av/0008-No-longer-make-re-assigning-legacy-audio-groups-fata.patch b/patches_treble_phh/platform_frameworks_av/0008-No-longer-make-re-assigning-legacy-audio-groups-fata.patch index a6d581a..4044577 100644 --- a/patches_treble_phh/platform_frameworks_av/0008-No-longer-make-re-assigning-legacy-audio-groups-fata.patch +++ b/patches_treble_phh/platform_frameworks_av/0008-No-longer-make-re-assigning-legacy-audio-groups-fata.patch @@ -1,7 +1,7 @@ -From 4babf9d2e8c5169cabe185b99bce89e0ccfa1b9b Mon Sep 17 00:00:00 2001 +From 47acdf3a578d5d55c98b0f59906c4728248e6687 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 12 Sep 2020 12:32:50 +0200 -Subject: [PATCH 08/18] No longer make re-assigning legacy audio groups fatal. +Subject: [PATCH 08/19] No longer make re-assigning legacy audio groups fatal. Mi9 declares AUDIO_STREAM_PATCH and AUDIO_STREAM_REROUTING which is defined by framework too diff --git a/patches_treble_phh/platform_frameworks_av/0009-Add-persist.sys.phh.disable_a2dp_offload-property-to.patch b/patches_treble_phh/platform_frameworks_av/0009-Add-persist.sys.phh.disable_a2dp_offload-property-to.patch index 5658085..a1449d0 100644 --- a/patches_treble_phh/platform_frameworks_av/0009-Add-persist.sys.phh.disable_a2dp_offload-property-to.patch +++ b/patches_treble_phh/platform_frameworks_av/0009-Add-persist.sys.phh.disable_a2dp_offload-property-to.patch @@ -1,7 +1,7 @@ -From cfc4fa6db350285e5a6ab87735e9252a1c070509 Mon Sep 17 00:00:00 2001 +From 1bb61eb2a2777c127b191599d796b5476a26c807 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 25 May 2020 21:26:54 +0200 -Subject: [PATCH 09/18] Add persist.sys.phh.disable_a2dp_offload property to +Subject: [PATCH 09/19] Add persist.sys.phh.disable_a2dp_offload property to force a2dp offload Change-Id: Id474540c33c594cc4010a1a398d82bff8aadaeea diff --git a/patches_treble_phh/platform_frameworks_av/0010-Make-camera-IDs-filter-out-optional.patch b/patches_treble_phh/platform_frameworks_av/0010-Make-camera-IDs-filter-out-optional.patch index a682824..56a7683 100644 --- a/patches_treble_phh/platform_frameworks_av/0010-Make-camera-IDs-filter-out-optional.patch +++ b/patches_treble_phh/platform_frameworks_av/0010-Make-camera-IDs-filter-out-optional.patch @@ -1,7 +1,7 @@ -From 5f2eb5d0a7224f6f466de35c9eeed3ae5a4dbf5e Mon Sep 17 00:00:00 2001 +From bba858703aee4bcfaaa38ad9f2da7be018fffc17 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 21 Dec 2020 20:19:11 +0100 -Subject: [PATCH 10/18] Make camera IDs filter-out optional +Subject: [PATCH 10/19] Make camera IDs filter-out optional Nowadays most people have Camera 2 apps, and would like to have all cameras, rather than limit which cameras are available. diff --git a/patches_treble_phh/platform_frameworks_av/0011-Support-Samsung-R-multi-cams.patch b/patches_treble_phh/platform_frameworks_av/0011-Support-Samsung-R-multi-cams.patch index d947e69..7d6b473 100644 --- a/patches_treble_phh/platform_frameworks_av/0011-Support-Samsung-R-multi-cams.patch +++ b/patches_treble_phh/platform_frameworks_av/0011-Support-Samsung-R-multi-cams.patch @@ -1,7 +1,7 @@ -From 2f93928141323d08cba2f10517c4338d3af0ef59 Mon Sep 17 00:00:00 2001 +From ed5f24d5cf810c146b60b90a01a85a37ab6c4a28 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 13 Mar 2021 14:20:03 -0500 -Subject: [PATCH 11/18] Support Samsung R multi-cams +Subject: [PATCH 11/19] Support Samsung R multi-cams Change-Id: If46f385e8dd16185cbf37ab083e6a1242e1d1555 --- diff --git a/patches_treble_phh/platform_frameworks_av/0012-Don-t-crash-on-unknown-audio-devices.patch b/patches_treble_phh/platform_frameworks_av/0012-Don-t-crash-on-unknown-audio-devices.patch index 56a1ca0..19cd155 100644 --- a/patches_treble_phh/platform_frameworks_av/0012-Don-t-crash-on-unknown-audio-devices.patch +++ b/patches_treble_phh/platform_frameworks_av/0012-Don-t-crash-on-unknown-audio-devices.patch @@ -1,7 +1,7 @@ -From fe8421d437012b5909d3dae6dec2969e67260826 Mon Sep 17 00:00:00 2001 +From 088360f986f6c7c009019eacf10dfc4f1cf5d6a0 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 23 Mar 2021 00:16:42 +0100 -Subject: [PATCH 12/18] Don't crash on unknown audio devices +Subject: [PATCH 12/19] Don't crash on unknown audio devices Change-Id: I2df8d88f742da6a84aa8888cdf19de25444de919 --- diff --git a/patches_treble_phh/platform_frameworks_av/0013-Reenable-STRATEGY_ROUTING.-This-is-a-leftover-of-tri.patch b/patches_treble_phh/platform_frameworks_av/0013-Reenable-STRATEGY_ROUTING.-This-is-a-leftover-of-tri.patch index ba67d1d..d1d15dd 100644 --- a/patches_treble_phh/platform_frameworks_av/0013-Reenable-STRATEGY_ROUTING.-This-is-a-leftover-of-tri.patch +++ b/patches_treble_phh/platform_frameworks_av/0013-Reenable-STRATEGY_ROUTING.-This-is-a-leftover-of-tri.patch @@ -1,7 +1,7 @@ -From d3d598ad4f8d22fefd4248e9fc04fb77c2800ace Mon Sep 17 00:00:00 2001 +From 3e64779329fa068fed4fa0f66e2cf498611dc901 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 28 Mar 2021 14:47:52 +0200 -Subject: [PATCH 13/18] Reenable STRATEGY_ROUTING. This is a leftover of tries +Subject: [PATCH 13/19] Reenable STRATEGY_ROUTING. This is a leftover of tries of 587b198, wrongly commited in 20f869 --- diff --git a/patches_treble_phh/platform_frameworks_av/0014-Use-a-fake-volume-policy-when-none-has-been-found.patch b/patches_treble_phh/platform_frameworks_av/0014-Use-a-fake-volume-policy-when-none-has-been-found.patch index 0f166ec..8c74e80 100644 --- a/patches_treble_phh/platform_frameworks_av/0014-Use-a-fake-volume-policy-when-none-has-been-found.patch +++ b/patches_treble_phh/platform_frameworks_av/0014-Use-a-fake-volume-policy-when-none-has-been-found.patch @@ -1,7 +1,7 @@ -From f150ef9a8d0776fbd2123662aac7315ba7bd48de Mon Sep 17 00:00:00 2001 +From 2b230756e1dc4c184557c577da7aa65f1a890be3 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 28 Mar 2021 14:48:49 +0200 -Subject: [PATCH 14/18] Use a fake volume policy when none has been found +Subject: [PATCH 14/19] Use a fake volume policy when none has been found This is useful, because on Samsung devices, the "real" (=non-gsi-cheating) audio policy doesn't have any volume policy. diff --git a/patches_treble_phh/platform_frameworks_av/0015-Not-all-sources-in-a-route-are-valid.-Dont-ignore-th.patch b/patches_treble_phh/platform_frameworks_av/0015-Not-all-sources-in-a-route-are-valid.-Dont-ignore-th.patch index 434e917..6681a5e 100644 --- a/patches_treble_phh/platform_frameworks_av/0015-Not-all-sources-in-a-route-are-valid.-Dont-ignore-th.patch +++ b/patches_treble_phh/platform_frameworks_av/0015-Not-all-sources-in-a-route-are-valid.-Dont-ignore-th.patch @@ -1,7 +1,7 @@ -From 244b0d93a9a1c3d2425b50c11f5c1abf310d21f9 Mon Sep 17 00:00:00 2001 +From 504363194ce939aaacf76d0e3f09106d8d68b139 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 28 Mar 2021 18:54:47 +0200 -Subject: [PATCH 15/18] Not all sources in a route are valid. Dont ignore the +Subject: [PATCH 15/19] Not all sources in a route are valid. Dont ignore the whole route because of one broken source Change-Id: If8a51740e71bef3a4738262ad7b43a337b0ec36d diff --git a/patches_treble_phh/platform_frameworks_av/0016-When-aux-cameras-are-enabled-ignore-system-only-came.patch b/patches_treble_phh/platform_frameworks_av/0016-When-aux-cameras-are-enabled-ignore-system-only-came.patch index f9b9912..5b63905 100644 --- a/patches_treble_phh/platform_frameworks_av/0016-When-aux-cameras-are-enabled-ignore-system-only-came.patch +++ b/patches_treble_phh/platform_frameworks_av/0016-When-aux-cameras-are-enabled-ignore-system-only-came.patch @@ -1,7 +1,7 @@ -From f69403f665a91492fcfd5d2afe52b8e88c903b85 Mon Sep 17 00:00:00 2001 +From 42780cbfbbb8ad0f5eef80541cb251c54c41129a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 7 Aug 2021 11:11:39 +0200 -Subject: [PATCH 16/18] When aux cameras are enabled, ignore "system only" +Subject: [PATCH 16/19] When aux cameras are enabled, ignore "system only" camera flag (it shouldnt be q security issue since secure cameras are listed otherwise) diff --git a/patches_treble_phh/platform_frameworks_av/0017-APM-Restore-R-and-Q-behavior-respectively-for-teleph.patch b/patches_treble_phh/platform_frameworks_av/0017-APM-Restore-R-and-Q-behavior-respectively-for-teleph.patch index 652f565..6dd70ef 100644 --- a/patches_treble_phh/platform_frameworks_av/0017-APM-Restore-R-and-Q-behavior-respectively-for-teleph.patch +++ b/patches_treble_phh/platform_frameworks_av/0017-APM-Restore-R-and-Q-behavior-respectively-for-teleph.patch @@ -1,7 +1,7 @@ -From 2140c752c78511852fef8fe2320d62ff88fb4a6c Mon Sep 17 00:00:00 2001 +From 7dd1be6f9d683cdb8a204e3ffde84f08a638d93d Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Tue, 19 Oct 2021 21:16:55 -0400 -Subject: [PATCH 17/18] APM: Restore R and Q behavior respectively for +Subject: [PATCH 17/19] APM: Restore R and Q behavior respectively for telephony audio This conditionally reverts part of 51c9cc (S) and afd4ce (R) when the @@ -34,7 +34,7 @@ Change-Id: I56d36d2aef4319935cb88a3e4771b23c6d5b2145 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp -index cc2d8e8cf4..8defaad32c 100644 +index cb9d70055e..dad066ec7f 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp @@ -601,6 +601,11 @@ status_t AudioPolicyManager::updateCallRoutingInternal( diff --git a/patches_treble_phh/platform_frameworks_av/0018-Revert-Remove-support-for-audio-HAL-V2-from-the-fram.patch b/patches_treble_phh/platform_frameworks_av/0018-Revert-Remove-support-for-audio-HAL-V2-from-the-fram.patch index bef9a3f..a5dd74d 100644 --- a/patches_treble_phh/platform_frameworks_av/0018-Revert-Remove-support-for-audio-HAL-V2-from-the-fram.patch +++ b/patches_treble_phh/platform_frameworks_av/0018-Revert-Remove-support-for-audio-HAL-V2-from-the-fram.patch @@ -1,7 +1,7 @@ -From e7f31e63f87dd23e421645783a672ce00e9f1122 Mon Sep 17 00:00:00 2001 +From 40839d6f809c90177f3b5160954d2e8abc6cb8f6 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 11 Oct 2021 16:10:42 -0400 -Subject: [PATCH 18/18] Revert "Remove support for audio HAL V2 from the +Subject: [PATCH 18/19] Revert "Remove support for audio HAL V2 from the framework" This reverts commit cbf517f837f7bf8a59f3ff8aa1e0e3e19612e251. diff --git a/patches_treble_phh/platform_frameworks_av/0019-Fix-parsing-audio-hal-7.0-audio-policies.patch b/patches_treble_phh/platform_frameworks_av/0019-Fix-parsing-audio-hal-7.0-audio-policies.patch new file mode 100644 index 0000000..1ecb8c3 --- /dev/null +++ b/patches_treble_phh/platform_frameworks_av/0019-Fix-parsing-audio-hal-7.0-audio-policies.patch @@ -0,0 +1,29 @@ +From 0ab558df019b2841415ac58d8cf9acc17c217b8a Mon Sep 17 00:00:00 2001 +From: Pierre-Hugues Husson +Date: Sun, 30 Jan 2022 07:40:19 -0500 +Subject: [PATCH 19/19] Fix parsing audio hal 7.0 audio policies + +Google changed separator from natural "," to weird " " +We broke its support in "FIH devices: Fix "Earpiece" audio output" + +Change-Id: I458b8b6a6498dd9cf748e00843ff65c561579902 +--- + .../audiopolicy/common/managerdefinitions/src/Serializer.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp +index 2ff11ddbab..df4f2dff63 100644 +--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp ++++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp +@@ -431,7 +431,7 @@ PolicySerializer::deserialize( + std::string samplingRates = getXmlAttribute(cur, Attributes::samplingRates); + std::string format = getXmlAttribute(cur, Attributes::format); + std::string channels = getXmlAttribute(cur, Attributes::channelMasks); +- ChannelTraits::Collection channelsMask = channelMasksFromString(channels, ","); ++ ChannelTraits::Collection channelsMask = channelMasksFromString(channels, mChannelMasksSeparator.c_str()); + + //Some Foxconn devices have wrong earpiece channel mask, leading to no channel mask + if(channelsMask.size() == 1 && *channelsMask.begin() == AUDIO_CHANNEL_IN_MONO && isOutput) { +-- +2.25.1 + diff --git a/patches_treble_phh/platform_frameworks_base/0001-Fallback-to-stupid-autobrightness-if-brightness-valu.patch b/patches_treble_phh/platform_frameworks_base/0001-Fallback-to-stupid-autobrightness-if-brightness-valu.patch index 04c7e7a..726a926 100644 --- a/patches_treble_phh/platform_frameworks_base/0001-Fallback-to-stupid-autobrightness-if-brightness-valu.patch +++ b/patches_treble_phh/platform_frameworks_base/0001-Fallback-to-stupid-autobrightness-if-brightness-valu.patch @@ -1,4 +1,4 @@ -From 6a586c8d51eddc005f1215e73327321296c047fd Mon Sep 17 00:00:00 2001 +From e42a02d1448c13fde0e1d7a326572d04f27fef14 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 5 Oct 2021 17:59:16 -0400 Subject: [PATCH 01/28] Fallback to stupid autobrightness if brightness values diff --git a/patches_treble_phh/platform_frameworks_base/0002-Relax-requirement-for-visible-flag-to-sdcards.patch b/patches_treble_phh/platform_frameworks_base/0002-Relax-requirement-for-visible-flag-to-sdcards.patch index 87be30b..616c1ef 100644 --- a/patches_treble_phh/platform_frameworks_base/0002-Relax-requirement-for-visible-flag-to-sdcards.patch +++ b/patches_treble_phh/platform_frameworks_base/0002-Relax-requirement-for-visible-flag-to-sdcards.patch @@ -1,4 +1,4 @@ -From 19e1c2ec405a3a378fd80b86716d65692da7a1cd Mon Sep 17 00:00:00 2001 +From 950264e8b5aa352a8d5663878a7ad6e5ac7d7865 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 28 Nov 2017 18:28:04 +0100 Subject: [PATCH 02/28] Relax requirement for visible flag to sdcards @@ -13,7 +13,7 @@ Change-Id: Ia616671c03562d1eadaff5531a5c708a62d7ad3a 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java -index 8727932a87f7..f58f952d19e2 100644 +index 2f29c3cb4e7c..de92ad4d47ca 100644 --- a/services/core/java/com/android/server/StorageManagerService.java +++ b/services/core/java/com/android/server/StorageManagerService.java @@ -1582,7 +1582,8 @@ class StorageManagerService extends IStorageManager.Stub @@ -24,8 +24,8 @@ index 8727932a87f7..f58f952d19e2 100644 + // Assume all SDs match this as well + if (vol.disk.isAdoptable() || vol.disk.isSd()) { vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE; - } - + } else if (vol.disk.isSd()) { + vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE; -- 2.25.1 diff --git a/patches_treble_phh/platform_frameworks_base/0003-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch b/patches_treble_phh/platform_frameworks_base/0003-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch index 642c0c7..a8cdb5c 100644 --- a/patches_treble_phh/platform_frameworks_base/0003-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch +++ b/patches_treble_phh/platform_frameworks_base/0003-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch @@ -1,4 +1,4 @@ -From 52c14e64a80eede9b3e82afd54fd4e6cf5862cf1 Mon Sep 17 00:00:00 2001 +From 439dea5fc58d5d67545f882c885586d6aa04e2dc Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 17 May 2018 20:28:35 +0200 Subject: [PATCH 03/28] Don't crash if there is IR HAL is not declared diff --git a/patches_treble_phh/platform_frameworks_base/0004-Show-APN-Settings-for-CDMA-carriers.patch b/patches_treble_phh/platform_frameworks_base/0004-Show-APN-Settings-for-CDMA-carriers.patch index 9aa8e80..4c580da 100644 --- a/patches_treble_phh/platform_frameworks_base/0004-Show-APN-Settings-for-CDMA-carriers.patch +++ b/patches_treble_phh/platform_frameworks_base/0004-Show-APN-Settings-for-CDMA-carriers.patch @@ -1,4 +1,4 @@ -From 33fb74d694502c95ee26f331ea308114f8506b90 Mon Sep 17 00:00:00 2001 +From 3d3ef7ef4a0406ed5b3761ee934d172bfdbe02e7 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 6 Aug 2018 12:49:00 +0200 Subject: [PATCH 04/28] Show APN Settings for CDMA carriers diff --git a/patches_treble_phh/platform_frameworks_base/0005-Re-order-services-so-that-it-works-even-without-qtag.patch b/patches_treble_phh/platform_frameworks_base/0005-Re-order-services-so-that-it-works-even-without-qtag.patch index 0e62bf9..ac155d3 100644 --- a/patches_treble_phh/platform_frameworks_base/0005-Re-order-services-so-that-it-works-even-without-qtag.patch +++ b/patches_treble_phh/platform_frameworks_base/0005-Re-order-services-so-that-it-works-even-without-qtag.patch @@ -1,4 +1,4 @@ -From b9d12e89208f1b10efbf6d64b9c1b8613b6b336c Mon Sep 17 00:00:00 2001 +From 114aa0bef17c9a6814d4424e8ed3b25512102c3d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 8 Nov 2018 23:04:03 +0100 Subject: [PATCH 05/28] Re-order services so that it works even without qtaguid @@ -9,7 +9,7 @@ Change-Id: I0c0f527b3ae151d45c68f7ac6c205da3f34e74df 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java -index 9c664b6da4f2..8ebcfb667161 100644 +index 0a85854b2af8..2b3b9b1572d7 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java @@ -878,6 +878,10 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { diff --git a/patches_treble_phh/platform_frameworks_base/0006-Support-samsung-Pie-and-Q-light-hal.patch b/patches_treble_phh/platform_frameworks_base/0006-Support-samsung-Pie-and-Q-light-hal.patch index 9de8683..c0bf831 100644 --- a/patches_treble_phh/platform_frameworks_base/0006-Support-samsung-Pie-and-Q-light-hal.patch +++ b/patches_treble_phh/platform_frameworks_base/0006-Support-samsung-Pie-and-Q-light-hal.patch @@ -1,4 +1,4 @@ -From 073b07985a88b4ab54a9451503d58070de0f0721 Mon Sep 17 00:00:00 2001 +From fec18df4c1900f54a9581569a27f44d4aa6689ce Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 24 Mar 2019 23:05:14 +0100 Subject: [PATCH 06/28] Support samsung Pie and Q light hal @@ -10,13 +10,13 @@ Change-Id: I01f94acd7d0672733e48854d80368f9ac6f861c6 2 files changed, 53 insertions(+) diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp -index 81532bcba0ae..8ddc16aae3d7 100644 +index 53401fd47178..59256cc73df1 100644 --- a/services/core/jni/Android.bp +++ b/services/core/jni/Android.bp -@@ -184,6 +184,8 @@ cc_defaults { +@@ -183,6 +183,8 @@ cc_defaults { + "android.system.suspend.control.internal-cpp", "android.system.suspend@1.0", "service.incremental", - "vendor.lineage.power-V1-cpp", + "vendor.samsung.hardware.light@2.0", + "vendor.samsung.hardware.light@3.0", ], diff --git a/patches_treble_phh/platform_frameworks_base/0007-Add-support-for-samsung-touch-physical-and-hover-pro.patch b/patches_treble_phh/platform_frameworks_base/0007-Add-support-for-samsung-touch-physical-and-hover-pro.patch index 9f88f79..8d1dbfa 100644 --- a/patches_treble_phh/platform_frameworks_base/0007-Add-support-for-samsung-touch-physical-and-hover-pro.patch +++ b/patches_treble_phh/platform_frameworks_base/0007-Add-support-for-samsung-touch-physical-and-hover-pro.patch @@ -1,4 +1,4 @@ -From 489e8a00a23c0dd6fbef5f1e69b2f7ed3fbc04d7 Mon Sep 17 00:00:00 2001 +From 4d0b2ab189abeadc3802878d679ef1e6800c76da Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 12 Aug 2019 23:08:26 +0200 Subject: [PATCH 07/28] Add support for samsung touch, physical and hover diff --git a/patches_treble_phh/platform_frameworks_base/0008-Always-allow-overriding-the-number-of-work-profiles.patch b/patches_treble_phh/platform_frameworks_base/0008-Always-allow-overriding-the-number-of-work-profiles.patch index d36a1e0..0b0efff 100644 --- a/patches_treble_phh/platform_frameworks_base/0008-Always-allow-overriding-the-number-of-work-profiles.patch +++ b/patches_treble_phh/platform_frameworks_base/0008-Always-allow-overriding-the-number-of-work-profiles.patch @@ -1,4 +1,4 @@ -From e69df4088c108effd45e8741047ee1afd8ca2ce5 Mon Sep 17 00:00:00 2001 +From bb2490310ccca71a4a0b69858d0a274eefebd3d7 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 5 Apr 2020 16:32:46 +0200 Subject: [PATCH 08/28] Always allow overriding the number of work profiles diff --git a/patches_treble_phh/platform_frameworks_base/0009-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch b/patches_treble_phh/platform_frameworks_base/0009-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch index 559c504..c1f12d2 100644 --- a/patches_treble_phh/platform_frameworks_base/0009-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch +++ b/patches_treble_phh/platform_frameworks_base/0009-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch @@ -1,4 +1,4 @@ -From 901baaf78da74754054309406fb5211170a38552 Mon Sep 17 00:00:00 2001 +From 86ba18dfced8787826c34bb28d7ed83b35b8d3f4 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 6 Jun 2020 18:21:56 +0200 Subject: [PATCH 09/28] HOME deserves to wake-up devices just as well as back diff --git a/patches_treble_phh/platform_frameworks_base/0010-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch b/patches_treble_phh/platform_frameworks_base/0010-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch index 9de0611..f23e281 100644 --- a/patches_treble_phh/platform_frameworks_base/0010-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch +++ b/patches_treble_phh/platform_frameworks_base/0010-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch @@ -1,4 +1,4 @@ -From 14e1ced9fe14016d081618bb41a451227cd538d8 Mon Sep 17 00:00:00 2001 +From 1b7f27efb7af8a4c9f49a1e504f5b4d2530e1c85 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 29 Sep 2020 22:39:47 +0200 Subject: [PATCH 10/28] Some devices have proximity sensor reporting NaN as max diff --git a/patches_treble_phh/platform_frameworks_base/0011-Fix-brightness-range-not-being-complete-on-Samsung-d.patch b/patches_treble_phh/platform_frameworks_base/0011-Fix-brightness-range-not-being-complete-on-Samsung-d.patch index 9c70656..05d840f 100644 --- a/patches_treble_phh/platform_frameworks_base/0011-Fix-brightness-range-not-being-complete-on-Samsung-d.patch +++ b/patches_treble_phh/platform_frameworks_base/0011-Fix-brightness-range-not-being-complete-on-Samsung-d.patch @@ -1,4 +1,4 @@ -From f8fb9e614a976c475edc26770347f9eee623d85c Mon Sep 17 00:00:00 2001 +From 5f849729380e68e0317c89da35c23b98df916748 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 29 Sep 2020 22:40:10 +0200 Subject: [PATCH 11/28] Fix brightness range not being complete on Samsung @@ -15,7 +15,7 @@ Change-Id: I4d97cbc32490949e83272b81ec6320a5483310b1 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java -index 62d9991254bd..24932bd4d201 100644 +index 5ac1f31bf817..06cd0ac979e9 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java @@ -1040,9 +1040,11 @@ public final class PowerManagerService extends SystemService diff --git a/patches_treble_phh/platform_frameworks_base/0012-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch b/patches_treble_phh/platform_frameworks_base/0012-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch index 035ed92..dc28b9d 100644 --- a/patches_treble_phh/platform_frameworks_base/0012-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch +++ b/patches_treble_phh/platform_frameworks_base/0012-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch @@ -1,4 +1,4 @@ -From ccb4d4cf65dcb79d237caa9192bb863ef5809edd Mon Sep 17 00:00:00 2001 +From af86daa9d8bd70690e9b50c2e1e23e5d52bc662d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 25 Oct 2020 23:57:26 +0100 Subject: [PATCH 12/28] Re-implement fnmatch-like behaviour for RRO java-side diff --git a/patches_treble_phh/platform_frameworks_base/0013-Make-rounded-corners-padding-overridable-with-persis.patch b/patches_treble_phh/platform_frameworks_base/0013-Make-rounded-corners-padding-overridable-with-persis.patch index 56ac3ef..91edf81 100644 --- a/patches_treble_phh/platform_frameworks_base/0013-Make-rounded-corners-padding-overridable-with-persis.patch +++ b/patches_treble_phh/platform_frameworks_base/0013-Make-rounded-corners-padding-overridable-with-persis.patch @@ -1,4 +1,4 @@ -From 924e19514d9bc0c67c64560fba9d7fc3432e8981 Mon Sep 17 00:00:00 2001 +From 8a1571889ec702ae794f006af91d6d662042cc0a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 6 Dec 2020 12:20:08 +0100 Subject: [PATCH 13/28] Make rounded corners padding overridable with diff --git a/patches_treble_phh/platform_frameworks_base/0014-Remove-useless-notification-about-console-service-be.patch b/patches_treble_phh/platform_frameworks_base/0014-Remove-useless-notification-about-console-service-be.patch index 54958f9..b42c553 100644 --- a/patches_treble_phh/platform_frameworks_base/0014-Remove-useless-notification-about-console-service-be.patch +++ b/patches_treble_phh/platform_frameworks_base/0014-Remove-useless-notification-about-console-service-be.patch @@ -1,4 +1,4 @@ -From dd87ec1187b8be38995b734dbdfe3598dfd59cdb Mon Sep 17 00:00:00 2001 +From 4a0779e7ee51291bc635cc2aa414ef6252503902 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 11 Dec 2020 14:41:09 +0100 Subject: [PATCH 14/28] Remove useless notification about "console" service diff --git a/patches_treble_phh/platform_frameworks_base/0015-Revert-Remove-unused-SystemProperties.set.patch b/patches_treble_phh/platform_frameworks_base/0015-Revert-Remove-unused-SystemProperties.set.patch index bb6d505..438a096 100644 --- a/patches_treble_phh/platform_frameworks_base/0015-Revert-Remove-unused-SystemProperties.set.patch +++ b/patches_treble_phh/platform_frameworks_base/0015-Revert-Remove-unused-SystemProperties.set.patch @@ -1,4 +1,4 @@ -From bdffa8303310e05d4fba777d5f1e00b62d20db19 Mon Sep 17 00:00:00 2001 +From f72b62ec62e70b907c02b7af6382e36f45777509 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 21:24:12 +0800 Subject: [PATCH 15/28] Revert "Remove unused SystemProperties.set" diff --git a/patches_treble_phh/platform_frameworks_base/0016-TelephonyManager-bring-back-getNetworkClass.patch b/patches_treble_phh/platform_frameworks_base/0016-TelephonyManager-bring-back-getNetworkClass.patch index 4bb52db..3c8dfec 100644 --- a/patches_treble_phh/platform_frameworks_base/0016-TelephonyManager-bring-back-getNetworkClass.patch +++ b/patches_treble_phh/platform_frameworks_base/0016-TelephonyManager-bring-back-getNetworkClass.patch @@ -1,4 +1,4 @@ -From 6384008d3e04db21fe384cba9879b915cded98ab Mon Sep 17 00:00:00 2001 +From 6a140ec75ff6b13b6ec397119ee46774e38f3333 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 13:46:15 +0800 Subject: [PATCH 16/28] TelephonyManager: bring back getNetworkClass() diff --git a/patches_treble_phh/platform_frameworks_base/0017-TelephonyManager-add-API-annotations-for-setTelephon.patch b/patches_treble_phh/platform_frameworks_base/0017-TelephonyManager-add-API-annotations-for-setTelephon.patch index 1add523..afb2d9f 100644 --- a/patches_treble_phh/platform_frameworks_base/0017-TelephonyManager-add-API-annotations-for-setTelephon.patch +++ b/patches_treble_phh/platform_frameworks_base/0017-TelephonyManager-add-API-annotations-for-setTelephon.patch @@ -1,4 +1,4 @@ -From 3026abf6ca577e885c2481c39826b16104a49ac2 Mon Sep 17 00:00:00 2001 +From 8f25adf7351f187e5c1a6c0f3607f14b6e272bd7 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 21:26:45 +0800 Subject: [PATCH 17/28] TelephonyManager: add API annotations for diff --git a/patches_treble_phh/platform_frameworks_base/0018-Fix-Wakelock-issue.patch b/patches_treble_phh/platform_frameworks_base/0018-Fix-Wakelock-issue.patch index 5ae8ba3..b928728 100644 --- a/patches_treble_phh/platform_frameworks_base/0018-Fix-Wakelock-issue.patch +++ b/patches_treble_phh/platform_frameworks_base/0018-Fix-Wakelock-issue.patch @@ -1,4 +1,4 @@ -From 78a5652a8d86f51f479ced7b08864fe71f630905 Mon Sep 17 00:00:00 2001 +From 2d0a8597409cd7a31d7718c1c9d6ebd2cdaa1c0d Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Tue, 2 Feb 2021 10:20:51 +0000 Subject: [PATCH 18/28] Fix Wakelock issue diff --git a/patches_treble_phh/platform_frameworks_base/0019-SystemUI-Use-AVCProfileMain-for-screen-recorder.patch b/patches_treble_phh/platform_frameworks_base/0019-SystemUI-Use-AVCProfileMain-for-screen-recorder.patch index 10f7364..35946fc 100644 --- a/patches_treble_phh/platform_frameworks_base/0019-SystemUI-Use-AVCProfileMain-for-screen-recorder.patch +++ b/patches_treble_phh/platform_frameworks_base/0019-SystemUI-Use-AVCProfileMain-for-screen-recorder.patch @@ -1,4 +1,4 @@ -From 2cb4389377b69c5e53101536333838c6aa63d4fa Mon Sep 17 00:00:00 2001 +From 243d10a369e231ca4f239d75c518a72bc1a55933 Mon Sep 17 00:00:00 2001 From: Arne Coucheron Date: Thu, 5 Nov 2020 05:38:44 +0100 Subject: [PATCH 19/28] SystemUI: Use AVCProfileMain for screen recorder diff --git a/patches_treble_phh/platform_frameworks_base/0020-Automatically-detect-pick-up-sensor-so-that-an-overl.patch b/patches_treble_phh/platform_frameworks_base/0020-Automatically-detect-pick-up-sensor-so-that-an-overl.patch index 751dcb9..5c0af2c 100644 --- a/patches_treble_phh/platform_frameworks_base/0020-Automatically-detect-pick-up-sensor-so-that-an-overl.patch +++ b/patches_treble_phh/platform_frameworks_base/0020-Automatically-detect-pick-up-sensor-so-that-an-overl.patch @@ -1,4 +1,4 @@ -From 357f0fac32fc59b8f6349febd3a65f2ffb820279 Mon Sep 17 00:00:00 2001 +From 3ae48d5109ac89634f9a7f96a8555d96025050c8 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 20 Mar 2021 14:31:01 +0100 Subject: [PATCH 20/28] Automatically detect pick up sensor, so that an overlay diff --git a/patches_treble_phh/platform_frameworks_base/0021-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch b/patches_treble_phh/platform_frameworks_base/0021-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch index b1ed391..3ce9f3a 100644 --- a/patches_treble_phh/platform_frameworks_base/0021-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch +++ b/patches_treble_phh/platform_frameworks_base/0021-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch @@ -1,4 +1,4 @@ -From f4f5e6173024f2057f4d4ffcdc77028d03b004e2 Mon Sep 17 00:00:00 2001 +From 5b9aa5db4dc782ed9a6506cda78277d87f81ef31 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 23 Mar 2021 19:43:26 +0100 Subject: [PATCH 21/28] Catch broken mainBuiltInDisplayCutoutRectApproximation diff --git a/patches_treble_phh/platform_frameworks_base/0022-backlight-Fix-backlight-control-on-Galaxy-S9.patch b/patches_treble_phh/platform_frameworks_base/0022-backlight-Fix-backlight-control-on-Galaxy-S9.patch index fd5f38c..425677f 100644 --- a/patches_treble_phh/platform_frameworks_base/0022-backlight-Fix-backlight-control-on-Galaxy-S9.patch +++ b/patches_treble_phh/platform_frameworks_base/0022-backlight-Fix-backlight-control-on-Galaxy-S9.patch @@ -1,4 +1,4 @@ -From 0935d80aa90b9575b77bd55a37432a5f4a6c3747 Mon Sep 17 00:00:00 2001 +From 69316504d686f4365303f60a395634d5a9878725 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 24 Mar 2018 08:01:48 +0100 Subject: [PATCH 22/28] backlight: Fix backlight control on Galaxy S9(+) diff --git a/patches_treble_phh/platform_frameworks_base/0023-Add-support-for-app-signature-spoofing.patch b/patches_treble_phh/platform_frameworks_base/0023-Add-support-for-app-signature-spoofing.patch index 5248915..4b60efd 100644 --- a/patches_treble_phh/platform_frameworks_base/0023-Add-support-for-app-signature-spoofing.patch +++ b/patches_treble_phh/platform_frameworks_base/0023-Add-support-for-app-signature-spoofing.patch @@ -1,4 +1,4 @@ -From 7b0c25ae3dfe6af5d9d9a2b2518964f7c5f034bf Mon Sep 17 00:00:00 2001 +From 3c7d6c5106eea744e08250998ce3d60af7c9b306 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sat, 16 Oct 2021 05:27:57 -0700 Subject: [PATCH 23/28] Add support for app signature spoofing @@ -56,10 +56,10 @@ index 1de47b548a5c..52c7ea2e1321 100644 field public static final String MICROPHONE = "android.permission-group.MICROPHONE"; field public static final String NEARBY_DEVICES = "android.permission-group.NEARBY_DEVICES"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml -index 76b8547cea2a..8bd3206d1e3a 100644 +index a006db9d8373..8c88f2d3dcba 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml -@@ -3199,6 +3199,21 @@ +@@ -3202,6 +3202,21 @@ android:description="@string/permdesc_getPackageSize" android:protectionLevel="normal" /> diff --git a/patches_treble_phh/platform_frameworks_base/0024-Revert-Switch-long-press-power-behavior-in-AOSP.patch b/patches_treble_phh/platform_frameworks_base/0024-Revert-Switch-long-press-power-behavior-in-AOSP.patch index e6170f4..1afeb32 100644 --- a/patches_treble_phh/platform_frameworks_base/0024-Revert-Switch-long-press-power-behavior-in-AOSP.patch +++ b/patches_treble_phh/platform_frameworks_base/0024-Revert-Switch-long-press-power-behavior-in-AOSP.patch @@ -1,4 +1,4 @@ -From 7003808f45a75893726d4073da9132c314091e98 Mon Sep 17 00:00:00 2001 +From afdd9f16ebf1993e982389260129fed10c3820fa Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 4 Sep 2021 08:26:30 +0000 Subject: [PATCH 24/28] Revert "Switch long-press power behavior in AOSP." diff --git a/patches_treble_phh/platform_frameworks_base/0025-Reduce-the-size-of-udfps-enroll-progress-bar.-Some-d.patch b/patches_treble_phh/platform_frameworks_base/0025-Reduce-the-size-of-udfps-enroll-progress-bar.-Some-d.patch index fab902c..115a4ec 100644 --- a/patches_treble_phh/platform_frameworks_base/0025-Reduce-the-size-of-udfps-enroll-progress-bar.-Some-d.patch +++ b/patches_treble_phh/platform_frameworks_base/0025-Reduce-the-size-of-udfps-enroll-progress-bar.-Some-d.patch @@ -1,4 +1,4 @@ -From 72faf5ce1446d48e39961177519c92359e066312 Mon Sep 17 00:00:00 2001 +From af7498ac0f380fd576e8c821d4a091ab242f20ba Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 17 Dec 2021 17:16:14 -0500 Subject: [PATCH 25/28] Reduce the size of udfps enroll progress bar. Some @@ -11,7 +11,7 @@ Change-Id: I1609ad9ca316293dcaaf07f7e681d11aadfcd29c 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml -index dbbb54f7ad6e..d0098b32f384 100644 +index b2ccacd5fe42..ebf7b8407727 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -637,7 +637,7 @@ diff --git a/patches_treble_phh/platform_frameworks_base/0026-Add-UDFPS-support-for-various-devices.patch b/patches_treble_phh/platform_frameworks_base/0026-Add-UDFPS-support-for-various-devices.patch index 6302d63..7162e9a 100644 --- a/patches_treble_phh/platform_frameworks_base/0026-Add-UDFPS-support-for-various-devices.patch +++ b/patches_treble_phh/platform_frameworks_base/0026-Add-UDFPS-support-for-various-devices.patch @@ -1,4 +1,4 @@ -From 380896691e59acbc1af203a2433adaba68c1b5ee Mon Sep 17 00:00:00 2001 +From 3c5f40c68535cf981e0d891fa368910ccf9a301a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 19 Dec 2021 17:08:22 -0500 Subject: [PATCH 26/28] Add UDFPS support for various devices diff --git a/patches_treble_phh/platform_frameworks_base/0027-Dynamically-resize-boot-animation-to-match-screen-si.patch b/patches_treble_phh/platform_frameworks_base/0027-Dynamically-resize-boot-animation-to-match-screen-si.patch index 3b5afe5..af0b785 100644 --- a/patches_treble_phh/platform_frameworks_base/0027-Dynamically-resize-boot-animation-to-match-screen-si.patch +++ b/patches_treble_phh/platform_frameworks_base/0027-Dynamically-resize-boot-animation-to-match-screen-si.patch @@ -1,4 +1,4 @@ -From 8bee76c6e7f4524183ea134f59fd0254f958e07e Mon Sep 17 00:00:00 2001 +From 901626c91714a65086a7a007290964f60da8464e Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 20 Dec 2021 15:01:41 -0500 Subject: [PATCH 27/28] Dynamically resize boot animation to match screen size diff --git a/patches_treble_phh/platform_frameworks_base/0028-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch b/patches_treble_phh/platform_frameworks_base/0028-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch index 53e7b1b..785f680 100644 --- a/patches_treble_phh/platform_frameworks_base/0028-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch +++ b/patches_treble_phh/platform_frameworks_base/0028-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch @@ -1,4 +1,4 @@ -From 16f900d9c0342636db048c22685d2a104a2a4e1f Mon Sep 17 00:00:00 2001 +From 4be34967d45c4c8198be53c0190fa5b12b5cbb6e Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 27 Dec 2021 17:57:11 -0500 Subject: [PATCH 28/28] Once we integrate Samsung Power hal in libpowermanager, @@ -11,11 +11,11 @@ Change-Id: I9084f64e505009abe9420d28b44199605cee52d8 1 file changed, 1 insertion(+) diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp -index 8ddc16aae3d7..806b92bcbdab 100644 +index 59256cc73df1..17736c3623c9 100644 --- a/services/core/jni/Android.bp +++ b/services/core/jni/Android.bp -@@ -186,6 +186,7 @@ cc_defaults { - "vendor.lineage.power-V1-cpp", +@@ -185,6 +185,7 @@ cc_defaults { + "service.incremental", "vendor.samsung.hardware.light@2.0", "vendor.samsung.hardware.light@3.0", + "vendor.samsung.hardware.miscpower@2.0", diff --git a/patches_treble_phh/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch b/patches_treble_phh/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch index 4278e91..12aff4a 100644 --- a/patches_treble_phh/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch +++ b/patches_treble_phh/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch @@ -1,4 +1,4 @@ -From 8a382e0be8155b21e0e99d03311476b8f0194736 Mon Sep 17 00:00:00 2001 +From 297868e5aed30c197cc62805a2eba35fb604b63d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 14 Aug 2019 23:37:10 +0200 Subject: [PATCH 01/13] On Samsung, we need to send a hack-message to HAL to diff --git a/patches_treble_phh/platform_frameworks_native/0002-Use-BKK-s-hwcomposer-hacks-to-properly-display-FOD-l.patch b/patches_treble_phh/platform_frameworks_native/0002-Use-BKK-s-hwcomposer-hacks-to-properly-display-FOD-l.patch index 93b7db9..fce1115 100644 --- a/patches_treble_phh/platform_frameworks_native/0002-Use-BKK-s-hwcomposer-hacks-to-properly-display-FOD-l.patch +++ b/patches_treble_phh/platform_frameworks_native/0002-Use-BKK-s-hwcomposer-hacks-to-properly-display-FOD-l.patch @@ -1,4 +1,4 @@ -From dbad169717d4780128085b04ca5a6d39a2f0c5f0 Mon Sep 17 00:00:00 2001 +From ecc9c4502e39ee6f2c97a97ef836b670b30127b8 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 10 Mar 2020 23:26:55 +0100 Subject: [PATCH 02/13] Use BKK's hwcomposer hacks to properly display FOD diff --git a/patches_treble_phh/platform_frameworks_native/0003-Samsung-Xiaomi-new-FOD-HBM-controls.patch b/patches_treble_phh/platform_frameworks_native/0003-Samsung-Xiaomi-new-FOD-HBM-controls.patch index 5d62c18..1558c10 100644 --- a/patches_treble_phh/platform_frameworks_native/0003-Samsung-Xiaomi-new-FOD-HBM-controls.patch +++ b/patches_treble_phh/platform_frameworks_native/0003-Samsung-Xiaomi-new-FOD-HBM-controls.patch @@ -1,4 +1,4 @@ -From dfc8b5d9b4b9011de99a6b61dc2469a0fe71fe7f Mon Sep 17 00:00:00 2001 +From f8cdc13f4a0c9c701c67d2bba831c9914883d7f4 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 20 May 2020 21:16:56 +0200 Subject: [PATCH 03/13] Samsung + Xiaomi new FOD HBM controls diff --git a/patches_treble_phh/platform_frameworks_native/0004-Matching-an-input-with-a-display-uses-uniqueId.patch b/patches_treble_phh/platform_frameworks_native/0004-Matching-an-input-with-a-display-uses-uniqueId.patch index ba014e3..7ab716d 100644 --- a/patches_treble_phh/platform_frameworks_native/0004-Matching-an-input-with-a-display-uses-uniqueId.patch +++ b/patches_treble_phh/platform_frameworks_native/0004-Matching-an-input-with-a-display-uses-uniqueId.patch @@ -1,4 +1,4 @@ -From 3da3fd1c7f9302110cf747e717d2d60307c023bf Mon Sep 17 00:00:00 2001 +From fa1f31735f374849c7697086a83f25b9a8e01bdb Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 22 Oct 2020 23:22:46 +0200 Subject: [PATCH 04/13] Matching an input with a display uses uniqueId diff --git a/patches_treble_phh/platform_frameworks_native/0005-unshared_oob-didn-t-exist-in-O-P-so-detect-its-suppo.patch b/patches_treble_phh/platform_frameworks_native/0005-unshared_oob-didn-t-exist-in-O-P-so-detect-its-suppo.patch index 700f750..335756d 100644 --- a/patches_treble_phh/platform_frameworks_native/0005-unshared_oob-didn-t-exist-in-O-P-so-detect-its-suppo.patch +++ b/patches_treble_phh/platform_frameworks_native/0005-unshared_oob-didn-t-exist-in-O-P-so-detect-its-suppo.patch @@ -1,4 +1,4 @@ -From 5f8dd3a2351d262cea42d7b17746349d20649271 Mon Sep 17 00:00:00 2001 +From 6406d35dbf27d6c9d0a82e6ae6ec3c323f077e57 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 5 Jan 2021 23:44:00 +0100 Subject: [PATCH 05/13] unshared_oob didn't exist in O/P, so detect its diff --git a/patches_treble_phh/platform_frameworks_native/0006-Remove-Samsung-system-permission-on-sensors.patch b/patches_treble_phh/platform_frameworks_native/0006-Remove-Samsung-system-permission-on-sensors.patch index 070afbf..69e269f 100644 --- a/patches_treble_phh/platform_frameworks_native/0006-Remove-Samsung-system-permission-on-sensors.patch +++ b/patches_treble_phh/platform_frameworks_native/0006-Remove-Samsung-system-permission-on-sensors.patch @@ -1,4 +1,4 @@ -From dfd43b7f2773b8e413b41fac4d3b916658a55f6e Mon Sep 17 00:00:00 2001 +From fdd475f9d03ba45e855d12a7b8732e95e5d44794 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 31 Mar 2021 23:36:03 +0200 Subject: [PATCH 06/13] Remove Samsung system permission on sensors diff --git a/patches_treble_phh/platform_frameworks_native/0007-Try-to-fallback-mCallingSid-to-getpidcon.patch b/patches_treble_phh/platform_frameworks_native/0007-Try-to-fallback-mCallingSid-to-getpidcon.patch index f073b4a..88da1ef 100644 --- a/patches_treble_phh/platform_frameworks_native/0007-Try-to-fallback-mCallingSid-to-getpidcon.patch +++ b/patches_treble_phh/platform_frameworks_native/0007-Try-to-fallback-mCallingSid-to-getpidcon.patch @@ -1,4 +1,4 @@ -From 3f8be28fc09a5d3dba6528be7f6144cecc804b17 Mon Sep 17 00:00:00 2001 +From 8d39a35611d3d167461e92e909ea05cd9a3506fa Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 20 Oct 2021 09:39:47 -0400 Subject: [PATCH 07/13] Try to fallback mCallingSid to getpidcon diff --git a/patches_treble_phh/platform_frameworks_native/0008-Mark-accelerometer-input-as-sensor-exclusively-if-th.patch b/patches_treble_phh/platform_frameworks_native/0008-Mark-accelerometer-input-as-sensor-exclusively-if-th.patch index ef18038..91707ce 100644 --- a/patches_treble_phh/platform_frameworks_native/0008-Mark-accelerometer-input-as-sensor-exclusively-if-th.patch +++ b/patches_treble_phh/platform_frameworks_native/0008-Mark-accelerometer-input-as-sensor-exclusively-if-th.patch @@ -1,4 +1,4 @@ -From bcef77e6159b832ff4fccd6968b3f8c1fd9f24e1 Mon Sep 17 00:00:00 2001 +From e661deeaae72043ce07657476710498682e215b4 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 12 Dec 2021 08:45:36 -0500 Subject: [PATCH 08/13] Mark accelerometer input as sensor exclusively if there diff --git a/patches_treble_phh/platform_frameworks_native/0009-On-Samsung-devices-for-FOD-HBM-set-specific-usage-bi.patch b/patches_treble_phh/platform_frameworks_native/0009-On-Samsung-devices-for-FOD-HBM-set-specific-usage-bi.patch index 2e51576..ecf0d20 100644 --- a/patches_treble_phh/platform_frameworks_native/0009-On-Samsung-devices-for-FOD-HBM-set-specific-usage-bi.patch +++ b/patches_treble_phh/platform_frameworks_native/0009-On-Samsung-devices-for-FOD-HBM-set-specific-usage-bi.patch @@ -1,4 +1,4 @@ -From 16f193c5d1d5a358a4d08432254477bdb69724ea Mon Sep 17 00:00:00 2001 +From ddd7c07b9bc675ca50a4dfa1d15906791649b688 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 17 Dec 2021 17:18:20 -0500 Subject: [PATCH 09/13] On Samsung devices for FOD HBM, set specific usage bits diff --git a/patches_treble_phh/platform_frameworks_native/0010-Update-FOD-HBM-method-Xiaomi-Oplus.patch b/patches_treble_phh/platform_frameworks_native/0010-Update-FOD-HBM-method-Xiaomi-Oplus.patch index 8a3e1ec..5387667 100644 --- a/patches_treble_phh/platform_frameworks_native/0010-Update-FOD-HBM-method-Xiaomi-Oplus.patch +++ b/patches_treble_phh/platform_frameworks_native/0010-Update-FOD-HBM-method-Xiaomi-Oplus.patch @@ -1,4 +1,4 @@ -From 215af0d1a309c8bf2f6e8b474fa5f99c4c09ef15 Mon Sep 17 00:00:00 2001 +From fa8c48b68b12a28dd171abc0f6f52a60c12f6840 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 19 Dec 2021 16:54:31 -0500 Subject: [PATCH 10/13] Update FOD/HBM method Xiaomi/Oplus diff --git a/patches_treble_phh/platform_frameworks_native/0011-For-FOD-HBM-on-Asus-devices-call-the-HWC-extended-ca.patch b/patches_treble_phh/platform_frameworks_native/0011-For-FOD-HBM-on-Asus-devices-call-the-HWC-extended-ca.patch index 5bf236a..706ee73 100644 --- a/patches_treble_phh/platform_frameworks_native/0011-For-FOD-HBM-on-Asus-devices-call-the-HWC-extended-ca.patch +++ b/patches_treble_phh/platform_frameworks_native/0011-For-FOD-HBM-on-Asus-devices-call-the-HWC-extended-ca.patch @@ -1,4 +1,4 @@ -From 1636cbb066d3a7f835588dad5aee9c2e764117d1 Mon Sep 17 00:00:00 2001 +From b5fe4477aa2acd28d60ce9f382dce31ac9d5c168 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 19 Dec 2021 17:04:51 -0500 Subject: [PATCH 11/13] For FOD/HBM on Asus devices, call the HWC extended call diff --git a/patches_treble_phh/platform_frameworks_native/0012-powermanager-Add-support-Samsung-miscpower-HAL.patch b/patches_treble_phh/platform_frameworks_native/0012-powermanager-Add-support-Samsung-miscpower-HAL.patch index f41bb8f..957c90b 100644 --- a/patches_treble_phh/platform_frameworks_native/0012-powermanager-Add-support-Samsung-miscpower-HAL.patch +++ b/patches_treble_phh/platform_frameworks_native/0012-powermanager-Add-support-Samsung-miscpower-HAL.patch @@ -1,4 +1,4 @@ -From e33af0dcd960fdbcc14b31ce22e21ce8297fad69 Mon Sep 17 00:00:00 2001 +From a99bfcddc9930b3acd9b3e3f6026e962f2c62a59 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 27 Dec 2021 18:00:43 -0500 Subject: [PATCH 12/13] powermanager: Add support Samsung miscpower HAL @@ -18,54 +18,53 @@ Only tested configuration ATM is the latest one Change-Id: I182a91ccb0a89f9d0d7d41f36eccab218b553bbc --- include/powermanager/PowerHalLoader.h | 3 + - include/powermanager/PowerHalWrapper.h | 35 ++++++++- + include/powermanager/PowerHalWrapper.h | 35 +++++++++- services/powermanager/Android.bp | 1 + services/powermanager/PowerHalController.cpp | 7 +- services/powermanager/PowerHalLoader.cpp | 16 ++++- - services/powermanager/PowerHalWrapper.cpp | 75 ++++++++++++++++++++ - 6 files changed, 134 insertions(+), 3 deletions(-) + services/powermanager/PowerHalWrapper.cpp | 70 ++++++++++++++++++++ + 6 files changed, 129 insertions(+), 3 deletions(-) diff --git a/include/powermanager/PowerHalLoader.h b/include/powermanager/PowerHalLoader.h -index 18dfb50cb4..8822658706 100644 +index ed6f6f35f5..53ecdd7e98 100644 --- a/include/powermanager/PowerHalLoader.h +++ b/include/powermanager/PowerHalLoader.h -@@ -21,6 +21,7 @@ +@@ -20,6 +20,7 @@ + #include #include #include - #include +#include namespace android { -@@ -35,6 +36,7 @@ public: +@@ -32,12 +33,14 @@ public: + static sp loadAidl(); static sp loadHidlV1_0(); static sp loadHidlV1_1(); - static sp loadLineageAidl(); + static sp loadHidlSeh(); private: static std::mutex gHalMutex; -@@ -43,6 +45,7 @@ private: + static sp gHalAidl GUARDED_BY(gHalMutex); static sp gHalHidlV1_0 GUARDED_BY(gHalMutex); static sp gHalHidlV1_1 GUARDED_BY(gHalMutex); - static sp gHalLineageAidl GUARDED_BY(gLineageHalMutex); + static sp gHalHidlSeh GUARDED_BY(gHalMutex); static sp loadHidlV1_0Locked() EXCLUSIVE_LOCKS_REQUIRED(gHalMutex); diff --git a/include/powermanager/PowerHalWrapper.h b/include/powermanager/PowerHalWrapper.h -index d455b74564..8a0623f588 100644 +index 2c6eacbfaa..672cf65ae6 100644 --- a/include/powermanager/PowerHalWrapper.h +++ b/include/powermanager/PowerHalWrapper.h -@@ -24,6 +24,7 @@ +@@ -23,6 +23,7 @@ + #include #include #include - #include +#include namespace android { -@@ -185,7 +186,10 @@ private: +@@ -181,7 +182,10 @@ private: // Wrapper for the AIDL Power HAL. class AidlHalWrapper : public HalWrapper { public: @@ -77,7 +76,7 @@ index d455b74564..8a0623f588 100644 virtual ~AidlHalWrapper() = default; virtual HalResult setBoost(hardware::power::Boost boost, int32_t durationMs) override; -@@ -201,6 +205,7 @@ private: +@@ -196,6 +200,7 @@ private: std::mutex mBoostMutex; std::mutex mModeMutex; sp mHandle; @@ -85,8 +84,8 @@ index d455b74564..8a0623f588 100644 // Android framework only sends boost upto DISPLAY_UPDATE_IMMINENT. // Need to increase the array size if more boost supported. std::array, -@@ -231,6 +236,34 @@ private: - sp mHandle; +@@ -208,6 +213,34 @@ private: + mModeSupportedArray GUARDED_BY(mModeMutex) = {HalSupport::UNKNOWN}; }; +class HidlHalWrapperSeh : public HalWrapper { @@ -105,7 +104,6 @@ index d455b74564..8a0623f588 100644 + int32_t tgid, int32_t uid, const std::vector& threadIds, + int64_t durationNanos) override; + virtual HalResult getHintSessionPreferredRate() override; -+ virtual HalResult getFeature(vendor::lineage::power::Feature feature) override; + +protected: + virtual HalResult sendPowerHint(hardware::power::V1_0::PowerHint hintId, uint32_t data); @@ -117,23 +115,24 @@ index d455b74564..8a0623f588 100644 + HalResult setInteractive(bool enabled); + HalResult setFeature(hardware::power::V1_0::Feature feature, bool enabled); +}; - ++ }; // namespace power + }; // namespace android diff --git a/services/powermanager/Android.bp b/services/powermanager/Android.bp -index e27e620729..e77cdc32b2 100644 +index d828aa97a0..4bbe284ee9 100644 --- a/services/powermanager/Android.bp +++ b/services/powermanager/Android.bp -@@ -40,6 +40,7 @@ cc_library_shared { +@@ -39,6 +39,7 @@ cc_library_shared { + "android.hardware.power@1.0", "android.hardware.power@1.1", "android.hardware.power-V2-cpp", - "vendor.lineage.power-V1-cpp", + "vendor.samsung.hardware.miscpower@2.0", ], cflags: [ diff --git a/services/powermanager/PowerHalController.cpp b/services/powermanager/PowerHalController.cpp -index 7a1b5f7c0a..8577c3b931 100644 +index 8c225d5d02..f67fbae08b 100644 --- a/services/powermanager/PowerHalController.cpp +++ b/services/powermanager/PowerHalController.cpp @@ -20,6 +20,7 @@ @@ -144,7 +143,7 @@ index 7a1b5f7c0a..8577c3b931 100644 #include #include #include -@@ -35,11 +36,15 @@ namespace power { +@@ -34,11 +35,15 @@ namespace power { std::unique_ptr HalConnector::connect() { sp halAidl = PowerHalLoader::loadAidl(); @@ -162,7 +161,7 @@ index 7a1b5f7c0a..8577c3b931 100644 return std::make_unique(halHidlV1_0, halHidlV1_1); } diff --git a/services/powermanager/PowerHalLoader.cpp b/services/powermanager/PowerHalLoader.cpp -index e5c636344d..803888dabb 100644 +index 1f1b43a607..f9f5bbc347 100644 --- a/services/powermanager/PowerHalLoader.cpp +++ b/services/powermanager/PowerHalLoader.cpp @@ -18,6 +18,7 @@ @@ -173,16 +172,16 @@ index e5c636344d..803888dabb 100644 #include #include #include -@@ -59,6 +60,7 @@ sp PowerHalLoader::gHalAidl = nullptr; +@@ -55,6 +56,7 @@ std::mutex PowerHalLoader::gHalMutex; + sp PowerHalLoader::gHalAidl = nullptr; sp PowerHalLoader::gHalHidlV1_0 = nullptr; sp PowerHalLoader::gHalHidlV1_1 = nullptr; - sp PowerHalLoader::gHalLineageAidl = nullptr; +sp PowerHalLoader::gHalHidlSeh = nullptr; void PowerHalLoader::unloadAll() { std::lock_guard lock(gHalMutex); -@@ -98,10 +100,22 @@ sp PowerHalLoader::loadLineageAidl() { - return loadHal(gHalExists, gHalLineageAidl, loadFn, "Lineage AIDL"); +@@ -82,10 +84,22 @@ sp PowerHalLoader::loadHidlV1_1() { + return loadHal(gHalExists, gHalHidlV1_1, loadFn, "HIDL v1.1"); } +sp PowerHalLoader::loadHidlSeh() { @@ -206,10 +205,10 @@ index e5c636344d..803888dabb 100644 // ------------------------------------------------------------------------------------------------- diff --git a/services/powermanager/PowerHalWrapper.cpp b/services/powermanager/PowerHalWrapper.cpp -index 49659e796e..775cdcf800 100644 +index d74bd23a8d..a83990f2a4 100644 --- a/services/powermanager/PowerHalWrapper.cpp +++ b/services/powermanager/PowerHalWrapper.cpp -@@ -220,6 +220,10 @@ HalResult AidlHalWrapper::setMode(Mode mode, bool enabled) { +@@ -209,6 +209,10 @@ HalResult AidlHalWrapper::setMode(Mode mode, bool enabled) { std::unique_lock lock(mModeMutex); size_t idx = static_cast(mode); @@ -220,8 +219,8 @@ index 49659e796e..775cdcf800 100644 // Quick return if mode is not supported by HAL if (idx >= mModeSupportedArray.size() || mModeSupportedArray[idx] == HalSupport::OFF) { ALOGV("Skipped setMode %s because Power HAL doesn't support it", toString(mode).c_str()); -@@ -296,6 +300,77 @@ HalResult LineageAidlHalWrapper::getFeature(LineageAidl::Feature feature) { - return HalResult::fromStatus(ret, value); +@@ -248,6 +252,72 @@ HalResult AidlHalWrapper::getHintSessionPreferredRate() { + return HalResult::fromStatus(result, rate); } +HalResult HidlHalWrapperSeh::setBoost(Boost boost, int32_t durationMs) { @@ -289,11 +288,6 @@ index 49659e796e..775cdcf800 100644 + ALOGV("Skipped getHintSessionPreferredRate because Power HAL not available"); + return HalResult::unsupported(); +} -+ -+HalResult HidlHalWrapperSeh::getFeature(LineageAidl::Feature) { -+ ALOGV("Skipped getFeature because Power HAL not available"); -+ return HalResult::unsupported(); -+} + // ------------------------------------------------------------------------------------------------- diff --git a/patches_treble_phh/platform_frameworks_native/0013-Fix-loading-power-hidl-v1.0.patch b/patches_treble_phh/platform_frameworks_native/0013-Fix-loading-power-hidl-v1.0.patch index 02be11d..70db528 100644 --- a/patches_treble_phh/platform_frameworks_native/0013-Fix-loading-power-hidl-v1.0.patch +++ b/patches_treble_phh/platform_frameworks_native/0013-Fix-loading-power-hidl-v1.0.patch @@ -1,4 +1,4 @@ -From 184f59f82b11e4180a12586ab01b926b9187c418 Mon Sep 17 00:00:00 2001 +From 71294e86127acffb85bd93dd6ebd867e1111ac8c Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 12 Jan 2022 04:07:34 -0500 Subject: [PATCH 13/13] Fix loading power hidl v1.0 @@ -9,10 +9,10 @@ Change-Id: Ife20a98d2a11c79c7b42f359f30c28e2dede1f25 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/powermanager/PowerHalLoader.cpp b/services/powermanager/PowerHalLoader.cpp -index 803888dabb..f04abdcbd0 100644 +index f9f5bbc347..412fda3c35 100644 --- a/services/powermanager/PowerHalLoader.cpp +++ b/services/powermanager/PowerHalLoader.cpp -@@ -108,10 +108,11 @@ sp PowerHalLoader::lo +@@ -92,10 +92,11 @@ sp PowerHalLoader::lo } sp PowerHalLoader::loadHidlV1_0Locked() { diff --git a/patches_treble_phh/platform_frameworks_opt_telephony/0001-telephony-forward-port-support-for-forceCognitive.patch b/patches_treble_phh/platform_frameworks_opt_telephony/0001-telephony-forward-port-support-for-forceCognitive.patch index 63c413f..28d2a72 100644 --- a/patches_treble_phh/platform_frameworks_opt_telephony/0001-telephony-forward-port-support-for-forceCognitive.patch +++ b/patches_treble_phh/platform_frameworks_opt_telephony/0001-telephony-forward-port-support-for-forceCognitive.patch @@ -1,7 +1,7 @@ -From cc24a7e886eff42a0e2f160cabb2c11d87c1a384 Mon Sep 17 00:00:00 2001 +From b5fd6bb53c710116c5138393a827117f3f02024c Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 13 Oct 2019 17:21:31 +0800 -Subject: [PATCH 1/4] telephony: forward-port support for forceCognitive +Subject: [PATCH 1/5] telephony: forward-port support for forceCognitive * This is needed on some MTK devices. Android 10 refactored some code, so now the "non-persistent/cognitive" filter is relocated to RIL and diff --git a/patches_treble_phh/platform_frameworks_opt_telephony/0002-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch b/patches_treble_phh/platform_frameworks_opt_telephony/0002-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch index dd02326..ec8e70f 100644 --- a/patches_treble_phh/platform_frameworks_opt_telephony/0002-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch +++ b/patches_treble_phh/platform_frameworks_opt_telephony/0002-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch @@ -1,7 +1,7 @@ -From fcfb842f7f35b38c07062f40a344412323317c2e Mon Sep 17 00:00:00 2001 +From af27c3b5cb4829735c3304925f850144a12a85d1 Mon Sep 17 00:00:00 2001 From: Artem Borisov Date: Sat, 10 Nov 2018 17:19:17 +0000 -Subject: [PATCH 2/4] Telephony: Don not call onUssdRelease for Huawei RIL +Subject: [PATCH 2/5] Telephony: Don not call onUssdRelease for Huawei RIL Huawei RIL doesn't seem to work properly with USSD_MODE_NW_RELEASE, always releasing USSD when it should be finished instead. diff --git a/patches_treble_phh/platform_frameworks_opt_telephony/0003-Fix-baseband-being-too-long-to-fit-into-a-91-chars-p.patch b/patches_treble_phh/platform_frameworks_opt_telephony/0003-Fix-baseband-being-too-long-to-fit-into-a-91-chars-p.patch index f407b7d..11a09b6 100644 --- a/patches_treble_phh/platform_frameworks_opt_telephony/0003-Fix-baseband-being-too-long-to-fit-into-a-91-chars-p.patch +++ b/patches_treble_phh/platform_frameworks_opt_telephony/0003-Fix-baseband-being-too-long-to-fit-into-a-91-chars-p.patch @@ -1,7 +1,7 @@ -From 467090b06364a3c7874406eac519ef92c425bc82 Mon Sep 17 00:00:00 2001 +From dd6a3ecb9423ab7aec4a007946eacf69f134f0cd Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 6 Dec 2021 16:28:22 -0500 -Subject: [PATCH 3/4] Fix baseband being too long to fit into a 91 chars +Subject: [PATCH 3/5] Fix baseband being too long to fit into a 91 chars property, preventing telephony subsystem from starting Change-Id: I1762e4a8cc137626be89f350229d6be162bdaf57 diff --git a/patches_treble_phh/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch b/patches_treble_phh/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch index 2648df7..2f9f674 100644 --- a/patches_treble_phh/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch +++ b/patches_treble_phh/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch @@ -1,7 +1,7 @@ -From fdf6b444ee616a00e8f2c96817fc94913015ab7d Mon Sep 17 00:00:00 2001 +From 346ae5f3e226cb46c7e281d327785e2a600ea6f8 Mon Sep 17 00:00:00 2001 From: ironydelerium <42721860+ironydelerium@users.noreply.github.com> Date: Fri, 31 Dec 2021 02:20:28 -0800 -Subject: [PATCH 4/4] Reintroduce 'public void +Subject: [PATCH 4/5] Reintroduce 'public void TelephonyMetrics.writeRilSendSms(int, int, int, int)'. (#8) The MediaTek IMS package for Android Q, at the very least (likely for the rest, too) diff --git a/patches_treble_phh/platform_frameworks_opt_telephony/0005-Fix-Huawei-signal-strength-indicator.patch b/patches_treble_phh/platform_frameworks_opt_telephony/0005-Fix-Huawei-signal-strength-indicator.patch new file mode 100644 index 0000000..1ed2ea9 --- /dev/null +++ b/patches_treble_phh/platform_frameworks_opt_telephony/0005-Fix-Huawei-signal-strength-indicator.patch @@ -0,0 +1,184 @@ +From ceb8d445c0cad907e5685e4ca0388d1202e30e19 Mon Sep 17 00:00:00 2001 +From: Ryan Press +Date: Tue, 25 Jan 2022 11:29:41 -0800 +Subject: [PATCH 5/5] Fix Huawei signal strength indicator + +--- + .../com/android/internal/telephony/RIL.java | 122 ++++++++++++++++++ + .../internal/telephony/RadioIndication.java | 23 +++- + 2 files changed, 141 insertions(+), 4 deletions(-) + +diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java +index af28bd8f9a..558a55e1b3 100644 +--- a/src/java/com/android/internal/telephony/RIL.java ++++ b/src/java/com/android/internal/telephony/RIL.java +@@ -7478,6 +7478,128 @@ public class RIL extends BaseCommands implements CommandsInterface { + new CellSignalStrengthNr()); + } + ++ ++ /** ++ * Fixup for SignalStrength for Huawei device ++ * @param signalStrength the initial signal strength ++ * @return a new SignalStrength ++ */ ++ public SignalStrength fixupSignalStrengthHuawei(android.hardware.radio.V1_0.SignalStrength signalStrength) { ++ int gsmSignalStrength = signalStrength.gw.signalStrength; ++ int gsmBitErrorRate = signalStrength.gw.bitErrorRate; ++ int gsmTimingAdvance = signalStrength.gw.timingAdvance; ++ int mWcdmaRscp = 0; ++ int mWcdmaEcio = 0; ++ int cdmaDbm = signalStrength.cdma.dbm; ++ int cdmaEcio = signalStrength.cdma.ecio; ++ int evdoDbm = signalStrength.evdo.dbm; ++ int evdoEcio = signalStrength.evdo.ecio; ++ int evdoSnr = signalStrength.evdo.signalNoiseRatio; ++ int lteSignalStrength = signalStrength.lte.signalStrength; ++ int lteRsrp = signalStrength.lte.rsrp; ++ int lteRsrq = signalStrength.lte.rsrq; ++ int lteRssnr = signalStrength.lte.rssnr; ++ int lteCqi = signalStrength.lte.cqi; ++ int lteTimingAdvance = signalStrength.lte.timingAdvance; ++ int mGsm = 0; ++ int mRat = 0; ++ ++ ++ ++ //Calcul level with Rssnr, Rsrq, Rsrp value - so specify KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT (parameters_used_for_lte_signal_bar_int) to use this 3 values ++ //RSRP = 1 << 0 ++ //RSRQ = 1 << 1 ++ //RSSNR = 1 << 2 ++ // ++ if (lteRsrp != 0) { // LTE ++ // Nothing to DO ++ } else if (gsmSignalStrength == 0 && lteRsrp == 0) { // 3G ++ lteRsrp = (mWcdmaRscp & 0xFF) - 256; ++ lteRsrq = (mWcdmaEcio & 0xFF) - 256; ++ if (lteRsrp > -20) { // None or Unknown ++ lteRssnr = -200; ++ } else if (lteRsrp >= -85) { // Great ++ lteRssnr = 300; ++ } else if (lteRsrp >= -95) { // Good ++ lteRssnr = 129; ++ } else if (lteRsrp >= -105) { // Moderate ++ lteRssnr = 44; ++ } else if (lteRsrp >= -115) { // Poor ++ lteRssnr = 9; ++ } else if (lteRsrp >= -140) { // None or Unknown ++ lteRssnr = -200; ++ } ++ } else if (mWcdmaRscp == 0 && lteRsrp == 0) { // 2G ++ lteRsrp = (gsmSignalStrength & 0xFF) - 256; ++ if (lteRsrp > -20) { // None or Unknown ++ lteRsrq = -21; ++ lteRssnr = -200; ++ } else if (lteRsrp >= -85) { // Great ++ lteRsrq = -3; ++ lteRssnr = 300; ++ } else if (lteRsrp >= -95) { // Good ++ lteRsrq = -7; ++ lteRssnr = 129; ++ } else if (lteRsrp >= -105) { // Moderate ++ lteRsrq = -12; ++ lteRssnr = 44; ++ } else if (lteRsrp >= -115) { // Poor ++ lteRsrq = -17; ++ lteRssnr = 9; ++ } else if (lteRsrp >= -140) { // None or Unknown ++ lteRsrq = -21; ++ lteRssnr = -200; ++ } ++ } ++ ++ ++ ++ // 4G - LTE ++ // .lte = {.signalStrength = 99, .rsrp = -104, .rsrq = -16, .rssnr = -4, .cqi = 2147483647, .timingAdvance = -1}, ++ // public CellSignalStrengthLte(int rssi, int rsrp, int rsrq, int rssnr, int cqi, int timingAdvance) { ++ CellSignalStrengthLte lteStrength = new CellSignalStrengthLte(SignalStrength.INVALID, ++ lteRsrp, ++ lteRsrq, ++ lteRssnr, ++ lteCqi, ++ lteTimingAdvance); ++ ++ // GSM ++ // .gw = {.signalStrength = -91, .bitErrorRate = -1, .timingAdvance = 0} ++ // public CellSignalStrengthGsm(int rssi, int ber, int ta) { ++ // rssi in dBm [-113, -51] or UNAVAILABLE ++ // bit error rate (0-7, 99) TS 27.007 8.5 or UNAVAILABLE ++ CellSignalStrengthGsm gsmStrength = new CellSignalStrengthGsm(gsmSignalStrength, ++ gsmBitErrorRate, ++ gsmTimingAdvance); ++ ++ if (RILJ_LOGD) { ++ riljLog("Huawei signal : LTE dbm : " + String.valueOf(lteStrength.getDbm()) + ++ ", level : " + String.valueOf(lteStrength.getLevel()) + ++ ", Rsrp : " + String.valueOf(lteStrength.getRsrp()) + ++ ", Rsrq : " + String.valueOf(lteStrength.getRsrq()) + ++ ", Rssi : " + String.valueOf(lteStrength.getRssi()) + ++ ", Rssnr : " + String.valueOf(lteStrength.getRssnr())); ++ riljLog("Huawei signal : GSM dbm : " + String.valueOf(gsmStrength.getDbm()) + ++ ", errorrate : " + String.valueOf(gsmStrength.getBitErrorRate()) + ++ ", timingadvance : " + String.valueOf(gsmStrength.getTimingAdvance())); ++ } ++ ++ ++ ++ // Perhaps add also gsm signalStrength ++ return new SignalStrength( ++ new CellSignalStrengthCdma(), ++ gsmStrength, ++ new CellSignalStrengthWcdma(), ++ new CellSignalStrengthTdscdma(), ++ lteStrength, ++ new CellSignalStrengthNr()); ++ ++ } ++ ++ ++ + /** + * Convert CellInfo defined in 1.4/types.hal to CellInfo type. + * @param records List of CellInfo defined in 1.4/types.hal. +diff --git a/src/java/com/android/internal/telephony/RadioIndication.java b/src/java/com/android/internal/telephony/RadioIndication.java +index d18efdcb9c..26c0f51ab8 100644 +--- a/src/java/com/android/internal/telephony/RadioIndication.java ++++ b/src/java/com/android/internal/telephony/RadioIndication.java +@@ -243,14 +243,29 @@ public class RadioIndication extends IRadioIndication.Stub { + + public void currentSignalStrength(int indicationType, + android.hardware.radio.V1_0.SignalStrength signalStrength) { ++ SignalStrength ss = null; ++ + mRil.processIndication(indicationType); + +- SignalStrength ssInitial = new SignalStrength(signalStrength); ++ // Note this is set to "verbose" because it happens frequently ++ if (RIL.RILJ_LOGV) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, signalStrength); ++ ++ // Fix signalStrength for Huawei ++ String hardware = android.os.SystemProperties.get("ro.hardware", ""); ++ if(hardware.contains("hi3660") || hardware.contains("hi6250") || hardware.contains("hi3670") || hardware.contains("kirin")) ++ { ++ if (RIL.RILJ_LOGV) mRil.riljLog("currentSignalStrength Found Huawei device"); ++ ss = mRil.fixupSignalStrengthHuawei(signalStrength); ++ } ++ else ++ { ++ SignalStrength ssInitial = new SignalStrength(signalStrength); ++ ss = mRil.fixupSignalStrength10(ssInitial); ++ } + +- SignalStrength ss = mRil.fixupSignalStrength10(ssInitial); +- // Note this is set to "verbose" because it happens frequently +- if (RIL.RILJ_LOGV) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss); + ++ // Note this is set to "verbose" because it happens frequently ++ if (RIL.RILJ_LOGV) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss); + if (mRil.mSignalStrengthRegistrant != null) { + mRil.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult (null, ss, null)); + } +-- +2.25.1 + diff --git a/patches_treble_phh/platform_system_core/0001-Stop-overriding-system-properties-from-vendor.patch b/patches_treble_phh/platform_system_core/0001-Stop-overriding-system-properties-from-vendor.patch index 6a4ebfa..6144093 100644 --- a/patches_treble_phh/platform_system_core/0001-Stop-overriding-system-properties-from-vendor.patch +++ b/patches_treble_phh/platform_system_core/0001-Stop-overriding-system-properties-from-vendor.patch @@ -1,7 +1,7 @@ -From bec8dc46031766ec06bbdf5364dda19ed1c27e4e Mon Sep 17 00:00:00 2001 +From 72db5bb7c714b25b9fd162647eeb5fd6ad3f6a12 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 7 Oct 2021 15:48:11 -0400 -Subject: [PATCH 1/5] Stop overriding system properties from vendor +Subject: [PATCH 1/6] Stop overriding system properties from vendor This is annoying to disable apexes, or force adb @@ -11,10 +11,10 @@ Change-Id: Ifd0072c631349b23945df4ab401ba26eca07131f 1 file changed, 1 deletion(-) diff --git a/init/property_service.cpp b/init/property_service.cpp -index 2d67bf5d7..5974065f5 100644 +index 5a8fc5418..bc9a29dea 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp -@@ -725,7 +725,6 @@ static void LoadProperties(char* data, const char* filter, const char* filename, +@@ -726,7 +726,6 @@ static void LoadProperties(char* data, const char* filter, const char* filename, } else if (it->second != value) { LOG(WARNING) << "Overriding previous property '" << key << "':'" << it->second << "' with new value '" << value << "'"; @@ -23,5 +23,5 @@ index 2d67bf5d7..5974065f5 100644 } else { LOG(ERROR) << "Do not have permissions to set '" << key << "' to '" << value -- -2.29.2 +2.25.1 diff --git a/patches_treble_phh/platform_system_core/0002-first-stage-If-Vboot2-fails-fall-back-to-Vboot1.patch b/patches_treble_phh/platform_system_core/0002-If-Vboot2-fails-fall-back-to-Vboot1.patch similarity index 90% rename from patches_treble_phh/platform_system_core/0002-first-stage-If-Vboot2-fails-fall-back-to-Vboot1.patch rename to patches_treble_phh/platform_system_core/0002-If-Vboot2-fails-fall-back-to-Vboot1.patch index fd94ee4..e2cb463 100644 --- a/patches_treble_phh/platform_system_core/0002-first-stage-If-Vboot2-fails-fall-back-to-Vboot1.patch +++ b/patches_treble_phh/platform_system_core/0002-If-Vboot2-fails-fall-back-to-Vboot1.patch @@ -1,7 +1,7 @@ -From 6cb2b52642892379df490dc44ff977e55e9bde02 Mon Sep 17 00:00:00 2001 +From dd023d4b5b9e3611b0daf250dec3818cba301d9a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 12 Sep 2019 13:05:37 +0200 -Subject: [PATCH 2/5] [first stage] If Vboot2 fails, fall-back to Vboot1 +Subject: [PATCH 2/6] If Vboot2 fails, fall-back to Vboot1 Some devices, for instance Honor View 10, running Pie vendor declares vbmeta in their device-tree, but doesn't have a vbmeta partition. @@ -42,5 +42,5 @@ index f5c10bbd4..9562af35d 100644 void SetInitAvbVersionInRecovery() { -- -2.29.2 +2.25.1 diff --git a/patches_treble_phh/platform_system_core/0003-Don-t-abandon-creating-property-tree-if-there-is-a-c.patch b/patches_treble_phh/platform_system_core/0003-Don-t-abandon-creating-property-tree-if-there-is-a-c.patch index 920954b..25b872a 100644 --- a/patches_treble_phh/platform_system_core/0003-Don-t-abandon-creating-property-tree-if-there-is-a-c.patch +++ b/patches_treble_phh/platform_system_core/0003-Don-t-abandon-creating-property-tree-if-there-is-a-c.patch @@ -1,7 +1,7 @@ -From 9df676e24531b46250ac239879baa51163305823 Mon Sep 17 00:00:00 2001 +From 22a748594817b296b363f64cdb8db13987ea1cc6 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 18 Oct 2020 18:14:47 +0200 -Subject: [PATCH 3/5] Don't abandon creating property tree if there is a +Subject: [PATCH 3/6] Don't abandon creating property tree if there is a conflict, and hope for the best Change-Id: I194c815fdd58bfb84aaf7db02b8f0d00b4db21e8 @@ -31,5 +31,5 @@ index 803657ab8..ecdd0be20 100644 } -- -2.29.2 +2.25.1 diff --git a/patches_treble_phh/platform_system_core/0004-Detect-allowed-sdcard-options-based-on-vndk.patch b/patches_treble_phh/platform_system_core/0004-Detect-allowed-sdcard-options-based-on-vndk.patch index 5d35f33..34d91cd 100644 --- a/patches_treble_phh/platform_system_core/0004-Detect-allowed-sdcard-options-based-on-vndk.patch +++ b/patches_treble_phh/platform_system_core/0004-Detect-allowed-sdcard-options-based-on-vndk.patch @@ -1,7 +1,7 @@ -From 86431a4936479bf7f80b982a12d64732f494b14f Mon Sep 17 00:00:00 2001 +From 4776b1f3bd94b8a035fc0608e71844b97dac6390 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 14 Aug 2018 19:33:03 +0200 -Subject: [PATCH 4/5] Detect allowed sdcard options based on vndk +Subject: [PATCH 4/6] Detect allowed sdcard options based on vndk Some kernel crashes when using too recent sdcardfs options @@ -39,5 +39,5 @@ index 622de5b7a..e580190e9 100644 // handle older kernels that aren't updated yet. for (int i = 0; i <= new_opts_list.size(); ++i) { -- -2.29.2 +2.25.1 diff --git a/patches_treble_phh/platform_system_core/0005-Ugly-but-secure-Set-dev-uinput-as-0666-to-fix-finger.patch b/patches_treble_phh/platform_system_core/0005-Ugly-but-secure-Set-dev-uinput-as-0666-to-fix-finger.patch index 5ffa5e2..be197a2 100644 --- a/patches_treble_phh/platform_system_core/0005-Ugly-but-secure-Set-dev-uinput-as-0666-to-fix-finger.patch +++ b/patches_treble_phh/platform_system_core/0005-Ugly-but-secure-Set-dev-uinput-as-0666-to-fix-finger.patch @@ -1,7 +1,7 @@ -From 8807d3ac8c9fe662a6d5610b421bb54d0e05603e Mon Sep 17 00:00:00 2001 +From 05cada88a45c9260f7085f6c953341ac1f92adbb Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 1 Nov 2019 18:22:13 +0100 -Subject: [PATCH 5/5] Ugly but secure: Set /dev/uinput as 0666 to fix +Subject: [PATCH 5/6] Ugly but secure: Set /dev/uinput as 0666 to fix fingerprint sensor on some devices cf https://github.com/phhusson/device_phh_treble/pull/122/commits/e000d69c286b6686777ea6f1867f379e30273e48 @@ -28,5 +28,5 @@ index 56e774bdc..67230e051 100644 /dev/tty0 0660 root system /dev/graphics/* 0660 root graphics -- -2.29.2 +2.25.1 diff --git a/patches_treble_phh/platform_system_core/0006-Add-my-own-OTA-mechanism-going-over-data.patch b/patches_treble_phh/platform_system_core/0006-Add-my-own-OTA-mechanism-going-over-data.patch new file mode 100644 index 0000000..1dfe67e --- /dev/null +++ b/patches_treble_phh/platform_system_core/0006-Add-my-own-OTA-mechanism-going-over-data.patch @@ -0,0 +1,136 @@ +From 40be0112b1316800a3e496caed7bb73bfb3d801f Mon Sep 17 00:00:00 2001 +From: Pierre-Hugues Husson +Date: Sat, 22 Jan 2022 14:34:45 -0500 +Subject: [PATCH 6/6] Add my own OTA mechanism going over /data + +Change-Id: I9cacff2d761affa0376b4bb8ca63353a9d95b5de +--- + fs_mgr/libfiemap/image_manager.cpp | 2 +- + init/selinux.cpp | 64 ++++++++++++++++++++++++++++++ + 2 files changed, 65 insertions(+), 1 deletion(-) + +diff --git a/fs_mgr/libfiemap/image_manager.cpp b/fs_mgr/libfiemap/image_manager.cpp +index dcbbc5448..ea2f4254d 100644 +--- a/fs_mgr/libfiemap/image_manager.cpp ++++ b/fs_mgr/libfiemap/image_manager.cpp +@@ -156,7 +156,7 @@ bool ImageManager::MetadataDirIsTest() const { + } + + bool ImageManager::IsUnreliablePinningAllowed() const { +- return IsSubdir(data_dir_, "/data/gsi/dsu/") || MetadataDirIsTest(); ++ return IsSubdir(data_dir_, "/data/gsi/dsu/") || MetadataDirIsTest() || IsSubdir(data_dir_, "/data/gsi/phh/"); + } + + FiemapStatus ImageManager::CreateBackingImage( +diff --git a/init/selinux.cpp b/init/selinux.cpp +index 42d302324..068849989 100644 +--- a/init/selinux.cpp ++++ b/init/selinux.cpp +@@ -58,6 +58,9 @@ + #include + #include + #include ++#include ++#include ++#include + + #include + #include +@@ -71,12 +74,16 @@ + #include + #include + #include ++#include ++#include ++#include + + #include "block_dev_initializer.h" + #include "debug_ramdisk.h" + #include "reboot_utils.h" + #include "snapuserd_transition.h" + #include "util.h" ++#include "switch_root.h" + + using namespace std::string_literals; + +@@ -85,6 +92,7 @@ using android::base::Timer; + using android::base::unique_fd; + using android::fs_mgr::AvbHandle; + using android::snapshot::SnapshotManager; ++using android::fiemap::IImageManager; + + namespace android { + namespace init { +@@ -696,6 +704,60 @@ static void LoadSelinuxPolicy(std::string& policy) { + } + } + ++static void setupPhhOta() { ++ setenv("PHH_STEP2", (char*)"1", 1); ++ if(getenv("PHH_OTA")) return; ++ setenv("PHH_STEP3", (char*)"1", 1); ++ ++ std::string phh_ota; ++ if(!base::ReadFileToString("/metadata/phh/img", &phh_ota)) return; ++ const char *slot = "a"; ++ if(phh_ota.c_str()[0] == 'b') ++ slot = "b"; ++ setenv("PHH_OTA_SLOT", (char*)slot, 1); ++ setenv("PHH_STEP4", (char*)"1", 1); ++ ++ std::string imageNameStr = "system_otaphh_"s + slot; ++ ++ BlockDevInitializer block_dev_init; ++ block_dev_init.InitDeviceMapper(); ++ block_dev_init.InitDevices({"userdata"}); ++ ++ auto images = IImageManager::Open("phh", 0ms); ++ std::string blockDev; ++ android::fs_mgr::PartitionOpener opener; ++ if(!images->MapImageWithDeviceMapper(opener, imageNameStr, &blockDev)) return; ++ ++ // For some reason, I can't get block_dev_init to find system_otaphh_X, so construct it ourselves ++ int major = atoi(blockDev.c_str()); ++ const char *minorStr = strstr(blockDev.c_str(), ":")+1; ++ int minor = atoi(minorStr); ++ int eee = mknod("/dev/root-otaphh", 0644 | S_IFBLK, makedev(major, minor)); ++ ++ base::WriteStringToFile("phh mknod returned " + std::to_string(eee) + " of " + std::to_string(major) + " " + std::to_string(minor), "/dev/kmsg"); ++ setenv("PHH_STEP5", (char*)"1", 1); ++ ++ umount2("/debug_ramdisk", 0); ++ umount2("/debug_ramdisk", MNT_DETACH); ++ int mountRes = mount("/dev/root-otaphh", "/debug_ramdisk", "ext4", MS_RDONLY, ""); ++ putenv((char*)"PHH_OTA=1"); ++ base::WriteStringToFile("phh_ota setup " + blockDev, "/dev/kmsg"); ++ base::WriteStringToFile("phh mount returned " + std::to_string(mountRes), "/dev/kmsg"); ++ base::WriteStringToFile("errno is " + std::to_string(errno), "/dev/kmsg"); ++ ++ if(mountRes != 0) return; ++ ++ SwitchRoot("/debug_ramdisk"); ++ ++ const char* path = "/system/bin/init"; ++ const char* args[] = {path, "selinux_setup", nullptr}; ++ auto fd = open("/dev/kmsg", O_WRONLY | O_CLOEXEC); ++ dup2(fd, STDOUT_FILENO); ++ dup2(fd, STDERR_FILENO); ++ close(fd); ++ execv(path, const_cast(args)); ++} ++ + // The SELinux setup process is carefully orchestrated around snapuserd. Policy + // must be loaded off dynamic partitions, and during an OTA, those partitions + // cannot be read without snapuserd. But, with kernel-privileged snapuserd +@@ -718,6 +780,8 @@ int SetupSelinux(char** argv) { + if (REBOOT_BOOTLOADER_ON_PANIC) { + InstallRebootSignalHandlers(); + } ++ setenv("PHH_STEP1", (char*)"1", 1); ++ setupPhhOta(); + + boot_clock::time_point start_time = boot_clock::now(); + +-- +2.25.1 +