Changes for March 2022, syncing up to v410

This commit is contained in:
Andy CrossGate Yan 2022-03-16 07:26:33 +00:00
parent f16874a663
commit f8937ff81f
127 changed files with 2470 additions and 1973 deletions

View File

@ -1,7 +1,7 @@
From 9644e048f2a52b51195003bb90a45c3a0efb67c8 Mon Sep 17 00:00:00 2001
From 9bfffff2b717e8606d4b0332b485e5c7bb1a02e1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 13 Jan 2022 14:22:24 +0000
Subject: [PATCH 01/19] Add SPenPointerOverlay
Subject: [PATCH 01/22] Add SPenPointerOverlay
Toggle this overlay with property "persist.ui.spen.pointer"

View File

@ -0,0 +1,334 @@
From e75e1b19b2da6bea129d320436f3796de4635936 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 14 Mar 2022 08:20:43 +0000
Subject: [PATCH 02/22] UI: Monet: Default to Lineage Teal
Embrace Monet, but also maintain some LOS identity
Applies the signature teal of LineageOS (#167C80) as fallback (e.g. with live wallpapers)
Change-Id: Ida88fa1d891223ad11e058d24b3c96bebbc9cd62
---
core/res/res/values/colors.xml | 120 +++++++++---------
.../com/android/systemui/monet/ColorScheme.kt | 14 +-
2 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 59d6005ba193..36cf03f5268e 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -245,200 +245,200 @@
<!-- Lightest shade of the accent color used by the system. White.
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_0">#ffffff</color>
+ <color name="system_accent1_0">#FFFFFF</color>
<!-- Shade of the accent system color at 99% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_10">#F9FCFF</color>
+ <color name="system_accent1_10">#EFFFFF</color>
<!-- Shade of the accent system color at 95% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_50">#E0F3FF</color>
+ <color name="system_accent1_50">#B4FDFF</color>
<!-- Shade of the accent system color at 90% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_100">#C1E8FF</color>
+ <color name="system_accent1_100">#6EF6FC</color>
<!-- Shade of the accent system color at 80% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_200">#76D1FF</color>
+ <color name="system_accent1_200">#4CD9E0</color>
<!-- Shade of the accent system color at 70% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_300">#4BB6E8</color>
+ <color name="system_accent1_300">#1EBDC4</color>
<!-- Shade of the accent system color at 60% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_400">#219BCC</color>
+ <color name="system_accent1_400">#00A1A7</color>
<!-- Shade of the accent system color at 49.6% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_500">#007FAC</color>
+ <color name="system_accent1_500">#008388</color>
<!-- Shade of the accent system color at 40% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_600">#00668B</color>
+ <color name="system_accent1_600">#00696E</color>
<!-- Shade of the accent system color at 30% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_700">#004C69</color>
+ <color name="system_accent1_700">#004F53</color>
<!-- Shade of the accent system color at 20% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_800">#003549</color>
+ <color name="system_accent1_800">#00373A</color>
<!-- Shade of the accent system color at 10% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent1_900">#001E2C</color>
+ <color name="system_accent1_900">#002022</color>
<!-- Darkest shade of the accent color used by the system. Black.
This value can be overlaid at runtime by OverlayManager RROs. -->
<color name="system_accent1_1000">#000000</color>
<!-- Lightest shade of the secondary accent color used by the system. White.
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_0">#ffffff</color>
+ <color name="system_accent2_0">#FFFFFF</color>
<!-- Shade of the secondary accent system color at 99% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_10">#F9FCFF</color>
+ <color name="system_accent2_10">#EFFFFF</color>
<!-- Shade of the secondary accent system color at 95% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_50">#E0F3FF</color>
+ <color name="system_accent2_50">#DAF6F7</color>
<!-- Shade of the secondary accent system color at 90% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_100">#D1E5F4</color>
+ <color name="system_accent2_100">#CCE8E8</color>
<!-- Shade of the secondary accent system color at 80% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_200">#B5CAD7</color>
+ <color name="system_accent2_200">#B0CCCC</color>
<!-- Shade of the secondary accent system color at 70% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_300">#9AAEBB</color>
+ <color name="system_accent2_300">#96B0B1</color>
<!-- Shade of the secondary accent system color at 60% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_400">#8094A0</color>
+ <color name="system_accent2_400">#7B9697</color>
<!-- Shade of the secondary accent system color at 49.6% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_500">#657985</color>
+ <color name="system_accent2_500">#617B7C</color>
<!-- Shade of the secondary accent system color at 40% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_600">#4E616C</color>
+ <color name="system_accent2_600">#496364</color>
<!-- Shade of the secondary accent system color at 30% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_700">#374955</color>
+ <color name="system_accent2_700">#324B4D</color>
<!-- Shade of the secondary accent system color at 20% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_800">#20333D</color>
+ <color name="system_accent2_800">#1B3436</color>
<!-- Shade of the secondary accent system color at 10% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent2_900">#091E28</color>
+ <color name="system_accent2_900">#051F21</color>
<!-- Darkest shade of the secondary accent color used by the system. Black.
This value can be overlaid at runtime by OverlayManager RROs. -->
<color name="system_accent2_1000">#000000</color>
<!-- Lightest shade of the tertiary accent color used by the system. White.
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_0">#ffffff</color>
+ <color name="system_accent3_0">#FFFFFF</color>
<!-- Shade of the tertiary accent system color at 99% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_10">#FFFBFF</color>
+ <color name="system_accent3_10">#FDFCFF</color>
<!-- Shade of the tertiary accent system color at 95% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_50">#F5EEFF</color>
+ <color name="system_accent3_50">#EBF1FF</color>
<!-- Shade of the tertiary accent system color at 90% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_100">#E6DEFF</color>
+ <color name="system_accent3_100">#D4E3FF</color>
<!-- Shade of the tertiary accent system color at 80% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_200">#CAC1EA</color>
+ <color name="system_accent3_200">#ACC8F7</color>
<!-- Shade of the tertiary accent system color at 70% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_300">#AEA6CE</color>
+ <color name="system_accent3_300">#91ACDB</color>
<!-- Shade of the tertiary accent system color at 60% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_400">#938CB1</color>
+ <color name="system_accent3_400">#7692BE</color>
<!-- Shade of the tertiary accent system color at 49% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_500">#787296</color>
+ <color name="system_accent3_500">#5C77A2</color>
<!-- Shade of the tertiary accent system color at 40% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_600">#605A7C</color>
+ <color name="system_accent3_600">#445F8A</color>
<!-- Shade of the tertiary accent system color at 30% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_700">#484264</color>
+ <color name="system_accent3_700">#2B4770</color>
<!-- Shade of the tertiary accent system color at 20% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_800">#322C4C</color>
+ <color name="system_accent3_800">#113158</color>
<!-- Shade of the tertiary accent system color at 10% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_accent3_900">#1D1736</color>
+ <color name="system_accent3_900">#001B3D</color>
<!-- Darkest shade of the tertiary accent color used by the system. Black.
This value can be overlaid at runtime by OverlayManager RROs. -->
<color name="system_accent3_1000">#000000</color>
<!-- Lightest shade of the neutral color used by the system. White.
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_0">#ffffff</color>
+ <color name="system_neutral1_0">#FFFFFF</color>
<!-- Shade of the neutral system color at 99% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_10">#FCFCFF</color>
+ <color name="system_neutral1_10">#FAFDFC</color>
<!-- Shade of the neutral system color at 95% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_50">#F0F0F3</color>
+ <color name="system_neutral1_50">#EFF1F1</color>
<!-- Shade of the neutral system color at 90% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_100">#E1E3E5</color>
+ <color name="system_neutral1_100">#E0E3E2</color>
<!-- Shade of the neutral system color at 80% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_200">#C5C7C9</color>
+ <color name="system_neutral1_200">#C4C7C6</color>
<!-- Shade of the neutral system color at 70% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_300">#AAABAE</color>
+ <color name="system_neutral1_300">#A9ACAB</color>
<!-- Shade of the neutral system color at 60% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_400">#8F9193</color>
+ <color name="system_neutral1_400">#8E9191</color>
<!-- Shade of the neutral system color at 49% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_500">#747679</color>
+ <color name="system_neutral1_500">#737776</color>
<!-- Shade of the neutral system color at 40% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_600">#5C5F61</color>
+ <color name="system_neutral1_600">#5B5F5F</color>
<!-- Shade of the neutral system color at 30% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_700">#454749</color>
+ <color name="system_neutral1_700">#444747</color>
<!-- Shade of the neutral system color at 20% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_800">#2E3133</color>
+ <color name="system_neutral1_800">#2E3131</color>
<!-- Shade of the neutral system color at 10% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral1_900">#191C1E</color>
+ <color name="system_neutral1_900">#191C1C</color>
<!-- Darkest shade of the neutral color used by the system. Black.
This value can be overlaid at runtime by OverlayManager RROs. -->
<color name="system_neutral1_1000">#000000</color>
<!-- Lightest shade of the secondary neutral color used by the system. White.
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_0">#ffffff</color>
+ <color name="system_neutral2_0">#FFFFFF</color>
<!-- Shade of the secondary neutral system color at 99% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_10">#F9FCFF</color>
+ <color name="system_neutral2_10">#F4FEFE</color>
<!-- Shade of the secondary neutral system color at 95% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_50">#EBF1F8</color>
+ <color name="system_neutral2_50">#E8F3F2</color>
<!-- Shade of the secondary neutral system color at 90% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_100">#DCE3E9</color>
+ <color name="system_neutral2_100">#DAE5E4</color>
<!-- Shade of the secondary neutral system color at 80% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_200">#C0C7CD</color>
+ <color name="system_neutral2_200">#BEC8C9</color>
<!-- Shade of the secondary neutral system color at 70% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_300">#A5ACB2</color>
+ <color name="system_neutral2_300">#A3ADAE</color>
<!-- Shade of the secondary neutral system color at 60% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_400">#8A9297</color>
+ <color name="system_neutral2_400">#889393</color>
<!-- Shade of the secondary neutral system color at 49% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_500">#70777C</color>
+ <color name="system_neutral2_500">#6E7878</color>
<!-- Shade of the secondary neutral system color at 40% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_600">#585F65</color>
+ <color name="system_neutral2_600">#566061</color>
<!-- Shade of the secondary neutral system color at 30% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_700">#40484D</color>
+ <color name="system_neutral2_700">#3F4949</color>
<!-- Shade of the secondary neutral system color at 20% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_800">#2A3136</color>
+ <color name="system_neutral2_800">#293232</color>
<!-- Shade of the secondary neutral system color at 10% perceptual luminance (L* in L*a*b* color space).
This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_neutral2_900">#161C20</color>
+ <color name="system_neutral2_900">#141D1E</color>
<!-- Darkest shade of the secondary neutral color used by the system. Black.
This value can be overlaid at runtime by OverlayManager RROs. -->
<color name="system_neutral2_1000">#000000</color>
diff --git a/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt b/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
index 0b3eccfd3a91..eabc1c510ecb 100644
--- a/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
+++ b/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
@@ -35,7 +35,7 @@ const val ACCENT3_HUE_SHIFT = 60.0f
const val NEUTRAL1_CHROMA = 4.0f
const val NEUTRAL2_CHROMA = 8.0f
-const val GOOGLE_BLUE = 0xFF1b6ef3.toInt()
+const val LINEAGE_TEAL = 0xFF167C80.toInt()
const val MIN_CHROMA = 5
@@ -76,9 +76,9 @@ public class ColorScheme(@ColorInt seed: Int, val darkTheme: Boolean) {
init {
val proposedSeedCam = Cam.fromInt(seed)
val seedArgb = if (seed == Color.TRANSPARENT) {
- GOOGLE_BLUE
+ LINEAGE_TEAL
} else if (proposedSeedCam.chroma < 5) {
- GOOGLE_BLUE
+ LINEAGE_TEAL
} else {
seed
}
@@ -140,7 +140,7 @@ public class ColorScheme(@ColorInt seed: Int, val darkTheme: Boolean) {
}.toList()
if (distinctColors.isEmpty()) {
- return listOf(GOOGLE_BLUE)
+ return listOf(LINEAGE_TEAL)
}
return distinctColors
}
@@ -204,8 +204,8 @@ public class ColorScheme(@ColorInt seed: Int, val darkTheme: Boolean) {
}
if (seeds.isEmpty()) {
- // Use gBlue 500 if there are 0 colors
- seeds.add(GOOGLE_BLUE)
+ // Use Lineage Teal 500 if there are 0 colors
+ seeds.add(LINEAGE_TEAL)
}
return seeds
@@ -259,4 +259,4 @@ public class ColorScheme(@ColorInt seed: Int, val darkTheme: Boolean) {
return huePopulation
}
}
-}
\ No newline at end of file
+}
--
2.25.1

View File

@ -1,7 +1,7 @@
From 160ca5e73a2d075c5514db911180d4523fedf860 Mon Sep 17 00:00:00 2001
From 32011e0db7f8ee8de64a9b9a5912e6c39a2ab7cb Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Apr 2018 10:01:19 +0800
Subject: [PATCH 02/19] Disable vendor mismatch warning
Subject: [PATCH 03/22] Disable vendor mismatch warning
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
---
@ -9,10 +9,10 @@ Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 5d0d182230e1..789968e19ab6 100644
index 112a56957fc0..8b6ec8bbf3ff 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -5508,20 +5508,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
@@ -5665,20 +5665,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
}
if (!Build.isBuildConsistent()) {

View File

@ -1,7 +1,7 @@
From 79e4311950c147ce85983a7088f4d921050f3f74 Mon Sep 17 00:00:00 2001
From e9b33bcd2d50330e1b34e3f865cc46b9fc7aaaf3 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 02:23:48 +0000
Subject: [PATCH 03/19] UI: Adjust default navbar layouts
Subject: [PATCH 04/22] 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,10 +45,10 @@ index 07b797a32428..000000000000
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
-</resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index ebf7b8407727..557699b35aa8 100644
index 1bee8eee1534..d0a3a807a79a 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -350,7 +350,7 @@
@@ -332,7 +332,7 @@
</string-array>
<!-- Nav bar button default ordering/layout -->

View File

@ -1,7 +1,7 @@
From 47b42ba04a71792b6a0d9bcfa6fe515593d4bcc8 Mon Sep 17 00:00:00 2001
From 4a097fc8eba629cc0e6784c7b1d8da7a1a9c0a6e Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 9 Mar 2018 15:41:26 +0800
Subject: [PATCH 04/19] UI: Disable left (seascape) navigation bar optionally
Subject: [PATCH 05/22] UI: Disable left (seascape) navigation bar optionally
Toggle this behaviour with property "persist.ui.seascape.disable"
@ -45,12 +45,12 @@ index f1e1366404a2..f43bef8532b8 100644
for (int i = 0; i < group.getChildCount(); i++) {
final View child = group.getChildAt(i);
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 21bca6ed6a53..b699c4e4f38d 100644
index 65eaa63118b2..89ac6585c673 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -2388,9 +2388,10 @@ public class DisplayPolicy {
@NavigationBarPosition
int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) {
@@ -2644,9 +2644,10 @@ public class DisplayPolicy {
}
}
if (navigationBarCanMove() && displayWidth > displayHeight) {
- if (displayRotation == Surface.ROTATION_270) {
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);

View File

@ -1,7 +1,7 @@
From 66956ebbdb5645ff2cfb2a010d4371faa7c41554 Mon Sep 17 00:00:00 2001
From a83a00cadfd1ab7746fda648ec0f54c2bcec794d Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 10 Jan 2021 11:44:29 +0000
Subject: [PATCH 05/19] UI: Disable wallpaper zoom
Subject: [PATCH 06/22] UI: Disable wallpaper zoom
It does little more than inducing motion sickness
@ -11,10 +11,10 @@ Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3ce1886fef6d..d8f280ddbf93 100644
index e2216d23e15e..9d6c712c8285 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -4770,7 +4770,7 @@
@@ -4842,7 +4842,7 @@
<string name="config_customMediaSessionPolicyProvider"></string>
<!-- The max scale for the wallpaper when it's zoomed in -->

View File

@ -1,26 +0,0 @@
From 04b13419bb9446b5b25fe329be88804e297050b2 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 3 Jun 2020 01:31:34 +0000
Subject: [PATCH 06/19] UI: Increase default status bar height
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
---
core/res/res/values/dimens.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index a666a5b4b796..b62a785cd69f 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -43,7 +43,7 @@
<dimen name="status_bar_height">@dimen/status_bar_height_portrait</dimen>
<!-- Height of the status bar in portrait. The height should be
Max((status bar content height + waterfall top size), top cutout size) -->
- <dimen name="status_bar_height_portrait">24dp</dimen>
+ <dimen name="status_bar_height_portrait">28dp</dimen>
<!-- Height of the status bar in landscape. The height should be
Max((status bar content height + waterfall top size), top cutout size) -->
<dimen name="status_bar_height_landscape">@dimen/status_bar_height_portrait</dimen>
--
2.25.1

View File

@ -0,0 +1,26 @@
From 0157abc9f7b706b3b884178f1668da6f6874e90a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 3 Jun 2020 01:31:34 +0000
Subject: [PATCH 07/22] UI: Increase default status bar height
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
---
core/res/res/values/dimens.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index f331f1ab720f..a31e166296ee 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -42,7 +42,7 @@
<!-- Height of the status bar.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
- <dimen name="status_bar_height">24dp</dimen>
+ <dimen name="status_bar_height">28dp</dimen>
<!-- Height of the status bar in portrait.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
--
2.25.1

View File

@ -0,0 +1,43 @@
From c84e0185c5cd5e9312eb1d393e36a2b82cf02e67 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 19 Mar 2022 09:22:24 +0000
Subject: [PATCH 08/22] UI: Restore split-screen divider to pre-Sv2 looks
- Kill rounded corners - where two rectangles collide should be perfectly straight
- Make it black again - taskbar should mind its own business
Change-Id: I240b627793b615c82bd07ebd77638cde180ef80f
---
.../Shell/res/color/split_divider_background.xml | 4 ++--
libs/WindowManager/Shell/res/values/dimen.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/WindowManager/Shell/res/color/split_divider_background.xml b/libs/WindowManager/Shell/res/color/split_divider_background.xml
index 329e5b9b31a0..cd54ac26a7fd 100644
--- a/libs/WindowManager/Shell/res/color/split_divider_background.xml
+++ b/libs/WindowManager/Shell/res/color/split_divider_background.xml
@@ -15,5 +15,5 @@
~ limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_500" android:lStar="35" />
-</selector>
\ No newline at end of file
+ <item android:color="@android:color/black" />
+</selector>
diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml
index af78293eb3ea..489fb0c83681 100644
--- a/libs/WindowManager/Shell/res/values/dimen.xml
+++ b/libs/WindowManager/Shell/res/values/dimen.xml
@@ -88,7 +88,7 @@
<dimen name="split_divider_handle_height">3dp</dimen>
<dimen name="split_divider_bar_width">10dp</dimen>
- <dimen name="split_divider_corner_size">42dp</dimen>
+ <dimen name="split_divider_corner_size">0dp</dimen>
<!-- One-Handed Mode -->
<!-- Threshold for dragging distance to enable one-handed mode -->
--
2.25.1

View File

@ -1,7 +1,7 @@
From 65e25646ab0c3cbfdc7199a791cd5e8bcccbaffe Mon Sep 17 00:00:00 2001
From dee59312a6b9ba10154af6ec96f9004a670177b9 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 6 Oct 2020 01:41:16 +0000
Subject: [PATCH 07/19] UI: Revive navbar layout tuning via sysui_nav_bar
Subject: [PATCH 09/22] UI: Revive navbar layout tuning via sysui_nav_bar
tunable
Google keeps fixing what ain't broken.

View File

@ -1,40 +0,0 @@
From 5bfabfbe5d9b44e85f18151fa1f29ed59b505dd5 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 14 Oct 2021 15:45:24 +0000
Subject: [PATCH 09/19] UI: Unblock alarm status bar icon
That's very Zen of you, Google...
Change-Id: I2c9f91f47bb1e324a20c13d588dcdbbca91dc12e
---
.../systemui/statusbar/phone/CollapsedStatusBarFragment.java | 1 -
.../android/systemui/statusbar/phone/KeyguardStatusBarView.java | 1 -
2 files changed, 2 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
index 2e40af4fab2a..f8c79ceabf2e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
@@ -162,7 +162,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
}
mDarkIconManager = new DarkIconManager(view.findViewById(R.id.statusIcons), mFeatureFlags);
mDarkIconManager.setShouldLog(true);
- mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_alarm_clock));
mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_call_strength));
mDarkIconManager.setBlockList(mBlockedIcons);
mStatusBarIconController.addIconGroup(mDarkIconManager);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index a32e7c4765ef..efc02548763a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -203,7 +203,6 @@ public class KeyguardStatusBarView extends RelativeLayout implements
// Set hidden status bar items
private void loadBlockList() {
Resources r = getResources();
- mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_alarm_clock));
mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_call_strength));
}
--
2.25.1

View File

@ -1,7 +1,7 @@
From e2774d80fc6cd0de872259c555f21ae2e8f8bf2c Mon Sep 17 00:00:00 2001
From 96aed2ae04eb83bcacc6f9e9dc26143852a54369 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 26 Apr 2020 08:56:13 +0000
Subject: [PATCH 08/19] UI: Use SNAP_FIXED_RATIO for multi-window globally
Subject: [PATCH 10/22] UI: Use SNAP_FIXED_RATIO for multi-window globally
Enables multiple snap targets under landscape for phone UI
@ -40,7 +40,7 @@ index 7308dc5882c1..000000000000
-</resources>
\ No newline at end of file
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
index 34b6a54be493..3921c9edfeac 100644
index 624581aba7dd..658654e2a63f 100644
--- a/core/res/res/values-sw600dp/config.xml
+++ b/core/res/res/values-sw600dp/config.xml
@@ -3,16 +3,16 @@
@ -78,10 +78,10 @@ index 34b6a54be493..3921c9edfeac 100644
Only applies if the device display is not square. -->
<bool name="config_navBarCanMove">false</bool>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d8f280ddbf93..3a62b51d3cbc 100644
index 9d6c712c8285..1b9306913e7d 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3531,7 +3531,7 @@
@@ -3589,7 +3589,7 @@
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
2 - 1 snap target: 1:1
-->

View File

@ -1,32 +0,0 @@
From 69866119d54b6e5aee80530f4030980ef0ab28c1 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 5 Oct 2021 21:01:15 -0700
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.
Demo screenshots (with color overlays applied):
https://twitter.com/kdrag0n/status/1445960685427433473
Change-Id: Id6f6623096ed231e841ca3794b47f8a0ab54dae6
---
.../android/systemui/globalactions/GlobalActionsDialogLite.java | 2 +-
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 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
@Override
public void onUiModeChanged() {
mContext.getTheme().applyStyle(mContext.getThemeResId(), true);
- if (mDialog != null && mDialog.isShowing()) {
+ if (mDialog != null) {
mDialog.refreshDialog();
}
}
--
2.25.1

View File

@ -0,0 +1,40 @@
From f38c5f4211a7454f4232d55322939b2b07716937 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 14 Oct 2021 15:45:24 +0000
Subject: [PATCH 11/22] UI: Unblock alarm status bar icon
That's very Zen of you, Google...
Change-Id: I2c9f91f47bb1e324a20c13d588dcdbbca91dc12e
---
.../statusbar/phone/KeyguardStatusBarViewController.java | 1 -
.../statusbar/phone/fragment/CollapsedStatusBarFragment.java | 1 -
2 files changed, 2 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewController.java
index 20e20e19ce11..69936c63c7ed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewController.java
@@ -264,7 +264,6 @@ public class KeyguardStatusBarViewController extends ViewController<KeyguardStat
Resources r = getResources();
mBlockedIcons = Collections.unmodifiableList(Arrays.asList(
- r.getString(com.android.internal.R.string.status_bar_alarm_clock),
r.getString(com.android.internal.R.string.status_bar_call_strength)));
mNotificationsHeaderCollideDistance = r.getDimensionPixelSize(
R.dimen.header_notifications_collide_distance);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
index 87e6d62fb088..f5daaa8c7002 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
@@ -195,7 +195,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
}
mDarkIconManager = new DarkIconManager(view.findViewById(R.id.statusIcons), mFeatureFlags);
mDarkIconManager.setShouldLog(true);
- mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_alarm_clock));
mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_call_strength));
mDarkIconManager.setBlockList(mBlockedIcons);
mStatusBarIconController.addIconGroup(mDarkIconManager);
--
2.25.1

View File

@ -1,7 +1,7 @@
From 262b65f0ca1c307215c538c378775874c054ef01 Mon Sep 17 00:00:00 2001
From b6213d20b46e5601cbb9b31325ca6ce3f32fac03 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 3 Nov 2020 22:43:12 -0800
Subject: [PATCH 10/19] core: Remove old app target SDK dialog
Subject: [PATCH 12/22] 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

View File

@ -0,0 +1,41 @@
From 894572f399ce6132eae919fa2106e8554648c79c Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 8 Mar 2022 20:37:33 -0800
Subject: [PATCH 13/22] 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.
Demo screenshots (with color overlays applied):
https://twitter.com/kdrag0n/status/1445960685427433473
[kdrag0n: ported to 12L]
Change-Id: If58fb4079a4cd11414ff928fad3576beecb14ff5
---
.../systemui/globalactions/GlobalActionsDialogLite.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
index bddf5756f925..0ed1042f21e2 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
@@ -787,6 +787,15 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
&& (currentUser == null || currentUser.isPrimary());
}
+ @Override
+ public void onUiModeChanged() {
+ // Colors may change, depending on UI mode
+ mContext.getTheme().applyStyle(mContext.getThemeResId(), true);
+ if (mDialog != null) {
+ mDialog.refreshDialog();
+ }
+ }
+
@Override
public void onConfigChanged(Configuration newConfig) {
if (mDialog != null && mDialog.isShowing()
--
2.25.1

View File

@ -1,7 +1,7 @@
From a08e7b27c44c384da58a118f5a0f3290a37f07da Mon Sep 17 00:00:00 2001
From 4424a099b13b1ec10580134071384fa498ff3356 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Sat, 9 Oct 2021 14:39:38 -0700
Subject: [PATCH 12/19] SystemUI: Use Monet colors for power menu
Subject: [PATCH 14/22] 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
@ -14,7 +14,7 @@ Change-Id: Iaffb178fe2c09a33925cb40e89d78640fab2b23c
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml
index b98694e2fae7..3a6b62dfe1c8 100644
index fcb369876cf2..a0015a72f268 100644
--- a/packages/SystemUI/res/values-night/colors.xml
+++ b/packages/SystemUI/res/values-night/colors.xml
@@ -99,4 +99,11 @@
@ -30,11 +30,11 @@ index b98694e2fae7..3a6b62dfe1c8 100644
+ <color name="global_actions_lite_emergency_icon">@*android:color/accent_device_default_dark</color>
</resources>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index f539b0cf68a1..9ea915c1cb3f 100644
index e455aaa225be..04d4fedccdec 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -53,11 +53,11 @@
<color name="global_actions_emergency_text">@color/GM2_grey_100</color>
@@ -34,11 +34,11 @@
<color name="global_actions_grid_background">#F1F3F4</color>
<!-- Colors for Power Menu Lite -->
- <color name="global_actions_lite_background">#191C18</color>

View File

@ -1,7 +1,7 @@
From 09ea8e6106959f6c8a6399227ee029d1feace6b2 Mon Sep 17 00:00:00 2001
From bf258bd06284df94c2872e677679299d2498b4df Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Wed, 6 Oct 2021 18:40:30 -0700
Subject: [PATCH 13/19] Revert "Make QS always use dark theme colors"
Subject: [PATCH 15/22] Revert "Make QS always use dark theme colors"
This reverts commit d62f7249f9e3222da95ecf6816601c408aac6be5.
@ -15,11 +15,11 @@ Change-Id: Iac4c96ccb3845812ca3df820bf27dc533816f72e
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
index 42a7c895ff84..27514617fb23 100644
index 542a1c9d22bd..7a370d8cbc48 100644
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
@@ -24,7 +24,7 @@
android:minHeight="48dp"
android:minHeight="@dimen/qs_header_row_min_height"
android:clickable="false"
android:focusable="true"
- android:theme="@style/Theme.SystemUI.QuickSettings.Header">
@ -28,10 +28,10 @@ index 42a7c895ff84..27514617fb23 100644
<LinearLayout
android:id="@+id/clock_container"
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 93d60cce2915..e592fe2dd630 100644
index f26159f5176a..e2665f879e5e 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -395,7 +395,7 @@
@@ -326,7 +326,7 @@
<item name="*android:dotColor">?android:attr/textColorSecondary</item>
</style>
@ -40,7 +40,7 @@ index 93d60cce2915..e592fe2dd630 100644
<item name="lightIconTheme">@style/QSIconTheme</item>
<item name="darkIconTheme">@style/QSIconTheme</item>
<item name="android:colorError">@*android:color/error_color_material_dark</item>
@@ -486,7 +486,7 @@
@@ -421,7 +421,7 @@
<item name="singleToneColor">@color/dark_mode_qs_icon_color_single_tone</item>
</style>

View File

@ -1,7 +1,7 @@
From 9bce4fe471a1d7c107fad69b9285525041feed72 Mon Sep 17 00:00:00 2001
From f245cb8f21951c04b094708eb0c9c67bcb2fa795 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Wed, 6 Oct 2021 18:41:11 -0700
Subject: [PATCH 14/19] Revert "Do not re-inflate QS and SB when
Subject: [PATCH 16/22] Revert "Do not re-inflate QS and SB when
CONFIG_UI_MODE"
This reverts commit 8a40ff855b86bc86e23367017002289920855a4e.
@ -15,10 +15,10 @@ Change-Id: Ibad399ece587505559cc73febdda2f2d8558e94d
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
index b45dc52585ad..87d90adceba5 100644
index 10878dcc2474..483865186945 100644
--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
+++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
@@ -54,7 +54,8 @@ public class FragmentHostManager {
@@ -53,7 +53,8 @@ public class FragmentHostManager {
private final View mRootView;
private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE

View File

@ -1,7 +1,7 @@
From c87db4a6ea8c4c399dd92923dd28f2533246c293 Mon Sep 17 00:00:00 2001
From dae69872bd37ea8b2f4877ecb44ef5338f589079 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Mon, 11 Oct 2021 19:24:58 -0700
Subject: [PATCH 15/19] SystemUI: Follow light/dark theme in quick settings
Subject: [PATCH 17/22] 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
@ -22,18 +22,22 @@ the notification shade.
Demo screenshots (with dual-tone commit):
https://twitter.com/kdrag0n/status/1445922541218922496
[kdrag0n: ported to 12L]
Change-Id: I3d45b72f0f119e100505409d178ab8f698993881
---
.../brightness_progress_full_drawable.xml | 2 +-
.../qs_footer_action_chip_background.xml | 8 +----
.../qs_security_footer_background.xml | 3 +-
packages/SystemUI/res/values-night/styles.xml | 12 ++++++++
packages/SystemUI/res/values/styles.xml | 10 +++----
.../systemui/privacy/OngoingPrivacyChip.kt | 4 +--
.../qs_footer_action_chip_background.xml | 8 +-------
.../qs_security_footer_background.xml | 3 +--
.../res/layout/combined_qs_header.xml | 4 ++--
.../res/layout/split_shade_header.xml | 2 +-
packages/SystemUI/res/values-night/styles.xml | 12 +++++++++++
packages/SystemUI/res/values/styles.xml | 10 +++++-----
.../systemui/privacy/OngoingPrivacyChip.kt | 4 ++--
.../systemui/qs/tileimpl/QSTileViewImpl.kt | 2 +-
.../statusbar/phone/ScrimController.java | 2 +-
.../systemui/statusbar/phone/ScrimState.java | 30 +++++++++----------
9 files changed, 39 insertions(+), 34 deletions(-)
.../systemui/statusbar/phone/ScrimState.java | 20 +++++++++----------
11 files changed, 37 insertions(+), 32 deletions(-)
diff --git a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml
index 4d9188c40822..1eae667c6e79 100644
@ -81,8 +85,41 @@ index 860d23b11439..8f12b95ed4f6 100644
<corners android:radius="@dimen/qs_security_footer_corner_radius"/>
</shape>
</item>
diff --git a/packages/SystemUI/res/layout/combined_qs_header.xml b/packages/SystemUI/res/layout/combined_qs_header.xml
index 1f10e5dfeed8..4e46c42a053a 100644
--- a/packages/SystemUI/res/layout/combined_qs_header.xml
+++ b/packages/SystemUI/res/layout/combined_qs_header.xml
@@ -26,7 +26,7 @@
android:paddingLeft="@dimen/qs_panel_padding"
android:paddingRight="@dimen/qs_panel_padding"
android:visibility="gone"
- android:theme="@style/Theme.SystemUI.QuickSettings.Header"
+ android:theme="@style/QSHeaderTheme"
app:layoutDescription="@xml/combined_qs_header_scene">
<androidx.constraintlayout.widget.Guideline
@@ -101,4 +101,4 @@
app:layout_constraintBottom_toBottomOf="parent"
/>
-</androidx.constraintlayout.motion.widget.MotionLayout>
\ No newline at end of file
+</androidx.constraintlayout.motion.widget.MotionLayout>
diff --git a/packages/SystemUI/res/layout/split_shade_header.xml b/packages/SystemUI/res/layout/split_shade_header.xml
index b6e96ceeaf20..ecb017a3b606 100644
--- a/packages/SystemUI/res/layout/split_shade_header.xml
+++ b/packages/SystemUI/res/layout/split_shade_header.xml
@@ -25,7 +25,7 @@
android:paddingLeft="@dimen/qs_panel_padding"
android:paddingRight="@dimen/qs_panel_padding"
android:visibility="gone"
- android:theme="@style/Theme.SystemUI.QuickSettings.Header">
+ android:theme="@style/QSHeaderTheme">
<com.android.systemui.statusbar.policy.Clock
android:id="@+id/clock"
diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml
index dd999837a1ba..3fd6f9cc5454 100644
index e82230ab5fbc..897f7ae00824 100644
--- a/packages/SystemUI/res/values-night/styles.xml
+++ b/packages/SystemUI/res/values-night/styles.xml
@@ -24,6 +24,18 @@
@ -105,10 +142,10 @@ index dd999837a1ba..3fd6f9cc5454 100644
<item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index e592fe2dd630..a5ed039bd3fd 100644
index e2665f879e5e..47344cb6d352 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -398,12 +398,12 @@
@@ -329,12 +329,12 @@
<style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
<item name="lightIconTheme">@style/QSIconTheme</item>
<item name="darkIconTheme">@style/QSIconTheme</item>
@ -125,7 +162,7 @@ index e592fe2dd630..a5ed039bd3fd 100644
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
</style>
@@ -619,7 +619,7 @@
@@ -540,7 +540,7 @@
<style name="QSCustomizeToolbar" parent="@*android:style/Widget.DeviceDefault.Toolbar">
<item name="android:textColor">?android:attr/textColorPrimary</item>
@ -150,11 +187,11 @@ index 9cd97ff8e343..461f67935a11 100644
val padding = context.resources
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_side_padding)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
index 222539d49526..da7c63ff15a3 100644
index 9d60e63032c3..405080c32807 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
@@ -70,7 +70,7 @@ open class QSTileViewImpl @JvmOverloads constructor(
override var heightOverride: Int = HeightOverrideable.NO_OVERRIDE
@@ -83,7 +83,7 @@ open class QSTileViewImpl @JvmOverloads constructor(
}
private val colorActive = Utils.getColorAttrDefaultColor(context,
- com.android.internal.R.attr.colorAccentPrimary)
@ -163,10 +200,10 @@ index 222539d49526..da7c63ff15a3 100644
private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index 27c129ad34c5..6bdf82a60e40 100644
index 1077347eab0a..fd44a9b5a5b3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -692,7 +692,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
@@ -704,7 +704,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
mNotificationsAlpha = behindAlpha;
mNotificationsTint = behindTint;
mBehindAlpha = 1;
@ -176,19 +213,19 @@ index 27c129ad34c5..6bdf82a60e40 100644
mBehindAlpha = behindAlpha;
if (mState == ScrimState.SHADE_LOCKED) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
index 15b8c67fd4ba..e81642f7d491 100644
index 9246c0e73289..b30641bbf1af 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
@@ -88,7 +88,7 @@ public enum ScrimState {
@@ -82,7 +82,7 @@ public enum ScrimState {
mBehindAlpha = mClipQsScrim ? 1 : mScrimBehindAlphaKeyguard;
mNotifAlpha = mClipQsScrim ? mScrimBehindAlphaKeyguard : 0;
mBubbleAlpha = 0;
if (mClipQsScrim) {
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
}
}
},
@@ -114,7 +114,7 @@ public enum ScrimState {
@@ -119,7 +119,7 @@ public enum ScrimState {
@Override
public void prepare(ScrimState previousState) {
mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha;
@ -197,9 +234,9 @@ index 15b8c67fd4ba..e81642f7d491 100644
mNotifAlpha = mClipQsScrim ? mDefaultScrimAlpha : 0;
mNotifTint = Color.TRANSPARENT;
mFrontAlpha = 0f;
@@ -141,17 +141,17 @@ public enum ScrimState {
@@ -143,17 +143,17 @@ public enum ScrimState {
mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha;
mNotifAlpha = 1f;
mBubbleAlpha = 0f;
mFrontAlpha = 0f;
- mBehindTint = Color.BLACK;
+ mBehindTint = Color.TRANSPARENT;
@ -218,13 +255,12 @@ index 15b8c67fd4ba..e81642f7d491 100644
}
},
@@ -248,27 +248,27 @@ public enum ScrimState {
@@ -244,22 +244,22 @@ public enum ScrimState {
mAnimateChange = !mLaunchingAffordanceWithPreview && !fromAod;
mFrontTint = Color.TRANSPARENT;
- mBehindTint = Color.BLACK;
+ mBehindTint = Color.TRANSPARENT;
mBubbleTint = Color.TRANSPARENT;
mBlankScreen = false;
if (previousState == ScrimState.AOD) {
@ -232,15 +268,11 @@ index 15b8c67fd4ba..e81642f7d491 100644
updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */);
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */);
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT /* tint */);
if (mScrimForBubble != null) {
updateScrimColor(mScrimForBubble, 1f /* alpha */, Color.BLACK /* tint */);
}
// Scrims should still be black at the end of the transition.
mFrontTint = Color.BLACK;
- mBehindTint = Color.BLACK;
+ mBehindTint = Color.TRANSPARENT;
mBubbleTint = Color.BLACK;
mBlankScreen = true;
}
@ -249,41 +281,8 @@ index 15b8c67fd4ba..e81642f7d491 100644
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
}
}
},
@@ -290,27 +290,27 @@ public enum ScrimState {
mAnimateChange = !mLaunchingAffordanceWithPreview;
mFrontTint = Color.TRANSPARENT;
- mBehindTint = Color.BLACK;
- mBubbleTint = Color.BLACK;
+ mBehindTint = Color.TRANSPARENT;
+ mBubbleTint = Color.TRANSPARENT;
mBlankScreen = false;
if (previousState == ScrimState.AOD) {
// Set all scrims black, before they fade transparent.
updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */);
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */);
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT /* tint */);
if (mScrimForBubble != null) {
updateScrimColor(mScrimForBubble, 1f /* alpha */, Color.BLACK /* tint */);
}
// Scrims should still be black at the end of the transition.
mFrontTint = Color.BLACK;
- mBehindTint = Color.BLACK;
+ mBehindTint = Color.TRANSPARENT;
mBubbleTint = Color.BLACK;
mBlankScreen = true;
}
if (mClipQsScrim) {
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
}
mAnimationDuration = ScrimController.ANIMATION_DURATION;
@@ -468,4 +468,4 @@ public enum ScrimState {
};
@@ -399,4 +399,4 @@ public enum ScrimState {
public void setClipQsScrim(boolean clipsQsScrim) {
mClipQsScrim = clipsQsScrim;
}

View File

@ -1,7 +1,7 @@
From 57277759d1f5aa1d81f2121bc4d69edfed807cea Mon Sep 17 00:00:00 2001
From cee09b3e6dfdf780f6dab8d4d679a5a4c6ef9d23 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Mon, 11 Oct 2021 19:25:02 -0700
Subject: [PATCH 16/19] SystemUI: Initialize QS tiles in inactive state
Subject: [PATCH 18/22] SystemUI: Initialize QS tiles in inactive state
Now that the QS fragment is recreated when changing the UI mode (so that
it follows light/dark themes), all tiles flash with active color briefly

View File

@ -1,7 +1,7 @@
From d8e58fc80da5875d4a909d349413a4308a35a272 Mon Sep 17 00:00:00 2001
From 78af3b38ba93d5548bda677eac35519bb5b5fd7c Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Mon, 11 Oct 2021 19:25:08 -0700
Subject: [PATCH 17/19] SystemUI: Add dual-tone light and dark themes for QS
Subject: [PATCH 19/22] SystemUI: Add dual-tone light and dark themes for QS
Google's dual-tone QS design where the notification panel has a
semantically higher elevation adds depth to the notification+QS shade,
@ -80,10 +80,10 @@ index 1571fab66a5b..0683c20a4a4c 100644
<item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item>
<item name="forceDarkAllowed">false</item>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index a5ed039bd3fd..bb258ab18f82 100644
index 47344cb6d352..ba0361de6e8b 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -402,7 +402,7 @@
@@ -333,7 +333,7 @@
<item name="android:windowIsFloating">true</item>
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
<item name="offStateColor">@*android:color/surface_light</item>
@ -93,10 +93,10 @@ index a5ed039bd3fd..bb258ab18f82 100644
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
</style>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index 6bdf82a60e40..cc1c8e6255b8 100644
index fd44a9b5a5b3..00db68981eb6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -186,6 +186,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
@@ -180,6 +180,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
private GradientColors mColors;
@ -104,15 +104,15 @@ index 6bdf82a60e40..cc1c8e6255b8 100644
private boolean mNeedsDrawableColorUpdate;
private float mScrimBehindAlphaKeyguard = KEYGUARD_SCRIM_ALPHA;
@@ -284,6 +285,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
});
@@ -276,6 +277,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
);
mColors = new GradientColors();
+ mBehindColors = new GradientColors();
}
/**
@@ -851,7 +853,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
@@ -874,7 +876,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
&& !mBlankScreen;
mScrimInFront.setColors(mColors, animateScrimInFront);
@ -121,7 +121,7 @@ index 6bdf82a60e40..cc1c8e6255b8 100644
mNotificationsScrim.setColors(mColors, animateScrimNotifications);
dispatchBackScrimState(mScrimBehind.getViewAlpha());
@@ -1207,11 +1209,20 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
@@ -1214,11 +1216,20 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
if (mScrimBehind == null) return;
int background = Utils.getColorAttr(mScrimBehind.getContext(),
android.R.attr.colorBackgroundFloating).getDefaultColor();

View File

@ -1,7 +1,7 @@
From 3606dbe992a728d9e348d1d1802c189cc6a393f7 Mon Sep 17 00:00:00 2001
From c788defdb9c94c2537315a1b3eb08528ab807db0 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 5 Oct 2021 21:01:50 -0700
Subject: [PATCH 18/19] Paint: Enable subpixel text positioning by default
Subject: [PATCH 20/22] Paint: Enable subpixel text positioning by default
On desktop Linux, subpixel text positioning is necessary to avoid
kerning issues, and Android is no different. Even though most phone

View File

@ -0,0 +1,41 @@
From dc81ab2729689f570fa04c72496b20ea98792706 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Fri, 18 Mar 2022 23:19:54 -0700
Subject: [PATCH 21/22] monet: Fix overly low chroma for tones below 90
Chroma is capped to 40 for light colors of L* 90 and above for valid
reasons. However, assigning the capped value to "chroma" fails to
account for the fact that chroma is an argument passed to the method,
so the capping effect persists across iterations. This unintentionally
affects and limits the chroma of *all* shades because the first
iteration of the loop is L*=90.
As a result, almost all colors are less chromatic than the intended
chroma >= 48. Fix the issue by assigning capped chroma to a temporary
per-iteration variable.
Change-Id: I18102d0072c89535e27f23fdb98af7c83864ff7e
---
.../monet/src/com/android/systemui/monet/Shades.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java b/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
index aab3538e3c4c..c5b9458614e1 100644
--- a/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
+++ b/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
@@ -59,10 +59,8 @@ public class Shades {
shades[1] = ColorUtils.CAMToColor(hue, Math.min(40f, chroma), 95);
for (int i = 2; i < 12; i++) {
float lStar = (i == 6) ? MIDDLE_LSTAR : 100 - 10 * (i - 1);
- if (lStar >= 90) {
- chroma = Math.min(40f, chroma);
- }
- shades[i] = ColorUtils.CAMToColor(hue, chroma, lStar);
+ float shadeChroma = (lStar >= 90) ? Math.min(40f, chroma) : chroma;
+ shades[i] = ColorUtils.CAMToColor(hue, shadeChroma, lStar);
}
return shades;
}
--
2.25.1

View File

@ -1,7 +1,7 @@
From e6bb7fa0f413c0f68bd021bca26fac6a060e52b1 Mon Sep 17 00:00:00 2001
From 708976d1ac2ea6cbf3498f546e53488736dfd471 Mon Sep 17 00:00:00 2001
From: SagarMakhar <sagarmakhar@gmail.com>
Date: Sat, 6 Nov 2021 13:16:24 +0000
Subject: [PATCH 19/19] Fix QS clock being white on light theme
Subject: [PATCH 22/22] Fix QS clock being white on light theme
Steps to reproduce without this commit:
- Turn off dark theme
@ -16,39 +16,39 @@ Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
1 file changed, 13 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java
index 18d6e646b007..7aa668440b4b 100644
index 2dc4ee4e0064..c9e9b2ad69d0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java
@@ -22,10 +22,8 @@ import android.view.View.OnClickListener;
@@ -18,10 +18,8 @@ package com.android.systemui.qs;
import androidx.annotation.NonNull;
import android.os.Bundle;
-import com.android.internal.colorextraction.ColorExtractor;
import com.android.internal.logging.UiEventLogger;
import com.android.systemui.R;
import com.android.systemui.battery.BatteryMeterViewController;
-import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.demomode.DemoMode;
import com.android.systemui.demomode.DemoModeController;
import com.android.systemui.plugins.ActivityStarter;
@@ -83,9 +81,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
private final String mMicSlot;
private final String mLocationSlot;
import com.android.systemui.flags.FeatureFlags;
@@ -64,9 +62,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
private boolean mListening;
- private SysuiColorExtractor mColorExtractor;
- private ColorExtractor.OnColorsChangedListener mOnColorsChangedListener;
-
private PrivacyItemController.Callback mPICCallback = new PrivacyItemController.Callback() {
@Override
public void onPrivacyItemsChanged(@NonNull List<PrivacyItem> privacyItems) {
@@ -135,7 +130,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
@Inject
QuickStatusBarHeaderController(QuickStatusBarHeader view,
HeaderPrivacyIconsController headerPrivacyIconsController,
@@ -74,7 +69,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
DemoModeController demoModeController,
QuickQSPanelController quickQSPanelController,
QSCarrierGroupController.Builder qsCarrierGroupControllerBuilder,
PrivacyLogger privacyLogger,
- SysuiColorExtractor colorExtractor,
PrivacyDialogController privacyDialogController,
QSExpansionPathInterpolator qsExpansionPathInterpolator,
BatteryMeterViewController batteryMeterViewController,
FeatureFlags featureFlags,
@@ -168,12 +162,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
@@ -104,12 +98,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
mIconManager = new StatusBarIconController.TintedIconManager(mIconContainer, featureFlags);
mDemoModeReceiver = new ClockDemoModeReceiver(mClockView);
@ -59,14 +59,14 @@ index 18d6e646b007..7aa668440b4b 100644
- };
- mColorExtractor.addOnColorsChangedListener(mOnColorsChangedListener);
mCameraSlot = getResources().getString(com.android.internal.R.string.status_bar_camera);
mMicSlot = getResources().getString(com.android.internal.R.string.status_bar_microphone);
@@ -223,7 +211,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
// Don't need to worry about tuner settings for this icon
mBatteryMeterViewController.ignoreTunerUpdates();
@@ -157,7 +145,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
@Override
protected void onViewDetached() {
- mColorExtractor.removeOnColorsChangedListener(mOnColorsChangedListener);
mPrivacyChip.setOnClickListener(null);
mPrivacyIconsController.onParentInvisible();
mStatusBarIconController.removeIconGroup(mIconManager);
mQSCarrierGroupController.setOnSingleCarrierChangedListener(null);
--

View File

@ -1,47 +1,37 @@
From 0fdc4088295718c69121443e5b0fee5d213babd2 Mon Sep 17 00:00:00 2001
From 4c2395403ad6cc13c07f50889779a26404c1b096 Mon Sep 17 00:00:00 2001
From: Vachounet <vachounet@live.fr>
Date: Mon, 26 Oct 2020 17:05:18 +0100
Subject: [PATCH] Trebuchet: Move clear all button to actions view
@AndyCGYan: Instead of removing the original, hide it in a simple way
Change-Id: I7a0b2729c163169f7606ad4644870d07d5165e8e
---
.../ic_clear_all_recents.xml} | 20 +++---
.../res/layout/overview_actions_container.xml | 17 ++++-
.../RecentsViewStateController.java | 4 --
.../FallbackRecentsStateController.java | 4 --
.../android/quickstep/views/RecentsView.java | 64 ++-----------------
5 files changed, 31 insertions(+), 78 deletions(-)
rename quickstep/res/{layout/overview_clear_all_button.xml => drawable/ic_clear_all_recents.xml} (52%)
.../res/drawable/ic_recents_clear_all.xml | 18 ++++++++++++++++++
.../res/layout/overview_actions_container.xml | 17 ++++++++++++++++-
.../quickstep/fallback/RecentsState.java | 2 +-
.../quickstep/views/LauncherRecentsView.java | 3 +--
.../android/quickstep/views/RecentsView.java | 6 +++++-
5 files changed, 41 insertions(+), 5 deletions(-)
create mode 100644 quickstep/res/drawable/ic_recents_clear_all.xml
diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/drawable/ic_clear_all_recents.xml
similarity index 52%
rename from quickstep/res/layout/overview_clear_all_button.xml
rename to quickstep/res/drawable/ic_clear_all_recents.xml
index 1ee726e62e..7cba0220b0 100644
--- a/quickstep/res/layout/overview_clear_all_button.xml
+++ b/quickstep/res/drawable/ic_clear_all_recents.xml
@@ -1,6 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source Project
diff --git a/quickstep/res/drawable/ic_recents_clear_all.xml b/quickstep/res/drawable/ic_recents_clear_all.xml
new file mode 100644
index 0000000000..2ad0bb824d
--- /dev/null
+++ b/quickstep/res/drawable/ic_recents_clear_all.xml
@@ -0,0 +1,18 @@
+<!-- Copyright (C) 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,12 +12,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<com.android.quickstep.views.ClearAllButton
- xmlns:android="http://schemas.android.com/apk/res/android"
- style="@android:style/Widget.DeviceDefault.Button.Borderless"
- android:id="@+id/clear_all"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/recents_clear_all"
- android:textColor="?android:attr/textColorPrimary"
- android:textSize="14sp" />
\ No newline at end of file
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
@ -50,133 +40,95 @@ index 1ee726e62e..7cba0220b0 100644
+ <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" />
+</vector>
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
index b652252ce1..f12cad6875 100644
index 0fda0bf8d4..9a6f5ae062 100644
--- a/quickstep/res/layout/overview_actions_container.xml
+++ b/quickstep/res/layout/overview_actions_container.xml
@@ -46,6 +46,21 @@
android:layout_height="1dp"
android:layout_weight="1" />
@@ -40,6 +40,21 @@
android:text="@string/action_screenshot"
android:theme="@style/ThemeControlHighlightWorkspaceColor" />
+ <Space
+ android:id="@+id/action_clear_all_space"
+ android:layout_width="@dimen/overview_actions_button_spacing"
+ android:layout_height="1dp" />
+
+ <Button
+ android:id="@+id/action_clear_all"
+ style="@style/OverviewActionButton"
+ android:id="@+id/clear_all"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:drawableStart="@drawable/ic_recents_clear_all"
+ android:text="@string/recents_clear_all"
+ android:theme="@style/ThemeControlHighlightWorkspaceColor"
+ android:drawableStart="@drawable/ic_clear_all_recents"
+ />
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="1dp"
+ android:layout_weight="1" />
+
<Button
android:id="@+id/action_share"
style="@style/OverviewActionButton"
@@ -64,4 +79,4 @@
<Space
android:id="@+id/action_split_space"
android:layout_width="@dimen/overview_actions_button_spacing"
@@ -68,4 +83,4 @@
android:visibility="gone" />
</LinearLayout>
-</com.android.quickstep.views.OverviewActionsView>
\ No newline at end of file
+</com.android.quickstep.views.OverviewActionsView>
diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
index 996d36aadc..459a2c77f1 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
@@ -40,7 +40,6 @@ import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.anim.PropertySetter;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.util.MultiValueAlpha;
-import com.android.quickstep.views.ClearAllButton;
import com.android.quickstep.views.LauncherRecentsView;
import com.android.quickstep.views.RecentsView;
@@ -103,9 +102,6 @@ public final class RecentsViewStateController extends
private void setAlphas(PropertySetter propertySetter, StateAnimationConfig config,
LauncherState state) {
- float clearAllButtonAlpha = state.areElementsVisible(mLauncher, CLEAR_ALL_BUTTON) ? 1 : 0;
- propertySetter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
- clearAllButtonAlpha, LINEAR);
float overviewButtonAlpha = state.areElementsVisible(mLauncher, OVERVIEW_ACTIONS)
&& mRecentsView.shouldShowOverviewActionsForState(state) ? 1 : 0;
propertySetter.setFloat(mLauncher.getActionsView().getVisibilityAlpha(),
diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
index f0364eb410..7c60d9f5af 100644
--- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
+++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
@@ -36,7 +36,6 @@ import com.android.launcher3.statemanager.StateManager.StateHandler;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.quickstep.RecentsActivity;
-import com.android.quickstep.views.ClearAllButton;
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
index 15feb18367..dcd172170b 100644
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
@@ -102,7 +102,7 @@ public class RecentsState implements BaseState<RecentsState> {
* For this state, whether clear all button should be shown.
*/
public boolean hasClearAllButton() {
- return hasFlag(FLAG_CLEAR_ALL_BUTTON);
+ return false;
}
/**
* State controller for fallback recents activity
@@ -74,9 +73,6 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
private void setProperties(RecentsState state, StateAnimationConfig config,
PropertySetter setter) {
- float clearAllButtonAlpha = state.hasClearAllButton() ? 1 : 0;
- setter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
- clearAllButtonAlpha, LINEAR);
float overviewButtonAlpha =
state.hasOverviewActions() && mRecentsView.shouldShowOverviewActionsForState(state)
? 1 : 0;
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index e0395ea5aa..dd6fb70de9 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -120,8 +120,7 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun
super.setOverviewStateEnabled(enabled);
if (enabled) {
LauncherState state = mActivity.getStateManager().getState();
- boolean hasClearAllButton = (state.getVisibleElements(mActivity)
- & CLEAR_ALL_BUTTON) != 0;
+ boolean hasClearAllButton = false;
setDisallowScrollToClearAll(!hasClearAllButton);
}
}
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index ce79125be1..b447166d6e 100644
index eb107d4964..c0e4429804 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -96,6 +96,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
@@ -104,6 +104,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.Interpolator;
+import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.OverScroller;
@@ -378,8 +379,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
import android.widget.Toast;
@@ -425,6 +426,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
private final int mScrollHapticMinGapMillis;
private final RecentsModel mModel;
private final int mRowSpacing;
private final int mGridSideMargin;
- private final ClearAllButton mClearAllButton;
- private final Rect mClearAllButtonDeadZoneRect = new Rect();
+ private Button mClearAllButton;
private final int mSplitPlaceholderSize;
+ private Button mActionClearAllButton;
private final ClearAllButton mClearAllButton;
private final Rect mClearAllButtonDeadZoneRect = new Rect();
private final Rect mTaskViewDeadZoneRect = new Rect();
/**
* Reflects if Recents is currently in the middle of a gesture
@@ -593,9 +593,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mModel = RecentsModel.INSTANCE.get(context);
mIdp = InvariantDeviceProfile.INSTANCE.get(context);
- mClearAllButton = (ClearAllButton) LayoutInflater.from(context)
- .inflate(R.layout.overview_clear_all_button, this, false);
- mClearAllButton.setOnClickListener(this::dismissAllTasks);
mTaskViewPool = new ViewPool<>(context, this, R.layout.task, 20 /* max size */,
10 /* initial size */);
@@ -769,6 +766,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@@ -860,6 +862,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mActionsView = actionsView;
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
mSplitPlaceholderView = splitPlaceholderView;
+ mClearAllButton = (Button) mActionsView.findViewById(R.id.clear_all);
+ mClearAllButton.setOnClickListener(this::dismissAllTasks);
mSplitSelectStateController = splitController;
+ mActionClearAllButton = (Button) mActionsView.findViewById(R.id.action_clear_all);
+ mActionClearAllButton.setOnClickListener(this::dismissAllTasks);
}
public SplitPlaceholderView getSplitPlaceholder() {
@@ -910,7 +909,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
private void updateTaskStartIndex(View affectingView) {
- if (!(affectingView instanceof TaskView) && !(affectingView instanceof ClearAllButton)) {
+ if (!(affectingView instanceof TaskView)) {
int childCount = getChildCount();
mTaskViewStartIndex = 0;
@@ -975,7 +974,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
public SplitSelectStateController getSplitPlaceholder() {
@@ -1157,7 +1161,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
* button fully visible, center page is Clear All button.
*/
public boolean isClearAllHidden() {
@ -185,173 +137,6 @@ index ce79125be1..b447166d6e 100644
}
@Override
@@ -1044,11 +1043,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mTouchDownToStartHome = true;
} else {
updateDeadZoneRects();
- final boolean clearAllButtonDeadZoneConsumed =
- mClearAllButton.getAlpha() == 1
- && mClearAllButtonDeadZoneRect.contains(x, y);
final boolean cameFromNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
- if (!clearAllButtonDeadZoneConsumed && !cameFromNavBar
+ if (!cameFromNavBar
&& !mTaskViewDeadZoneRect.contains(x + getScrollX(), y)) {
mTouchDownToStartHome = true;
}
@@ -1123,18 +1119,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
final int requiredTaskCount = tasks.size();
if (getTaskViewCount() != requiredTaskCount) {
- if (indexOfChild(mClearAllButton) != -1) {
- removeView(mClearAllButton);
- }
for (int i = getTaskViewCount(); i < requiredTaskCount; i++) {
addView(mTaskViewPool.getView());
}
while (getTaskViewCount() > requiredTaskCount) {
removeView(getChildAt(getChildCount() - 1));
}
- if (requiredTaskCount > 0) {
- addView(mClearAllButton);
- }
}
// Rebind and reset all task views
@@ -1184,16 +1174,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
for (int i = getTaskViewCount() - 1; i >= 0; i--) {
removeView(getTaskViewAt(i));
}
- if (indexOfChild(mClearAllButton) != -1) {
- removeView(mClearAllButton);
- }
}
public int getTaskViewCount() {
int taskViewCount = getChildCount() - mTaskViewStartIndex;
- if (indexOfChild(mClearAllButton) != -1) {
- taskViewCount--;
- }
return taskViewCount;
}
@@ -1249,7 +1233,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
for (int i = 0; i < taskCount; i++) {
getTaskViewAt(i).setFullscreenProgress(mFullscreenProgress);
}
- mClearAllButton.setFullscreenProgress(fullscreenProgress);
// Fade out the actions view quickly (0.1 range)
mActionsView.getFullscreenAlpha().setValue(
@@ -1298,10 +1281,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
setLayoutDirection(mIsRtl
? View.LAYOUT_DIRECTION_RTL
: View.LAYOUT_DIRECTION_LTR);
- mClearAllButton.setLayoutDirection(mIsRtl
- ? View.LAYOUT_DIRECTION_LTR
- : View.LAYOUT_DIRECTION_RTL);
- mClearAllButton.setRotation(mOrientationHandler.getDegreesRotated());
if (forceRecreateDragLayerControllers
|| !mOrientationHandler.equals(oldOrientationHandler)) {
@@ -1390,8 +1369,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
accumulatedTranslationX += mIsRtl ? widthDiff : -widthDiff;
}
- mClearAllButton.setFullscreenTranslationPrimary(accumulatedTranslationX);
-
updateGridProperties();
}
@@ -1473,7 +1450,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
return;
}
int scroll = mOrientationHandler.getPrimaryScroll(this);
- mClearAllButton.onRecentsViewScroll(scroll, mOverviewGridEnabled);
}
@Override
@@ -1819,9 +1795,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
// Add an empty view for now until the task plan is loaded and applied
final TaskView taskView = mTaskViewPool.getView();
addView(taskView, mTaskViewStartIndex);
- if (wasEmpty) {
- addView(mClearAllButton);
- }
// The temporary running task is only used for the duration between the start of the
// gesture and the task list is loaded and applied
mTmpRunningTask = Task.from(new TaskKey(runningTaskInfo), runningTaskInfo, false);
@@ -2152,12 +2125,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
}
- mClearAllButton.setGridTranslationPrimary(
- clearAllTotalTranslationX - snappedTaskGridTranslationX);
- mClearAllButton.setGridScrollOffset(
- mIsRtl ? mLastComputedTaskSize.left - mLastComputedGridSize.left
- : mLastComputedTaskSize.right - mLastComputedGridSize.right);
-
setGridProgress(mGridProgress);
}
@@ -2190,7 +2157,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
for (int i = 0; i < taskCount; i++) {
getTaskViewAt(i).setGridProgress(gridProgress);
}
- mClearAllButton.setGridProgress(gridProgress);
}
private void enableLayoutTransitions() {
@@ -2452,7 +2418,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
removeViewInLayout(taskView);
if (getTaskViewCount() == 0) {
- removeViewInLayout(mClearAllButton);
startHome();
} else {
snapToPageImmediately(pageToSnapTo);
@@ -2661,7 +2626,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
child.setStableAlpha(alpha);
}
}
- mClearAllButton.setContentAlpha(mContentAlpha);
int alphaInt = Math.round(alpha * 255);
mEmptyMessagePaint.setAlpha(alphaInt);
mEmptyIcon.setAlpha(alphaInt);
@@ -3132,15 +3096,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
private void updateDeadZoneRects() {
- // Get the deadzone rect surrounding the clear all button to not dismiss overview to home
- mClearAllButtonDeadZoneRect.setEmpty();
- if (mClearAllButton.getWidth() > 0) {
- int verticalMargin = getResources()
- .getDimensionPixelSize(R.dimen.recents_clear_all_deadzone_vertical_margin);
- mClearAllButton.getHitRect(mClearAllButtonDeadZoneRect);
- mClearAllButtonDeadZoneRect.inset(-getPaddingRight() / 2, -verticalMargin);
- }
-
// Get the deadzone rect between the task views
mTaskViewDeadZoneRect.setEmpty();
int count = getTaskViewCount();
@@ -3548,7 +3503,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
if (layoutChildren) {
int clearAllWidthDiff = mOrientationHandler.getPrimaryValue(mTaskWidth, mTaskHeight)
- mOrientationHandler.getPrimarySize(mClearAllButton);
- mClearAllButton.setScrollOffsetPrimary(mIsRtl ? clearAllWidthDiff : -clearAllWidthDiff);
}
boolean pageScrollChanged = false;
@@ -3596,10 +3550,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
showAsFullscreen()));
}
- public ClearAllButton getClearAllButton() {
- return mClearAllButton;
- }
-
/**
* @return How many pixels the running task is offset on the currently laid out dominant axis.
*/
--
2.25.1

View File

@ -1,8 +1,8 @@
From 8613949607345b954525b24dedc843f5039ac781 Mon Sep 17 00:00:00 2001
From 96a347318969323185d15ddc86e464a2beef458f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Sep 2019 02:08:22 +0000
Subject: [PATCH] vendor_lineage: Log privapp-permissions whitelist violations
instead
Subject: [PATCH 1/2] vendor_lineage: Log privapp-permissions whitelist
violations instead
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
---
@ -10,10 +10,10 @@ Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/common.mk b/config/common.mk
index 9cc39324..fcf13b2b 100644
index 44db025a..ddb688c0 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -78,9 +78,9 @@ PRODUCT_COPY_FILES += \
@@ -74,9 +74,9 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/org.lineageos.android.xml

View File

@ -0,0 +1,32 @@
From bd9f9e0fab155e87e20de3f8abde37b65b9a46e2 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 14 Mar 2022 03:44:59 +0000
Subject: [PATCH 2/2] Revert "overlay: Default to night mode"
This reverts commit 4d4e39a845d54e37b20728f1448ae6e3fde4b97d.
Change-Id: I036bdd576e536392cf41e3c536d5ca2eb04e5a0f
---
.../common/frameworks/base/core/res/res/values/config.xml | 8 --------
1 file changed, 8 deletions(-)
diff --git a/overlay/common/frameworks/base/core/res/res/values/config.xml b/overlay/common/frameworks/base/core/res/res/values/config.xml
index 8028dc8d..179f96d7 100644
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
@@ -155,12 +155,4 @@
<bool name="config_supportsMicToggle">true</bool>
<!-- Whether this device is supporting the camera toggle -->
<bool name="config_supportsCamToggle">true</bool>
-
- <!-- Control the default night mode to use when there is no other mode override set.
- One of the following values (see UiModeManager.java):
- 0 - MODE_NIGHT_AUTO
- 1 - MODE_NIGHT_NO
- 2 - MODE_NIGHT_YES
- -->
- <integer name="config_defaultNightMode">2</integer>
</resources>
--
2.25.1

View File

@ -1,7 +1,7 @@
From facde4b2b88c2ced8092714df21c4e09751ca1da Mon Sep 17 00:00:00 2001
From 0f9d8e22d10d8a7de0eac999abce808ab456b973 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 30 Nov 2021 12:58:00 +0000
Subject: [PATCH] SearchLauncher: Adapt to Trebuchet
Subject: [PATCH 1/2] SearchLauncher: Adapt to Trebuchet
---
apps/SearchLauncher/Android.mk | 4 ++--

View File

@ -0,0 +1,42 @@
From addc56fdc030440cc10fafd693aab28badeef2f0 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Mar 2022 02:13:47 +0000
Subject: [PATCH 2/2] SearchLauncher: Fix build on Sv2
---
apps/SearchLauncher/Android.mk | 5 ++++-
.../src/com/android/searchlauncher/HotseatQsbWidget.java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/apps/SearchLauncher/Android.mk b/apps/SearchLauncher/Android.mk
index 6b90364..8202b04 100644
--- a/apps/SearchLauncher/Android.mk
+++ b/apps/SearchLauncher/Android.mk
@@ -61,7 +61,10 @@ include $(CLEAR_VARS)
# Relative path for Launcher3 directory
LAUNCHER_PATH := ../../../../packages/apps/Trebuchet
-LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
+LOCAL_STATIC_ANDROID_LIBRARIES := \
+ Launcher3CommonDepsLib \
+ Launcher3QuickStepLib \
+ QuickstepResLib
LOCAL_STATIC_JAVA_LIBRARIES := \
lib_launcherClient \
SystemUISharedLib \
diff --git a/apps/SearchLauncher/quickstep/src/com/android/searchlauncher/HotseatQsbWidget.java b/apps/SearchLauncher/quickstep/src/com/android/searchlauncher/HotseatQsbWidget.java
index 24c2de9..17162ed 100644
--- a/apps/SearchLauncher/quickstep/src/com/android/searchlauncher/HotseatQsbWidget.java
+++ b/apps/SearchLauncher/quickstep/src/com/android/searchlauncher/HotseatQsbWidget.java
@@ -126,7 +126,7 @@ public class HotseatQsbWidget extends QsbContainerView implements Insettable, Se
MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams();
mlp.topMargin = Math.max(-mFixedTranslationY, insets.top - mMarginTopAdjusting);
- Rect padding = mActivity.getDeviceProfile().getHotseatLayoutPadding();
+ Rect padding = mActivity.getDeviceProfile().getHotseatLayoutPadding(getContext());
setPaddingUnchecked(padding.left, 0, padding.right, 0);
--
2.25.1

View File

@ -1,4 +1,4 @@
From 996084a373929cf6ba65bdfe5d984328c0448ccc Mon Sep 17 00:00:00 2001
From e5c811e641abc8088cad017fdb8e282ef6899ed1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 09:08:43 +0000
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2)
@ -9,7 +9,7 @@ Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
index f0627a307..032636014 100755
index f0627a307..13cc396e7 100755
--- a/tools/buildinfo.sh
+++ b/tools/buildinfo.sh
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then
@ -34,9 +34,9 @@ index f0627a307..032636014 100755
fi
echo "ro.lineage.device=$LINEAGE_DEVICE"
+echo "ro.lineage.version=LineageOS 19.0 Self-built CGMod"
+echo "ro.lineage.display.version=LineageOS 19.0 Self-built CGMod"
+echo "ro.modversion=LineageOS 19.0 Self-built CGMod"
+echo "ro.lineage.version=LineageOS 19.1 Self-built CGMod"
+echo "ro.lineage.display.version=LineageOS 19.1 Self-built CGMod"
+echo "ro.modversion=LineageOS 19.1 Self-built CGMod"
+
+echo "lockscreen.rot_override=true"

View File

@ -1,4 +1,4 @@
From c33bf332540e7057d1d9f7491bf345658965aae9 Mon Sep 17 00:00:00 2001
From 537feb3970057cd71a77387a40c0f5b6d6fe5dfb Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 00:39:15 +0000
Subject: [PATCH 2/2] build: Remove Stk (1/2)

View File

@ -1,173 +0,0 @@
From 5598980edbd93751dc3c006d9d88b1b0e70170cc Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 27 Oct 2021 14:38:37 +0000
Subject: [PATCH 01/16] Add LineageMonetAccentOverlay
Applies the signature teal of LineageOS (#167C80) when Monet is absent - thanks @kdrag0n
Change-Id: Ib93b2bc68a08dfe12a7c3f503dcc62cce098b459
---
packages/overlays/Android.mk | 1 +
.../LineageMonetAccentOverlay/Android.bp | 28 ++++++++
.../AndroidManifest.xml | 22 ++++++
.../res/values/config.xml | 72 +++++++++++++++++++
4 files changed, 123 insertions(+)
create mode 100644 packages/overlays/LineageMonetAccentOverlay/Android.bp
create mode 100644 packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
create mode 100644 packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
index 3a114bc8ec79..15c55d3d588e 100644
--- a/packages/overlays/Android.mk
+++ b/packages/overlays/Android.mk
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \
DisplayCutoutEmulationTallOverlay \
DisplayCutoutEmulationWaterfallOverlay \
FontNotoSerifSourceOverlay \
+ LineageMonetAccentOverlay \
NavigationBarMode3ButtonOverlay \
NavigationBarModeGesturalOverlay \
NavigationBarModeGesturalOverlayNarrowBack \
diff --git a/packages/overlays/LineageMonetAccentOverlay/Android.bp b/packages/overlays/LineageMonetAccentOverlay/Android.bp
new file mode 100644
index 000000000000..e4da9231dc7c
--- /dev/null
+++ b/packages/overlays/LineageMonetAccentOverlay/Android.bp
@@ -0,0 +1,28 @@
+//
+// Copyright 2021, The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+}
+
+runtime_resource_overlay {
+ name: "LineageMonetAccentOverlay",
+ product_specific: true,
+}
diff --git a/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml b/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..11062b67bc61
--- /dev/null
+++ b/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+ ~ Copyright (C) 2021 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.lineageos.overlay.accent.monet"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:priority="0" android:isStatic="true"/>
+</manifest>
diff --git a/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml b/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
new file mode 100644
index 000000000000..4777409bb587
--- /dev/null
+++ b/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="system_accent1_0">#FFFFFF</color>
+ <color name="system_accent1_10">#EFFFFF</color>
+ <color name="system_accent1_50">#B4FDFF</color>
+ <color name="system_accent1_100">#6EF6FC</color>
+ <color name="system_accent1_200">#4CD9E0</color>
+ <color name="system_accent1_300">#1EBDC4</color>
+ <color name="system_accent1_400">#00A1A7</color>
+ <color name="system_accent1_500">#008388</color>
+ <color name="system_accent1_600">#00696E</color>
+ <color name="system_accent1_700">#004F53</color>
+ <color name="system_accent1_800">#00373A</color>
+ <color name="system_accent1_900">#002022</color>
+ <color name="system_accent1_1000">#000000</color>
+
+ <color name="system_accent2_0">#FFFFFF</color>
+ <color name="system_accent2_10">#EFFFFF</color>
+ <color name="system_accent2_50">#DAF6F7</color>
+ <color name="system_accent2_100">#CCE8E8</color>
+ <color name="system_accent2_200">#B0CCCC</color>
+ <color name="system_accent2_300">#96B0B1</color>
+ <color name="system_accent2_400">#7B9697</color>
+ <color name="system_accent2_500">#617B7C</color>
+ <color name="system_accent2_600">#496364</color>
+ <color name="system_accent2_700">#324B4D</color>
+ <color name="system_accent2_800">#1B3436</color>
+ <color name="system_accent2_900">#051F21</color>
+ <color name="system_accent2_1000">#000000</color>
+
+ <color name="system_accent3_0">#FFFFFF</color>
+ <color name="system_accent3_10">#FDFCFF</color>
+ <color name="system_accent3_50">#EBF1FF</color>
+ <color name="system_accent3_100">#D4E3FF</color>
+ <color name="system_accent3_200">#ACC8F7</color>
+ <color name="system_accent3_300">#91ACDB</color>
+ <color name="system_accent3_400">#7692BE</color>
+ <color name="system_accent3_500">#5C77A2</color>
+ <color name="system_accent3_600">#445F8A</color>
+ <color name="system_accent3_700">#2B4770</color>
+ <color name="system_accent3_800">#113158</color>
+ <color name="system_accent3_900">#001B3D</color>
+ <color name="system_accent3_1000">#000000</color>
+
+ <color name="system_neutral1_0">#FFFFFF</color>
+ <color name="system_neutral1_10">#FAFDFC</color>
+ <color name="system_neutral1_50">#EFF1F1</color>
+ <color name="system_neutral1_100">#E0E3E2</color>
+ <color name="system_neutral1_200">#C4C7C6</color>
+ <color name="system_neutral1_300">#A9ACAB</color>
+ <color name="system_neutral1_400">#8E9191</color>
+ <color name="system_neutral1_500">#737776</color>
+ <color name="system_neutral1_600">#5B5F5F</color>
+ <color name="system_neutral1_700">#444747</color>
+ <color name="system_neutral1_800">#2E3131</color>
+ <color name="system_neutral1_900">#191C1C</color>
+ <color name="system_neutral1_1000">#000000</color>
+
+ <color name="system_neutral2_0">#FFFFFF</color>
+ <color name="system_neutral2_10">#F4FEFE</color>
+ <color name="system_neutral2_50">#E8F3F2</color>
+ <color name="system_neutral2_100">#DAE5E4</color>
+ <color name="system_neutral2_200">#BEC8C9</color>
+ <color name="system_neutral2_300">#A3ADAE</color>
+ <color name="system_neutral2_400">#889393</color>
+ <color name="system_neutral2_500">#6E7878</color>
+ <color name="system_neutral2_600">#566061</color>
+ <color name="system_neutral2_700">#3F4949</color>
+ <color name="system_neutral2_800">#293232</color>
+ <color name="system_neutral2_900">#141D1E</color>
+ <color name="system_neutral2_1000">#000000</color>
+</resources>
--
2.25.1

View File

@ -1,7 +1,7 @@
From d8f26074114f9bb4e9a57ece4cb39d42e0ffa90c Mon Sep 17 00:00:00 2001
From fc658b43c4c9bc3ff42ddec8f62f37cbb986289f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 03:39:32 +0000
Subject: [PATCH 02/16] Add MiuiNavbarOverlay
Subject: [PATCH 01/15] Add MiuiNavbarOverlay
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
---
@ -29,13 +29,13 @@ Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
index 15c55d3d588e..ff20a7a30092 100644
index 3a114bc8ec79..8028b5bb9c2b 100644
--- a/packages/overlays/Android.mk
+++ b/packages/overlays/Android.mk
@@ -27,6 +27,7 @@ LOCAL_REQUIRED_MODULES := \
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \
DisplayCutoutEmulationTallOverlay \
DisplayCutoutEmulationWaterfallOverlay \
FontNotoSerifSourceOverlay \
LineageMonetAccentOverlay \
+ MiuiNavbarOverlay \
NavigationBarMode3ButtonOverlay \
NavigationBarModeGesturalOverlay \

View File

@ -1,7 +1,7 @@
From 2b7f5a1ca1c43ae5d7af48eeb07afa08f581e49b Mon Sep 17 00:00:00 2001
From bf95c1ec3307856306212316a59d0f0ec7df6284 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 27 Sep 2021 16:30:00 +0000
Subject: [PATCH 03/16] Disable cursor drag by default for editable TextViews
Subject: [PATCH 02/15] Disable cursor drag by default for editable TextViews
Requested by @TadiT7

View File

@ -1,7 +1,7 @@
From 26f39b897540abbdc64f25f671de87b9df33c04d Mon Sep 17 00:00:00 2001
From c1629264abb7564b076956dfd74994d659c8cb72 Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Fri, 22 Mar 2019 00:41:20 +0800
Subject: [PATCH 04/16] Disable FP lockouts
Subject: [PATCH 03/15] Disable FP lockouts
Both timed and permanent lockouts - GET THE FUCK OUT
Now targeting LockoutFramework, introduced in Android 12

View File

@ -1,21 +1,22 @@
From 1da3b1d0155f06373057ee7b08691da664e94da8 Mon Sep 17 00:00:00 2001
From 2f7d86bafcfccd37431cefe9422207b2fbe5fd6c Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 2 Sep 2021 16:15:19 +0000
Subject: [PATCH 05/16] Keyguard: Adjust clock style
Subject: [PATCH 04/15] Keyguard: Adjust clock style
Thinner font, less padding and unintrusive colors
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
---
.../SystemUI/res-keyguard/layout/keyguard_clock_switch.xml | 7 ++++---
.../SystemUI/res-keyguard/layout/keyguard_slice_view.xml | 2 +-
packages/SystemUI/res-keyguard/values/dimens.xml | 6 +++---
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
packages/SystemUI/res/values/styles.xml | 4 ++--
.../src/com/android/keyguard/AnimatableClockView.java | 2 +-
5 files changed, 10 insertions(+), 11 deletions(-)
6 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
index 28c61663bd4d..84ea2446f9d7 100644
index 87a9825af1cb..93e827ac540e 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
@@ -38,10 +38,10 @@
@ -43,11 +44,24 @@ index 28c61663bd4d..84ea2446f9d7 100644
chargeAnimationDelay="200"
dozeWeight="200"
lockScreenWeight="400"
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
index 7c5dbc247428..64657547621f 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
@@ -38,7 +38,7 @@
android:id="@+id/row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
+ android:orientation="vertical"
android:gravity="start"
/>
</com.android.keyguard.KeyguardSliceView>
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
index 7e3c87b24f07..58a1734aad22 100644
index 89dd741e2898..5aedf82f4d32 100644
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -94,8 +94,8 @@
@@ -89,10 +89,10 @@
<dimen name="num_pad_key_margin_end">12dp</dimen>
<!-- additional offset for clock switch area items -->
@ -58,12 +72,14 @@ index 7e3c87b24f07..58a1734aad22 100644
<dimen name="below_clock_padding_end">16dp</dimen>
- <dimen name="below_clock_padding_start_icons">28dp</dimen>
+ <dimen name="below_clock_padding_start_icons">22dp</dimen>
</resources>
<!-- Proportion of the screen height to use to set the maximum height of the bouncer to when
the device is in the DEVICE_POSTURE_HALF_OPENED posture, for the PIN/pattern entry. 0 will
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index 098b7e8dedbe..86f053535ee6 100644
index b8770e831d45..7f47e274304a 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -123,8 +123,6 @@
@@ -116,8 +116,6 @@
<item name="android:ellipsize">end</item>
<item name="android:maxLines">2</item>
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
@ -73,10 +89,10 @@ index 098b7e8dedbe..86f053535ee6 100644
<style name="TextAppearance.Keyguard.Secondary">
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index bb258ab18f82..f03f14d3316c 100644
index ba0361de6e8b..c5899b93c937 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -343,7 +343,7 @@
@@ -274,7 +274,7 @@
<item name="darkIconTheme">@style/DualToneDarkTheme</item>
<item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
@ -85,7 +101,7 @@ index bb258ab18f82..f03f14d3316c 100644
<item name="android:colorError">@*android:color/error_color_material_dark</item>
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
<item name="passwordStyle">@style/PasswordTheme</item>
@@ -359,7 +359,7 @@
@@ -290,7 +290,7 @@
<style name="Theme.SystemUI.LightWallpaper">
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
@ -95,10 +111,10 @@ index bb258ab18f82..f03f14d3316c 100644
<item name="shadowRadius">0</item>
diff --git a/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java b/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
index ef3104a21708..ec54cdb53f22 100644
index 2a0c2855c3b2..b6e18b8c20f8 100644
--- a/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
+++ b/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
@@ -113,7 +113,7 @@ public class AnimatableClockView extends TextView {
@@ -134,7 +134,7 @@ public class AnimatableClockView extends TextView {
void refreshTime() {
mTime.setTimeInMillis(System.currentTimeMillis());

View File

@ -0,0 +1,43 @@
From 5f4834016ac6e140133908c9af78014c2b6e1c13 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 06:41:03 +0000
Subject: [PATCH 05/15] Keyguard: Hide padlock unless UDFPS is in use
Fair enough Google, but don't give me that otherwise
Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
---
.../com/android/keyguard/LockIconViewController.java | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index cc452c6f3b79..477be22c60f5 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -254,20 +254,14 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
}
boolean wasShowingUnlock = mShowUnlockIcon;
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon
&& !mShowAodUnlockedIcon && !mShowAodLockIcon;
- mShowLockIcon = !mCanDismissLockScreen && !mUserUnlockedWithBiometric && isLockScreen()
- && (!mUdfpsEnrolled || !mRunningFPS);
- mShowUnlockIcon = (mCanDismissLockScreen || mUserUnlockedWithBiometric) && isLockScreen();
+ mShowUnlockIcon = (mCanDismissLockScreen || mUserUnlockedWithBiometric) && isLockScreen() && mUdfpsEnrolled;
mShowAodUnlockedIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && mCanDismissLockScreen;
mShowAodLockIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && !mCanDismissLockScreen;
final CharSequence prevContentDescription = mView.getContentDescription();
- if (mShowLockIcon) {
- mView.updateIcon(ICON_LOCK, false);
- mView.setContentDescription(mLockedLabel);
- mView.setVisibility(View.VISIBLE);
- } else if (mShowUnlockIcon) {
+ if (mShowUnlockIcon) {
if (wasShowingFpIcon) {
// fp icon was shown by UdfpsView, and now we still want to animate the transition
// in this drawable
--
2.25.1

View File

@ -1,59 +0,0 @@
From e6b6d26e1a86a3ff38630121164f83b653f20199 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 06:41:03 +0000
Subject: [PATCH 06/16] Keyguard: Hide padlock unless UDFPS is in use
Fair enough Google, but don't give me that otherwise
Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
---
.../keyguard/LockIconViewController.java | 29 +++++--------------
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index 52ebf2fa09d0..0ed36b4fa949 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -259,32 +259,17 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
return;
}
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon;
- boolean wasShowingLockIcon = mShowLockIcon;
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon;
boolean wasShowingUnlockIcon = mShowUnlockIcon;
- mShowLockIcon = !mCanDismissLockScreen && !mUserUnlockedWithBiometric && isLockScreen()
- && (!mUdfpsEnrolled || !mRunningFPS);
- mShowUnlockIcon = mCanDismissLockScreen && isLockScreen();
+ mShowUnlockIcon = mCanDismissLockScreen && isLockScreen() && mUdfpsEnrolled;
mShowAODFpIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS;
final CharSequence prevContentDescription = mView.getContentDescription();
- if (mShowLockIcon) {
- mView.setImageDrawable(mLockIcon);
- mView.setVisibility(View.VISIBLE);
- mView.setContentDescription(mLockedLabel);
- } else if (mShowUnlockIcon) {
- if (!wasShowingUnlockIcon) {
- if (wasShowingFpIcon) {
- mView.setImageDrawable(mFpToUnlockIcon);
- mFpToUnlockIcon.forceAnimationOnUI();
- mFpToUnlockIcon.start();
- } else if (wasShowingLockIcon) {
- mView.setImageDrawable(mLockToUnlockIcon);
- mLockToUnlockIcon.forceAnimationOnUI();
- mLockToUnlockIcon.start();
- } else {
- mView.setImageDrawable(mUnlockIcon);
- }
+ if (mShowUnlockIcon) {
+ if (wasShowingFpIcon) {
+ mView.setImageDrawable(mFpToUnlockIcon);
+ mFpToUnlockIcon.forceAnimationOnUI();
+ mFpToUnlockIcon.start();
}
mView.setVisibility(View.VISIBLE);
mView.setContentDescription(mUnlockedLabel);
--
2.25.1

View File

@ -0,0 +1,28 @@
From 49afc4395c225ca1f5493cfa1c460aa1ff5d95ce Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 1 Sep 2021 14:41:53 +0000
Subject: [PATCH 06/15] Keyguard: Never switch to large clock
It looks alright actually, but as always breaks under landscape
Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
---
.../src/com/android/keyguard/KeyguardClockSwitchController.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
index 86b12d3c0c3d..6eb97228b880 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
@@ -436,7 +436,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
private void updateDoubleLineClock() {
mCanShowDoubleLineClock = mSecureSettings.getInt(
- Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 1) != 0;
+ Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 0) != 0;
if (!mCanShowDoubleLineClock) {
mUiExecutor.execute(() -> displayClock(KeyguardClockSwitch.SMALL));
--
2.25.1

View File

@ -1,38 +0,0 @@
From 66149d4057081df5f550cad82db44b5c0f2bd0c7 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 1 Sep 2021 14:41:53 +0000
Subject: [PATCH 07/16] Keyguard: Never switch to large clock
It looks alright actually, but as always breaks under landscape
Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
---
.../com/android/keyguard/KeyguardClockSwitch.java | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
index a36a03473e0e..60195bcd23fb 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
@@ -280,17 +280,7 @@ public class KeyguardClockSwitch extends RelativeLayout {
* the smaller version.
*/
boolean willSwitchToLargeClock(boolean hasVisibleNotifications) {
- if (mHasVisibleNotifications != null
- && hasVisibleNotifications == mHasVisibleNotifications) {
- return false;
- }
- boolean landscape = getResources().getConfiguration().orientation
- == Configuration.ORIENTATION_LANDSCAPE;
- boolean useLargeClock = !hasVisibleNotifications && !landscape;
- animateClockChange(useLargeClock);
-
- mHasVisibleNotifications = hasVisibleNotifications;
- return useLargeClock;
+ return false;
}
public Paint getPaint() {
--
2.25.1

View File

@ -1,25 +1,25 @@
From 2c4a2751c3ecee97883a3b8606e479ec2068f8c8 Mon Sep 17 00:00:00 2001
From 8731b491f90317379cdb800bf1e47a1cb9bc7872 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 08:31:36 +0000
Subject: [PATCH 08/16] Keyguard: Refine indication text
Subject: [PATCH 07/15] Keyguard: Refine indication text
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
---
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
.../SystemUI/res/layout/keyguard_bottom_area.xml | 1 +
packages/SystemUI/res/values/dimens.xml | 2 +-
packages/SystemUI/res/values/dimens.xml | 3 +--
.../KeyguardIndicationRotateTextViewController.java | 12 +++++++++++-
.../statusbar/KeyguardIndicationController.java | 5 ++---
.../statusbar/phone/KeyguardIndicationTextView.java | 2 +-
6 files changed, 16 insertions(+), 8 deletions(-)
6 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index 86f053535ee6..b03c87af3059 100644
index 7f47e274304a..bb6c56455d72 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -137,8 +137,6 @@
<item name="android:textSize">14sp</item>
@@ -131,8 +131,6 @@
<item name="android:maxLines">1</item>
<item name="android:gravity">center</item>
<item name="android:textColor">?attr/wallpaperTextColor</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
@ -27,10 +27,10 @@ index 86f053535ee6..b03c87af3059 100644
<style name="TextAppearance.Keyguard.BottomArea.Button">
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
index 8dbd59d42ab7..68cba51e07fa 100644
index 759670e01e71..470c4ca488c2 100644
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
@@ -36,6 +36,7 @@
@@ -35,6 +35,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@ -39,23 +39,27 @@ index 8dbd59d42ab7..68cba51e07fa 100644
android:paddingEnd="@dimen/keyguard_indication_text_padding"
android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 5d4e4a6ad3c4..cd11fb7d81ac 100644
index 67488ec5bf3a..a34805f37278 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -920,7 +920,7 @@
<dimen name="keyguard_lock_width">42dp</dimen>
@@ -696,11 +696,10 @@
<dimen name="keyguard_lock_height">42dp</dimen>
<dimen name="keyguard_lock_padding">20dp</dimen>
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
<dimen name="lock_icon_margin_bottom">98dp</dimen>
<dimen name="lock_icon_margin_bottom">110dp</dimen>
<dimen name="ambient_indication_margin_bottom">71dp</dimen>
-
<!-- How much two taps can be apart to still be recognized as a double tap on the lockscreen -->
<dimen name="double_tap_slop">32dp</dimen>
<!-- The text size for battery level -->
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
index a424674ed252..b2af483bb76e 100644
index d73d9cdb7d40..a7a23032963a 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
@@ -182,12 +182,22 @@ public class KeyguardIndicationRotateTextViewController extends
@@ -218,12 +218,22 @@ public class KeyguardIndicationRotateTextViewController extends
}
/**
@ -77,13 +81,13 @@ index a424674ed252..b2af483bb76e 100644
+ }
+
/**
* Immediately show the passed indication type and schedule the next indication to show.
* Will re-add this indication to be re-shown after all other indications have been
* Clears all messages in the queue and sets the current message to an empty string.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index 8a397199dc84..f2df767db567 100644
index d7b4738340e6..e4f01184e0d8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -433,12 +433,11 @@ public class KeyguardIndicationController {
@@ -471,12 +471,11 @@ public class KeyguardIndicationController {
}
private void updateResting() {
@ -99,17 +103,17 @@ index 8a397199dc84..f2df767db567 100644
.build(),
false);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
index a5b5f1cbf1e7..df981c4e3129 100644
index 339f371c0d12..bd1432303463 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
@@ -49,7 +49,7 @@ public class KeyguardIndicationTextView extends TextView {
@@ -44,7 +44,7 @@ public class KeyguardIndicationTextView extends TextView {
@StyleRes
private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button;
private long mNextAnimationTime = 0;
- private boolean mAnimationsEnabled = true;
+ private boolean mAnimationsEnabled = false;
private LinkedList<CharSequence> mMessages = new LinkedList<>();
private LinkedList<KeyguardIndication> mKeyguardIndicationInfo = new LinkedList<>();
private CharSequence mMessage;
private KeyguardIndication mKeyguardIndicationInfo;
--
2.25.1

View File

@ -1,10 +1,10 @@
From cca9cb4645f5aa079c5ed39339f02f78a7e68695 Mon Sep 17 00:00:00 2001
From a98e2005d08374939d821f1ff95b8489bcbdcaaf Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 20 Mar 2021 10:35:14 +0000
Subject: [PATCH 09/16] Keyguard/UI: Fix status bar / quick settings margins
Subject: [PATCH 08/15] Keyguard/UI: Fix status bar / quick settings margins
and paddings
Last revised on 2021/12/10, targeting s-qpr1
Last revised on 2022/03/13, targeting s-v2
The way I think SB/QS margins/paddings should work:
- Devices with left notch: [notch_definition][status_bar_padding_start][content]...[content][status_bar_padding_end][rounded_corner_content_padding]
@ -23,13 +23,13 @@ As a result, below changes have been made:
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
---
.../res/layout/keyguard_status_bar.xml | 2 +-
.../res/layout/quick_qs_status_icons.xml | 6 --
.../res/layout/quick_qs_status_icons.xml | 6 ---
.../quick_status_bar_header_date_privacy.xml | 5 +-
.../SystemUI/res/values-sw600dp/dimens.xml | 6 --
packages/SystemUI/res/values/dimens.xml | 6 +-
.../systemui/qs/QuickStatusBarHeader.java | 61 +++++++++++++------
.../SystemUI/res/values-sw600dp/dimens.xml | 3 --
packages/SystemUI/res/values/dimens.xml | 2 +-
.../systemui/qs/QuickStatusBarHeader.java | 51 ++++++++++++-------
.../phone/KeyguardStatusBarView.java | 7 ---
7 files changed, 47 insertions(+), 46 deletions(-)
7 files changed, 35 insertions(+), 41 deletions(-)
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index 850b01717308..054db34023af 100644
@ -45,14 +45,14 @@ index 850b01717308..054db34023af 100644
android:gravity="center_vertical"
android:ellipsize="marquee"
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
index 27514617fb23..ada85c137600 100644
index 7a370d8cbc48..0247eebea131 100644
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
@@ -21,7 +21,6 @@
android:layout_height="@*android:dimen/quick_qs_offset_height"
android:clipChildren="false"
android:clipToPadding="false"
- android:minHeight="48dp"
- android:minHeight="@dimen/qs_header_row_min_height"
android:clickable="false"
android:focusable="true"
android:theme="@style/QSHeaderTheme">
@ -60,7 +60,7 @@ index 27514617fb23..ada85c137600 100644
android:id="@+id/clock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:minHeight="48dp"
- android:minHeight="@dimen/qs_header_row_min_height"
android:gravity="center_vertical|start"
- android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
- android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
@ -79,7 +79,7 @@ index 27514617fb23..ada85c137600 100644
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:minHeight="48dp"
- android:minHeight="@dimen/qs_header_row_min_height"
android:minWidth="48dp"
android:layout_marginStart="8dp"
android:layout_gravity="end|center_vertical"
@ -112,12 +112,12 @@ index b1e8c386fe21..cff67718bc47 100644
android:gravity="center_vertical|end" >
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 0a34dfd71c7e..3d590d752a7b 100644
index 7d033018c27f..3cd67d844895 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -53,9 +53,6 @@
<!-- end margin for multi user switch in collapsed quick settings -->
<dimen name="multi_user_switch_keyguard_margin">6dp</dimen>
@@ -27,9 +27,6 @@
<!-- The width of user avatar when on Keyguard -->
<dimen name="multi_user_avatar_keyguard_size">30dp</dimen>
- <!-- Margin on the left side of the carrier text on Keyguard -->
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
@ -125,53 +125,25 @@ index 0a34dfd71c7e..3d590d752a7b 100644
<!-- The width/height of the phone/camera/unlock icon on keyguard. -->
<dimen name="keyguard_affordance_height">80dp</dimen>
<dimen name="keyguard_affordance_width">120dp</dimen>
@@ -64,9 +61,6 @@
phone hints. -->
<dimen name="edge_tap_area_width">80dp</dimen>
- <!-- Margin on the right side of the system icon group on Keyguard. -->
- <dimen name="system_icons_keyguard_padding_end">2dp</dimen>
-
<!-- Screen pinning request width -->
<dimen name="screen_pinning_request_width">400dp</dimen>
<!-- Screen pinning request bottom button circle widths -->
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index cd11fb7d81ac..786b21f7595a 100644
index a34805f37278..6eac3b8f357d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -449,7 +449,7 @@
<dimen name="system_icons_super_container_margin_start">16dp</dimen>
<!-- Margin end of the system icons super container when the avatar is missing. -->
- <dimen name="system_icons_super_container_avatarless_margin_end">6dp</dimen>
+ <dimen name="system_icons_super_container_avatarless_margin_end">0dp</dimen>
<!-- Width for the notification panel and related windows -->
<dimen name="match_parent">-1px</dimen>
@@ -868,7 +868,7 @@
@@ -672,7 +672,7 @@
<dimen name="kg_framed_avatar_size">32dp</dimen>
<!-- Margin on the left side of the carrier text on Keyguard -->
- <dimen name="keyguard_carrier_text_margin">16dp</dimen>
+ <dimen name="keyguard_carrier_text_margin">@dimen/status_bar_padding_start</dimen>
<!-- Margin on the left side of the battery % in the header. -->
<dimen name="header_battery_margin_expanded">6dp</dimen>
@@ -877,7 +877,7 @@
<dimen name="header_battery_margin_keyguard">6dp</dimen>
<!-- Margin on the right side of the system icon group on Keyguard. -->
- <dimen name="system_icons_keyguard_padding_end">4dp</dimen>
+ <dimen name="system_icons_keyguard_padding_end">@dimen/status_bar_padding_end</dimen>
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
from Keyguard. -->
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index 3478ec463573..386b4e007a90 100644
index 60a5df0665e7..55112ee27ef3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -91,6 +91,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private QSExpansionPathInterpolator mQSExpansionPathInterpolator;
@@ -93,6 +93,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private StatusBarContentInsetsProvider mInsetsProvider;
private int mRoundedCornerPadding = 0;
+ private int mStatusBarPaddingStart;
@ -181,16 +153,7 @@ index 3478ec463573..386b4e007a90 100644
private int mWaterfallTopInset;
private int mCutOutPaddingLeft;
private int mCutOutPaddingRight;
@@ -102,6 +106,8 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private List<String> mRssiIgnoredSlots;
private boolean mIsSingleCarrier;
+ private boolean mHasLeftCutout;
+ private boolean mHasRightCutout;
private boolean mHasCenterCutout;
private boolean mConfigShowBatteryEstimate;
@@ -244,6 +250,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
@@ -259,6 +263,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mRoundedCornerPadding = resources.getDimensionPixelSize(
R.dimen.rounded_corner_content_padding);
@ -199,10 +162,10 @@ index 3478ec463573..386b4e007a90 100644
+ mStatusBarPaddingEnd = resources.getDimensionPixelSize(
+ R.dimen.status_bar_padding_end);
+
int qsOffsetHeight = resources.getDimensionPixelSize(
com.android.internal.R.dimen.quick_qs_offset_height);
int qsOffsetHeight = SystemBarUtils.getQuickQsOffsetHeight(mContext);
@@ -324,6 +335,9 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mDatePrivacyView.getLayoutParams().height =
@@ -346,6 +355,9 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
.addFloat(mDateView, "alpha", 0, 0, 1)
.addFloat(mClockDateView, "alpha", 1, 0, 0)
.addFloat(mQSCarriers, "alpha", 0, 1)
@ -212,41 +175,19 @@ index 3478ec463573..386b4e007a90 100644
.setListener(new TouchAnimator.ListenerAdapter() {
@Override
public void onAnimationAtEnd() {
@@ -430,8 +444,6 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
Pair<Integer, Integer> padding =
StatusBarWindowView.paddingNeededForCutoutAndRoundedCorner(
cutout, cornerCutoutPadding, -1);
- mDatePrivacyView.setPadding(padding.first, 0, padding.second, 0);
- mClockIconsView.setPadding(padding.first, 0, padding.second, 0);
@@ -451,8 +463,6 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
.getStatusBarContentInsetsForCurrentRotation();
boolean hasCornerCutout = mInsetsProvider.currentRotationHasCornerCutout();
- mDatePrivacyView.setPadding(sbInsets.first, 0, sbInsets.second, 0);
- mStatusIconsView.setPadding(sbInsets.first, 0, sbInsets.second, 0);
LinearLayout.LayoutParams datePrivacySeparatorLayoutParams =
(LinearLayout.LayoutParams) mDatePrivacySeparator.getLayoutParams();
LinearLayout.LayoutParams mClockIconsSeparatorLayoutParams =
@@ -446,6 +458,12 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mClockIconsSeparatorLayoutParams.width = 0;
setSeparatorVisibility(false);
mShowClockIconsSeparator = false;
+ if (cornerCutoutPadding.first != 0) {
+ mHasLeftCutout = true;
+ }
+ if (cornerCutoutPadding.second != 0) {
+ mHasRightCutout = true;
+ }
mHasCenterCutout = false;
} else {
datePrivacySeparatorLayoutParams.width = topCutout.width();
@@ -453,6 +471,8 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mClockIconsSeparatorLayoutParams.width = topCutout.width();
mShowClockIconsSeparator = true;
setSeparatorVisibility(mKeyguardExpansionFraction == 0f);
+ mHasLeftCutout = false;
+ mHasRightCutout = false;
mHasCenterCutout = true;
}
}
@@ -497,34 +517,37 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
@@ -516,34 +526,37 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private void updateHeadersPadding() {
setContentMargins(mDatePrivacyView, 0, 0);
setContentMargins(mClockIconsView, 0, 0);
setContentMargins(mStatusIconsView, 0, 0);
- int paddingLeft = 0;
- int paddingRight = 0;
@ -290,8 +231,8 @@ index 3478ec463573..386b4e007a90 100644
- paddingRight,
+ mHeaderPaddingRight + mStatusBarPaddingEnd,
0);
- mClockIconsView.setPadding(paddingLeft,
+ mClockIconsView.setPadding(0,
- mStatusIconsView.setPadding(paddingLeft,
+ mStatusIconsView.setPadding(0,
mWaterfallTopInset,
- paddingRight,
+ 0,
@ -299,10 +240,10 @@ index 3478ec463573..386b4e007a90 100644
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index efc02548763a..ce5719c674dd 100644
index b11843cd5d1f..049939ed41a2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -164,14 +164,7 @@ public class KeyguardStatusBarView extends RelativeLayout implements
@@ -151,14 +151,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
getResources().getDimensionPixelSize(
com.android.internal.R.dimen.text_size_small_material));

View File

@ -1,7 +1,7 @@
From b8fe4a2e79bd273f69bb0331eb0d07ad0454d43f Mon Sep 17 00:00:00 2001
From 9c36c8f2bdfbd5b584397da9b9ab17c177fe9d84 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 5 Sep 2021 01:20:12 +0000
Subject: [PATCH 11/16] Revert "Update RAT icons to match Silk design"
Subject: [PATCH 09/15] Revert "Update RAT icons to match Silk design"
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
---

View File

@ -1,378 +0,0 @@
From da27cecc0366133f80c38aa479da212faa503181 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 19 Oct 2021 12:11:24 +0000
Subject: [PATCH 10/16] Revert "monet: Add support for monet (cam16)"
This reverts commit f4460c9cb0494ddcc1829b05298d140fa1afc526.
Change-Id: I94ca83b2c147a32afeb4fbddbc5d6dbcfd804199
---
packages/SystemUI/Android.bp | 2 -
packages/SystemUI/monet/Android.bp | 12 --
packages/SystemUI/monet/AndroidManifest.xml | 4 -
.../com/android/systemui/monet/ColorScheme.kt | 168 ------------------
.../com/android/systemui/monet/Shades.java | 19 --
.../theme/ThemeOverlayController.java | 56 ++----
6 files changed, 10 insertions(+), 251 deletions(-)
delete mode 100644 packages/SystemUI/monet/Android.bp
delete mode 100644 packages/SystemUI/monet/AndroidManifest.xml
delete mode 100644 packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
delete mode 100644 packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index e677b10295f6..e86486dbc6bc 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -97,7 +97,6 @@ android_library {
"lottie",
"org.lineageos.platform.internal",
"vendor.lineage.powershare-V1.0-java",
- "monet",
],
manifest: "AndroidManifest.xml",
additional_manifests: ["LineageManifest.xml"],
@@ -188,7 +187,6 @@ android_library {
"WindowManager-Shell",
"org.lineageos.platform.internal",
"vendor.lineage.powershare-V1.0-java",
- "monet",
],
libs: [
"android.test.runner",
diff --git a/packages/SystemUI/monet/Android.bp b/packages/SystemUI/monet/Android.bp
deleted file mode 100644
index 42563765b077..000000000000
--- a/packages/SystemUI/monet/Android.bp
+++ /dev/null
@@ -1,12 +0,0 @@
-java_library {
- name: "monet",
- platform_apis: true,
- static_libs: [
- "androidx.annotation_annotation",
- "androidx.core_core",
- ],
- srcs: [
- "src/**/*.java",
- "src/**/*.kt",
- ],
-}
diff --git a/packages/SystemUI/monet/AndroidManifest.xml b/packages/SystemUI/monet/AndroidManifest.xml
deleted file mode 100644
index 37f0050ee949..000000000000
--- a/packages/SystemUI/monet/AndroidManifest.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.systemui.monet">
-</manifest>
diff --git a/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt b/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
deleted file mode 100644
index 56a9c805ca81..000000000000
--- a/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
+++ /dev/null
@@ -1,168 +0,0 @@
-package com.android.systemui.monet
-
-import android.app.WallpaperColors
-import android.graphics.Color
-import com.android.internal.graphics.ColorUtils
-import com.android.internal.graphics.cam.Cam
-import com.android.internal.graphics.cam.CamUtils
-import kotlin.math.absoluteValue
-import kotlin.math.roundToInt
-
-public class ColorScheme(i: Int, val darkTheme: Boolean) {
- val accent1: List<Int>
- val accent2: List<Int>
- val accent3: List<Int>
- val neutral1: List<Int>
- val neutral2: List<Int>
-
- init {
- val fromInt = Cam.fromInt(if (i == 0) -14979341 else i)
- val hue = fromInt.hue
- accent1 = Shades.of(hue, fromInt.chroma.coerceAtLeast(48.0f)).toList()
- accent2 = Shades.of(hue, 16.0f).toList()
- accent3 = Shades.of(60.0f + hue, 32.0f).toList()
- neutral1 = Shades.of(hue, 4.0f).toList()
- neutral2 = Shades.of(hue, 8.0f).toList()
- }
-
- val accentColors1: List<Int>
- get() {
- return accent1
- }
-
- val allAccentColors: List<Int>
- get() {
- val arrayList = mutableListOf<Int>()
- arrayList.addAll(accent1)
- arrayList.addAll(accent2)
- arrayList.addAll(accent3)
- return arrayList
- }
-
- val allNeutralColors: List<Int>
- get() {
- val arrayList = mutableListOf<Int>()
- arrayList.addAll(neutral1)
- arrayList.addAll(neutral2)
- return arrayList
- }
-
- override fun toString(): String {
- return "ColorScheme {\n" +
- " neutral1: ${humanReadable(neutral1)}\n" +
- " neutral2: ${humanReadable(neutral2)}\n" +
- " accent1: ${humanReadable(accent1)}\n" +
- " accent2: ${humanReadable(accent2)}\n" +
- " accent3: ${humanReadable(accent3)}\n" +
- "}"
- }
-
- companion object {
- @JvmStatic
- fun getSeedColor(wallpaperColors: WallpaperColors): Int {
- return getSeedColors(wallpaperColors).first()
- }
-
- @JvmStatic
- fun getSeedColors(wallpaperColors: WallpaperColors): List<Int> {
- val intValue2 = wallpaperColors.allColors.values.reduce { a, b -> a + b }.toDouble()
- val z2 = (intValue2 == 0.0)
- if (z2) {
- val list2 = wallpaperColors.mainColors.map {
- it.toArgb()
- }.distinct().filter {
- Cam.fromInt(it).chroma >= 15.0f && CamUtils.lstarFromInt(it) >= 10.0f
- }.toList()
-
- if (list2.isEmpty()) {
- return listOf(-14979341)
- }
- return list2
- }
-
- val linkedHashMap = wallpaperColors.allColors.mapValues { it.value.toDouble() / intValue2 }
-
- val linkedHashMap2 = wallpaperColors.allColors.mapValues { Cam.fromInt(it.key) }
-
- val huePopulation = huePopulations(linkedHashMap2, linkedHashMap)
-
- val linkedHashMap3 = wallpaperColors.allColors.mapValues {
- val cam = linkedHashMap2[it.key]!!
- val i = cam.hue.roundToInt()
- val i2 = i - 15
- val i3 = i + 15
- var d = 0.0
- for (a in i2..i3) {
- d += huePopulation[wrapDegrees(a)]
- }
- d
- }
-
- val linkedHashMap4 = linkedHashMap2.filter {
- val key4 = it.key
- val lstarFromInt = CamUtils.lstarFromInt(key4)
- val d2 = linkedHashMap3[key4]!!
- it.value.chroma >= 15.0f && lstarFromInt >= 10.0f && (z2 || d2 > 0.01)
- }
-
- val arrayList3 = mutableListOf<Int>()
- val linkedHashMap5 = linkedHashMap4.mapValues {
- score(it.value, linkedHashMap3[it.key]!!)
- }
-
- val list3 = linkedHashMap5.entries.toMutableList()
- list3.sortByDescending { it.value }
-
- for (entry6 in list3) {
- val num2 = entry6.key
- val z = arrayList3.find {
- val hue1 = linkedHashMap2[num2]!!.hue
- val hue2 = linkedHashMap2[it]!!.hue
- hueDiff(hue1, hue2) < 15 } != null
- if (z) {
- continue
- }
- arrayList3.add(num2)
- }
-
- if (arrayList3.isEmpty()) {
- arrayList3.add(-14979341)
- }
-
- return arrayList3;
- }
-
- private fun wrapDegrees(i: Int): Int {
- if (i < 0) {
- return (i % 360) + 360
- }
- return if (i >= 360) i % 360 else i
- }
-
- private fun hueDiff(f: Float, f2: Float): Float {
- return 180f - ((f - f2).absoluteValue - 180f).absoluteValue
- }
-
- private fun humanReadable(list: List<Int>): String {
- return list.joinToString { "#" + Integer.toHexString(it) }
- }
-
- private fun score(cam: Cam, d: Double): Double {
- val f = cam.getChroma()
- val d2 = if (f < 48.0) 0.1 else 0.3
- val d3 = d * 70.0
- return ((f - 48.0) * d2) + d3
- }
-
- private fun huePopulations(map: Map<Int, Cam>, map2: Map<Int, Double>): List<Double> {
- val arrayList = List(size = 360, init = { 0.0 }).toMutableList()
- for (entry in map2.entries) {
- val d = map2[entry.key]!!
- val cam = map[entry.key]!!
- val i2 = cam.hue.roundToInt() % 360
- arrayList[i2] = arrayList[i2] + d
- }
- return arrayList
- }
- }
-}
diff --git a/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java b/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
deleted file mode 100644
index 5ab00a1afcb4..000000000000
--- a/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.android.systemui.monet;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.graphics.ColorUtils;
-
-@VisibleForTesting
-public class Shades {
- public static int[] of(float f, float f2) {
- int[] iArr = new int[12];
- iArr[0] = ColorUtils.CAMToColor(f, f2, 99.0f);
- iArr[1] = ColorUtils.CAMToColor(f, f2, 95.0f);
- int i = 2;
- while (i < 12) {
- iArr[i] = ColorUtils.CAMToColor(f, f2, i == 6 ? 49.6f : (float) (100 - ((i - 1) * 10)));
- i++;
- }
- return iArr;
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
index 1e35c9e51150..81999b534046 100644
--- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
+++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
@@ -37,7 +37,6 @@ import android.content.IntentFilter;
import android.content.om.FabricatedOverlay;
import android.content.om.OverlayIdentifier;
import android.content.pm.UserInfo;
-import android.content.res.Configuration;
import android.database.ContentObserver;
import android.graphics.Color;
import android.net.Uri;
@@ -48,11 +47,9 @@ import android.provider.Settings;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
-import android.util.TypedValue;
import androidx.annotation.NonNull;
-import com.android.internal.graphics.ColorUtils;
import com.android.systemui.Dumpable;
import com.android.systemui.SystemUI;
import com.android.systemui.broadcast.BroadcastDispatcher;
@@ -61,7 +58,6 @@ import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.keyguard.WakefulnessLifecycle;
-import com.android.systemui.monet.ColorScheme;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
@@ -75,7 +71,6 @@ import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Executor;
@@ -408,56 +403,25 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
* Return the main theme color from a given {@link WallpaperColors} instance.
*/
protected int getNeutralColor(@NonNull WallpaperColors wallpaperColors) {
- return ColorScheme.getSeedColor(wallpaperColors);
+ return wallpaperColors.getPrimaryColor().toArgb();
}
protected int getAccentColor(@NonNull WallpaperColors wallpaperColors) {
- return ColorScheme.getSeedColor(wallpaperColors);
- }
-
- private final boolean inDarkMode() {
- return (mContext.getResources().getConfiguration().uiMode
- & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
+ Color accentCandidate = wallpaperColors.getSecondaryColor();
+ if (accentCandidate == null) {
+ accentCandidate = wallpaperColors.getTertiaryColor();
+ }
+ if (accentCandidate == null) {
+ accentCandidate = wallpaperColors.getPrimaryColor();
+ }
+ return accentCandidate.toArgb();
}
/**
* Given a color candidate, return an overlay definition.
*/
protected @Nullable FabricatedOverlay getOverlay(int color, int type) {
- ColorScheme colorScheme = new ColorScheme(color, inDarkMode());
- List<Integer> colors;
- String name;
-
- if (type == ACCENT) {
- colors = colorScheme.getAllAccentColors();
- name = "accent";
- } else {
- colors = colorScheme.getAllNeutralColors();
- name = "neutral";
- }
-
- int size = colorScheme.getAccent1().size();
- FabricatedOverlay.Builder builder =
- new FabricatedOverlay.Builder(mContext.getPackageName(), name, "android");
-
- for (int i = 0; i < colors.size(); i++) {
- int lightness = i % size;
- int shade = i / size + 1;
-
- String targetResource = "android:color/system_";
- if (lightness == 0) {
- targetResource += name + shade + "_10";
- } else if (lightness == 1) {
- targetResource += name + shade + "_50";
- } else {
- targetResource += name + shade + "_" + (lightness - 1) + "00";
- }
-
- builder.setResourceValue(targetResource, TypedValue.TYPE_INT_COLOR_ARGB8,
- ColorUtils.setAlphaComponent(colors.get(i).intValue(), 0xFF));
- }
-
- return builder.build();
+ return null;
}
private void updateThemeOverlays() {
--
2.25.1

View File

@ -1,7 +1,7 @@
From fe5e86fc264bf9ca5d6cfa89d28d51bd123c2966 Mon Sep 17 00:00:00 2001
From f8b7656a0b01c5382a7795aa8e352433674c2cc3 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 7 Oct 2020 14:00:35 +0000
Subject: [PATCH 12/16] UI: Always render windows into cutouts
Subject: [PATCH 10/15] UI: Always render windows into cutouts
Eliminates black/white letterboxing
Quick and dirty way to do the latter - wait for proper fix from Google
@ -55,10 +55,10 @@ index 32e43ca4e56c..18c28ae674f9 100644
}
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 41247363146d..554dea8efb33 100644
index 89ac6585c673..b08604c6b4e7 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -1655,7 +1655,7 @@ public class DisplayPolicy {
@@ -1817,7 +1817,7 @@ public class DisplayPolicy {
pf.set((fl & FLAG_LAYOUT_IN_SCREEN) == 0 ? attached.getFrame() : df);
}

View File

@ -1,7 +1,7 @@
From e2fe18aa9aab73594414b11164ed180ca8b16cd1 Mon Sep 17 00:00:00 2001
From 2a077aa2f4b1362b062ea7ecfa9d2841cbc466bd Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 1 Sep 2021 14:10:50 +0000
Subject: [PATCH 13/16] UI: Kill rounded corners in notification scrim
Subject: [PATCH 11/15] UI: Kill rounded corners in notification scrim
Rounded corners in S is nicely implemented, but this is one occasion where it looks out of place
@ -11,13 +11,13 @@ Change-Id: I09ed59e0e658ebd512a9d02a8ef3edfe2c9888da
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 786b21f7595a..7217156d8972 100644
index 6eac3b8f357d..e954759c77fc 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -757,7 +757,7 @@
@@ -608,7 +608,7 @@
<!-- Burmese line spacing multiplier between hours and minutes of the keyguard clock -->
<item name="keyguard_clock_line_spacing_scale_burmese" type="dimen" format="float">1</item>
<item name="scrim_behind_alpha" format="float" type="dimen">0.62</item>
- <dimen name="notification_scrim_corner_radius">32dp</dimen>
+ <dimen name="notification_scrim_corner_radius">0dp</dimen>

View File

@ -1,20 +1,18 @@
From 81538d4126c99a86cb8f3ea13becca665db468e8 Mon Sep 17 00:00:00 2001
From 43e3fde166791c054f49dce9313806aef44e4371 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 26 Oct 2020 14:06:56 +0000
Subject: [PATCH 14/16] UI: Reconfigure power menu items
Screenshot/airplane are broken as of now
Subject: [PATCH 12/15] UI: Reconfigure power menu items
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
---
core/res/res/values/config.xml | 5 -----
1 file changed, 5 deletions(-)
core/res/res/values/config.xml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3a62b51d3cbc..5e9c9988e946 100644
index 1b9306913e7d..29f203450151 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2963,13 +2963,8 @@
@@ -3016,13 +3016,10 @@
"logout" = Logout the current user
-->
<string-array translatable="false" name="config_globalActionsList">
@ -23,8 +21,9 @@ index 3a62b51d3cbc..5e9c9988e946 100644
<item>power</item>
<item>restart</item>
- <item>logout</item>
- <item>screenshot</item>
<item>screenshot</item>
- <item>bugreport</item>
+ <item>airplane</item>
</string-array>
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully

View File

@ -0,0 +1,26 @@
From ad4d765c957164ab47272388085e666f4db63837 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 5 Mar 2022 01:43:37 +0000
Subject: [PATCH 13/15] UI: Reconfigure quick settings tiles
Change-Id: I743f52ef3a95db0ca2c02ae973faa4629e41885d
---
packages/SystemUI/res/values/config.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index d0a3a807a79a..6f86bf40e4b5 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -74,7 +74,7 @@
<!-- The default tiles to display in QuickSettings -->
<string name="quick_settings_tiles_default" translatable="false">
- internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle
+ wifi,cell,hotspot,location,rotation,flashlight
</string>
<!-- The minimum number of tiles to display in QuickSettings -->
--
2.25.1

View File

@ -1,7 +1,7 @@
From 39e52d3177af783e0fdb08f997d1a4971485b896 Mon Sep 17 00:00:00 2001
From 8624b307387a553863ec825464c4b77b215d9770 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 29 Jun 2021 22:57:01 +0000
Subject: [PATCH 15/16] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
Subject: [PATCH 14/15] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
I decide what's good enough for a wallpaper!

View File

@ -1,7 +1,7 @@
From 9248a81745f91699e2b6891746536deaab96dbf0 Mon Sep 17 00:00:00 2001
From 6950ae969d855cb3143526f17717cc19be2a1cbc Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 19 Oct 2021 12:09:34 +0000
Subject: [PATCH 16/16] UI: Remove privacy dot padding
Subject: [PATCH 15/15] UI: Remove privacy dot padding
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
---
@ -9,10 +9,10 @@ Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 7217156d8972..4354442fb51d 100644
index e954759c77fc..0b985af4a109 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1265,7 +1265,7 @@
@@ -938,7 +938,7 @@
<dimen name="ongoing_appops_chip_max_width">76dp</dimen>
<dimen name="ongoing_appops_dot_diameter">6dp</dimen>
<!-- Total minimum padding to enforce to ensure that the dot can always show -->

View File

@ -0,0 +1,225 @@
From aecf59a8082d92f24514c7475e2665424f8736a9 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Mar 2022 11:22:48 +0000
Subject: [PATCH] Revert "[DO NOT MERGE] Allow a settings override for
double-line clock"
Sorry but I SAID NEVER!
This reverts commit cb4836b4868adc1f06212ce82851a5f16169ab5c.
---
res/values/strings.xml | 4 -
res/xml/security_lockscreen_settings.xml | 6 --
.../LockscreenClockPreferenceController.java | 70 ---------------
...ckscreenClockPreferenceControllerTest.java | 90 -------------------
4 files changed, 170 deletions(-)
delete mode 100644 src/com/android/settings/display/LockscreenClockPreferenceController.java
delete mode 100644 tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6fcff4103b..417669d4c0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13291,10 +13291,6 @@
<string name="lockscreen_privacy_controls_setting_toggle">Show device controls</string>
<!-- Device controls summary [CHAR LIMIT=NONE] -->
<string name="lockscreen_privacy_controls_summary">Access controls when locked</string>
- <!-- Lockscreen double-line clock summary [CHAR LIMIT=NONE] -->
- <string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
- <!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
- <string name="lockscreen_double_line_clock_setting_toggle">Double-line clock</string>
<!-- Title for RTT setting. [CHAR LIMIT=NONE] -->
<string name="rtt_settings_title"></string>
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
index 60dc599c2e..755b3c2ee9 100644
--- a/res/xml/security_lockscreen_settings.xml
+++ b/res/xml/security_lockscreen_settings.xml
@@ -67,12 +67,6 @@
android:title="@string/lockscreen_privacy_controls_setting_toggle"
android:summary="@string/lockscreen_privacy_controls_summary"
settings:controller="com.android.settings.display.ControlsPrivacyPreferenceController" />
-
- <SwitchPreference
- android:key="lockscreen_double_line_clock_switch"
- android:title="@string/lockscreen_double_line_clock_setting_toggle"
- android:summary="@string/lockscreen_double_line_clock_summary"
- settings:controller="com.android.settings.display.LockscreenClockPreferenceController" />
</PreferenceCategory>
<PreferenceCategory
diff --git a/src/com/android/settings/display/LockscreenClockPreferenceController.java b/src/com/android/settings/display/LockscreenClockPreferenceController.java
deleted file mode 100644
index 70ae55eaf9..0000000000
--- a/src/com/android/settings/display/LockscreenClockPreferenceController.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.display;
-
-import android.content.Context;
-import android.provider.Settings;
-
-import androidx.preference.Preference;
-
-import com.android.settings.R;
-import com.android.settings.core.TogglePreferenceController;
-
-/**
- * Preference to enable/disable the large double-line clock on lockscreen
- */
-public class LockscreenClockPreferenceController extends TogglePreferenceController {
-
- private static final String SETTING_KEY = Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK;
-
- public LockscreenClockPreferenceController(Context context, String preferenceKey) {
- super(context, preferenceKey);
- }
-
- @Override
- public boolean isChecked() {
- return Settings.Secure.getInt(mContext.getContentResolver(), SETTING_KEY, 1) != 0;
- }
-
- @Override
- public boolean setChecked(boolean isChecked) {
- return Settings.Secure.putInt(mContext.getContentResolver(), SETTING_KEY,
- isChecked ? 1 : 0);
- }
-
- @Override
- public CharSequence getSummary() {
- return mContext.getText(R.string.lockscreen_double_line_clock_summary);
- }
-
- @Override
- public int getAvailabilityStatus() {
- return AVAILABLE;
- }
-
- @Override
- public void updateState(Preference preference) {
- super.updateState(preference);
- preference.setEnabled(true);
- refreshSummary(preference);
- }
-
- @Override
- public int getSliceHighlightMenuRes() {
- return R.string.menu_key_display;
- }
-}
diff --git a/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
deleted file mode 100644
index 94f2dc6655..0000000000
--- a/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.display;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.provider.Settings;
-
-import androidx.preference.Preference;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-
-@RunWith(RobolectricTestRunner.class)
-public class LockscreenClockPreferenceControllerTest {
-
- private static final String TEST_KEY = "test_key";
- private static final String SETTING_KEY = Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK;
-
- private Context mContext;
- private ContentResolver mContentResolver;
- private LockscreenClockPreferenceController mController;
-
- @Mock
- private Preference mPreference;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- mContext = RuntimeEnvironment.application;
- mContentResolver = mContext.getContentResolver();
- mController = new LockscreenClockPreferenceController(mContext, TEST_KEY);
- }
-
- @Test
- public void isChecked_SettingIs1_returnTrue() {
- Settings.Secure.putInt(mContentResolver, SETTING_KEY, 1);
-
- assertThat(mController.isChecked()).isTrue();
- }
-
- @Test
- public void isChecked_SettingIs0_returnFalse() {
- Settings.Secure.putInt(mContentResolver, SETTING_KEY, 0);
-
- assertThat(mController.isChecked()).isFalse();
- }
-
- @Test
- public void isChecked_SettingIsNotSet_returnTrue() {
- Settings.Secure.putString(mContentResolver, SETTING_KEY, null);
-
- assertThat(mController.isChecked()).isTrue();
- }
-
- @Test
- public void setChecked_true_SettingIsNot0() {
- mController.setChecked(true);
-
- assertThat(Settings.Secure.getInt(mContentResolver, SETTING_KEY, 0)).isNotEqualTo(0);
- }
-
- @Test
- public void setChecked_false_SettingIs0() {
- mController.setChecked(false);
-
- assertThat(Settings.Secure.getInt(mContentResolver, SETTING_KEY, 0)).isEqualTo(0);
- }
-}
--
2.25.1

View File

@ -1,260 +0,0 @@
From 54374a8c7cdb6df7657090ff849cce25d051ee52 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 10 Jan 2022 04:44:58 +0000
Subject: [PATCH] Revert "Implement LocalColorExtractor using monet theme
engine"
This reverts commit 43594af5b025d2223f9eab97e9226541b2851419.
---
Android.bp | 1 -
res/values/config.xml | 2 +-
.../widget/LocalWallpaperColorsExtractor.java | 212 ------------------
3 files changed, 1 insertion(+), 214 deletions(-)
delete mode 100644 src/com/android/launcher3/widget/LocalWallpaperColorsExtractor.java
diff --git a/Android.bp b/Android.bp
index 621eaf0a1e..f700dedf03 100644
--- a/Android.bp
+++ b/Android.bp
@@ -122,7 +122,6 @@ android_library {
"com.google.android.material_material",
"iconloader_base",
"libGoogleFeed",
- "monet",
],
manifest: "AndroidManifest-common.xml",
sdk_version: "current",
diff --git a/res/values/config.xml b/res/values/config.xml
index 95f94af904..0ac0f9c588 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -87,7 +87,7 @@
<!-- Default packages -->
<string name="wallpaper_picker_package" translatable="false"></string>
- <string name="local_colors_extraction_class" translatable="false">com.android.launcher3.widget.LocalWallpaperColorsExtractor</string>
+ <string name="local_colors_extraction_class" translatable="false"></string>
<!-- Accessibility actions -->
<item type="id" name="action_remove" />
diff --git a/src/com/android/launcher3/widget/LocalWallpaperColorsExtractor.java b/src/com/android/launcher3/widget/LocalWallpaperColorsExtractor.java
deleted file mode 100644
index 29d464826e..0000000000
--- a/src/com/android/launcher3/widget/LocalWallpaperColorsExtractor.java
+++ /dev/null
@@ -1,212 +0,0 @@
-package com.android.launcher3.widget;
-
-import android.app.WallpaperColors;
-import android.app.WallpaperManager;
-import android.content.Context;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.util.SparseIntArray;
-import android.view.View;
-import android.widget.RemoteViews;
-
-import com.android.launcher3.DeviceProfile;
-import com.android.launcher3.Launcher;
-import com.android.launcher3.Utilities;
-import com.android.launcher3.widget.LocalColorExtractor;
-import com.android.systemui.monet.ColorScheme;
-
-import java.util.List;
-
-public class LocalWallpaperColorsExtractor extends LocalColorExtractor implements
- WallpaperManager.LocalWallpaperColorConsumer {
-
- private final WallpaperManager wallpaperManager;
- private Listener listener;
- private Context mContext;
-
- // For calculating and returning bounds
- private final float[] tempFloatArray = new float[4];
- private final Rect tempRect = new Rect();
- private final RectF tempRectF = new RectF();
-
- public static final int[] accent = {
- android.R.color.system_accent1_10,
- android.R.color.system_accent1_50,
- android.R.color.system_accent1_100,
- android.R.color.system_accent1_200,
- android.R.color.system_accent1_300,
- android.R.color.system_accent1_400,
- android.R.color.system_accent1_500,
- android.R.color.system_accent1_600,
- android.R.color.system_accent1_700,
- android.R.color.system_accent1_800,
- android.R.color.system_accent1_900,
- android.R.color.system_accent1_1000,
- android.R.color.system_accent2_10,
- android.R.color.system_accent2_50,
- android.R.color.system_accent2_100,
- android.R.color.system_accent2_200,
- android.R.color.system_accent2_300,
- android.R.color.system_accent2_400,
- android.R.color.system_accent2_500,
- android.R.color.system_accent2_600,
- android.R.color.system_accent2_700,
- android.R.color.system_accent2_800,
- android.R.color.system_accent2_900,
- android.R.color.system_accent2_1000,
- android.R.color.system_accent3_10,
- android.R.color.system_accent3_50,
- android.R.color.system_accent3_100,
- android.R.color.system_accent3_200,
- android.R.color.system_accent3_300,
- android.R.color.system_accent3_400,
- android.R.color.system_accent3_500,
- android.R.color.system_accent3_600,
- android.R.color.system_accent3_700,
- android.R.color.system_accent3_800,
- android.R.color.system_accent3_900,
- android.R.color.system_accent3_1000
- };
-
- public static final int[] neutral = {
- android.R.color.system_neutral1_10,
- android.R.color.system_neutral1_50,
- android.R.color.system_neutral1_100,
- android.R.color.system_neutral1_200,
- android.R.color.system_neutral1_300,
- android.R.color.system_neutral1_400,
- android.R.color.system_neutral1_500,
- android.R.color.system_neutral1_600,
- android.R.color.system_neutral1_700,
- android.R.color.system_neutral1_800,
- android.R.color.system_neutral1_900,
- android.R.color.system_neutral1_1000,
- android.R.color.system_neutral2_10,
- android.R.color.system_neutral2_50,
- android.R.color.system_neutral2_100,
- android.R.color.system_neutral2_200,
- android.R.color.system_neutral2_300,
- android.R.color.system_neutral2_400,
- android.R.color.system_neutral2_500,
- android.R.color.system_neutral2_600,
- android.R.color.system_neutral2_700,
- android.R.color.system_neutral2_800,
- android.R.color.system_neutral2_900,
- android.R.color.system_neutral2_1000
- };
-
- public LocalWallpaperColorsExtractor(Context context) {
- mContext = context;
- wallpaperManager = (WallpaperManager) context.getSystemService(Context.WALLPAPER_SERVICE);
- }
-
- private static void addColorsToArray(List<Integer> list, int[] resArray, SparseIntArray array) {
- for (int i = 0; i < resArray.length; i++) {
- array.put(resArray[i], -16777216 | list.get(i));
- }
- }
-
- @Override
- public void setListener(Listener listener) {
- this.listener = listener;
- }
-
- @Override
- public void addLocation(List<RectF> locations) {
- wallpaperManager.addOnColorsChangedListener(this, locations);
- }
-
- @Override
- public void removeLocations() {
- wallpaperManager.removeOnColorsChangedListener(this);
- }
-
- @Override
- public SparseIntArray generateColorsOverride(WallpaperColors colors) {
- SparseIntArray colorRes = new SparseIntArray(5 * 13);
- boolean nightMode = (mContext.getResources().getConfiguration().uiMode
- & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
-
- ColorScheme colorScheme = new ColorScheme(ColorScheme.getSeedColor(colors), nightMode);
-
- addColorsToArray(colorScheme.getAllAccentColors(), accent, colorRes);
- addColorsToArray(colorScheme.getAllNeutralColors(), neutral, colorRes);
-
- return colorRes;
- }
-
- @Override
- public void applyColorsOverride(Context base, WallpaperColors colors) {
- RemoteViews.ColorResources res =
- RemoteViews.ColorResources.create(base, generateColorsOverride(colors));
- if (res != null) {
- res.apply(base);
- }
- }
-
- @Override
- public void getExtractedRectForView(Launcher launcher, int pageId, View v,
- RectF colorExtractionRectOut) {
- Rect viewRect = tempRect;
- viewRect.set(0, 0, v.getWidth(), v.getHeight());
- Utilities.getBoundsForViewInDragLayer(launcher.getDragLayer(), v, viewRect, false,
- tempFloatArray, tempRectF);
- Utilities.setRect(tempRectF, viewRect);
- getExtractedRectForViewRect(launcher, pageId, viewRect, colorExtractionRectOut);
- }
-
- @Override
- public void getExtractedRectForViewRect(Launcher launcher, int pageId, Rect rectInDragLayer,
- RectF colorExtractionRectOut) {
- // If the view hasn't been measured and laid out, we cannot do this.
- if (rectInDragLayer.isEmpty()) {
- colorExtractionRectOut.setEmpty();
- return;
- }
-
- Resources res = launcher.getResources();
- DeviceProfile dp = launcher.getDeviceProfile().inv.getDeviceProfile(launcher);
- float screenWidth = dp.widthPx;
- float screenHeight = dp.heightPx;
- int numScreens = launcher.getWorkspace().getNumPagesForWallpaperParallax();
- pageId = Utilities.isRtl(res) ? numScreens - pageId - 1 : pageId;
- float relativeScreenWidth = 1f / numScreens;
-
- int[] dragLayerBounds = new int[2];
- launcher.getDragLayer().getLocationOnScreen(dragLayerBounds);
- // Translate from drag layer coordinates to screen coordinates.
- int screenLeft = rectInDragLayer.left + dragLayerBounds[0];
- int screenTop = rectInDragLayer.top + dragLayerBounds[1];
- int screenRight = rectInDragLayer.right + dragLayerBounds[0];
- int screenBottom = rectInDragLayer.bottom + dragLayerBounds[1];
-
- // This is the position of the view relative to the wallpaper, as expected by the
- // local color extraction of the WallpaperManager.
- // The coordinate system is such that, on the horizontal axis, each screen has a
- // distinct range on the [0,1] segment. So if there are 3 screens, they will have the
- // ranges [0, 1/3], [1/3, 2/3] and [2/3, 1]. The position on the subrange should be
- // the position of the view relative to the screen. For the vertical axis, this is
- // simply the location of the view relative to the screen.
- // Translate from drag layer coordinates to screen coordinates
- colorExtractionRectOut.left = (screenLeft / screenWidth + pageId) * relativeScreenWidth;
- colorExtractionRectOut.right = (screenRight / screenWidth + pageId) * relativeScreenWidth;
- colorExtractionRectOut.top = screenTop / screenHeight;
- colorExtractionRectOut.bottom = screenBottom / screenHeight;
-
- if (colorExtractionRectOut.left < 0
- || colorExtractionRectOut.right > 1
- || colorExtractionRectOut.top < 0
- || colorExtractionRectOut.bottom > 1) {
- colorExtractionRectOut.setEmpty();
- }
- }
-
- @Override
- public void onColorsChanged(RectF area, WallpaperColors colors) {
- if (listener != null) {
- listener.onColorsChanged(area, generateColorsOverride(colors));
- }
- }
-}
--
2.25.1

View File

@ -1,7 +1,7 @@
From deccbf542c72d5e1f78e83b3e895eb1f9480ac75 Mon Sep 17 00:00:00 2001
From 32f8fec323dfe5f7d7f357e26e7f7a494bddaba3 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 28 Oct 2021 02:30:59 +0000
Subject: [PATCH] Trebuchet: Make overview scrim transparent again
Subject: [PATCH 1/2] Trebuchet: Make overview scrim transparent again
Also revert texts/buttons to workspace color
@ -15,7 +15,7 @@ Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index 07c448df9e..c3a3bb8375 100644
index 2efe72e651..03c28773a7 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -130,7 +130,7 @@
@ -27,18 +27,18 @@ index 07c448df9e..c3a3bb8375 100644
<item name="android:drawablePadding">8dp</item>
<item name="android:textAllCaps">false</item>
</style>
@@ -139,4 +139,4 @@
<style name="BaseIcon.Workspace.Taskbar" >
<item name="iconDisplay">taskbar</item>
@@ -170,4 +170,4 @@
<item name="android:textSize">24sp</item>
<item name="android:lines">2</item>
</style>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index b447166d6e..d94a93a909 100644
index 13295f27c1..c0e4429804 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -606,7 +606,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@@ -702,7 +702,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mEmptyIcon.setCallback(this);
mEmptyMessage = context.getText(R.string.recents_empty_message);
mEmptyMessagePaint = new TextPaint();
@ -59,14 +59,14 @@ index 80799957ff..894997c59a 100644
+ <item android:color="@android:color/transparent" />
</selector>
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
index b8ed7747e0..894997c59a 100644
index 2ab8ecdec9..894997c59a 100644
--- a/res/color-v31/overview_scrim_dark.xml
+++ b/res/color-v31/overview_scrim_dark.xml
@@ -14,5 +14,5 @@
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_800" />
- <item android:color="@android:color/system_neutral1_500" android:lStar="35" />
+ <item android:color="@android:color/transparent" />
</selector>
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml

View File

@ -0,0 +1,82 @@
From e8b6e0902bc8c77df404b67a9a619d7705940125 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 18 Mar 2022 08:42:18 +0000
Subject: [PATCH 2/2] Trebuchet: Kill haptics in recents
This partially reverts commit cc5c8843dfebfa92057b6ce8904ac58cd05ffaef.
Change-Id: Ie3b0eabe8cc0421e696720740edc492cae2f5153
---
.../NoButtonQuickSwitchTouchController.java | 8 --------
.../TaskViewTouchController.java | 5 -----
.../android/quickstep/views/RecentsView.java | 19 -------------------
3 files changed, 32 deletions(-)
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
index f6148a7c8f..546f5f3c18 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
@@ -407,14 +407,6 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
nonOverviewAnim.setFloatValues(startProgress, endProgress);
mNonOverviewAnim.dispatchOnStart();
}
- if (targetState == QUICK_SWITCH) {
- // Navigating to quick switch, add scroll feedback since the first time is not
- // considered a scroll by the RecentsView.
- VibratorWrapper.INSTANCE.get(mLauncher).vibrate(
- RecentsView.SCROLL_VIBRATION_PRIMITIVE,
- RecentsView.SCROLL_VIBRATION_PRIMITIVE_SCALE,
- RecentsView.SCROLL_VIBRATION_FALLBACK);
- }
nonOverviewAnim.setDuration(Math.max(xDuration, yDuration));
mNonOverviewAnim.setEndAction(() -> onAnimationToStateCompleted(targetState));
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
index 308bca62e4..d964371784 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
@@ -367,11 +367,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
velocity * orientationHandler.getSecondaryTranslationDirectionFactor(),
mEndDisplacement, animationDuration);
- if (goingUp && goingToEnd && !mIsDismissHapticRunning) {
- VibratorWrapper.INSTANCE.get(mActivity).vibrate(TASK_DISMISS_VIBRATION_PRIMITIVE,
- TASK_DISMISS_VIBRATION_PRIMITIVE_SCALE, TASK_DISMISS_VIBRATION_FALLBACK);
- mIsDismissHapticRunning = true;
- }
}
private void clearState() {
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index c0e4429804..436f3521a6 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1294,25 +1294,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
}
- @Override
- protected void onEdgeAbsorbingScroll() {
- vibrateForScroll();
- }
-
- @Override
- protected void onScrollOverPageChanged() {
- vibrateForScroll();
- }
-
- private void vibrateForScroll() {
- long now = SystemClock.uptimeMillis();
- if (now - mScrollLastHapticTimestamp > mScrollHapticMinGapMillis) {
- mScrollLastHapticTimestamp = now;
- VibratorWrapper.INSTANCE.get(mContext).vibrate(SCROLL_VIBRATION_PRIMITIVE,
- SCROLL_VIBRATION_PRIMITIVE_SCALE, SCROLL_VIBRATION_FALLBACK);
- }
- }
-
@Override
protected void determineScrollingStart(MotionEvent ev, float touchSlopScale) {
// Enables swiping to the left or right only if the task overlay is not modal.
--
2.25.1

View File

@ -1,7 +1,7 @@
From bd33859aa15ad4ab099716b0d029b333c6300134 Mon Sep 17 00:00:00 2001
From 3b2033d58939374fb6e350796c32f89740cdfba0 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 09:09:15 +0000
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)
Subject: [PATCH 1/3] build: Integrate prop modifications (2/2)
Change-Id: I076973f902ab20011964e50955e4326c18d5b34e
---

View File

@ -1,7 +1,7 @@
From e3633d610a46dfa849b01ae66ff233e615efa079 Mon Sep 17 00:00:00 2001
From 0187e006bf6b0374d00ad42689295bb96d59a587 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 00:41:07 +0000
Subject: [PATCH 2/4] build: Remove Stk (2/2)
Subject: [PATCH 2/3] build: Remove Stk (2/2)
Change-Id: I4e1cfacd296e47ef1731f3c32555089a5fca6f0c
---

View File

@ -1,23 +0,0 @@
From ef538d98c3401b7324682ebf96f32f28649dc036 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 27 Oct 2021 13:23:31 +0000
Subject: [PATCH 3/4] Revert "overlay: Enable monet"
This reverts commit 97a1727968a2fca85c3bdc419637e9c02fce9ce7.
---
.../frameworks/base/packages/SystemUI/res/values/flags.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml b/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
index d22d0f23..64c6e78b 100644
--- a/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
+++ b/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
@@ -17,5 +17,4 @@
<resources>
<bool name="flag_conversations">true</bool>
<bool name="flag_charging_ripple">true</bool>
- <bool name="flag_monet">true</bool>
</resources>
--
2.25.1

View File

@ -1,7 +1,7 @@
From 89941c7836527978fb1834a14e9ad95cb1c5c9d0 Mon Sep 17 00:00:00 2001
From 417b74b1000249df254be9527f78aef936d60611 Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Mon, 1 Jul 2019 07:03:04 +0000
Subject: [PATCH 4/4] vendor_lineage: Ignore neverallows... again
Subject: [PATCH 3/3] vendor_lineage: Ignore neverallows... again
Because unofficial builds are better than no builds!

View File

@ -1,4 +1,4 @@
From ff787114856cc9ccb057cf524e7089f7aed558cc Mon Sep 17 00:00:00 2001
From 7891d4dd5e8ef676e94f65cc66a362c21af24a84 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 8 Dec 2021 07:04:53 +0000
Subject: [PATCH] Remove init.vndk-nodef.rc
@ -58,7 +58,7 @@ index efeef117b..000000000
- # Must define BOARD_VNDK_VERSION
- exec - root -- /system/bin/reboot bootloader
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index d924d0bc1..5c3e10de7 100644
index a2a29ed0f..74413b191 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -59,8 +59,7 @@ PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_with_prebuilts.flattened
@ -69,8 +69,8 @@ index d924d0bc1..5c3e10de7 100644
- init.vndk-nodef.rc \
+ init.gsi.rc
# Support additional P, Q and R VNDK packages
PRODUCT_EXTRA_VNDK_VERSIONS := 28 29 30
# Support additional VNDK snapshots
PRODUCT_EXTRA_VNDK_VERSIONS := \
--
2.25.1

View File

@ -1,7 +1,7 @@
From 978be1fd8202655676e335cdd611f9c6756c0025 Mon Sep 17 00:00:00 2001
From 26669a1e511d9622a55795b611ed10b4d55ee54f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000
Subject: [PATCH 1/4] treble: Lineage-ify
Subject: [PATCH 1/5] treble: Lineage-ify
Squash of:
- Proper target names
@ -14,11 +14,11 @@ Change-Id: I25eee7a3804f335430a447ae1424402d7e37851b
---
base-pre.mk | 3 -
base.mk | 16 ++--
generate.sh | 3 +
generate.sh | 2 +-
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
.../base/core/res/res/values/config.xml | 1 -
sepolicy/file_contexts | 3 -
6 files changed, 93 insertions(+), 14 deletions(-)
6 files changed, 91 insertions(+), 15 deletions(-)
create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
diff --git a/base-pre.mk b/base-pre.mk
@ -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 73abbab..057ad0c 100644
index 7020df2..c87986e 100644
--- a/base.mk
+++ b/base.mk
@@ -8,12 +8,14 @@ PRODUCT_COPY_FILES := \
@ -68,16 +68,15 @@ index 73abbab..057ad0c 100644
#VNDK config files
PRODUCT_COPY_FILES += \
diff --git a/generate.sh b/generate.sh
index 352fe12..7e4f137 100644
index 352fe12..623a9ce 100644
--- a/generate.sh
+++ b/generate.sh
@@ -65,6 +65,9 @@ for part in a ab;do
@@ -64,7 +64,7 @@ for part in a ab;do
optional_base='$(call inherit-product, device/phh/treble/base-sas.mk)'
fi
target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
+ if [ "$1" == "lineage" ];then
+ target="lineage_${target}"
+ fi
- target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
+ target="lineage_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
baseArch="$arch"
if [ "$arch" = "a64" ];then

View File

@ -1,7 +1,7 @@
From 7ebb3f6332087fb5243955bb28c656e14a411660 Mon Sep 17 00:00:00 2001
From 93b03ccb8f4572de3af7795da5572ea337f8fb80 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 09:29:32 +0000
Subject: [PATCH 2/4] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
Subject: [PATCH 2/5] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
Change-Id: I725443154fabde548d2e6c1b072d34c27596c421
---

View File

@ -1,7 +1,7 @@
From 56c20273ac8c3c34de36f80edc2e94fc5f60b78a Mon Sep 17 00:00:00 2001
From 28e5f836e3bfc674e7466320f755751edd33886a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 20 Oct 2021 11:30:25 +0000
Subject: [PATCH 3/4] treble: Set TARGET_NO_KERNEL_OVERRIDE
Subject: [PATCH 3/5] treble: Set TARGET_NO_KERNEL_OVERRIDE
Taken from Lineage generic targets - skips building kernel cleanly

View File

@ -0,0 +1,24 @@
From dbd801eb83540152467c56bb328d415ebeb82685 Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Wed, 9 Feb 2022 12:34:47 +0000
Subject: [PATCH 4/5] treble: Set OTA JSON URL
Change-Id: I8f817b90d42629c208ceb45598daf5293850b953
---
lineage.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lineage.mk b/lineage.mk
index 172bb01..68b57f4 100644
--- a/lineage.mk
+++ b/lineage.mk
@@ -1,3 +1,6 @@
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
-include vendor/lineage/build/core/config.mk
-include vendor/lineage/build/core/apicheck.mk
+
+PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+ ro.system.ota.json_url=https://downloads.sourceforge.net/project/andyyan-gsi/lineage-19.x/ota.json
--
2.25.1

View File

@ -1,7 +1,7 @@
From 39c3d994822d367cad58827e6cfa8dcd7e13b519 Mon Sep 17 00:00:00 2001
From 11c35f78a117c21de95131b8318bf41e53e4f4ec Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Tue, 15 Sep 2020 21:26:45 -0400
Subject: [PATCH 4/4] add offline charger sepolicy
Subject: [PATCH 5/5] add offline charger sepolicy
---
sepolicy/gsicharger.te | 1 +

View File

@ -1,9 +1,9 @@
From 291265e4179a03a9407ed2e7a7f898be0eb25e00 Mon Sep 17 00:00:00 2001
From 5e9668c16e8cd71526cb2b451c9a072ed14f12dc Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 6 Nov 2021 05:43:23 +0000
Date: Sun, 13 Mar 2022 11:06:37 +0000
Subject: [PATCH 1/4] Revert "init: Add vendor-specific initialization hooks."
This reverts commit e2dc41bcfb140e0119e0f7e34eccfb2335ae7f89.
This reverts commit 99ef051a7d0d34103babf5f2297dd2747c28570c.
---
init/Android.bp | 9 ---------
init/NOTICE | 26 --------------------------
@ -15,7 +15,7 @@ This reverts commit e2dc41bcfb140e0119e0f7e34eccfb2335ae7f89.
delete mode 100644 init/vendor_init.h
diff --git a/init/Android.bp b/init/Android.bp
index 69f8815ed..7eeafa24b 100644
index 00ac6a752..a57f3a407 100644
--- a/init/Android.bp
+++ b/init/Android.bp
@@ -89,14 +89,6 @@ init_host_sources = [
@ -30,10 +30,10 @@ index 69f8815ed..7eeafa24b 100644
- ],
-}
-
cc_defaults {
name: "init_defaults",
sanitize: {
@@ -190,7 +182,6 @@ cc_library_static {
soong_config_module_type {
name: "libinit_cc_defaults",
module_type: "cc_defaults",
@@ -211,7 +203,6 @@ cc_library_static {
defaults: [
"init_defaults",
"selinux_policy_version",
@ -76,7 +76,7 @@ index 383d0f541..c5b1efa7a 100644
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/init/property_service.cpp b/init/property_service.cpp
index bc9a29dea..5974065f5 100644
index 1600744ff..49500428e 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -73,7 +73,6 @@
@ -87,7 +87,7 @@ index bc9a29dea..5974065f5 100644
using namespace std::literals;
@@ -1097,9 +1096,6 @@ void PropertyLoadBootDefaults() {
@@ -1102,9 +1101,6 @@ void PropertyLoadBootDefaults() {
}
}

View File

@ -1,4 +1,4 @@
From 0263909a309cbc35efd586b4aec14e46ed23e2d7 Mon Sep 17 00:00:00 2001
From 4007d7537bdff0aa9ee444731c57a5a9b2b84256 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 4 Sep 2019 21:11:48 +0200
Subject: [PATCH 2/4] Panic into recovery rather than bootloader

View File

@ -1,4 +1,4 @@
From e2392f1b2f4afbf783fd6b1b25c2d905828c71f1 Mon Sep 17 00:00:00 2001
From 7b79958277c40838fdbbcd7c9324cb9543318290 Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Wed, 3 Mar 2021 06:31:17 -0500
Subject: [PATCH 3/4] Restore /sbin for Magisk compatibility

View File

@ -1,4 +1,4 @@
From 1c13959077f9616c050b4ee92420f561b3af6121 Mon Sep 17 00:00:00 2001
From e3589c745007dbc2f9c983dd68f0fc82fdd56244 Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Wed, 26 Feb 2020 07:23:44 +0200
Subject: [PATCH 4/4] fix offline charger v7
@ -9,7 +9,7 @@ Subject: [PATCH 4/4] fix offline charger v7
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 376a678a8..6434d06bf 100644
index 5116c0fea..76f2bf60e 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -11,6 +11,11 @@ import /vendor/etc/init/hw/init.${ro.hardware}.rc
@ -24,7 +24,7 @@ index 376a678a8..6434d06bf 100644
# Cgroups are mounted right before early-init using list from /etc/cgroups.json
on early-init
# Disable sysrq from keyboard
@@ -452,7 +457,7 @@ on init
@@ -456,7 +461,7 @@ on init
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
@ -33,7 +33,7 @@ index 376a678a8..6434d06bf 100644
trigger late-init
on load_persist_props_action
@@ -1090,8 +1095,12 @@ on nonencrypted
@@ -1108,8 +1113,12 @@ on nonencrypted
on property:sys.init_log_level=*
loglevel ${sys.init_log_level}

View File

@ -1,7 +1,7 @@
From 9c440d31d462e558ba6961e8cd42c91411299826 Mon Sep 17 00:00:00 2001
From 4557ae177f6ba40eb5c359a332d8325a333ddb7e Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 27 Oct 2021 14:39:29 -0400
Subject: [PATCH] Disable vndklite handling
Subject: [PATCH 1/2] Disable vndklite handling
Change-Id: Ic4474cf80fc4b45a9a2760dd51e2ca29c4d961e2
---
@ -9,7 +9,7 @@ Change-Id: Ic4474cf80fc4b45a9a2760dd51e2ca29c4d961e2
1 file changed, 5 deletions(-)
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 3488f5cc7..c32ea8484 100644
index 4a4969192..c375a0551 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -93,7 +93,6 @@ static uint64_t g_module_unload_counter = 0;
@ -20,7 +20,7 @@ index 3488f5cc7..c32ea8484 100644
static const char* const kLdGeneratedConfigFilePath = "/linkerconfig/ld.config.txt";
@@ -3368,10 +3367,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
@@ -3439,10 +3438,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
}
static std::string get_ld_config_file_vndk_path() {
@ -32,5 +32,5 @@ index 3488f5cc7..c32ea8484 100644
size_t insert_pos = ld_config_file_vndk.find_last_of('.');
if (insert_pos == std::string::npos) {
--
2.29.2
2.25.1

View File

@ -0,0 +1,78 @@
From 2dc2ed499505821a535319138e70e64af56ddc87 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 19 Feb 2022 08:20:25 -0500
Subject: [PATCH 2/2] Add new mechanism to fake vendor props on a per-process
basis
This reads debug.phh.props.<process name>. If its value is "vendor",
then ro.product.device/ro.product.manufacturer is read from vendor
---
libc/system_properties/system_properties.cpp | 38 ++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
index 1cb15c3df..d6e7e3e68 100644
--- a/libc/system_properties/system_properties.cpp
+++ b/libc/system_properties/system_properties.cpp
@@ -35,6 +35,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <fcntl.h>
#include <new>
@@ -50,6 +51,32 @@
#define SERIAL_DIRTY(serial) ((serial)&1)
#define SERIAL_VALUE_LEN(serial) ((serial) >> 24)
+static char comm[128];
+static bool self_ok = false;
+static char comm_override[PROP_VALUE_MAX];
+
+static void read_self() {
+ //NB: Not atomic, but should be good enough, there is no possible corruption from concurrency
+ if(self_ok) return;
+ self_ok = true;
+
+ int fd = open("/proc/self/comm", O_RDONLY);
+ if(fd<0) return;
+ read(fd, comm, sizeof(comm)-1);
+ for(unsigned i=0; i<sizeof(comm); i++)
+ if(comm[i] == '\n')
+ comm[i] = 0;
+ close(fd);
+
+ //That's calling ourselves but that's fine because we already have self_ok = true
+ char propName[PROP_NAME_MAX];
+ memset(propName, 0, PROP_NAME_MAX);
+ strncpy(propName, "debug.phh.props.", PROP_NAME_MAX - 1);
+ strncat(propName, comm, PROP_NAME_MAX - 1);
+
+ __system_property_get(propName, comm_override);
+}
+
static bool is_dir(const char* pathname) {
struct stat info;
if (stat(pathname, &info) == -1) {
@@ -216,6 +243,17 @@ void SystemProperties::ReadCallback(const prop_info* pi,
}
int SystemProperties::Get(const char* name, char* value) {
+ read_self();
+ if(strcmp(comm_override, "vendor") == 0) {
+ if(strcmp(name, "ro.product.device") == 0) {
+ int r = Get("ro.product.vendor.device", value);
+ if(r>0) return r;
+ }
+ if(strcmp(name, "ro.product.manufacturer") == 0) {
+ int r = Get("ro.product.vendor.manufacturer", value);
+ if(r>0) return r;
+ }
+ }
const prop_info* pi = Find(name);
if (pi != nullptr) {
--
2.25.1

View File

@ -1,7 +1,7 @@
From e42a02d1448c13fde0e1d7a326572d04f27fef14 Mon Sep 17 00:00:00 2001
From 4a78110a71028d606e6a353aed365f2b7f016510 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 5 Oct 2021 17:59:16 -0400
Subject: [PATCH 01/28] Fallback to stupid autobrightness if brightness values
Subject: [PATCH 01/30] Fallback to stupid autobrightness if brightness values
are broken
This is needed because of:

View File

@ -1,7 +1,7 @@
From 950264e8b5aa352a8d5663878a7ad6e5ac7d7865 Mon Sep 17 00:00:00 2001
From 8f6347bba760a63c0319b6b5a441aff8414e6b58 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 28 Nov 2017 18:28:04 +0100
Subject: [PATCH 02/28] Relax requirement for visible flag to sdcards
Subject: [PATCH 02/30] Relax requirement for visible flag to sdcards
The vast majority of sdcard readers are stable enough to be declared by
the API. (I see no counter-example)

View File

@ -1,7 +1,7 @@
From 439dea5fc58d5d67545f882c885586d6aa04e2dc Mon Sep 17 00:00:00 2001
From ccbe7bd316eeea390d09681dbde75725a7845ed8 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 17 May 2018 20:28:35 +0200
Subject: [PATCH 03/28] Don't crash if there is IR HAL is not declared
Subject: [PATCH 03/30] Don't crash if there is IR HAL is not declared
Change-Id: I3afded27441bbee8244d5fda544b3e6d1238dc1b
---

View File

@ -1,17 +1,17 @@
From 3d3ef7ef4a0406ed5b3761ee934d172bfdbe02e7 Mon Sep 17 00:00:00 2001
From 0a01e9129a67b4e155ea43b31b0bd067d18687cb Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 6 Aug 2018 12:49:00 +0200
Subject: [PATCH 04/28] Show APN Settings for CDMA carriers
Subject: [PATCH 04/30] Show APN Settings for CDMA carriers
---
telephony/java/android/telephony/CarrierConfigManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 45fd7a3467c4..92d6d9868da6 100644
index b8a14b8ea72e..51cbd880af77 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -5283,7 +5283,7 @@ public class CarrierConfigManager {
@@ -5342,7 +5342,7 @@ public class CarrierConfigManager {
sDefaults.putBoolean(KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL, false);
sDefaults.putBoolean(KEY_OPERATOR_SELECTION_EXPAND_BOOL, true);
sDefaults.putBoolean(KEY_PREFER_2G_BOOL, true);

View File

@ -1,7 +1,7 @@
From 114aa0bef17c9a6814d4424e8ed3b25512102c3d Mon Sep 17 00:00:00 2001
From 250548eb42958e47e63fd73ba68c1bc9a95be592 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 8 Nov 2018 23:04:03 +0100
Subject: [PATCH 05/28] Re-order services so that it works even without qtaguid
Subject: [PATCH 05/30] Re-order services so that it works even without qtaguid
Change-Id: I0c0f527b3ae151d45c68f7ac6c205da3f34e74df
---

View File

@ -1,7 +1,7 @@
From fec18df4c1900f54a9581569a27f44d4aa6689ce Mon Sep 17 00:00:00 2001
From dd2a85c2aa47d13a454124e97bfff3cd4172b755 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 24 Mar 2019 23:05:14 +0100
Subject: [PATCH 06/28] Support samsung Pie and Q light hal
Subject: [PATCH 06/30] Support samsung Pie and Q light hal
Change-Id: I01f94acd7d0672733e48854d80368f9ac6f861c6
---

View File

@ -1,7 +1,7 @@
From 4d0b2ab189abeadc3802878d679ef1e6800c76da Mon Sep 17 00:00:00 2001
From 4d0ab8e90662d7cca5ec7db19e0363b35cf85660 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 12 Aug 2019 23:08:26 +0200
Subject: [PATCH 07/28] Add support for samsung touch, physical and hover
Subject: [PATCH 07/30] Add support for samsung touch, physical and hover
proximity sensor as fallback to real proximity sensor
Change-Id: I7a0f8b4665c802140d19197d850b77b2a7ac1865
@ -10,10 +10,10 @@ Change-Id: I7a0f8b4665c802140d19197d850b77b2a7ac1865
1 file changed, 35 insertions(+)
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index f543a562687c..82b1260e79dc 100644
index 78d79ad2f12d..1bcd2317235b 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -1726,6 +1726,27 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
@@ -1734,6 +1734,27 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
? Sensor.TYPE_PROXIMITY : SensorUtils.NO_FALLBACK;
mProximitySensor = SensorUtils.findSensor(mSensorManager, proxSensor.type, proxSensor.name,
fallbackType);
@ -41,7 +41,7 @@ index f543a562687c..82b1260e79dc 100644
if (mProximitySensor != null) {
mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(),
TYPICAL_PROXIMITY_THRESHOLD);
@@ -2491,6 +2512,20 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
@@ -2499,6 +2520,20 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
public void onSensorChanged(SensorEvent event) {
if (mProximitySensorEnabled) {
final long time = SystemClock.uptimeMillis();

View File

@ -1,7 +1,7 @@
From bb2490310ccca71a4a0b69858d0a274eefebd3d7 Mon Sep 17 00:00:00 2001
From 407aacdb90c06aecadbc7351d92285a77806ae0f Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 5 Apr 2020 16:32:46 +0200
Subject: [PATCH 08/28] Always allow overriding the number of work profiles
Subject: [PATCH 08/30] Always allow overriding the number of work profiles
Change-Id: I6eb09aa71663c6fbe7563e3038bffcabdba0ff6a
---

View File

@ -1,7 +1,7 @@
From 86ba18dfced8787826c34bb28d7ed83b35b8d3f4 Mon Sep 17 00:00:00 2001
From 034e14c5c940054d1f942b25cc1339b8f6b03545 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 6 Jun 2020 18:21:56 +0200
Subject: [PATCH 09/28] HOME deserves to wake-up devices just as well as back
Subject: [PATCH 09/30] HOME deserves to wake-up devices just as well as back
and menu
Change-Id: Ia562bafd8c620d00c17e8eb338e4701c6c4a3c3a

View File

@ -1,7 +1,7 @@
From 1b7f27efb7af8a4c9f49a1e504f5b4d2530e1c85 Mon Sep 17 00:00:00 2001
From e19859819c2b065315c5fb07ea7ffc1bb605d48b Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 29 Sep 2020 22:39:47 +0200
Subject: [PATCH 10/28] Some devices have proximity sensor reporting NaN as max
Subject: [PATCH 10/30] Some devices have proximity sensor reporting NaN as max
range for some reason. Make them behave standard way by setting 5 cm
Change-Id: I3c39e3e914a05903c140235702e0480d2d58a612
@ -10,10 +10,10 @@ Change-Id: I3c39e3e914a05903c140235702e0480d2d58a612
1 file changed, 3 insertions(+)
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 82b1260e79dc..a9de9e1ff19a 100644
index 1bcd2317235b..0d5ea94da738 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -1750,6 +1750,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
@@ -1758,6 +1758,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
if (mProximitySensor != null) {
mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(),
TYPICAL_PROXIMITY_THRESHOLD);

View File

@ -1,7 +1,7 @@
From 5f849729380e68e0317c89da35c23b98df916748 Mon Sep 17 00:00:00 2001
From cfe776121dbdcc0b8678588b2ab4172552e747b5 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 29 Sep 2020 22:40:10 +0200
Subject: [PATCH 11/28] Fix brightness range not being complete on Samsung
Subject: [PATCH 11/30] Fix brightness range not being complete on Samsung
devices
On some devices, minimum brightness is 0, which totally messes with
@ -15,10 +15,10 @@ 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 5ac1f31bf817..06cd0ac979e9 100644
index 53b2b8ba5bda..07d858986539 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
@@ -1043,9 +1043,11 @@ public final class PowerManagerService extends SystemService
if (min == INVALID_BRIGHTNESS_IN_CONFIG || max == INVALID_BRIGHTNESS_IN_CONFIG
|| def == INVALID_BRIGHTNESS_IN_CONFIG) {

View File

@ -1,7 +1,7 @@
From af86daa9d8bd70690e9b50c2e1e23e5d52bc662d Mon Sep 17 00:00:00 2001
From 1ba5bf7dc38366e06e7b05b4e7411269303b000f Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 25 Oct 2020 23:57:26 +0100
Subject: [PATCH 12/28] Re-implement fnmatch-like behaviour for RRO java-side
Subject: [PATCH 12/30] Re-implement fnmatch-like behaviour for RRO java-side
Change-Id: Id38292a9a1453aa87b8401c1fdb390fa4e63c7d1
---
@ -9,10 +9,10 @@ Change-Id: Id38292a9a1453aa87b8401c1fdb390fa4e63c7d1
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 4ff26242dab2..9379a634afa8 100644
index 86fef5d9df19..1c4214020d03 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -2489,8 +2489,17 @@ public class PackageParser {
@@ -2496,8 +2496,17 @@ public class PackageParser {
for (int i = 0; i < propNames.length; i++) {
// Check property value: make sure it is both set and equal to expected value
final String currValue = SystemProperties.get(propNames[i]);

View File

@ -1,18 +1,18 @@
From 8a1571889ec702ae794f006af91d6d662042cc0a Mon Sep 17 00:00:00 2001
From 8dc6b1eea2b69d8fd2ad9c39bfa427cfb346c2a2 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 6 Dec 2020 12:20:08 +0100
Subject: [PATCH 13/28] Make rounded corners padding overridable with
Subject: [PATCH 13/30] Make rounded corners padding overridable with
persist.sys.phh.rounded_corners_padding
Change-Id: I481c1c8849b2f22a7cdfb2896a6d3c2e7e3b44d9
---
.../src/com/android/systemui/qs/QuickStatusBarHeader.java | 7 +++++--
.../systemui/statusbar/phone/KeyguardStatusBarView.java | 7 +++++--
.../statusbar/phone/StatusBarContentInsetsProvider.kt | 5 ++++-
3 files changed, 14 insertions(+), 5 deletions(-)
.../statusbar/phone/StatusBarContentInsetsProvider.kt | 6 ++++--
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index d2af6f88915f..3478ec463573 100644
index 8e0b413209ec..60a5df0665e7 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -22,6 +22,7 @@ import android.content.res.Configuration;
@ -23,7 +23,7 @@ index d2af6f88915f..3478ec463573 100644
import android.util.AttributeSet;
import android.util.Pair;
import android.view.DisplayCutout;
@@ -238,8 +239,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
@@ -253,8 +254,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mConfigShowBatteryEstimate = resources.getBoolean(R.bool.config_showBatteryEstimateQSBH);
@ -34,13 +34,13 @@ index d2af6f88915f..3478ec463573 100644
+ mRoundedCornerPadding = resources.getDimensionPixelSize(
+ R.dimen.rounded_corner_content_padding);
int qsOffsetHeight = resources.getDimensionPixelSize(
com.android.internal.R.dimen.quick_qs_offset_height);
int qsOffsetHeight = SystemBarUtils.getQuickQsOffsetHeight(mContext);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index c1191aa71ef4..a32e7c4765ef 100644
index eb41536e21d0..b11843cd5d1f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -30,6 +30,7 @@ import android.graphics.Color;
@@ -28,6 +28,7 @@ import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.UserManager;
@ -48,7 +48,7 @@ index c1191aa71ef4..a32e7c4765ef 100644
import android.util.AttributeSet;
import android.util.Pair;
import android.util.TypedValue;
@@ -193,8 +194,10 @@ public class KeyguardStatusBarView extends RelativeLayout implements
@@ -177,8 +178,10 @@ public class KeyguardStatusBarView extends RelativeLayout {
R.dimen.ongoing_appops_dot_min_padding);
mCutoutSideNudge = getResources().getDimensionPixelSize(
R.dimen.display_cutout_margin_consumption);
@ -60,30 +60,31 @@ index c1191aa71ef4..a32e7c4765ef 100644
+ R.dimen.rounded_corner_content_padding);
}
// Set hidden status bar items
private void updateVisibilities() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt
index fe1f63a34acd..3ee8c688376d 100644
index b7988bcc6f45..72b8e971306c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt
@@ -25,6 +25,7 @@ import android.view.DisplayCutout
import android.view.View.LAYOUT_DIRECTION_RTL
import android.view.WindowManager
import android.view.WindowMetrics
@@ -23,7 +23,7 @@ import android.graphics.Rect
import android.util.LruCache
import android.util.Pair
import android.view.DisplayCutout
-
+import android.os.SystemProperties
import androidx.annotation.VisibleForTesting
import com.android.systemui.Dumpable
import com.android.systemui.R
@@ -157,7 +158,9 @@ class StatusBarContentInsetsProvider @Inject constructor(
val currentRotation = RotationUtils.getExactRotation(context)
val isRtl = rotatedResources.configuration.layoutDirection == LAYOUT_DIRECTION_RTL
import com.android.internal.policy.SystemBarUtils
@@ -227,7 +227,9 @@ class StatusBarContentInsetsProvider @Inject constructor(
val dc = context.display.cutout
val currentRotation = getExactRotation(context)
- val roundedCornerPadding = rotatedResources
+ var roundedCornerPadding = SystemProperties.getInt("persist.sys.phh.rounded_corners_padding", -1);
+ if(roundedCornerPadding == -1)
+ roundedCornerPadding = rotatedResources
.getDimensionPixelSize(R.dimen.rounded_corner_content_padding)
val minDotWidth = rotatedResources
.getDimensionPixelSize(R.dimen.ongoing_appops_dot_min_padding)
val minDotPadding = if (isPrivacyDotEnabled)
rotatedResources.getDimensionPixelSize(R.dimen.ongoing_appops_dot_min_padding)
--
2.25.1

View File

@ -1,7 +1,7 @@
From 4a0779e7ee51291bc635cc2aa414ef6252503902 Mon Sep 17 00:00:00 2001
From ea6bcd921886e585836b991323b7eadb4356835a Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Fri, 11 Dec 2020 14:41:09 +0100
Subject: [PATCH 14/28] Remove useless notification about "console" service
Subject: [PATCH 14/30] Remove useless notification about "console" service
being running
---
@ -9,10 +9,10 @@ Subject: [PATCH 14/28] Remove useless notification about "console" service
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index c78d5d538f8d..8739a5913091 100644
index 330d2ddc0a94..b2c86b89ccb0 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -4775,7 +4775,7 @@ public class ActivityManagerService extends IActivityManager.Stub
@@ -4801,7 +4801,7 @@ public class ActivityManagerService extends IActivityManager.Stub
}
private void showConsoleNotificationIfActive() {

View File

@ -1,7 +1,7 @@
From f72b62ec62e70b907c02b7af6382e36f45777509 Mon Sep 17 00:00:00 2001
From 6c4399d814b9c3112c90a1fe2d585562358260d2 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 16 Dec 2020 21:24:12 +0800
Subject: [PATCH 15/28] Revert "Remove unused SystemProperties.set"
Subject: [PATCH 15/30] Revert "Remove unused SystemProperties.set"
This reverts commit debb4616ef67f9ed5054eca51ec58592358ff55f.
@ -11,7 +11,7 @@ This reverts commit debb4616ef67f9ed5054eca51ec58592358ff55f.
1 file changed, 69 insertions(+)
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 989663406a6b..9d65e6385db3 100644
index 8bc4d381e2dd..616ab6b22081 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -7406,6 +7406,75 @@ public class TelephonyManager {

View File

@ -1,7 +1,7 @@
From 6a140ec75ff6b13b6ec397119ee46774e38f3333 Mon Sep 17 00:00:00 2001
From f600afdb74b656312e41cd044b754a598cedd088 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 16 Dec 2020 13:46:15 +0800
Subject: [PATCH 16/28] TelephonyManager: bring back getNetworkClass()
Subject: [PATCH 16/30] TelephonyManager: bring back getNetworkClass()
This partially reverts commit c058cac051ab083dc7fb7ea6aa85699110b2e9bf.
@ -11,7 +11,7 @@ This partially reverts commit c058cac051ab083dc7fb7ea6aa85699110b2e9bf.
1 file changed, 58 insertions(+)
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 9d65e6385db3..b0c640547e0e 100644
index 616ab6b22081..967ad10f697d 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3042,6 +3042,64 @@ public class TelephonyManager {

View File

@ -1,7 +1,7 @@
From 8f25adf7351f187e5c1a6c0f3607f14b6e272bd7 Mon Sep 17 00:00:00 2001
From f23fa294ab33ad231e6d4ee90059016332914b89 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 16 Dec 2020 21:26:45 +0800
Subject: [PATCH 17/28] TelephonyManager: add API annotations for
Subject: [PATCH 17/30] TelephonyManager: add API annotations for
setTelephonyProperty
* This method was added back by reverting commit
@ -14,7 +14,7 @@ Subject: [PATCH 17/28] TelephonyManager: add API annotations for
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index b0c640547e0e..c11232326370 100644
index 967ad10f697d..e5b80e4cee30 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -7470,7 +7470,7 @@ public class TelephonyManager {

View File

@ -1,7 +1,7 @@
From 2d0a8597409cd7a31d7718c1c9d6ebd2cdaa1c0d Mon Sep 17 00:00:00 2001
From 27c3433b0ff7c187b283de27f1ab059772e4957c Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Tue, 2 Feb 2021 10:20:51 +0000
Subject: [PATCH 18/28] Fix Wakelock issue
Subject: [PATCH 18/30] Fix Wakelock issue
Prevent SystemUI crash due to "WakeLock under-locked Doze" (issue #12) by only releasing a wakelock that was not already released
---

View File

@ -1,7 +1,7 @@
From 3ae48d5109ac89634f9a7f96a8555d96025050c8 Mon Sep 17 00:00:00 2001
From c7346e5fbc34f2f6c1e175cffe4cfb4b2bb25efa Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 20 Mar 2021 14:31:01 +0100
Subject: [PATCH 20/28] Automatically detect pick up sensor, so that an overlay
Subject: [PATCH 19/30] Automatically detect pick up sensor, so that an overlay
is required for the sole purpose of enabling pulse doze on pick up sensor
---
@ -9,7 +9,7 @@ Subject: [PATCH 20/28] Automatically detect pick up sensor, so that an overlay
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/core/java/android/hardware/display/AmbientDisplayConfiguration.java b/core/java/android/hardware/display/AmbientDisplayConfiguration.java
index a1f7aa12264b..5f6201bbb18c 100644
index 0b1ed65ef937..61a7522f38f4 100644
--- a/core/java/android/hardware/display/AmbientDisplayConfiguration.java
+++ b/core/java/android/hardware/display/AmbientDisplayConfiguration.java
@@ -23,6 +23,9 @@ import android.os.SystemProperties;
@ -20,9 +20,9 @@ index a1f7aa12264b..5f6201bbb18c 100644
+import android.hardware.Sensor;
+
import com.android.internal.R;
import com.android.internal.util.ArrayUtils;
/**
@@ -76,7 +79,20 @@ public class AmbientDisplayConfiguration {
@@ -77,7 +80,20 @@ public class AmbientDisplayConfiguration {
/** {@hide} */
public boolean dozePickupSensorAvailable() {

View File

@ -1,30 +0,0 @@
From 243d10a369e231ca4f239d75c518a72bc1a55933 Mon Sep 17 00:00:00 2001
From: Arne Coucheron <arco68@gmail.com>
Date: Thu, 5 Nov 2020 05:38:44 +0100
Subject: [PATCH 19/28] SystemUI: Use AVCProfileMain for screen recorder
Some devices don't support the High profile very well.
Use Main profile, which is more compatible, so they
can use screen recorder too.
Change-Id: Iac23480e080edf4300e6f411c3394c0b41030daa
---
.../com/android/systemui/screenrecord/ScreenMediaRecorder.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java
index 2133cf63d1c3..6100b6030544 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java
@@ -135,7 +135,7 @@ public class ScreenMediaRecorder {
* VIDEO_FRAME_RATE_TO_RESOLUTION_RATIO;
mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
mMediaRecorder.setVideoEncodingProfileLevel(
- MediaCodecInfo.CodecProfileLevel.AVCProfileHigh,
+ MediaCodecInfo.CodecProfileLevel.AVCProfileMain,
MediaCodecInfo.CodecProfileLevel.AVCLevel3);
mMediaRecorder.setVideoSize(width, height);
mMediaRecorder.setVideoFrameRate(refreshRate);
--
2.25.1

View File

@ -1,7 +1,7 @@
From 5b9aa5db4dc782ed9a6506cda78277d87f81ef31 Mon Sep 17 00:00:00 2001
From 3cfd962cec75ad34939e5821c96769bdc7006066 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 23 Mar 2021 19:43:26 +0100
Subject: [PATCH 21/28] Catch broken mainBuiltInDisplayCutoutRectApproximation
Subject: [PATCH 20/30] Catch broken mainBuiltInDisplayCutoutRectApproximation
Some devices (Redmi Note 9T) have:
mainBuiltInDisplayCutoutRectApproximation = @android:mainBuiltInDisplayCutout
@ -18,27 +18,27 @@ Change-Id: I03b6e78bac2cc38f3a623c8add801405ad6ba7ba
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java
index e1a4402d8964..25282b50cc45 100644
index c1a5636b7b34..2f3d71c963c8 100644
--- a/core/java/android/view/DisplayCutout.java
+++ b/core/java/android/view/DisplayCutout.java
@@ -881,10 +881,17 @@ public final class DisplayCutout {
@@ -987,10 +987,17 @@ public final class DisplayCutout {
*/
public static DisplayCutout fromResourcesRectApproximation(Resources res, int displayWidth,
int displayHeight) {
- return pathAndDisplayCutoutFromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout),
- res.getString(R.string.config_mainBuiltInDisplayCutoutRectApproximation),
public static DisplayCutout fromResourcesRectApproximation(Resources res,
String displayUniqueId, int displayWidth, int displayHeight) {
- return pathAndDisplayCutoutFromSpec(getDisplayCutoutPath(res, displayUniqueId),
- getDisplayCutoutApproximationRect(res, displayUniqueId),
- displayWidth, displayHeight, DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT,
- loadWaterfallInset(res)).second;
- getWaterfallInsets(res, displayUniqueId)).second;
+ try {
+ return pathAndDisplayCutoutFromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout),
+ res.getString(R.string.config_mainBuiltInDisplayCutoutRectApproximation),
+ return pathAndDisplayCutoutFromSpec(getDisplayCutoutPath(res, displayUniqueId),
+ getDisplayCutoutApproximationRect(res, displayUniqueId),
+ displayWidth, displayHeight, DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT,
+ loadWaterfallInset(res)).second;
+ getWaterfallInsets(res, displayUniqueId)).second;
+ } catch(Throwable t) {
+ return pathAndDisplayCutoutFromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout),
+ return pathAndDisplayCutoutFromSpec(getDisplayCutoutPath(res, displayUniqueId),
+ null,
+ displayWidth, displayHeight, DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT,
+ loadWaterfallInset(res)).second;
+ getWaterfallInsets(res, displayUniqueId)).second;
+ }
}

View File

@ -1,7 +1,7 @@
From 69316504d686f4365303f60a395634d5a9878725 Mon Sep 17 00:00:00 2001
From 4c27c2503be041833ba539ee4b1a501c4e67c46f Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 24 Mar 2018 08:01:48 +0100
Subject: [PATCH 22/28] backlight: Fix backlight control on Galaxy S9(+)
Subject: [PATCH 21/30] backlight: Fix backlight control on Galaxy S9(+)
Change-Id: I1fbbb47939c377597ef8ad6b88b2acea5f4acaa6

View File

@ -1,7 +1,7 @@
From 3c7d6c5106eea744e08250998ce3d60af7c9b306 Mon Sep 17 00:00:00 2001
From 308ffd0c8945640cf84ce5b9b50bf066b2dc4e83 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Sat, 16 Oct 2021 05:27:57 -0700
Subject: [PATCH 23/28] Add support for app signature spoofing
Subject: [PATCH 22/30] Add support for app signature spoofing
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
@ -36,7 +36,7 @@ Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
4 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/core/api/current.txt b/core/api/current.txt
index 1de47b548a5c..52c7ea2e1321 100644
index 1dd401d04e2b..ada2c59ff24c 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -84,6 +84,7 @@ package android {
@ -47,7 +47,7 @@ index 1de47b548a5c..52c7ea2e1321 100644
field public static final String FOREGROUND_SERVICE = "android.permission.FOREGROUND_SERVICE";
field public static final String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
field public static final String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
@@ -199,6 +200,7 @@ package android {
@@ -200,6 +201,7 @@ package android {
field public static final String CALL_LOG = "android.permission-group.CALL_LOG";
field public static final String CAMERA = "android.permission-group.CAMERA";
field public static final String CONTACTS = "android.permission-group.CONTACTS";
@ -56,7 +56,7 @@ 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 a006db9d8373..8c88f2d3dcba 100644
index 030310406949..a7e5ee11cc10 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3202,6 +3202,21 @@
@ -82,7 +82,7 @@ index a006db9d8373..8c88f2d3dcba 100644
{@link android.content.pm.PackageManager#addPackageToPreferred}
for details. -->
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index b58638cc3ade..8cf98fa56bf6 100644
index 166d6abd1809..cba87ff17600 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -880,6 +880,18 @@
@ -105,10 +105,10 @@ index b58638cc3ade..8cf98fa56bf6 100644
<string name="permlab_statusBar">disable or modify status bar</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index f69922f64787..7d0ba265ff7e 100644
index e9fcac5fac57..a4a7da126051 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -3325,6 +3325,29 @@ public class PackageManagerService extends IPackageManager.Stub
@@ -3328,6 +3328,29 @@ public class PackageManagerService extends IPackageManager.Stub
return result;
}
@ -138,7 +138,7 @@ index f69922f64787..7d0ba265ff7e 100644
public final PackageInfo generatePackageInfo(PackageSetting ps, int flags, int userId) {
if (!mUserManager.exists(userId)) return null;
if (ps == null) {
@@ -3353,12 +3376,14 @@ public class PackageManagerService extends IPackageManager.Stub
@@ -3356,12 +3379,14 @@ public class PackageManagerService extends IPackageManager.Stub
final int[] gids = (flags & PackageManager.GET_GIDS) == 0 ? EMPTY_INT_ARRAY
: mPermissionManager.getGidsForUid(UserHandle.getUid(userId, ps.appId));
// Compute granted permissions only if package has requested permissions

View File

@ -1,7 +1,7 @@
From afdd9f16ebf1993e982389260129fed10c3820fa Mon Sep 17 00:00:00 2001
From eff8d618d194b5773dee38addc5329448ee3a9ff Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 4 Sep 2021 08:26:30 +0000
Subject: [PATCH 24/28] Revert "Switch long-press power behavior in AOSP."
Subject: [PATCH 23/30] Revert "Switch long-press power behavior in AOSP."
This reverts commit 803c77a0a24624111944832098c6f65158051dc4.
---
@ -9,10 +9,10 @@ This reverts commit 803c77a0a24624111944832098c6f65158051dc4.
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 380f2b362668..3ce1886fef6d 100644
index 7305ccc93e93..e2216d23e15e 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -956,7 +956,7 @@
@@ -978,7 +978,7 @@
5 - Go to assistant (Settings.Secure.ASSISTANT)
6 - Toggle torch on / off (if screen is off)
-->
@ -21,7 +21,7 @@ index 380f2b362668..3ce1886fef6d 100644
<!-- The time in milliseconds after which a press on power button is considered "long". -->
<integer name="config_longPressOnPowerDurationMs">500</integer>
@@ -988,7 +988,7 @@
@@ -1010,7 +1010,7 @@
1 - Mute toggle
2 - Global actions menu
-->

View File

@ -1,7 +1,7 @@
From af7498ac0f380fd576e8c821d4a091ab242f20ba Mon Sep 17 00:00:00 2001
From d4214d8e74194049786980aa55126ca22679e839 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Fri, 17 Dec 2021 17:16:14 -0500
Subject: [PATCH 25/28] Reduce the size of udfps enroll progress bar. Some
Subject: [PATCH 24/30] Reduce the size of udfps enroll progress bar. Some
devices have their udfps pretty low, and the progress bar would make the icon
at the wrong place
@ -11,10 +11,10 @@ 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 b2ccacd5fe42..ebf7b8407727 100644
index e520dfed45d0..1bee8eee1534 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -637,7 +637,7 @@
@@ -592,7 +592,7 @@
<!-- The radius of the enrollment progress bar, in dp -->
<integer name="config_udfpsEnrollProgressBar" translatable="false">

View File

@ -1,7 +1,7 @@
From 3c5f40c68535cf981e0d891fa368910ccf9a301a Mon Sep 17 00:00:00 2001
From a3be161414fcefc79314adf4ac5675eba3a75908 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 19 Dec 2021 17:08:22 -0500
Subject: [PATCH 26/28] Add UDFPS support for various devices
Subject: [PATCH 25/30] Add UDFPS support for various devices
Successfully tested on Galaxy A51, Xiaomi Mi 9, and OnePlus Nord 2
@ -13,11 +13,11 @@ Successfully tested on Galaxy A51, Xiaomi Mi 9, and OnePlus Nord 2
Change-Id: I9448f06a46c178652f5b216717d914b8db55c993
---
.../systemui/biometrics/UdfpsSurfaceView.java | 2 +-
.../systemui/biometrics/UdfpsView.java | 53 +++-
.../systemui/biometrics/UdfpsView.java | 54 +++-
services/core/Android.bp | 4 +
.../server/biometrics/AuthService.java | 262 +++++++++++++++++-
.../sensors/fingerprint/UdfpsHelper.java | 115 +++++++-
5 files changed, 418 insertions(+), 18 deletions(-)
5 files changed, 419 insertions(+), 18 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsSurfaceView.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsSurfaceView.java
index 77fad35d32d4..51409b9c533a 100644
@ -33,10 +33,10 @@ index 77fad35d32d4..51409b9c533a 100644
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java
index 8a213ec502e4..335edf4819de 100644
index 30e5aed2f8d8..7b8a5995f26c 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java
@@ -41,6 +41,12 @@ import com.android.systemui.R;
@@ -42,6 +42,12 @@ import com.android.systemui.R;
import com.android.systemui.biometrics.UdfpsHbmTypes.HbmType;
import com.android.systemui.doze.DozeReceiver;
@ -49,7 +49,7 @@ index 8a213ec502e4..335edf4819de 100644
/**
* A view containing 1) A SurfaceView for HBM, and 2) A normal drawable view for all other
* animations.
@@ -50,7 +56,7 @@ public class UdfpsView extends FrameLayout implements DozeReceiver, UdfpsIllumin
@@ -51,7 +57,7 @@ public class UdfpsView extends FrameLayout implements DozeReceiver, UdfpsIllumin
private static final String SETTING_HBM_TYPE =
"com.android.systemui.biometrics.UdfpsSurfaceView.hbmType";
@ -58,7 +58,7 @@ index 8a213ec502e4..335edf4819de 100644
private static final int DEBUG_TEXT_SIZE_PX = 32;
@@ -70,6 +76,49 @@ public class UdfpsView extends FrameLayout implements DozeReceiver, UdfpsIllumin
@@ -71,6 +77,49 @@ public class UdfpsView extends FrameLayout implements DozeReceiver, UdfpsIllumin
@Nullable private String mDebugMessage;
private boolean mIlluminationRequested;
@ -108,17 +108,18 @@ index 8a213ec502e4..335edf4819de 100644
public UdfpsView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -252,6 +301,8 @@ public class UdfpsView extends FrameLayout implements DozeReceiver, UdfpsIllumin
Log.w(TAG, "doIlluminate | onIlluminatedRunnable is null");
@@ -255,6 +304,9 @@ public class UdfpsView extends FrameLayout implements DozeReceiver, UdfpsIllumin
}
});
+ } else if (mGhbmView != null) {
+ mGhbmView.drawIlluminationDot(mSensorRect);
}
+ else if (mGhbmView != null) {
+ mGhbmView.drawIlluminationDot(mSensorRect);
+ }
}
@Override
diff --git a/services/core/Android.bp b/services/core/Android.bp
index 89e4b02e7944..9270e81cb4b5 100644
index e432cf0167cc..b63402c290d5 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -157,6 +157,10 @@ java_library_static {
@ -133,10 +134,10 @@ index 89e4b02e7944..9270e81cb4b5 100644
"icu4j_calendar_astronomer",
"netd-client",
diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java
index b42f8980d1c0..41a04b8b5056 100644
index 16a4e106a2e2..341b08262ed4 100644
--- a/services/core/java/com/android/server/biometrics/AuthService.java
+++ b/services/core/java/com/android/server/biometrics/AuthService.java
@@ -72,6 +72,21 @@ import com.android.server.SystemService;
@@ -75,6 +75,21 @@ import com.android.server.SystemService;
import java.util.ArrayList;
import java.util.List;
@ -158,7 +159,7 @@ index b42f8980d1c0..41a04b8b5056 100644
/**
* System service that provides an interface for authenticating with biometrics and
* PIN/pattern/password to BiometricPrompt and lock screen.
@@ -88,6 +103,9 @@ public class AuthService extends SystemService {
@@ -91,6 +106,9 @@ public class AuthService extends SystemService {
@VisibleForTesting
final IAuthService.Stub mImpl;
@ -168,7 +169,7 @@ index b42f8980d1c0..41a04b8b5056 100644
/**
* Class for injecting dependencies into AuthService.
* TODO(b/141025588): Replace with a dependency injection framework (e.g. Guice, Dagger).
@@ -636,6 +654,68 @@ public class AuthService extends SystemService {
@@ -639,6 +657,68 @@ public class AuthService extends SystemService {
registerAuthenticators(hidlConfigs);
mInjector.publishBinderService(this, mImpl);
@ -237,7 +238,7 @@ index b42f8980d1c0..41a04b8b5056 100644
}
/**
@@ -734,19 +814,197 @@ public class AuthService extends SystemService {
@@ -737,23 +817,201 @@ public class AuthService extends SystemService {
? modality : (modality & ~BiometricAuthenticator.TYPE_CREDENTIAL);
}
@ -311,6 +312,10 @@ index b42f8980d1c0..41a04b8b5056 100644
+ int[] udfpsProps = getContext().getResources().getIntArray(
com.android.internal.R.array.config_udfps_sensor_props);
// Non-empty workaroundLocations indicates that the sensor is SFPS.
final List<SensorLocationInternal> workaroundLocations =
getWorkaroundSensorProps(getContext());
- final boolean isUdfps = !ArrayUtils.isEmpty(udfpsProps);
+ boolean isUdfps = !ArrayUtils.isEmpty(udfpsProps);
@ -438,12 +443,12 @@ index b42f8980d1c0..41a04b8b5056 100644
if (isUdfps) {
sensorType = FingerprintSensorProperties.TYPE_UDFPS_OPTICAL;
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/UdfpsHelper.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/UdfpsHelper.java
index 879c8a0317d7..d288acdc2ef5 100644
index 29661d46f328..e97f70d7bffd 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/UdfpsHelper.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/UdfpsHelper.java
@@ -28,6 +28,10 @@ import android.util.Slog;
import com.android.server.biometrics.sensors.AcquisitionClient;
@@ -23,6 +23,10 @@ import android.hardware.fingerprint.FingerprintManager;
import android.os.RemoteException;
import android.util.Slog;
+import vendor.goodix.hardware.biometrics.fingerprint.V2_1.IGoodixFingerprintDaemon;
+
@ -452,7 +457,7 @@ index 879c8a0317d7..d288acdc2ef5 100644
/**
* Contains helper methods for under-display fingerprint HIDL.
*/
@@ -35,37 +39,120 @@ public class UdfpsHelper {
@@ -30,37 +34,120 @@ public class UdfpsHelper {
private static final String TAG = "UdfpsHelper";
@ -561,21 +566,21 @@ index 879c8a0317d7..d288acdc2ef5 100644
return;
+ } catch(Throwable t) {
+ Slog.e(TAG, "Tried sending goodix daemon cmd failed", t);
}
try {
- extension.onFingerUp();
- } catch (RemoteException e) {
- Slog.e(TAG, "onFingerUp | RemoteException: ", e);
+ }
+
+ try {
+ vendor.oplus.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint fp = vendor.oplus.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint.getService();
+ writeFile("/sys/kernel/oppo_display/notify_fppress", "0");
+ writeFile("/sys/kernel/oplus_display/oplus_notify_fppress", "0");
+ fp.touchUp();
+ } catch(Throwable t) {
+ Slog.e(TAG, "Tried sending oplus daemon cmd failed", t);
+ }
+
+ try {
}
try {
- extension.onFingerUp();
- } catch (RemoteException e) {
- Slog.e(TAG, "onFingerUp | RemoteException: ", e);
+ vendor.oppo.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint fp = vendor.oppo.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint.getService();
+ writeFile("/sys/kernel/oppo_display/notify_fppress", "0");
+ writeFile("/sys/kernel/oplus_display/oplus_notify_fppress", "0");
@ -586,7 +591,7 @@ index 879c8a0317d7..d288acdc2ef5 100644
+ Slog.v(TAG, "onFingerUp | failed to cast the HIDL to V2_3");
}
public static int getReasonFromEnrollReason(@FingerprintManager.EnrollReason int reason) {
public static boolean isValidAcquisitionMessage(@NonNull Context context,
--
2.25.1

View File

@ -1,7 +1,7 @@
From 901626c91714a65086a7a007290964f60da8464e Mon Sep 17 00:00:00 2001
From a3f70fa8332d6b5f7663ec4c41a9491dae511663 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 20 Dec 2021 15:01:41 -0500
Subject: [PATCH 27/28] Dynamically resize boot animation to match screen size
Subject: [PATCH 26/30] Dynamically resize boot animation to match screen size
Change-Id: I54e49fc6b8c670103852e212d1416e27ff976205
---

View File

@ -1,7 +1,7 @@
From 4be34967d45c4c8198be53c0190fa5b12b5cbb6e Mon Sep 17 00:00:00 2001
From d673b986c46c4eda5fdd2289472bca1fa74b7b72 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 27 Dec 2021 17:57:11 -0500
Subject: [PATCH 28/28] Once we integrate Samsung Power hal in libpowermanager,
Subject: [PATCH 27/30] Once we integrate Samsung Power hal in libpowermanager,
libpowermanager and its deps require linking against
vendor.samsung.hardware.miscpower@2.0

View File

@ -0,0 +1,39 @@
From a37fd36e336e956b4e83cff34463e82b1deb7bd7 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 3 Mar 2022 09:15:32 -0500
Subject: [PATCH 28/30] Add persist.sys.phh.ultrasonic_udfps property to
disable green circle for udfps
---
.../com/android/server/biometrics/AuthService.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java
index 341b08262ed4..718dbf85bdcd 100644
--- a/services/core/java/com/android/server/biometrics/AuthService.java
+++ b/services/core/java/com/android/server/biometrics/AuthService.java
@@ -1008,13 +1008,17 @@ public class AuthService extends SystemService {
isUdfps = true;
}
- if(udfpsProps.length > 0) {
- Slog.d("PHH-Enroll", "Samsung got udfps infos " + udfpsProps[0] + ", " + udfpsProps[1] + ", " + udfpsProps[2]);
- }
+ if(udfpsProps.length > 0) {
+ Slog.d("PHH-Enroll", "Got udfps infos " + udfpsProps[0] + ", " + udfpsProps[1] + ", " + udfpsProps[2]);
+ }
final @FingerprintSensorProperties.SensorType int sensorType;
if (isUdfps) {
- sensorType = FingerprintSensorProperties.TYPE_UDFPS_OPTICAL;
+ if(android.os.SystemProperties.getBoolean("persist.sys.phh.ultrasonic_udfps", false)) {
+ sensorType = FingerprintSensorProperties.TYPE_UDFPS_ULTRASONIC;
+ } else {
+ sensorType = FingerprintSensorProperties.TYPE_UDFPS_OPTICAL;
+ }
} else if (isPowerbuttonFps) {
sensorType = FingerprintSensorProperties.TYPE_POWER_BUTTON;
} else {
--
2.25.1

Some files were not shown because too many files have changed in this diff Show More