Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1865fc784b | ||
|
|
5f6d7c9b47 | ||
|
|
0d139427ed | ||
|
|
e5c1b35ec2 | ||
|
|
92556e4408 | ||
|
|
eea6776609 | ||
|
|
40f13096eb | ||
|
|
7c52a16c2e | ||
|
|
4bc5076d1c | ||
|
|
291d57d10a | ||
|
|
b271de008b | ||
|
|
d14628eeee | ||
|
|
65d23014f6 |
@@ -0,0 +1 @@
|
|||||||
|
/patches_treble_personal/vendor_hardware_overlay
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
From fdfbffda2815c0ac2270eae0efd0c31eb19e2dda Mon Sep 17 00:00:00 2001
|
||||||
|
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 22 Mar 2019 00:41:20 +0800
|
||||||
|
Subject: [PATCH 01/22] Disable FP lockouts optionally
|
||||||
|
|
||||||
|
Both timed and permanent lockouts - GET THE FUCK OUT
|
||||||
|
Now targeting LockoutFramework, introduced in Android 12
|
||||||
|
Now controlled by property "persist.sys.fp.lockouts.disable"
|
||||||
|
|
||||||
|
Change-Id: I2d4b091f3546d4d7903bfb4d5585629212dc9915
|
||||||
|
---
|
||||||
|
.../hidl/LockoutFrameworkImpl.java | 28 +++++++++++--------
|
||||||
|
1 file changed, 17 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||||
|
index a0befea8e085..48c4ded9f5ca 100644
|
||||||
|
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||||
|
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||||
|
@@ -25,6 +25,7 @@ import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
|
import android.os.SystemClock;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
import android.util.Slog;
|
||||||
|
import android.util.SparseBooleanArray;
|
||||||
|
import android.util.SparseIntArray;
|
||||||
|
@@ -44,6 +45,7 @@ public class LockoutFrameworkImpl implements LockoutTracker {
|
||||||
|
private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT = 20;
|
||||||
|
private static final long FAIL_LOCKOUT_TIMEOUT_MS = 30 * 1000;
|
||||||
|
private static final String KEY_LOCKOUT_RESET_USER = "lockout_reset_user";
|
||||||
|
+ private static final String DISABLE_FP_LOCKOUTS_PROPERTY = "persist.sys.fp.lockouts.disable";
|
||||||
|
|
||||||
|
private final class LockoutReceiver extends BroadcastReceiver {
|
||||||
|
@Override
|
||||||
|
@@ -101,23 +103,27 @@ public class LockoutFrameworkImpl implements LockoutTracker {
|
||||||
|
}
|
||||||
|
|
||||||
|
void addFailedAttemptForUser(int userId) {
|
||||||
|
- mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
|
||||||
|
- mTimedLockoutCleared.put(userId, false);
|
||||||
|
+ if (!SystemProperties.getBoolean(DISABLE_FP_LOCKOUTS_PROPERTY, false)) {
|
||||||
|
+ mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
|
||||||
|
+ mTimedLockoutCleared.put(userId, false);
|
||||||
|
|
||||||
|
- if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
|
||||||
|
- scheduleLockoutResetForUser(userId);
|
||||||
|
+ if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
|
||||||
|
+ scheduleLockoutResetForUser(userId);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @LockoutMode int getLockoutModeForUser(int userId) {
|
||||||
|
- final int failedAttempts = mFailedAttempts.get(userId, 0);
|
||||||
|
- if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
|
||||||
|
- return LOCKOUT_PERMANENT;
|
||||||
|
- } else if (failedAttempts > 0
|
||||||
|
- && !mTimedLockoutCleared.get(userId, false)
|
||||||
|
- && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
|
||||||
|
- return LOCKOUT_TIMED;
|
||||||
|
+ if (!SystemProperties.getBoolean(DISABLE_FP_LOCKOUTS_PROPERTY, false)) {
|
||||||
|
+ final int failedAttempts = mFailedAttempts.get(userId, 0);
|
||||||
|
+ if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
|
||||||
|
+ return LOCKOUT_PERMANENT;
|
||||||
|
+ } else if (failedAttempts > 0
|
||||||
|
+ && !mTimedLockoutCleared.get(userId, false)
|
||||||
|
+ && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
|
||||||
|
+ return LOCKOUT_TIMED;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
return LOCKOUT_NONE;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 70d36ecebffeae156a82209215badbf3de4b3f18 Mon Sep 17 00:00:00 2001
|
From f48a8e1bb482cde1c1e0a628aea218796586130a Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 5 Apr 2018 10:01:19 +0800
|
Date: Thu, 5 Apr 2018 10:01:19 +0800
|
||||||
Subject: [PATCH 01/11] Disable vendor mismatch warning
|
Subject: [PATCH 02/22] Disable vendor mismatch warning
|
||||||
|
|
||||||
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
||||||
---
|
---
|
||||||
@@ -9,10 +9,10 @@ Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
|||||||
1 file changed, 2 insertions(+), 14 deletions(-)
|
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
|
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||||
index 1308c12e1715..04dc3822cc27 100644
|
index ca45e087b60c..1d1da07f2942 100644
|
||||||
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||||
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||||
@@ -5676,20 +5676,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
@@ -5875,20 +5875,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Build.isBuildConsistent()) {
|
if (!Build.isBuildConsistent()) {
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
From d8dea7b3e03976fa4ab292f3d6fdcae84e039196 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 17 Jan 2023 17:19:19 +0000
|
||||||
|
Subject: [PATCH 03/22] Keyguard: Fix colors of slices not updating on doze
|
||||||
|
|
||||||
|
Slices were invisible (black) in doze when using light wallpapers
|
||||||
|
Introduced in https://github.com/LineageOS/android_frameworks_base/commit/a19e59d717ec6d573c11c7e8277bba3c4de189c2
|
||||||
|
|
||||||
|
Change-Id: I06abd8bf2e28655cc9e6d81366fd82a13454ec5a
|
||||||
|
---
|
||||||
|
.../com/android/keyguard/KeyguardStatusViewController.java | 7 +++++++
|
||||||
|
.../systemui/shade/NotificationPanelViewController.java | 1 +
|
||||||
|
2 files changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
|
||||||
|
index f4c581552bc4..c0f983551877 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
|
||||||
|
@@ -97,6 +97,13 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
|
||||||
|
mKeyguardSliceViewController.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * The amount we're in doze.
|
||||||
|
+ */
|
||||||
|
+ public void setDarkAmount(float darkAmount) {
|
||||||
|
+ mView.setDarkAmount(darkAmount);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Set which clock should be displayed on the keyguard. The other one will be automatically
|
||||||
|
* hidden.
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
|
||||||
|
index 1394c68ceeb7..6cb1da129b60 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
|
||||||
|
@@ -4422,6 +4422,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
||||||
|
public void onDozeAmountChanged(float linearAmount, float amount) {
|
||||||
|
mInterpolatedDarkAmount = amount;
|
||||||
|
mLinearDarkAmount = linearAmount;
|
||||||
|
+ mKeyguardStatusViewController.setDarkAmount(mInterpolatedDarkAmount);
|
||||||
|
positionClockAndNotifications();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
-66
@@ -1,66 +0,0 @@
|
|||||||
From 0b5f5038a27cabde31ca07b3beac5d078f773de0 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 03/11] UI: Disable left (seascape) navigation bar optionally
|
|
||||||
|
|
||||||
Toggle this behaviour with property "persist.ui.seascape.disable"
|
|
||||||
|
|
||||||
Change-Id: Ieb58efa4b59feeb0c4ac70e497f4c59aa04210d6
|
|
||||||
---
|
|
||||||
.../navigationbar/buttons/ReverseLinearLayout.java | 8 +++++++-
|
|
||||||
.../core/java/com/android/server/wm/DisplayPolicy.java | 5 +++--
|
|
||||||
2 files changed, 10 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
|
||||||
index f1e1366404a2..f43bef8532b8 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
|
||||||
@@ -16,6 +16,7 @@ package com.android.systemui.navigationbar.buttons;
|
|
||||||
|
|
||||||
import android.annotation.Nullable;
|
|
||||||
import android.content.Context;
|
|
||||||
+import android.os.SystemProperties;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.View;
|
|
||||||
@@ -86,6 +87,11 @@ public class ReverseLinearLayout extends LinearLayout {
|
|
||||||
boolean isLayoutRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
|
||||||
boolean isLayoutReverse = isLayoutRtl ^ mIsAlternativeOrder;
|
|
||||||
|
|
||||||
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
|
|
||||||
+ if (isSeascapeDisabled) {
|
|
||||||
+ isLayoutReverse = isLayoutRtl ^ true;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (mIsLayoutReverse != isLayoutReverse) {
|
|
||||||
// reversity changed, swap the order of all views.
|
|
||||||
int childCount = getChildCount();
|
|
||||||
@@ -154,7 +160,7 @@ public class ReverseLinearLayout extends LinearLayout {
|
|
||||||
if (getGravity() != gravityToApply) setGravity(gravityToApply);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-
|
|
||||||
+
|
|
||||||
private static void reverseGroup(ViewGroup group, boolean isLayoutReverse) {
|
|
||||||
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 0a5d7f41f40f..969d70099cfb 100644
|
|
||||||
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
|
||||||
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
|
||||||
@@ -2694,9 +2694,10 @@ public class DisplayPolicy {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (navigationBarCanMove() && displayWidth > displayHeight) {
|
|
||||||
- if (displayRotation == Surface.ROTATION_270) {
|
|
||||||
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
|
|
||||||
+ if (displayRotation == Surface.ROTATION_270 && !isSeascapeDisabled) {
|
|
||||||
return NAV_BAR_LEFT;
|
|
||||||
- } else if (displayRotation == Surface.ROTATION_90) {
|
|
||||||
+ } else {
|
|
||||||
return NAV_BAR_RIGHT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From d0ac5ca676b4a2d27b0d0c87b8cc9599e5ecfe9a Mon Sep 17 00:00:00 2001
|
From b92f1ca708133033601f8f0e70a872c5a30052df Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 16 Oct 2021 02:23:48 +0000
|
Date: Sat, 16 Oct 2021 02:23:48 +0000
|
||||||
Subject: [PATCH 02/11] UI: Adjust default navbar layouts
|
Subject: [PATCH 04/22] UI: Adjust default navbar layouts
|
||||||
|
|
||||||
- Slightly tighten nodpi layout
|
- Slightly tighten nodpi layout
|
||||||
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
|
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
|
||||||
@@ -45,16 +45,16 @@ index 07b797a32428..000000000000
|
|||||||
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
|
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
|
||||||
-</resources>
|
-</resources>
|
||||||
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||||
index 53523e3f4f5a..94cc561f5fb0 100644
|
index 99f21ed21d15..4c386f78a27a 100644
|
||||||
--- a/packages/SystemUI/res/values/config.xml
|
--- a/packages/SystemUI/res/values/config.xml
|
||||||
+++ b/packages/SystemUI/res/values/config.xml
|
+++ b/packages/SystemUI/res/values/config.xml
|
||||||
@@ -332,7 +332,7 @@
|
@@ -301,7 +301,7 @@
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Nav bar button default ordering/layout -->
|
<!-- Nav bar button default ordering/layout -->
|
||||||
- <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
|
- <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
|
||||||
+ <string name="config_navBarLayout" translatable="false">left[.6W],back[1WC];home;recent[1WC],right[.6W]</string>
|
+ <string name="config_navBarLayout" translatable="false">left[.6W],back[1WC];home;recent[1WC],right[.6W]</string>
|
||||||
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;contextual[1.7WC]</string>
|
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;menu_ime[1.7WC]</string>
|
||||||
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
|
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
|
||||||
|
|
||||||
--
|
--
|
||||||
+7
-7
@@ -1,7 +1,7 @@
|
|||||||
From 47ff170393f48d8710192e5dafb573b56d254523 Mon Sep 17 00:00:00 2001
|
From 09662a87b7db9b520aa5f996c5b837717fadfdec Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 10 Jan 2021 11:44:29 +0000
|
Date: Sun, 10 Jan 2021 11:44:29 +0000
|
||||||
Subject: [PATCH 04/11] UI: Disable wallpaper zoom
|
Subject: [PATCH 05/22] UI: Disable wallpaper zoom
|
||||||
|
|
||||||
It does little more than inducing motion sickness
|
It does little more than inducing motion sickness
|
||||||
|
|
||||||
@@ -11,18 +11,18 @@ Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||||
index 13a0a3935691..06d2b910b038 100644
|
index f015b485dfa6..77045ea11775 100644
|
||||||
--- a/core/res/res/values/config.xml
|
--- a/core/res/res/values/config.xml
|
||||||
+++ b/core/res/res/values/config.xml
|
+++ b/core/res/res/values/config.xml
|
||||||
@@ -4844,7 +4844,7 @@
|
@@ -5206,7 +5206,7 @@
|
||||||
<string name="config_customMediaSessionPolicyProvider"></string>
|
<item name="config_wallpaperMinScale" format="float" type="dimen">1</item>
|
||||||
|
|
||||||
<!-- The max scale for the wallpaper when it's zoomed in -->
|
<!-- The max scale for the wallpaper when it's zoomed in -->
|
||||||
- <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
|
- <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
|
||||||
+ <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
|
+ <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
|
||||||
|
|
||||||
<!-- Package name that will receive an explicit manifest broadcast for
|
<!-- If true, the wallpaper will scale regardless of the value of shouldZoomOutWallpaper() -->
|
||||||
android.os.action.POWER_SAVE_MODE_CHANGED. -->
|
<bool name="config_alwaysScaleWallpaper">false</bool>
|
||||||
--
|
--
|
||||||
2.34.1
|
2.34.1
|
||||||
|
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
From 6662339ff0a5507899d0f8bca883dbef8f748f1b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 25 Sep 2022 02:20:52 +0000
|
||||||
|
Subject: [PATCH 06/22] UI: Follow Monet and light/dark theme in user 1 icon
|
||||||
|
|
||||||
|
Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8
|
||||||
|
---
|
||||||
|
core/res/res/values-night/colors.xml | 1 +
|
||||||
|
core/res/res/values/colors.xml | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/res/res/values-night/colors.xml b/core/res/res/values-night/colors.xml
|
||||||
|
index ffaccd3ddc57..e2a955b89c77 100644
|
||||||
|
--- a/core/res/res/values-night/colors.xml
|
||||||
|
+++ b/core/res/res/values-night/colors.xml
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
|
||||||
|
<color name="overview_background">@color/overview_background_dark</color>
|
||||||
|
|
||||||
|
+ <color name="user_icon_1">@color/system_accent1_100</color>
|
||||||
|
<color name="user_icon_4">#fff439a0</color><!-- pink -->
|
||||||
|
<color name="user_icon_6">#ff4ecde6</color><!-- cyan -->
|
||||||
|
<color name="user_icon_7">#fffbbc04</color><!-- yellow -->
|
||||||
|
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
|
||||||
|
index b83d3b4ea298..7586684ea936 100644
|
||||||
|
--- a/core/res/res/values/colors.xml
|
||||||
|
+++ b/core/res/res/values/colors.xml
|
||||||
|
@@ -176,7 +176,7 @@
|
||||||
|
<color name="system_notification_accent_color">#00000000</color>
|
||||||
|
|
||||||
|
<!-- Default user icon colors -->
|
||||||
|
- <color name="user_icon_1">#ffe46962</color><!-- red -->
|
||||||
|
+ <color name="user_icon_1">@color/system_accent1_600</color>
|
||||||
|
<color name="user_icon_2">#ffaf5cf7</color><!-- purple -->
|
||||||
|
<color name="user_icon_3">#ff4c8df6</color><!-- blue -->
|
||||||
|
<color name="user_icon_4">#fff439a0</color><!-- pink -->
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
-56
@@ -1,56 +0,0 @@
|
|||||||
From d1e369eda326fd4a45ac1c33ca439ecc9dab5ffd 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 06/11] 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 ++--
|
|
||||||
.../wm/shell/common/split/SplitLayout.java | 15 +--------------
|
|
||||||
2 files changed, 3 insertions(+), 16 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/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
|
||||||
index ba343cb12085..e74013346afd 100644
|
|
||||||
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
|
||||||
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
|
||||||
@@ -128,20 +128,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getDividerInsets(Resources resources, Display display) {
|
|
||||||
- final int dividerInset = resources.getDimensionPixelSize(
|
|
||||||
- com.android.internal.R.dimen.docked_stack_divider_insets);
|
|
||||||
-
|
|
||||||
- int radius = 0;
|
|
||||||
- RoundedCorner corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT);
|
|
||||||
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
|
||||||
- corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_RIGHT);
|
|
||||||
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
|
||||||
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
|
|
||||||
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
|
||||||
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
|
|
||||||
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
|
||||||
-
|
|
||||||
- return Math.max(dividerInset, radius);
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Gets bounds of the primary split. */
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From 8d4516fa71e352f6f0841053c34bb806b7ca1d73 Mon Sep 17 00:00:00 2001
|
From 2249465d16cea6251df69dd13d331ed2fae270f0 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 3 Jun 2020 01:31:34 +0000
|
Date: Wed, 3 Jun 2020 01:31:34 +0000
|
||||||
Subject: [PATCH 05/11] UI: Increase default status bar height
|
Subject: [PATCH 07/22] UI: Increase default status bar height
|
||||||
|
|
||||||
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
||||||
---
|
---
|
||||||
@@ -9,7 +9,7 @@ Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
|||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
|
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
|
||||||
index cafebcec454e..11515b57dff1 100644
|
index 2542268a153a..099a6badc034 100644
|
||||||
--- a/core/res/res/values/dimens.xml
|
--- a/core/res/res/values/dimens.xml
|
||||||
+++ b/core/res/res/values/dimens.xml
|
+++ b/core/res/res/values/dimens.xml
|
||||||
@@ -41,7 +41,7 @@
|
@@ -41,7 +41,7 @@
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
From 380d8dff252dcde3b490cc3080bd56d2e3d21ec4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 25 Sep 2022 02:20:20 +0000
|
||||||
|
Subject: [PATCH 08/22] UI: Remove QS footer background
|
||||||
|
|
||||||
|
Change-Id: I68e82e0c5e3eddb2d3f767fe792b1436eae506ef
|
||||||
|
---
|
||||||
|
packages/SystemUI/res-keyguard/layout/footer_actions.xml | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res-keyguard/layout/footer_actions.xml b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||||
|
index 544d0299060d..d45744961f59 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||||
|
@@ -23,7 +23,6 @@
|
||||||
|
android:elevation="@dimen/qs_panel_elevation"
|
||||||
|
android:paddingTop="@dimen/qs_footer_actions_top_padding"
|
||||||
|
android:paddingBottom="@dimen/qs_footer_actions_bottom_padding"
|
||||||
|
- android:background="@drawable/qs_footer_actions_background"
|
||||||
|
android:gravity="center_vertical|end"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
/>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+89
@@ -0,0 +1,89 @@
|
|||||||
|
From 9f047b03021034b2cb21e7b8c2845eb8dfd577d1 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 09/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/values-sw600dp/colors.xml | 21 +++++++++++++++++++
|
||||||
|
.../WindowManager/Shell/res/values/colors.xml | 2 +-
|
||||||
|
.../wm/shell/common/split/SplitLayout.java | 19 ++---------------
|
||||||
|
3 files changed, 24 insertions(+), 18 deletions(-)
|
||||||
|
create mode 100644 libs/WindowManager/Shell/res/values-sw600dp/colors.xml
|
||||||
|
|
||||||
|
diff --git a/libs/WindowManager/Shell/res/values-sw600dp/colors.xml b/libs/WindowManager/Shell/res/values-sw600dp/colors.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..79db59cad3c2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libs/WindowManager/Shell/res/values-sw600dp/colors.xml
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
+<!--
|
||||||
|
+/*
|
||||||
|
+ * Copyright 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.
|
||||||
|
+ * You may obtain a copy of the License at
|
||||||
|
+ *
|
||||||
|
+ * http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
+ *
|
||||||
|
+ * Unless required by applicable law or agreed to in writing, software
|
||||||
|
+ * distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
+ * See the License for the specific language governing permissions and
|
||||||
|
+ * limitations under the License.
|
||||||
|
+ */
|
||||||
|
+-->
|
||||||
|
+<resources>
|
||||||
|
+ <color name="split_divider_background">@color/taskbar_background</color>
|
||||||
|
+</resources>
|
||||||
|
diff --git a/libs/WindowManager/Shell/res/values/colors.xml b/libs/WindowManager/Shell/res/values/colors.xml
|
||||||
|
index 6fb70006e67f..906dc71d623a 100644
|
||||||
|
--- a/libs/WindowManager/Shell/res/values/colors.xml
|
||||||
|
+++ b/libs/WindowManager/Shell/res/values/colors.xml
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<color name="docked_divider_handle">#000000</color>
|
||||||
|
- <color name="split_divider_background">@color/taskbar_background</color>
|
||||||
|
+ <color name="split_divider_background">@android:color/black</color>
|
||||||
|
<drawable name="forced_resizable_background">#59000000</drawable>
|
||||||
|
<color name="minimize_dock_shadow_start">#60000000</color>
|
||||||
|
<color name="minimize_dock_shadow_end">#00000000</color>
|
||||||
|
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
||||||
|
index ffc56b6f6106..fa7d70e34dd1 100644
|
||||||
|
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
||||||
|
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
||||||
|
@@ -154,23 +154,8 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateDividerConfig(Context context) {
|
||||||
|
- final Resources resources = context.getResources();
|
||||||
|
- final Display display = context.getDisplay();
|
||||||
|
- final int dividerInset = resources.getDimensionPixelSize(
|
||||||
|
- com.android.internal.R.dimen.docked_stack_divider_insets);
|
||||||
|
- int radius = 0;
|
||||||
|
- RoundedCorner corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT);
|
||||||
|
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
||||||
|
- corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_RIGHT);
|
||||||
|
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
||||||
|
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
|
||||||
|
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
||||||
|
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
|
||||||
|
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
||||||
|
-
|
||||||
|
- mDividerInsets = Math.max(dividerInset, radius);
|
||||||
|
- mDividerSize = resources.getDimensionPixelSize(R.dimen.split_divider_bar_width);
|
||||||
|
- mDividerWindowWidth = mDividerSize + 2 * mDividerInsets;
|
||||||
|
+ mDividerWindowWidth = context.getResources().getDimensionPixelSize(
|
||||||
|
+ R.dimen.split_divider_bar_width);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Gets bounds of the primary split with screen based coordinate. */
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From 1ed6413b27ee4180cf9cef072f7b3b4dffb2bc4f Mon Sep 17 00:00:00 2001
|
From 31f4647fa3e8662e372a3dacb08a64765f29915f Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Tue, 6 Oct 2020 01:41:16 +0000
|
Date: Tue, 6 Oct 2020 01:41:16 +0000
|
||||||
Subject: [PATCH 07/11] UI: Revive navbar layout tuning via sysui_nav_bar
|
Subject: [PATCH 10/22] UI: Revive navbar layout tuning via sysui_nav_bar
|
||||||
tunable
|
tunable
|
||||||
|
|
||||||
Google keeps fixing what ain't broken.
|
Google keeps fixing what ain't broken.
|
||||||
@@ -12,7 +12,7 @@ Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352
|
|||||||
1 file changed, 15 insertions(+)
|
1 file changed, 15 insertions(+)
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||||
index eb9544c1372b..8cc9a32a1794 100644
|
index 51feed875337..5f0f9a220c31 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||||
@@ -118,6 +118,7 @@ public class NavigationBarInflaterView extends FrameLayout
|
@@ -118,6 +118,7 @@ public class NavigationBarInflaterView extends FrameLayout
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
From b4fa57280a91d884655c0cdfe2767d9277e6d238 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Sun, 17 Mar 2024 17:10:38 +0800
|
|
||||||
Subject: [PATCH 11/11] Remove debuggable requirement for signature spoofing
|
|
||||||
|
|
||||||
Change-Id: I8d637ddbbd117a9c5b1d9c5e462b0f4b30d98333
|
|
||||||
---
|
|
||||||
.../java/com/android/server/pm/PackageManagerService.java | 4 ----
|
|
||||||
1 file changed, 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
||||||
index b6c08ab5f935..f2b6e35a5392 100644
|
|
||||||
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
||||||
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
||||||
@@ -8939,10 +8939,6 @@ public class PackageManagerService extends IPackageManager.Stub
|
|
||||||
private static native boolean isDebuggable();
|
|
||||||
|
|
||||||
public static boolean isMicrogSigned(AndroidPackage p) {
|
|
||||||
- if (!isDebuggable()) {
|
|
||||||
- return false;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
// Allowlist the following apps:
|
|
||||||
// * com.android.vending - microG Companion
|
|
||||||
// * com.google.android.gms - microG Services
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From 581a0131edae00b1e1f8f1f996b9d0e9e7a3847f Mon Sep 17 00:00:00 2001
|
From d81745ad081c1e8bbabd346deb3fa5cb3b3a1017 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 26 Apr 2020 08:56:13 +0000
|
Date: Sun, 26 Apr 2020 08:56:13 +0000
|
||||||
Subject: [PATCH 08/11] UI: Use SNAP_FIXED_RATIO for multi-window globally
|
Subject: [PATCH 11/22] UI: Use SNAP_FIXED_RATIO for multi-window globally
|
||||||
|
|
||||||
Enables multiple snap targets under landscape for phone UI
|
Enables multiple snap targets under landscape for phone UI
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ index 7308dc5882c1..000000000000
|
|||||||
-</resources>
|
-</resources>
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
|
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
|
||||||
index 624581aba7dd..658654e2a63f 100644
|
index 34b6a54be493..3921c9edfeac 100644
|
||||||
--- a/core/res/res/values-sw600dp/config.xml
|
--- a/core/res/res/values-sw600dp/config.xml
|
||||||
+++ b/core/res/res/values-sw600dp/config.xml
|
+++ b/core/res/res/values-sw600dp/config.xml
|
||||||
@@ -3,16 +3,16 @@
|
@@ -3,16 +3,16 @@
|
||||||
@@ -78,10 +78,10 @@ index 624581aba7dd..658654e2a63f 100644
|
|||||||
Only applies if the device display is not square. -->
|
Only applies if the device display is not square. -->
|
||||||
<bool name="config_navBarCanMove">false</bool>
|
<bool name="config_navBarCanMove">false</bool>
|
||||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||||
index 06d2b910b038..60a4e15d93ec 100644
|
index 77045ea11775..5c9cad656654 100644
|
||||||
--- a/core/res/res/values/config.xml
|
--- a/core/res/res/values/config.xml
|
||||||
+++ b/core/res/res/values/config.xml
|
+++ b/core/res/res/values/config.xml
|
||||||
@@ -3589,7 +3589,7 @@
|
@@ -3885,7 +3885,7 @@
|
||||||
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
|
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
|
||||||
2 - 1 snap target: 1:1
|
2 - 1 snap target: 1:1
|
||||||
-->
|
-->
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
From f47f31e3e83c3c29e7c791ab2ff5c18a61d91dcc Mon Sep 17 00:00:00 2001
|
From a1b87f1cc52bd1d906554b94657634976b9fb776 Mon Sep 17 00:00:00 2001
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
Date: Tue, 3 Nov 2020 22:43:12 -0800
|
Date: Tue, 3 Nov 2020 22:43:12 -0800
|
||||||
Subject: [PATCH 09/11] 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
|
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
|
point in warning them about it because they would already be using a
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 053445b81746800f6382d385a9fe962c23cb2d59 Mon Sep 17 00:00:00 2001
|
From 8b17b1dc3b1f373a0ae8a44d16a8adec599915b3 Mon Sep 17 00:00:00 2001
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
Date: Tue, 5 Oct 2021 21:01:50 -0700
|
Date: Tue, 5 Oct 2021 21:01:50 -0700
|
||||||
Subject: [PATCH 10/11] Paint: Enable subpixel text positioning by default
|
Subject: [PATCH 13/22] Paint: Enable subpixel text positioning by default
|
||||||
|
|
||||||
On desktop Linux, subpixel text positioning is necessary to avoid
|
On desktop Linux, subpixel text positioning is necessary to avoid
|
||||||
kerning issues, and Android is no different. Even though most phone
|
kerning issues, and Android is no different. Even though most phone
|
||||||
@@ -24,10 +24,10 @@ Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
|
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
|
||||||
index 42e470b7f660..9c0036e5d716 100644
|
index f438a03b1434..6621d1f23166 100644
|
||||||
--- a/graphics/java/android/graphics/Paint.java
|
--- a/graphics/java/android/graphics/Paint.java
|
||||||
+++ b/graphics/java/android/graphics/Paint.java
|
+++ b/graphics/java/android/graphics/Paint.java
|
||||||
@@ -252,7 +252,7 @@ public class Paint {
|
@@ -260,7 +260,7 @@ public class Paint {
|
||||||
|
|
||||||
// These flags are always set on a new/reset paint, even if flags 0 is passed.
|
// These flags are always set on a new/reset paint, even if flags 0 is passed.
|
||||||
static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
|
static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
From 482d15491c36aeb11a0e8b5c9a5205d389507034 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Date: Sat, 16 Oct 2021 05:27:57 -0700
|
||||||
|
Subject: [PATCH 14/22] 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
|
||||||
|
to make sure it matches Google's official certificate.
|
||||||
|
|
||||||
|
This was forward-ported from the Android 10 patch by gudenau:
|
||||||
|
https://github.com/microg/android_packages_apps_GmsCore/pull/957
|
||||||
|
|
||||||
|
Changes made for Android 11:
|
||||||
|
- Updated PackageInfo calls
|
||||||
|
- Added new permission to public API surface, needed for
|
||||||
|
PermissionController which is now an updatable APEX on 11
|
||||||
|
- Added a dummy permission group to allow users to manage the
|
||||||
|
permission through the PermissionController UI
|
||||||
|
(by Vachounet <vachounet@live.fr>)
|
||||||
|
- Updated location provider comment for conciseness
|
||||||
|
|
||||||
|
Changes made for Android 12:
|
||||||
|
- Moved mayFakeSignature into lock-free Computer subclass
|
||||||
|
- Always get permissions for packages that request signature spoofing
|
||||||
|
(otherwise permissions are usually ommitted and thus the permission
|
||||||
|
check doesn't work properly)
|
||||||
|
- Optimize mayFakeSignature check order to improve performance
|
||||||
|
|
||||||
|
Changes made for Android 13:
|
||||||
|
- Computer subclass is now an independent class.
|
||||||
|
|
||||||
|
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
|
||||||
|
---
|
||||||
|
core/api/current.txt | 2 ++
|
||||||
|
core/res/AndroidManifest.xml | 15 ++++++++++
|
||||||
|
core/res/res/values/strings.xml | 12 ++++++++
|
||||||
|
.../com/android/server/pm/ComputerEngine.java | 30 +++++++++++++++++--
|
||||||
|
4 files changed, 56 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/api/current.txt b/core/api/current.txt
|
||||||
|
index 487e57d114c9..04e69741b9fd 100644
|
||||||
|
--- a/core/api/current.txt
|
||||||
|
+++ b/core/api/current.txt
|
||||||
|
@@ -87,6 +87,7 @@ package android {
|
||||||
|
field public static final String DUMP = "android.permission.DUMP";
|
||||||
|
field public static final String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR";
|
||||||
|
field public static final String FACTORY_TEST = "android.permission.FACTORY_TEST";
|
||||||
|
+ field public static final String FAKE_PACKAGE_SIGNATURE = "android.permission.FAKE_PACKAGE_SIGNATURE";
|
||||||
|
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";
|
||||||
|
@@ -222,6 +223,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";
|
||||||
|
+ field public static final String FAKE_PACKAGE = "android.permission-group.FAKE_PACKAGE";
|
||||||
|
field public static final String LOCATION = "android.permission-group.LOCATION";
|
||||||
|
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 bbc3a7369423..af04d9d18fbd 100644
|
||||||
|
--- a/core/res/AndroidManifest.xml
|
||||||
|
+++ b/core/res/AndroidManifest.xml
|
||||||
|
@@ -3577,6 +3577,21 @@
|
||||||
|
android:description="@string/permdesc_getPackageSize"
|
||||||
|
android:protectionLevel="normal" />
|
||||||
|
|
||||||
|
+ <!-- Dummy user-facing group for faking package signature -->
|
||||||
|
+ <permission-group android:name="android.permission-group.FAKE_PACKAGE"
|
||||||
|
+ android:label="@string/permgrouplab_fake_package_signature"
|
||||||
|
+ android:description="@string/permgroupdesc_fake_package_signature"
|
||||||
|
+ android:request="@string/permgrouprequest_fake_package_signature"
|
||||||
|
+ android:priority="100" />
|
||||||
|
+
|
||||||
|
+ <!-- Allows an application to change the package signature as
|
||||||
|
+ seen by applications -->
|
||||||
|
+ <permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE"
|
||||||
|
+ android:permissionGroup="android.permission-group.UNDEFINED"
|
||||||
|
+ android:protectionLevel="signature|privileged"
|
||||||
|
+ android:label="@string/permlab_fakePackageSignature"
|
||||||
|
+ android:description="@string/permdesc_fakePackageSignature" />
|
||||||
|
+
|
||||||
|
<!-- @deprecated No longer useful, see
|
||||||
|
{@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 2091c0502b6f..6888edcf7d3c 100644
|
||||||
|
--- a/core/res/res/values/strings.xml
|
||||||
|
+++ b/core/res/res/values/strings.xml
|
||||||
|
@@ -982,6 +982,18 @@
|
||||||
|
|
||||||
|
<!-- Permissions -->
|
||||||
|
|
||||||
|
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
|
+ <string name="permlab_fakePackageSignature">Spoof package signature</string>
|
||||||
|
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
|
+ <string name="permdesc_fakePackageSignature">Allows the app to pretend to be a different app. Malicious applications might be able to use this to access private application data. Legitimate uses include an emulator pretending to be what it emulates. Grant this permission with caution only!</string>
|
||||||
|
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
|
+ <string name="permgrouplab_fake_package_signature">Spoof package signature</string>
|
||||||
|
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
|
+ <string name="permgroupdesc_fake_package_signature">allow to spoof package signature</string>
|
||||||
|
+ <!-- Message shown to the user when the apps requests permission from this group. If ever possible this should stay below 80 characters (assuming the parameters takes 20 characters). Don't abbreviate until the message reaches 120 characters though. [CHAR LIMIT=120] -->
|
||||||
|
+ <string name="permgrouprequest_fake_package_signature">Allow
|
||||||
|
+ <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> to spoof package signature?</string>
|
||||||
|
+
|
||||||
|
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
|
<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/ComputerEngine.java b/services/core/java/com/android/server/pm/ComputerEngine.java
|
||||||
|
index 46b7460dff1b..40549962436f 100644
|
||||||
|
--- a/services/core/java/com/android/server/pm/ComputerEngine.java
|
||||||
|
+++ b/services/core/java/com/android/server/pm/ComputerEngine.java
|
||||||
|
@@ -1603,6 +1603,29 @@ public class ComputerEngine implements Computer {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private boolean requestsFakeSignature(AndroidPackage p) {
|
||||||
|
+ return p.getMetaData() != null &&
|
||||||
|
+ p.getMetaData().getString("fake-signature") != null;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private PackageInfo mayFakeSignature(AndroidPackage p, PackageInfo pi,
|
||||||
|
+ Set<String> permissions) {
|
||||||
|
+ try {
|
||||||
|
+ if (p.getMetaData() != null &&
|
||||||
|
+ p.getTargetSdkVersion() > Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||||
|
+ String sig = p.getMetaData().getString("fake-signature");
|
||||||
|
+ if (sig != null &&
|
||||||
|
+ permissions.contains("android.permission.FAKE_PACKAGE_SIGNATURE")) {
|
||||||
|
+ pi.signatures = new Signature[] {new Signature(sig)};
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ } catch (Throwable t) {
|
||||||
|
+ // We should never die because of any failures, this is system code!
|
||||||
|
+ Log.w("PackageManagerService.FAKE_PACKAGE_SIGNATURE", t);
|
||||||
|
+ }
|
||||||
|
+ return pi;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public final PackageInfo generatePackageInfo(PackageStateInternal ps,
|
||||||
|
@PackageManager.PackageInfoFlagsBits long flags, int userId) {
|
||||||
|
if (!mUserManager.exists(userId)) return null;
|
||||||
|
@@ -1632,13 +1655,14 @@ public class ComputerEngine implements Computer {
|
||||||
|
final int[] gids = (flags & PackageManager.GET_GIDS) == 0 ? EMPTY_INT_ARRAY
|
||||||
|
: mPermissionManager.getGidsForUid(UserHandle.getUid(userId, ps.getAppId()));
|
||||||
|
// Compute granted permissions only if package has requested permissions
|
||||||
|
- final Set<String> permissions = ((flags & PackageManager.GET_PERMISSIONS) == 0
|
||||||
|
+ final Set<String> permissions = (((flags & PackageManager.GET_PERMISSIONS) == 0
|
||||||
|
+ && !requestsFakeSignature(p))
|
||||||
|
|| ArrayUtils.isEmpty(p.getRequestedPermissions())) ? Collections.emptySet()
|
||||||
|
: mPermissionManager.getGrantedPermissions(ps.getPackageName(), userId);
|
||||||
|
|
||||||
|
- PackageInfo packageInfo = PackageInfoUtils.generate(p, gids, flags,
|
||||||
|
+ PackageInfo packageInfo = mayFakeSignature(p, PackageInfoUtils.generate(p, gids, flags,
|
||||||
|
state.getFirstInstallTime(), ps.getLastUpdateTime(), permissions, state, userId,
|
||||||
|
- ps);
|
||||||
|
+ ps), permissions);
|
||||||
|
|
||||||
|
if (packageInfo == null) {
|
||||||
|
return null;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+113
@@ -0,0 +1,113 @@
|
|||||||
|
From db27d27f48658841c6a74e55f543f417ddb16e76 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Date: Mon, 11 Oct 2021 19:59:51 -0700
|
||||||
|
Subject: [PATCH 15/22] Spoof product name for Google Play Services
|
||||||
|
|
||||||
|
NB: This code is under the gmscompat package, but it does not depend on
|
||||||
|
any code from gmscompat.
|
||||||
|
|
||||||
|
Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a
|
||||||
|
---
|
||||||
|
core/java/android/app/Instrumentation.java | 4 ++
|
||||||
|
.../internal/gmscompat/AttestationHooks.java | 60 +++++++++++++++++++
|
||||||
|
2 files changed, 64 insertions(+)
|
||||||
|
create mode 100644 core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
|
||||||
|
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
|
||||||
|
index 556058b567f9..44449588bbab 100644
|
||||||
|
--- a/core/java/android/app/Instrumentation.java
|
||||||
|
+++ b/core/java/android/app/Instrumentation.java
|
||||||
|
@@ -57,6 +57,8 @@ import android.view.WindowManagerGlobal;
|
||||||
|
|
||||||
|
import com.android.internal.content.ReferrerIntent;
|
||||||
|
|
||||||
|
+import com.android.internal.gmscompat.AttestationHooks;
|
||||||
|
+
|
||||||
|
import java.io.File;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
@@ -1242,6 +1244,7 @@ public class Instrumentation {
|
||||||
|
Application app = getFactory(context.getPackageName())
|
||||||
|
.instantiateApplication(cl, className);
|
||||||
|
app.attach(context);
|
||||||
|
+ AttestationHooks.initApplicationBeforeOnCreate(app);
|
||||||
|
return app;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1259,6 +1262,7 @@ public class Instrumentation {
|
||||||
|
ClassNotFoundException {
|
||||||
|
Application app = (Application)clazz.newInstance();
|
||||||
|
app.attach(context);
|
||||||
|
+ AttestationHooks.initApplicationBeforeOnCreate(app);
|
||||||
|
return app;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..55db97dc28a1
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -0,0 +1,60 @@
|
||||||
|
+/*
|
||||||
|
+ * 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.internal.gmscompat;
|
||||||
|
+
|
||||||
|
+import android.app.Application;
|
||||||
|
+import android.os.Build;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+import android.util.Log;
|
||||||
|
+
|
||||||
|
+import java.lang.reflect.Field;
|
||||||
|
+
|
||||||
|
+/** @hide */
|
||||||
|
+public final class AttestationHooks {
|
||||||
|
+ private static final String TAG = "GmsCompat/Attestation";
|
||||||
|
+
|
||||||
|
+ private static final String PACKAGE_GMS = "com.google.android.gms";
|
||||||
|
+
|
||||||
|
+ private AttestationHooks() { }
|
||||||
|
+
|
||||||
|
+ private static void setBuildField(String key, String value) {
|
||||||
|
+ try {
|
||||||
|
+ // Unlock
|
||||||
|
+ Field field = Build.class.getDeclaredField(key);
|
||||||
|
+ field.setAccessible(true);
|
||||||
|
+
|
||||||
|
+ // Edit
|
||||||
|
+ field.set(null, value);
|
||||||
|
+
|
||||||
|
+ // Lock
|
||||||
|
+ field.setAccessible(false);
|
||||||
|
+ } catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
+ Log.e(TAG, "Failed to spoof Build." + key, e);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private static void spoofBuildGms() {
|
||||||
|
+ // Alter model name to avoid hardware attestation enforcement
|
||||||
|
+ setBuildField("MODEL", "Pixel 5a");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
+ if (PACKAGE_GMS.equals(app.getPackageName())) {
|
||||||
|
+ spoofBuildGms();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+93
@@ -0,0 +1,93 @@
|
|||||||
|
From dc4bd0f140c6946e01e0a3c31bfc71c884138981 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Date: Mon, 11 Oct 2021 20:00:44 -0700
|
||||||
|
Subject: [PATCH 16/22] keystore: Block key attestation for SafetyNet
|
||||||
|
|
||||||
|
SafetyNet (part of Google Play Services) opportunistically uses
|
||||||
|
hardware-backed key attestation via KeyStore as a strong integrity
|
||||||
|
check. This causes SafetyNet to fail on custom ROMs because the verified
|
||||||
|
boot key and bootloader unlock state can be detected from attestation
|
||||||
|
certificates.
|
||||||
|
|
||||||
|
As a workaround, we can take advantage of the fact that SafetyNet's
|
||||||
|
usage of key attestation is opportunistic (i.e. falls back to basic
|
||||||
|
integrity checks if it fails) and prevent it from getting the
|
||||||
|
attestation certificate chain from KeyStore. This is done by checking
|
||||||
|
the stack for DroidGuard, which is the codename for SafetyNet, and
|
||||||
|
pretending that the device doesn't support key attestation.
|
||||||
|
|
||||||
|
Key attestation has only been blocked for SafetyNet specifically, as
|
||||||
|
Google Play Services and other apps have many valid reasons to use it.
|
||||||
|
For example, it appears to be involved in Google's mobile security key
|
||||||
|
ferature.
|
||||||
|
|
||||||
|
Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
|
||||||
|
---
|
||||||
|
.../internal/gmscompat/AttestationHooks.java | 15 +++++++++++++++
|
||||||
|
.../security/keystore2/AndroidKeyStoreSpi.java | 3 +++
|
||||||
|
2 files changed, 18 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 55db97dc28a1..f2c85c82821f 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -22,12 +22,14 @@ import android.os.SystemProperties;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
+import java.util.Arrays;
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public final class AttestationHooks {
|
||||||
|
private static final String TAG = "GmsCompat/Attestation";
|
||||||
|
|
||||||
|
private static final String PACKAGE_GMS = "com.google.android.gms";
|
||||||
|
+ private static volatile boolean sIsGms = false;
|
||||||
|
|
||||||
|
private AttestationHooks() { }
|
||||||
|
|
||||||
|
@@ -54,7 +56,20 @@ public final class AttestationHooks {
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
if (PACKAGE_GMS.equals(app.getPackageName())) {
|
||||||
|
+ sIsGms = true;
|
||||||
|
spoofBuildGms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ private static boolean isCallerSafetyNet() {
|
||||||
|
+ return Arrays.stream(Thread.currentThread().getStackTrace())
|
||||||
|
+ .anyMatch(elem -> elem.getClassName().contains("DroidGuard"));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public static void onEngineGetCertificateChain() {
|
||||||
|
+ // Check stack for SafetyNet
|
||||||
|
+ if (sIsGms && isCallerSafetyNet()) {
|
||||||
|
+ throw new UnsupportedOperationException();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
|
||||||
|
index 33411e1ec5b9..133a4094d434 100644
|
||||||
|
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
|
||||||
|
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
|
||||||
|
@@ -42,6 +42,7 @@ import android.system.keystore2.ResponseCode;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
|
+import com.android.internal.gmscompat.AttestationHooks;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
@@ -164,6 +165,8 @@ public class AndroidKeyStoreSpi extends KeyStoreSpi {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Certificate[] engineGetCertificateChain(String alias) {
|
||||||
|
+ AttestationHooks.onEngineGetCertificateChain();
|
||||||
|
+
|
||||||
|
KeyEntryResponse response = getKeyMetadata(alias);
|
||||||
|
|
||||||
|
if (response == null || response.metadata.certificate == null) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
From 05bc5fa10b4e2ebc539c32db04abbc995906ff05 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Date: Mon, 1 Nov 2021 20:06:48 -0700
|
||||||
|
Subject: [PATCH 17/22] Limit SafetyNet workarounds to unstable GMS process
|
||||||
|
|
||||||
|
The unstable process is where SafetyNet attestation actually runs, so
|
||||||
|
we only need to spoof the model in that process. Leaving other processes
|
||||||
|
fixes various issues caused by model detection and flag provisioning,
|
||||||
|
including screen-off Voice Match in Google Assistant, broken At a Glance
|
||||||
|
weather and settings on Android 12, and more.
|
||||||
|
|
||||||
|
Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
|
||||||
|
---
|
||||||
|
.../com/android/internal/gmscompat/AttestationHooks.java | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index f2c85c82821f..37ce8c946de6 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -29,6 +29,8 @@ public final class AttestationHooks {
|
||||||
|
private static final String TAG = "GmsCompat/Attestation";
|
||||||
|
|
||||||
|
private static final String PACKAGE_GMS = "com.google.android.gms";
|
||||||
|
+ private static final String PROCESS_UNSTABLE = "com.google.android.gms.unstable";
|
||||||
|
+
|
||||||
|
private static volatile boolean sIsGms = false;
|
||||||
|
|
||||||
|
private AttestationHooks() { }
|
||||||
|
@@ -55,7 +57,8 @@ public final class AttestationHooks {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
- if (PACKAGE_GMS.equals(app.getPackageName())) {
|
||||||
|
+ if (PACKAGE_GMS.equals(app.getPackageName()) &&
|
||||||
|
+ PROCESS_UNSTABLE.equals(Application.getProcessName())) {
|
||||||
|
sIsGms = true;
|
||||||
|
spoofBuildGms();
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
From ace6036332743c6f1a5614b2fd573464ddbffef7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Date: Tue, 23 Aug 2022 18:57:05 +0200
|
||||||
|
Subject: [PATCH 18/22] gmscompat: Apply the SafetyNet workaround to Play Store
|
||||||
|
aswell
|
||||||
|
|
||||||
|
Play Store is used for the new Play Integrity API, extend the hack
|
||||||
|
to it aswell
|
||||||
|
|
||||||
|
Test: Device Integrity and Basic Integrity passes.
|
||||||
|
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
|
||||||
|
---
|
||||||
|
.../android/internal/gmscompat/AttestationHooks.java | 12 ++++++++++++
|
||||||
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 37ce8c946de6..65469239a0c6 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -29,9 +29,11 @@ public final class AttestationHooks {
|
||||||
|
private static final String TAG = "GmsCompat/Attestation";
|
||||||
|
|
||||||
|
private static final String PACKAGE_GMS = "com.google.android.gms";
|
||||||
|
+ private static final String PACKAGE_FINSKY = "com.android.vending";
|
||||||
|
private static final String PROCESS_UNSTABLE = "com.google.android.gms.unstable";
|
||||||
|
|
||||||
|
private static volatile boolean sIsGms = false;
|
||||||
|
+ private static volatile boolean sIsFinsky = false;
|
||||||
|
|
||||||
|
private AttestationHooks() { }
|
||||||
|
|
||||||
|
@@ -62,6 +64,11 @@ public final class AttestationHooks {
|
||||||
|
sIsGms = true;
|
||||||
|
spoofBuildGms();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if (PACKAGE_FINSKY.equals(app.getPackageName())) {
|
||||||
|
+ sIsFinsky = true;
|
||||||
|
+ spoofBuildGms();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isCallerSafetyNet() {
|
||||||
|
@@ -74,5 +81,10 @@ public final class AttestationHooks {
|
||||||
|
if (sIsGms && isCallerSafetyNet()) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Check stack for PlayIntegrity
|
||||||
|
+ if (sIsFinsky) {
|
||||||
|
+ throw new UnsupportedOperationException();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
From d67897a23c6e182294d6a6d137d7ccc430a1abe0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Date: Thu, 8 Sep 2022 14:39:52 +0200
|
||||||
|
Subject: [PATCH 19/22] gmscompat: Use Nexus 6P fingerprint for CTS/Integrity
|
||||||
|
|
||||||
|
Google seems to have patched the KM block to Play Store in record time,
|
||||||
|
but is still not enforced for anything under android N.
|
||||||
|
|
||||||
|
Since we moved to angler FP we don't need to spoof model to Play Store
|
||||||
|
anymore, however the KM block is still needed.
|
||||||
|
|
||||||
|
Test: Run Play Intregrity Attestation
|
||||||
|
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1
|
||||||
|
---
|
||||||
|
.../com/android/internal/gmscompat/AttestationHooks.java | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 65469239a0c6..328d9777b2a2 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -54,8 +54,9 @@ public final class AttestationHooks {
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void spoofBuildGms() {
|
||||||
|
- // Alter model name to avoid hardware attestation enforcement
|
||||||
|
- setBuildField("MODEL", "Pixel 5a");
|
||||||
|
+ // Alter model name and fingerprint to avoid hardware attestation enforcement
|
||||||
|
+ setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
|
||||||
|
+ setBuildField("MODEL", "Nexus 6P");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
@@ -67,7 +68,6 @@ public final class AttestationHooks {
|
||||||
|
|
||||||
|
if (PACKAGE_FINSKY.equals(app.getPackageName())) {
|
||||||
|
sIsFinsky = true;
|
||||||
|
- spoofBuildGms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From 7893f246007a1989420583ab8728a5ced89e944d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Date: Tue, 6 Dec 2022 15:59:08 +0100
|
||||||
|
Subject: [PATCH 20/22] gmscompat: Use actual device model name
|
||||||
|
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6
|
||||||
|
---
|
||||||
|
core/java/com/android/internal/gmscompat/AttestationHooks.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 328d9777b2a2..7649bb6533da 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -56,7 +56,7 @@ public final class AttestationHooks {
|
||||||
|
private static void spoofBuildGms() {
|
||||||
|
// Alter model name and fingerprint to avoid hardware attestation enforcement
|
||||||
|
setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
|
||||||
|
- setBuildField("MODEL", "Nexus 6P");
|
||||||
|
+ setBuildField("MODEL", Build.MODEL + "\u200b");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+57
@@ -0,0 +1,57 @@
|
|||||||
|
From dd5e4484df6868958941773ac310396b281e5ceb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anirudh Gupta <anirudhgupta109@aosip.dev>
|
||||||
|
Date: Wed, 4 Jan 2023 18:20:56 +0000
|
||||||
|
Subject: [PATCH 21/22] gmscompat: Set shipping level to 32 for devices >=33
|
||||||
|
|
||||||
|
If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
|
||||||
|
setting it to 32 allows for software attestation and passing CTS
|
||||||
|
|
||||||
|
Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
---
|
||||||
|
.../internal/gmscompat/AttestationHooks.java | 18 ++++++++++++++++++
|
||||||
|
1 file changed, 18 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 7649bb6533da..d2b1d2879c9c 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -18,6 +18,7 @@ package com.android.internal.gmscompat;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import android.os.Build;
|
||||||
|
+import android.os.Build.VERSION;
|
||||||
|
import android.os.SystemProperties;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
@@ -53,10 +54,27 @@ public final class AttestationHooks {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private static void setVersionField(String key, Integer value) {
|
||||||
|
+ try {
|
||||||
|
+ // Unlock
|
||||||
|
+ Field field = Build.VERSION.class.getDeclaredField(key);
|
||||||
|
+ field.setAccessible(true);
|
||||||
|
+
|
||||||
|
+ // Edit
|
||||||
|
+ field.set(null, value);
|
||||||
|
+
|
||||||
|
+ // Lock
|
||||||
|
+ field.setAccessible(false);
|
||||||
|
+ } catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
+ Log.e(TAG, "Failed to spoof Build." + key, e);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
private static void spoofBuildGms() {
|
||||||
|
// Alter model name and fingerprint to avoid hardware attestation enforcement
|
||||||
|
setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
|
||||||
|
setBuildField("MODEL", Build.MODEL + "\u200b");
|
||||||
|
+ setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.S);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
From 4ffed064b21d9662631ee70d20dfd8441fcec574 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Date: Wed, 8 Feb 2023 15:21:01 +0000
|
||||||
|
Subject: [PATCH 22/22] gmscompat: Make CTS/Play Integrity pass again
|
||||||
|
|
||||||
|
The logic behind CTS and Play Integrity has been updated today it now
|
||||||
|
checks the product and model names against the fingerprint and if
|
||||||
|
they do not match the CTS profile will fail.
|
||||||
|
|
||||||
|
Also while we are at it use a newer FP from Pixel XL and add logging
|
||||||
|
for key attestation blocking for debugging.
|
||||||
|
|
||||||
|
Test: Boot, check for CTS and Play Integrity
|
||||||
|
|
||||||
|
Change-Id: I089d5ef935bba40338e10c795ea7d181103ffd15
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
---
|
||||||
|
.../internal/gmscompat/AttestationHooks.java | 20 +++++++++----------
|
||||||
|
1 file changed, 9 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index d2b1d2879c9c..ef7a308a25bc 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -72,9 +72,11 @@ public final class AttestationHooks {
|
||||||
|
|
||||||
|
private static void spoofBuildGms() {
|
||||||
|
// Alter model name and fingerprint to avoid hardware attestation enforcement
|
||||||
|
- setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
|
||||||
|
- setBuildField("MODEL", Build.MODEL + "\u200b");
|
||||||
|
- setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.S);
|
||||||
|
+ setBuildField("FINGERPRINT", "google/marlin/marlin:7.1.2/NJH47F/4146041:user/release-keys");
|
||||||
|
+ setBuildField("PRODUCT", "marlin");
|
||||||
|
+ setBuildField("DEVICE", "marlin");
|
||||||
|
+ setBuildField("MODEL", "Pixel XL");
|
||||||
|
+ setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.N_MR1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
@@ -90,18 +92,14 @@ public final class AttestationHooks {
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isCallerSafetyNet() {
|
||||||
|
- return Arrays.stream(Thread.currentThread().getStackTrace())
|
||||||
|
+ return sIsGms && Arrays.stream(Thread.currentThread().getStackTrace())
|
||||||
|
.anyMatch(elem -> elem.getClassName().contains("DroidGuard"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void onEngineGetCertificateChain() {
|
||||||
|
- // Check stack for SafetyNet
|
||||||
|
- if (sIsGms && isCallerSafetyNet()) {
|
||||||
|
- throw new UnsupportedOperationException();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // Check stack for PlayIntegrity
|
||||||
|
- if (sIsFinsky) {
|
||||||
|
+ // Check stack for SafetyNet or Play Integrity
|
||||||
|
+ if (isCallerSafetyNet() || sIsFinsky) {
|
||||||
|
+ Log.i(TAG, "Blocked key attestation sIsGms=" + sIsGms + " sIsFinsky=" + sIsFinsky);
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
From 6f9026e0548bd82e7b728ef29dd7d14db93b2105 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Sat, 26 Jun 2021 14:23:09 +0000
|
|
||||||
Subject: [PATCH] Jelly: MainActivity: Restore applyThemeColor
|
|
||||||
|
|
||||||
Fixes black statusbar on start
|
|
||||||
|
|
||||||
Change-Id: I6816f5b1dcb3c7bcaee2736a9e2a3ecd63217bc6
|
|
||||||
---
|
|
||||||
app/src/main/java/org/lineageos/jelly/MainActivity.kt | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/app/src/main/java/org/lineageos/jelly/MainActivity.kt b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
|
||||||
index 2902b0a..9ff74ed 100644
|
|
||||||
--- a/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
|
||||||
+++ b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
|
||||||
@@ -193,6 +193,7 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
|
|
||||||
findViewById(R.id.search_menu_cancel),
|
|
||||||
this)
|
|
||||||
setUiMode()
|
|
||||||
+ applyThemeColor(mThemeColor)
|
|
||||||
try {
|
|
||||||
val httpCacheDir = File(cacheDir, "suggestion_responses")
|
|
||||||
val httpCacheSize = 1024 * 1024.toLong() // 1 MiB
|
|
||||||
@@ -763,4 +764,4 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
|
|
||||||
private const val STORAGE_PERM_REQ = 423
|
|
||||||
private const val LOCATION_PERM_REQ = 424
|
|
||||||
}
|
|
||||||
-}
|
|
||||||
\ No newline at end of file
|
|
||||||
+}
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+15
-15
@@ -1,4 +1,4 @@
|
|||||||
From 9ee8209308b775f6cd4a104fe1cd89c9645e4742 Mon Sep 17 00:00:00 2001
|
From 3dda22bc6cad9da7d937218f157fe762dafb5d7d Mon Sep 17 00:00:00 2001
|
||||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 13 Jan 2019 21:44:48 +0800
|
Date: Sun, 13 Jan 2019 21:44:48 +0800
|
||||||
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
|
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
|
||||||
@@ -14,10 +14,10 @@ Change-Id: Icb02c8dfd84882f736e37d6cd92c35e5eb288faa
|
|||||||
6 files changed, 11 insertions(+), 11 deletions(-)
|
6 files changed, 11 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
diff --git a/res/layout/long_screen_layout.xml b/res/layout/long_screen_layout.xml
|
diff --git a/res/layout/long_screen_layout.xml b/res/layout/long_screen_layout.xml
|
||||||
index 40d0938..1119cef 100644
|
index 3252c10..ed4efd9 100644
|
||||||
--- a/res/layout/long_screen_layout.xml
|
--- a/res/layout/long_screen_layout.xml
|
||||||
+++ b/res/layout/long_screen_layout.xml
|
+++ b/res/layout/long_screen_layout.xml
|
||||||
@@ -36,7 +36,7 @@
|
@@ -25,7 +25,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
@@ -27,10 +27,10 @@ index 40d0938..1119cef 100644
|
|||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
|
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
|
||||||
index 9340e57..63a4b71 100644
|
index 9823209..a15a439 100644
|
||||||
--- a/res/values-zh-rCN/strings.xml
|
--- a/res/values-zh-rCN/strings.xml
|
||||||
+++ b/res/values-zh-rCN/strings.xml
|
+++ b/res/values-zh-rCN/strings.xml
|
||||||
@@ -434,9 +434,9 @@
|
@@ -456,9 +456,9 @@
|
||||||
<string name="display_rotation_90_title">90 度</string>
|
<string name="display_rotation_90_title">90 度</string>
|
||||||
<string name="display_rotation_180_title">180 度</string>
|
<string name="display_rotation_180_title">180 度</string>
|
||||||
<string name="display_rotation_270_title">270 度</string>
|
<string name="display_rotation_270_title">270 度</string>
|
||||||
@@ -44,10 +44,10 @@ index 9340e57..63a4b71 100644
|
|||||||
<string name="charging_sounds_enable_title">启用充电提示音</string>
|
<string name="charging_sounds_enable_title">启用充电提示音</string>
|
||||||
<string name="charging_sounds_summary">连接或断开电源时发出声音</string>
|
<string name="charging_sounds_summary">连接或断开电源时发出声音</string>
|
||||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
index 9fe4181..998a5f6 100644
|
index 0358a7e..5996a8f 100644
|
||||||
--- a/res/values/strings.xml
|
--- a/res/values/strings.xml
|
||||||
+++ b/res/values/strings.xml
|
+++ b/res/values/strings.xml
|
||||||
@@ -567,9 +567,9 @@
|
@@ -579,9 +579,9 @@
|
||||||
<string name="display_rotation_270_title">270 degrees</string>
|
<string name="display_rotation_270_title">270 degrees</string>
|
||||||
|
|
||||||
<!-- Applications: Long screen -->
|
<!-- Applications: Long screen -->
|
||||||
@@ -61,22 +61,22 @@ index 9fe4181..998a5f6 100644
|
|||||||
<!-- Sounds: Charging sounds -->
|
<!-- Sounds: Charging sounds -->
|
||||||
<string name="charging_sounds_settings_title">Charging sounds</string>
|
<string name="charging_sounds_settings_title">Charging sounds</string>
|
||||||
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
|
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
|
||||||
index ec947fa..20da90a 100644
|
index 9a4f7bb..ece52c9 100644
|
||||||
--- a/res/xml/long_screen_prefs.xml
|
--- a/res/xml/long_screen_prefs.xml
|
||||||
+++ b/res/xml/long_screen_prefs.xml
|
+++ b/res/xml/long_screen_prefs.xml
|
||||||
@@ -18,6 +18,6 @@
|
@@ -6,6 +6,6 @@
|
||||||
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:lineage="http://schemas.android.com/apk/res/org.lineageos.lineageparts"
|
|
||||||
android:key="long_screen_settings"
|
android:key="long_screen_settings"
|
||||||
- android:title="@string/long_screen_settings_title">
|
- android:title="@string/long_screen_settings_title">
|
||||||
+ android:title="@string/inverse_long_screen_settings_title">
|
+ android:title="@string/inverse_long_screen_settings_title">
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
|
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
|
||||||
index 803b214..6f61e9d 100644
|
index d6b19c0..6e65a31 100644
|
||||||
--- a/res/xml/parts_catalog.xml
|
--- a/res/xml/parts_catalog.xml
|
||||||
+++ b/res/xml/parts_catalog.xml
|
+++ b/res/xml/parts_catalog.xml
|
||||||
@@ -81,8 +81,8 @@
|
@@ -75,8 +75,8 @@
|
||||||
lineage:xmlRes="@xml/power_menu_settings" />
|
lineage:xmlRes="@xml/power_menu_settings" />
|
||||||
|
|
||||||
<part android:key="long_screen_settings"
|
<part android:key="long_screen_settings"
|
||||||
@@ -88,10 +88,10 @@ index 803b214..6f61e9d 100644
|
|||||||
lineage:xmlRes="@xml/long_screen_prefs" />
|
lineage:xmlRes="@xml/long_screen_prefs" />
|
||||||
|
|
||||||
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
index ac04058..50ff8f6 100644
|
index 7155e12..4b89260 100644
|
||||||
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
@@ -246,7 +246,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
|
@@ -222,7 +222,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
|
||||||
mApplicationsState.ensureIcon(entry);
|
mApplicationsState.ensureIcon(entry);
|
||||||
holder.icon.setImageDrawable(entry.icon);
|
holder.icon.setImageDrawable(entry.icon);
|
||||||
holder.state.setTag(entry);
|
holder.state.setTag(entry);
|
||||||
@@ -101,5 +101,5 @@ index ac04058..50ff8f6 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+15
-3
@@ -1,4 +1,4 @@
|
|||||||
From 3f7f3f9546f9f23d66381f7dff887cd562285ce6 Mon Sep 17 00:00:00 2001
|
From c93f729acb568f290085cea4014fbe384ec40289 Mon Sep 17 00:00:00 2001
|
||||||
From: Paul Keith <javelinanddart@gmail.com>
|
From: Paul Keith <javelinanddart@gmail.com>
|
||||||
Date: Tue, 30 Oct 2018 15:46:18 +0100
|
Date: Tue, 30 Oct 2018 15:46:18 +0100
|
||||||
Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
|
Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
|
||||||
@@ -7,6 +7,7 @@ Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
|
|||||||
Change-Id: I7194dca022e5062926fa35709de282721ca64320
|
Change-Id: I7194dca022e5062926fa35709de282721ca64320
|
||||||
---
|
---
|
||||||
res/drawable/ic_wear_read.xml | 9 +++++++++
|
res/drawable/ic_wear_read.xml | 9 +++++++++
|
||||||
|
res/values-zh-rCN/cm_strings.xml | 1 +
|
||||||
res/values/cm_strings.xml | 3 +++
|
res/values/cm_strings.xml | 3 +++
|
||||||
.../messaging/datamodel/BugleNotifications.java | 14 ++++++++++++++
|
.../messaging/datamodel/BugleNotifications.java | 14 ++++++++++++++
|
||||||
.../datamodel/MessageNotificationState.java | 8 ++++++++
|
.../datamodel/MessageNotificationState.java | 8 ++++++++
|
||||||
@@ -14,7 +15,7 @@ Change-Id: I7194dca022e5062926fa35709de282721ca64320
|
|||||||
.../messaging/receiver/NotificationReceiver.java | 12 +++++++++++-
|
.../messaging/receiver/NotificationReceiver.java | 12 +++++++++++-
|
||||||
src/com/android/messaging/ui/UIIntents.java | 11 +++++++++++
|
src/com/android/messaging/ui/UIIntents.java | 11 +++++++++++
|
||||||
src/com/android/messaging/ui/UIIntentsImpl.java | 14 ++++++++++++++
|
src/com/android/messaging/ui/UIIntentsImpl.java | 14 ++++++++++++++
|
||||||
8 files changed, 81 insertions(+), 2 deletions(-)
|
9 files changed, 82 insertions(+), 2 deletions(-)
|
||||||
create mode 100644 res/drawable/ic_wear_read.xml
|
create mode 100644 res/drawable/ic_wear_read.xml
|
||||||
|
|
||||||
diff --git a/res/drawable/ic_wear_read.xml b/res/drawable/ic_wear_read.xml
|
diff --git a/res/drawable/ic_wear_read.xml b/res/drawable/ic_wear_read.xml
|
||||||
@@ -32,6 +33,17 @@ index 0000000..9d017e6
|
|||||||
+ android:fillColor="#ffffff"
|
+ android:fillColor="#ffffff"
|
||||||
+ android:pathData="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z" />
|
+ android:pathData="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z" />
|
||||||
+</vector>
|
+</vector>
|
||||||
|
diff --git a/res/values-zh-rCN/cm_strings.xml b/res/values-zh-rCN/cm_strings.xml
|
||||||
|
index 3cfebff..f1ffeab 100644
|
||||||
|
--- a/res/values-zh-rCN/cm_strings.xml
|
||||||
|
+++ b/res/values-zh-rCN/cm_strings.xml
|
||||||
|
@@ -19,5 +19,6 @@
|
||||||
|
<string name="swipe_to_delete_conversation_pref_summary">向右滑动以删除会话</string>
|
||||||
|
<string name="show_emoticons_pref_title">访问表情符号</string>
|
||||||
|
<string name="show_emoticons_pref_summary">在键盘上显示表情符号键</string>
|
||||||
|
+ <string name="notification_mark_as_read">标记为已读</string>
|
||||||
|
<string name="notification_channel_messages_title">短信</string>
|
||||||
|
</resources>
|
||||||
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
||||||
index f285555..858f093 100644
|
index f285555..858f093 100644
|
||||||
--- a/res/values/cm_strings.xml
|
--- a/res/values/cm_strings.xml
|
||||||
@@ -219,5 +231,5 @@ index d64082d..9281899 100644
|
|||||||
* Gets a PendingIntent associated with an Intent to start an Activity. All notifications
|
* Gets a PendingIntent associated with an Intent to start an Activity. All notifications
|
||||||
* that starts an Activity must use this method to get a PendingIntent, which achieves two
|
* that starts an Activity must use this method to get a PendingIntent, which achieves two
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+14
-14
@@ -1,4 +1,4 @@
|
|||||||
From 4c2395403ad6cc13c07f50889779a26404c1b096 Mon Sep 17 00:00:00 2001
|
From 316e6779dde5db01258fcf5139e1d4a33933b114 Mon Sep 17 00:00:00 2001
|
||||||
From: Vachounet <vachounet@live.fr>
|
From: Vachounet <vachounet@live.fr>
|
||||||
Date: Mon, 26 Oct 2020 17:05:18 +0100
|
Date: Mon, 26 Oct 2020 17:05:18 +0100
|
||||||
Subject: [PATCH] Trebuchet: Move clear all button to actions view
|
Subject: [PATCH] Trebuchet: Move clear all button to actions view
|
||||||
@@ -73,10 +73,10 @@ index 0fda0bf8d4..9a6f5ae062 100644
|
|||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
+</com.android.quickstep.views.OverviewActionsView>
|
+</com.android.quickstep.views.OverviewActionsView>
|
||||||
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
||||||
index 15feb18367..dcd172170b 100644
|
index 8b5f091e11..601021b5bf 100644
|
||||||
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
||||||
+++ b/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> {
|
@@ -106,7 +106,7 @@ public class RecentsState implements BaseState<RecentsState> {
|
||||||
* For this state, whether clear all button should be shown.
|
* For this state, whether clear all button should be shown.
|
||||||
*/
|
*/
|
||||||
public boolean hasClearAllButton() {
|
public boolean hasClearAllButton() {
|
||||||
@@ -86,10 +86,10 @@ index 15feb18367..dcd172170b 100644
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
||||||
index e0395ea5aa..dd6fb70de9 100644
|
index 6c27587058..dbaf180e68 100644
|
||||||
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
||||||
+++ b/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
|
@@ -143,8 +143,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher
|
||||||
super.setOverviewStateEnabled(enabled);
|
super.setOverviewStateEnabled(enabled);
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
LauncherState state = mActivity.getStateManager().getState();
|
LauncherState state = mActivity.getStateManager().getState();
|
||||||
@@ -98,12 +98,12 @@ index e0395ea5aa..dd6fb70de9 100644
|
|||||||
+ boolean hasClearAllButton = false;
|
+ boolean hasClearAllButton = false;
|
||||||
setDisallowScrollToClearAll(!hasClearAllButton);
|
setDisallowScrollToClearAll(!hasClearAllButton);
|
||||||
}
|
}
|
||||||
}
|
if (mActivity.getDesktopVisibilityController() != null) {
|
||||||
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
index eb107d4964..c0e4429804 100644
|
index 5e645ea917..0dc0b3b62e 100644
|
||||||
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
@@ -104,6 +104,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
|
@@ -117,6 +117,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
|
||||||
import android.view.accessibility.AccessibilityEvent;
|
import android.view.accessibility.AccessibilityEvent;
|
||||||
import android.view.accessibility.AccessibilityNodeInfo;
|
import android.view.accessibility.AccessibilityNodeInfo;
|
||||||
import android.view.animation.Interpolator;
|
import android.view.animation.Interpolator;
|
||||||
@@ -111,15 +111,15 @@ index eb107d4964..c0e4429804 100644
|
|||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.OverScroller;
|
import android.widget.OverScroller;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
@@ -425,6 +426,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
@@ -472,6 +473,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
private final int mScrollHapticMinGapMillis;
|
|
||||||
private final RecentsModel mModel;
|
private final RecentsModel mModel;
|
||||||
private final int mSplitPlaceholderSize;
|
private final int mSplitPlaceholderSize;
|
||||||
|
private final int mSplitPlaceholderInset;
|
||||||
+ private Button mActionClearAllButton;
|
+ private Button mActionClearAllButton;
|
||||||
private final ClearAllButton mClearAllButton;
|
private final ClearAllButton mClearAllButton;
|
||||||
private final Rect mClearAllButtonDeadZoneRect = new Rect();
|
private final Rect mClearAllButtonDeadZoneRect = new Rect();
|
||||||
private final Rect mTaskViewDeadZoneRect = new Rect();
|
private final Rect mTaskViewDeadZoneRect = new Rect();
|
||||||
@@ -860,6 +862,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
@@ -976,6 +978,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
mActionsView = actionsView;
|
mActionsView = actionsView;
|
||||||
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
|
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
|
||||||
mSplitSelectStateController = splitController;
|
mSplitSelectStateController = splitController;
|
||||||
@@ -127,8 +127,8 @@ index eb107d4964..c0e4429804 100644
|
|||||||
+ mActionClearAllButton.setOnClickListener(this::dismissAllTasks);
|
+ mActionClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SplitSelectStateController getSplitPlaceholder() {
|
public SplitSelectStateController getSplitSelectController() {
|
||||||
@@ -1157,7 +1161,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
@@ -1342,7 +1346,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
* button fully visible, center page is Clear All button.
|
* button fully visible, center page is Clear All button.
|
||||||
*/
|
*/
|
||||||
public boolean isClearAllHidden() {
|
public boolean isClearAllHidden() {
|
||||||
@@ -138,5 +138,5 @@ index eb107d4964..c0e4429804 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
From 2270e02fcbb2b3bae7fb16ab0f2b81b589b8aa7e Mon Sep 17 00:00:00 2001
|
From 80d66b7f255176e7cf761ce9c62c436cb729df71 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 5 Sep 2019 02:08:22 +0000
|
Date: Thu, 5 Sep 2019 02:08:22 +0000
|
||||||
Subject: [PATCH 1/2] vendor_lineage: Log privapp-permissions whitelist
|
Subject: [PATCH 1/2] vendor_lineage: Log privapp-permissions whitelist
|
||||||
@@ -10,7 +10,7 @@ Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
|
|||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/config/common.mk b/config/common.mk
|
diff --git a/config/common.mk b/config/common.mk
|
||||||
index 584ecbc3..08f9b0e1 100644
|
index 7048c9cb..9dc5c710 100644
|
||||||
--- a/config/common.mk
|
--- a/config/common.mk
|
||||||
+++ b/config/common.mk
|
+++ b/config/common.mk
|
||||||
@@ -74,9 +74,9 @@ PRODUCT_COPY_FILES += \
|
@@ -74,9 +74,9 @@ PRODUCT_COPY_FILES += \
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 0d6bfed52c387c47ce3165766771d3f899bc0ca8 Mon Sep 17 00:00:00 2001
|
From 9218670153d5aa40fd05f51d89240fc7859293a2 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Mon, 14 Mar 2022 03:44:59 +0000
|
Date: Mon, 14 Mar 2022 03:44:59 +0000
|
||||||
Subject: [PATCH 2/2] Revert "overlay: Default to night mode"
|
Subject: [PATCH 2/2] Revert "overlay: Default to night mode"
|
||||||
@@ -11,14 +11,13 @@ Change-Id: I036bdd576e536392cf41e3c536d5ca2eb04e5a0f
|
|||||||
1 file changed, 8 deletions(-)
|
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
|
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 ee5bc917..4a4ae958 100644
|
index 94687fe1..579b98f7 100644
|
||||||
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
|
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
|
||||||
+++ b/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 @@
|
@@ -146,14 +146,6 @@
|
||||||
<bool name="config_supportsMicToggle">true</bool>
|
|
||||||
<!-- Whether this device is supporting the camera toggle -->
|
<!-- Whether this device is supporting the camera toggle -->
|
||||||
<bool name="config_supportsCamToggle">true</bool>
|
<bool name="config_supportsCamToggle">true</bool>
|
||||||
-
|
|
||||||
- <!-- Control the default night mode to use when there is no other mode override set.
|
- <!-- Control the default night mode to use when there is no other mode override set.
|
||||||
- One of the following values (see UiModeManager.java):
|
- One of the following values (see UiModeManager.java):
|
||||||
- 0 - MODE_NIGHT_AUTO
|
- 0 - MODE_NIGHT_AUTO
|
||||||
@@ -26,7 +25,10 @@ index ee5bc917..4a4ae958 100644
|
|||||||
- 2 - MODE_NIGHT_YES
|
- 2 - MODE_NIGHT_YES
|
||||||
- -->
|
- -->
|
||||||
- <integer name="config_defaultNightMode">2</integer>
|
- <integer name="config_defaultNightMode">2</integer>
|
||||||
</resources>
|
-
|
||||||
|
<!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
|
||||||
|
in hardware. -->
|
||||||
|
<bool name="config_setColorTransformAccelerated">true</bool>
|
||||||
--
|
--
|
||||||
2.25.1
|
2.25.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
From 2a0ccee75e3fd1ab7d5ef27fd46c9e6d41eed9d6 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 1/2] SearchLauncher: Adapt to Trebuchet
|
|
||||||
|
|
||||||
---
|
|
||||||
apps/SearchLauncher/Android.mk | 4 ++--
|
|
||||||
apps/SearchLauncher/AndroidManifest.xml | 5 +++--
|
|
||||||
.../quickstep/res/layout/search_container_all_apps.xml | 2 +-
|
|
||||||
3 files changed, 6 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/apps/SearchLauncher/Android.mk b/apps/SearchLauncher/Android.mk
|
|
||||||
index a9f182a..6b90364 100644
|
|
||||||
--- a/apps/SearchLauncher/Android.mk
|
|
||||||
+++ b/apps/SearchLauncher/Android.mk
|
|
||||||
@@ -20,7 +20,7 @@ include $(BUILD_PREBUILT)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# Relative path for Launcher3 directory
|
|
||||||
-LAUNCHER_PATH := ../../../../packages/apps/Launcher3
|
|
||||||
+LAUNCHER_PATH := ../../../../packages/apps/Trebuchet
|
|
||||||
|
|
||||||
LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := lib_launcherClient
|
|
||||||
@@ -59,7 +59,7 @@ include $(BUILD_PACKAGE)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# Relative path for Launcher3 directory
|
|
||||||
-LAUNCHER_PATH := ../../../../packages/apps/Launcher3
|
|
||||||
+LAUNCHER_PATH := ../../../../packages/apps/Trebuchet
|
|
||||||
|
|
||||||
LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
diff --git a/apps/SearchLauncher/AndroidManifest.xml b/apps/SearchLauncher/AndroidManifest.xml
|
|
||||||
index d5ffded..5a249b5 100644
|
|
||||||
--- a/apps/SearchLauncher/AndroidManifest.xml
|
|
||||||
+++ b/apps/SearchLauncher/AndroidManifest.xml
|
|
||||||
@@ -51,11 +51,12 @@
|
|
||||||
android:fullBackupOnly="true"
|
|
||||||
android:fullBackupContent="@xml/backupscheme"
|
|
||||||
android:hardwareAccelerated="true"
|
|
||||||
- android:icon="@drawable/ic_launcher_home"
|
|
||||||
+ android:icon="@mipmap/ic_launcher"
|
|
||||||
android:label="@string/derived_app_name"
|
|
||||||
android:largeHeap="@bool/config_largeHeap"
|
|
||||||
android:restoreAnyVersion="true"
|
|
||||||
- android:supportsRtl="true" >
|
|
||||||
+ android:supportsRtl="true"
|
|
||||||
+ tools:replace="android:icon" >
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name="com.android.searchlauncher.SearchLauncher"
|
|
||||||
diff --git a/apps/SearchLauncher/quickstep/res/layout/search_container_all_apps.xml b/apps/SearchLauncher/quickstep/res/layout/search_container_all_apps.xml
|
|
||||||
index 1fae132..82ccf38 100644
|
|
||||||
--- a/apps/SearchLauncher/quickstep/res/layout/search_container_all_apps.xml
|
|
||||||
+++ b/apps/SearchLauncher/quickstep/res/layout/search_container_all_apps.xml
|
|
||||||
@@ -47,7 +47,7 @@
|
|
||||||
android:scrollHorizontally="true"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
- android:textColorHint="@drawable/all_apps_search_hint"
|
|
||||||
+ android:textColorHint="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:visibility="invisible" />
|
|
||||||
</com.android.searchlauncher.HotseatQsbWidget>
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
From a17bd2428ec11241769a53c54cfba01303c95c81 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
|
|
||||||
|
|
||||||
+7
-7
@@ -1,4 +1,4 @@
|
|||||||
From e5c811e641abc8088cad017fdb8e282ef6899ed1 Mon Sep 17 00:00:00 2001
|
From 45ce666776f48f82151a4fc3c8a3219f3e4c210f Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 20 Jun 2021 09:08:43 +0000
|
Date: Sun, 20 Jun 2021 09:08:43 +0000
|
||||||
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2)
|
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2)
|
||||||
@@ -9,7 +9,7 @@ Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61
|
|||||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
|
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
|
||||||
index f0627a307..13cc396e7 100755
|
index c00e1e98b..490d15215 100755
|
||||||
--- a/tools/buildinfo.sh
|
--- a/tools/buildinfo.sh
|
||||||
+++ b/tools/buildinfo.sh
|
+++ b/tools/buildinfo.sh
|
||||||
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then
|
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then
|
||||||
@@ -21,7 +21,7 @@ index f0627a307..13cc396e7 100755
|
|||||||
echo "ro.build.version.incremental=$BUILD_NUMBER"
|
echo "ro.build.version.incremental=$BUILD_NUMBER"
|
||||||
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
|
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
|
||||||
echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
|
echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
|
||||||
@@ -21,7 +21,7 @@ echo "ro.build.version.release_or_codename=$PLATFORM_VERSION"
|
@@ -23,7 +23,7 @@ echo "ro.build.version.release_or_preview_display=$PLATFORM_DISPLAY_VERSION"
|
||||||
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
|
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
|
||||||
echo "ro.build.version.base_os=$PLATFORM_BASE_OS"
|
echo "ro.build.version.base_os=$PLATFORM_BASE_OS"
|
||||||
echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION"
|
echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION"
|
||||||
@@ -30,13 +30,13 @@ index f0627a307..13cc396e7 100755
|
|||||||
echo "ro.build.date.utc=`$DATE +%s`"
|
echo "ro.build.date.utc=`$DATE +%s`"
|
||||||
echo "ro.build.type=$TARGET_BUILD_TYPE"
|
echo "ro.build.type=$TARGET_BUILD_TYPE"
|
||||||
echo "ro.build.user=$BUILD_USERNAME"
|
echo "ro.build.user=$BUILD_USERNAME"
|
||||||
@@ -56,5 +56,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then
|
@@ -58,5 +58,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "ro.lineage.device=$LINEAGE_DEVICE"
|
echo "ro.lineage.device=$LINEAGE_DEVICE"
|
||||||
+echo "ro.lineage.version=LineageOS 19.1 Self-built CGMod"
|
+echo "ro.lineage.version=LineageOS 20 Self-built CGMod"
|
||||||
+echo "ro.lineage.display.version=LineageOS 19.1 Self-built CGMod"
|
+echo "ro.lineage.display.version=LineageOS 20 Self-built CGMod"
|
||||||
+echo "ro.modversion=LineageOS 19.1 Self-built CGMod"
|
+echo "ro.modversion=LineageOS 20 Self-built CGMod"
|
||||||
+
|
+
|
||||||
+echo "lockscreen.rot_override=true"
|
+echo "lockscreen.rot_override=true"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 537feb3970057cd71a77387a40c0f5b6d6fe5dfb Mon Sep 17 00:00:00 2001
|
From 1c0c37fd29fb20537eca319cd5c3874127414d8a Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 16 Oct 2021 00:39:15 +0000
|
Date: Sat, 16 Oct 2021 00:39:15 +0000
|
||||||
Subject: [PATCH 2/2] build: Remove Stk (1/2)
|
Subject: [PATCH 2/2] build: Remove Stk (1/2)
|
||||||
@@ -9,7 +9,7 @@ Change-Id: I24ef17c74c3137a11b463cde96c74d0edc853edd
|
|||||||
1 file changed, 1 deletion(-)
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
|
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
|
||||||
index f13c9db4d..a559e244d 100644
|
index 1a639ef71..49a080076 100644
|
||||||
--- a/target/product/generic_system.mk
|
--- a/target/product/generic_system.mk
|
||||||
+++ b/target/product/generic_system.mk
|
+++ b/target/product/generic_system.mk
|
||||||
@@ -32,7 +32,6 @@ PRODUCT_PACKAGES += \
|
@@ -32,7 +32,6 @@ PRODUCT_PACKAGES += \
|
||||||
|
|||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
From 64c0e12dc7a4eb6add7631a84dda17e2012f687c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 18 Jun 2023 19:33:27 +0800
|
||||||
|
Subject: [PATCH 01/21] Add keylayout for Backbone One for Android, with AB/XY
|
||||||
|
keys swapped
|
||||||
|
|
||||||
|
Change-Id: Ia057c084099015b544c926cd57c37b4ac314867a
|
||||||
|
---
|
||||||
|
data/keyboards/Vendor_358a_Product_0201.kl | 31 ++++++++++++++++++++++
|
||||||
|
1 file changed, 31 insertions(+)
|
||||||
|
create mode 100644 data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
|
||||||
|
diff --git a/data/keyboards/Vendor_358a_Product_0201.kl b/data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..e15907f9c6f2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
@@ -0,0 +1,31 @@
|
||||||
|
+#
|
||||||
|
+# Backbone One for Android
|
||||||
|
+#
|
||||||
|
+
|
||||||
|
+# AB/XY swapped
|
||||||
|
+key 305 BUTTON_A
|
||||||
|
+key 304 BUTTON_B
|
||||||
|
+key 308 BUTTON_X
|
||||||
|
+key 307 BUTTON_Y
|
||||||
|
+
|
||||||
|
+key 310 BUTTON_L1
|
||||||
|
+key 311 BUTTON_R1
|
||||||
|
+key 312 BUTTON_L2
|
||||||
|
+key 313 BUTTON_R2
|
||||||
|
+
|
||||||
|
+key 317 BUTTON_THUMBL
|
||||||
|
+key 318 BUTTON_THUMBR
|
||||||
|
+
|
||||||
|
+axis 0x00 X flat 4096
|
||||||
|
+axis 0x01 Y flat 4096
|
||||||
|
+axis 0x02 Z flat 4096
|
||||||
|
+axis 0x05 RZ flat 4096
|
||||||
|
+
|
||||||
|
+axis 0x0a LTRIGGER
|
||||||
|
+axis 0x09 RTRIGGER
|
||||||
|
+
|
||||||
|
+axis 0x10 HAT_X
|
||||||
|
+axis 0x11 HAT_Y
|
||||||
|
+
|
||||||
|
+key 315 BUTTON_START
|
||||||
|
+key 314 BUTTON_SELECT
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 25d9150d8e100259647ba248fdc13ccd23497137 Mon Sep 17 00:00:00 2001
|
From 2e9df83d63b2c316a6cec6fcbc253ef0919cf5d3 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 20 Jun 2021 03:39:32 +0000
|
Date: Sun, 20 Jun 2021 03:39:32 +0000
|
||||||
Subject: [PATCH 01/19] Add MiuiNavbarOverlay
|
Subject: [PATCH 02/21] Add MiuiNavbarOverlay
|
||||||
|
|
||||||
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
|
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
|
||||||
---
|
---
|
||||||
@@ -29,7 +29,7 @@ Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
|
|||||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
|
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
|
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
|
||||||
index 3a114bc8ec79..8028b5bb9c2b 100644
|
index 69641e69a9f2..1efc296d9689 100644
|
||||||
--- a/packages/overlays/Android.mk
|
--- a/packages/overlays/Android.mk
|
||||||
+++ b/packages/overlays/Android.mk
|
+++ b/packages/overlays/Android.mk
|
||||||
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \
|
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \
|
||||||
@@ -385,5 +385,5 @@ literal 0
|
|||||||
HcmV?d00001
|
HcmV?d00001
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 05ac45a37799322ddb9774326359a3414fb7f8d8 Mon Sep 17 00:00:00 2001
|
From cf35535a94712e9f81d9532fa4a494a8628b4641 Mon Sep 17 00:00:00 2001
|
||||||
From: Hikari-no-Tenshi <kyryljan.serhij@gmail.com>
|
From: Hikari-no-Tenshi <kyryljan.serhij@gmail.com>
|
||||||
Date: Thu, 30 Jan 2020 22:20:54 +0200
|
Date: Thu, 30 Jan 2020 22:20:54 +0200
|
||||||
Subject: [PATCH 02/19] Disable Bluetooth by default
|
Subject: [PATCH 03/21] Disable Bluetooth by default
|
||||||
|
|
||||||
Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c
|
Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c
|
||||||
---
|
---
|
||||||
@@ -9,7 +9,7 @@ Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
|
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
|
||||||
index 8e6e251ff3f2..53324ba4d966 100644
|
index 99b15db780dc..cff3e668f053 100644
|
||||||
--- a/packages/SettingsProvider/res/values/defaults.xml
|
--- a/packages/SettingsProvider/res/values/defaults.xml
|
||||||
+++ b/packages/SettingsProvider/res/values/defaults.xml
|
+++ b/packages/SettingsProvider/res/values/defaults.xml
|
||||||
@@ -36,7 +36,7 @@
|
@@ -36,7 +36,7 @@
|
||||||
@@ -22,5 +22,5 @@ index 8e6e251ff3f2..53324ba4d966 100644
|
|||||||
<bool name="def_install_non_market_apps">false</bool>
|
<bool name="def_install_non_market_apps">false</bool>
|
||||||
<!-- 0 == off, 3 == on -->
|
<!-- 0 == off, 3 == on -->
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
From 938658e1a31d80907f8f3f616710b27efb5aa74f Mon Sep 17 00:00:00 2001
|
|
||||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Fri, 22 Mar 2019 00:41:20 +0800
|
|
||||||
Subject: [PATCH 04/19] Disable FP lockouts
|
|
||||||
|
|
||||||
Both timed and permanent lockouts - GET THE FUCK OUT
|
|
||||||
Now targeting LockoutFramework, introduced in Android 12
|
|
||||||
|
|
||||||
Change-Id: I2d4b091f3546d4d7903bfb4d5585629212dc9915
|
|
||||||
---
|
|
||||||
.../fingerprint/hidl/LockoutFrameworkImpl.java | 17 +----------------
|
|
||||||
1 file changed, 1 insertion(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
|
||||||
index dc5dace98825..386e4f868e8d 100644
|
|
||||||
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
|
||||||
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
|
||||||
@@ -100,25 +100,10 @@ public class LockoutFrameworkImpl implements LockoutTracker {
|
|
||||||
mLockoutResetCallback.onLockoutReset(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
- void addFailedAttemptForUser(int userId) {
|
|
||||||
- mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
|
|
||||||
- mTimedLockoutCleared.put(userId, false);
|
|
||||||
-
|
|
||||||
- if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
|
|
||||||
- scheduleLockoutResetForUser(userId);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ void addFailedAttemptForUser(int userId) {}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @LockoutMode int getLockoutModeForUser(int userId) {
|
|
||||||
- final int failedAttempts = mFailedAttempts.get(userId, 0);
|
|
||||||
- if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
|
|
||||||
- return LOCKOUT_PERMANENT;
|
|
||||||
- } else if (failedAttempts > 0
|
|
||||||
- && !mTimedLockoutCleared.get(userId, false)
|
|
||||||
- && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
|
|
||||||
- return LOCKOUT_TIMED;
|
|
||||||
- }
|
|
||||||
return LOCKOUT_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From 21208235ad12f038f80f22416992ada15d1a3868 Mon Sep 17 00:00:00 2001
|
From 8201fef9ab532374796549c938ea2fc172bf20f5 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Mon, 27 Sep 2021 16:30:00 +0000
|
Date: Mon, 27 Sep 2021 16:30:00 +0000
|
||||||
Subject: [PATCH 03/19] Disable cursor drag by default for editable TextViews
|
Subject: [PATCH 04/21] Disable cursor drag by default for editable TextViews
|
||||||
|
|
||||||
Requested by @TadiT7
|
Requested by @TadiT7
|
||||||
|
|
||||||
@@ -24,5 +24,5 @@ index fb40ee5ec843..c0c6fb6e9431 100644
|
|||||||
/**
|
/**
|
||||||
* Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
|
* Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+12
-8
@@ -1,25 +1,29 @@
|
|||||||
From 4a72033948d6fb7bbef8b4c4233d0f8077f83ae1 Mon Sep 17 00:00:00 2001
|
From 0dba3680960846702881fed2b3e716825af92d58 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 3 Jul 2022 00:08:42 +0000
|
Date: Sun, 3 Jul 2022 00:08:42 +0000
|
||||||
Subject: [PATCH 05/19] Disable "RESTRICTED bucket" toast
|
Subject: [PATCH 05/21] Disable "RESTRICTED bucket" toast
|
||||||
|
|
||||||
Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8
|
Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8
|
||||||
---
|
---
|
||||||
.../server/usage/AppStandbyController.java | 16 +---------------
|
.../server/usage/AppStandbyController.java | 20 +------------------
|
||||||
1 file changed, 1 insertion(+), 15 deletions(-)
|
1 file changed, 1 insertion(+), 19 deletions(-)
|
||||||
|
|
||||||
diff --git a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
diff --git a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
||||||
index 4b081d258fd4..ded38c55325a 100644
|
index b27ff411dd58..5ce49bd98c5c 100644
|
||||||
--- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
--- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
||||||
+++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
+++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
||||||
@@ -1493,21 +1493,7 @@ public class AppStandbyController
|
@@ -1792,25 +1792,7 @@ public class AppStandbyController
|
||||||
.noteRestrictionAttempt(packageName, userId, elapsedRealtime, reason);
|
.noteRestrictionAttempt(packageName, userId, elapsedRealtime, reason);
|
||||||
|
|
||||||
if (isForcedByUser) {
|
if (isForcedByUser) {
|
||||||
- // Only user force can bypass the delay restriction. If the user forced the
|
- // Only user force can bypass the delay restriction. If the user forced the
|
||||||
- // app into the RESTRICTED bucket, then a toast confirming the action
|
- // app into the RESTRICTED bucket, then a toast confirming the action
|
||||||
- // shouldn't be surprising.
|
- // shouldn't be surprising.
|
||||||
- if (Build.IS_DEBUGGABLE) {
|
- // Exclude REASON_SUB_FORCED_USER_FLAG_INTERACTION since the RESTRICTED bucket
|
||||||
|
- // isn't directly visible in that flow.
|
||||||
|
- if (Build.IS_DEBUGGABLE
|
||||||
|
- && (reason & REASON_SUB_MASK)
|
||||||
|
- != REASON_SUB_FORCED_USER_FLAG_INTERACTION) {
|
||||||
- Toast.makeText(mContext,
|
- Toast.makeText(mContext,
|
||||||
- // Since AppStandbyController sits low in the lock hierarchy,
|
- // Since AppStandbyController sits low in the lock hierarchy,
|
||||||
- // make sure not to call out with the lock held.
|
- // make sure not to call out with the lock held.
|
||||||
@@ -36,5 +40,5 @@ index 4b081d258fd4..ded38c55325a 100644
|
|||||||
final long timeUntilRestrictPossibleMs = app.lastUsedByUserElapsedTime
|
final long timeUntilRestrictPossibleMs = app.lastUsedByUserElapsedTime
|
||||||
+ mInjector.getAutoRestrictedBucketDelayMs() - elapsedRealtime;
|
+ mInjector.getAutoRestrictedBucketDelayMs() - elapsedRealtime;
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,49 +1,90 @@
|
|||||||
From f8b17ff4c88c210606c33bf9c622c1b9ee99153e Mon Sep 17 00:00:00 2001
|
From c16a1a66b9e311a2dfbf1925d8f17783933571e5 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 2 Sep 2021 16:15:19 +0000
|
Date: Thu, 2 Sep 2021 16:15:19 +0000
|
||||||
Subject: [PATCH 06/19] Keyguard: Adjust clock style
|
Subject: [PATCH 06/21] Keyguard: Adjust clock style
|
||||||
|
|
||||||
Thinner font, less padding and unintrusive colors
|
Thinner font, less padding and unintrusive colors
|
||||||
|
|
||||||
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
|
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
|
||||||
---
|
---
|
||||||
.../SystemUI/res-keyguard/layout/keyguard_clock_switch.xml | 7 ++++---
|
.../customization/res/layout/clock_default_large.xml | 1 +
|
||||||
.../SystemUI/res-keyguard/layout/keyguard_slice_view.xml | 2 +-
|
.../customization/res/layout/clock_default_small.xml | 2 +-
|
||||||
packages/SystemUI/res-keyguard/values/dimens.xml | 6 +++---
|
packages/SystemUI/customization/res/values/colors.xml | 5 +++++
|
||||||
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
.../android/systemui/shared/clocks/AnimatableClockView.kt | 2 +-
|
||||||
packages/SystemUI/res/values/styles.xml | 4 ++--
|
.../systemui/shared/clocks/DefaultClockController.kt | 4 ++--
|
||||||
.../src/com/android/keyguard/AnimatableClockView.java | 2 +-
|
.../SystemUI/res-keyguard/layout/keyguard_slice_view.xml | 2 +-
|
||||||
6 files changed, 11 insertions(+), 12 deletions(-)
|
packages/SystemUI/res-keyguard/values/dimens.xml | 6 +++---
|
||||||
|
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
||||||
|
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
|
||||||
|
packages/SystemUI/res/values/styles.xml | 4 ++--
|
||||||
|
10 files changed, 17 insertions(+), 13 deletions(-)
|
||||||
|
create mode 100644 packages/SystemUI/customization/res/values/colors.xml
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
diff --git a/packages/SystemUI/customization/res/layout/clock_default_large.xml b/packages/SystemUI/customization/res/layout/clock_default_large.xml
|
||||||
index 87a9825af1cb..93e827ac540e 100644
|
index 0139d50dcfba..9f5ca7b89213 100644
|
||||||
--- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
--- a/packages/SystemUI/customization/res/layout/clock_default_large.xml
|
||||||
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
+++ b/packages/SystemUI/customization/res/layout/clock_default_large.xml
|
||||||
@@ -38,10 +38,10 @@
|
@@ -26,6 +26,7 @@
|
||||||
android:layout_gravity="start"
|
android:fontFamily="@*android:string/config_clockFontFamily"
|
||||||
android:gravity="start"
|
android:typeface="monospace"
|
||||||
android:textSize="@dimen/clock_text_size"
|
android:elegantTextHeight="false"
|
||||||
- android:fontFamily="@font/clock"
|
+ android:fontFeatureSettings="tnum"
|
||||||
+ android:fontFamily="sans-serif-thin"
|
chargeAnimationDelay="200"
|
||||||
android:elegantTextHeight="false"
|
dozeWeight="200"
|
||||||
android:singleLine="true"
|
lockScreenWeight="400" />
|
||||||
- android:fontFeatureSettings="pnum"
|
diff --git a/packages/SystemUI/customization/res/layout/clock_default_small.xml b/packages/SystemUI/customization/res/layout/clock_default_small.xml
|
||||||
+ android:fontFeatureSettings="tnum"
|
index ff6d7f9e2240..b63ffce20671 100644
|
||||||
chargeAnimationDelay="350"
|
--- a/packages/SystemUI/customization/res/layout/clock_default_small.xml
|
||||||
dozeWeight="200"
|
+++ b/packages/SystemUI/customization/res/layout/clock_default_small.xml
|
||||||
lockScreenWeight="400"
|
@@ -27,7 +27,7 @@
|
||||||
@@ -60,9 +60,10 @@
|
android:elegantTextHeight="false"
|
||||||
android:layout_gravity="center"
|
android:ellipsize="none"
|
||||||
android:gravity="center_horizontal"
|
android:singleLine="true"
|
||||||
android:textSize="@dimen/large_clock_text_size"
|
- android:fontFeatureSettings="pnum"
|
||||||
- android:fontFamily="@font/clock"
|
+ android:fontFeatureSettings="tnum"
|
||||||
+ android:fontFamily="sans-serif-thin"
|
chargeAnimationDelay="350"
|
||||||
android:typeface="monospace"
|
dozeWeight="200"
|
||||||
android:elegantTextHeight="false"
|
lockScreenWeight="400" />
|
||||||
+ android:fontFeatureSettings="tnum"
|
diff --git a/packages/SystemUI/customization/res/values/colors.xml b/packages/SystemUI/customization/res/values/colors.xml
|
||||||
chargeAnimationDelay="200"
|
new file mode 100644
|
||||||
dozeWeight="200"
|
index 000000000000..f80af4376ff1
|
||||||
lockScreenWeight="400"
|
--- /dev/null
|
||||||
|
+++ b/packages/SystemUI/customization/res/values/colors.xml
|
||||||
|
@@ -0,0 +1,5 @@
|
||||||
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
+<resources>
|
||||||
|
+ <color name="clock_default_color_dark">@*android:color/primary_text_material_dark</color>
|
||||||
|
+ <color name="clock_default_color_light">@*android:color/primary_text_material_light</color>
|
||||||
|
+</resources>
|
||||||
|
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
|
||||||
|
index 86bd5f2bff5a..b99a8ba487cb 100644
|
||||||
|
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
|
||||||
|
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
|
||||||
|
@@ -146,7 +146,7 @@ class AnimatableClockView @JvmOverloads constructor(
|
||||||
|
fun refreshTime() {
|
||||||
|
time.timeInMillis = timeOverrideInMillis ?: System.currentTimeMillis()
|
||||||
|
contentDescription = DateFormat.format(descFormat, time)
|
||||||
|
- val formattedText = DateFormat.format(format, time)
|
||||||
|
+ val formattedText = DateFormat.format(format, time).toString() + ' '
|
||||||
|
logBuffer?.log(TAG, DEBUG,
|
||||||
|
{ str1 = formattedText?.toString() },
|
||||||
|
{ "refreshTime: new formattedText=$str1" }
|
||||||
|
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
index 4df7a44d3e1d..447160a8cb63 100644
|
||||||
|
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
@@ -143,9 +143,9 @@ class DefaultClockController(
|
||||||
|
if (seedColor != null) {
|
||||||
|
seedColor!!
|
||||||
|
} else if (isRegionDark) {
|
||||||
|
- resources.getColor(android.R.color.system_accent1_100)
|
||||||
|
+ resources.getColor(R.color.clock_default_color_dark)
|
||||||
|
} else {
|
||||||
|
- resources.getColor(android.R.color.system_accent2_600)
|
||||||
|
+ resources.getColor(R.color.clock_default_color_light)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentColor == color) {
|
||||||
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
|
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
|
index 7c5dbc247428..64657547621f 100644
|
||||||
--- a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
|
--- a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
|
||||||
@@ -58,10 +99,10 @@ index 7c5dbc247428..64657547621f 100644
|
|||||||
/>
|
/>
|
||||||
</com.android.keyguard.KeyguardSliceView>
|
</com.android.keyguard.KeyguardSliceView>
|
||||||
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
|
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||||
index 89dd741e2898..5aedf82f4d32 100644
|
index edd6eff92c1c..14df77dc4a4e 100644
|
||||||
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
|
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||||
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
|
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||||
@@ -89,10 +89,10 @@
|
@@ -91,10 +91,10 @@
|
||||||
<dimen name="num_pad_key_margin_end">12dp</dimen>
|
<dimen name="num_pad_key_margin_end">12dp</dimen>
|
||||||
|
|
||||||
<!-- additional offset for clock switch area items -->
|
<!-- additional offset for clock switch area items -->
|
||||||
@@ -76,10 +117,10 @@ index 89dd741e2898..5aedf82f4d32 100644
|
|||||||
<!-- Proportion of the screen height to use to set the maximum height of the bouncer to when
|
<!-- 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
|
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
|
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
index b8770e831d45..7f47e274304a 100644
|
index 04dffb6e8c52..c81e018702bb 100644
|
||||||
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
@@ -116,8 +116,6 @@
|
@@ -117,8 +117,6 @@
|
||||||
<item name="android:ellipsize">end</item>
|
<item name="android:ellipsize">end</item>
|
||||||
<item name="android:maxLines">2</item>
|
<item name="android:maxLines">2</item>
|
||||||
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||||
@@ -88,41 +129,41 @@ index b8770e831d45..7f47e274304a 100644
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TextAppearance.Keyguard.Secondary">
|
<style name="TextAppearance.Keyguard.Secondary">
|
||||||
|
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
index 8b8594032816..9135e78f3e4c 100644
|
||||||
|
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
@@ -74,7 +74,7 @@
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:textDirection="locale"
|
||||||
|
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
|
||||||
|
+ android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="?attr/wallpaperTextColorSecondary"
|
||||||
|
android:singleLine="true"
|
||||||
|
systemui:showMissingSim="true"
|
||||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||||
index ba0361de6e8b..c5899b93c937 100644
|
index 892c2f4caa39..6996e41e08da 100644
|
||||||
--- a/packages/SystemUI/res/values/styles.xml
|
--- a/packages/SystemUI/res/values/styles.xml
|
||||||
+++ b/packages/SystemUI/res/values/styles.xml
|
+++ b/packages/SystemUI/res/values/styles.xml
|
||||||
@@ -274,7 +274,7 @@
|
@@ -302,7 +302,7 @@
|
||||||
<item name="darkIconTheme">@style/DualToneDarkTheme</item>
|
<item name="darkIconTheme">@style/DualToneDarkTheme</item>
|
||||||
<item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
|
<item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
|
||||||
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
|
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
|
||||||
- <item name="wallpaperTextColorAccent">@*android:color/system_accent1_100</item>
|
- <item name="wallpaperTextColorAccent">@color/material_dynamic_primary90</item>
|
||||||
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_dark</item>
|
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_dark</item>
|
||||||
<item name="android:colorError">@*android:color/error_color_material_dark</item>
|
<item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||||
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
|
<item name="*android:lockPatternStyle">@style/LockPatternViewStyle</item>
|
||||||
<item name="passwordStyle">@style/PasswordTheme</item>
|
<item name="lockPatternStyle">@style/LockPatternContainerStyle</item>
|
||||||
@@ -290,7 +290,7 @@
|
@@ -324,7 +324,7 @@
|
||||||
<style name="Theme.SystemUI.LightWallpaper">
|
<style name="Theme.SystemUI.LightWallpaper">
|
||||||
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
|
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
|
||||||
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
|
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
|
||||||
- <item name="wallpaperTextColorAccent">@*android:color/system_accent2_600</item>
|
- <item name="wallpaperTextColorAccent">@color/material_dynamic_secondary40</item>
|
||||||
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_light</item>
|
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_light</item>
|
||||||
<item name="android:colorError">@*android:color/error_color_material_light</item>
|
<item name="android:colorError">@*android:color/error_color_material_light</item>
|
||||||
<item name="shadowRadius">0</item>
|
<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 2a0c2855c3b2..b6e18b8c20f8 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
|
|
||||||
@@ -134,7 +134,7 @@ public class AnimatableClockView extends TextView {
|
|
||||||
|
|
||||||
void refreshTime() {
|
|
||||||
mTime.setTimeInMillis(System.currentTimeMillis());
|
|
||||||
- setText(DateFormat.format(mFormat, mTime));
|
|
||||||
+ setText(DateFormat.format(mFormat, mTime).toString() + ' ');
|
|
||||||
setContentDescription(DateFormat.format(mDescFormat, mTime));
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -1,7 +1,7 @@
|
|||||||
From 5dc1b1b3954e77640b15dc5a9f850c2048060595 Mon Sep 17 00:00:00 2001
|
From c9d2af70d90a8cf81dae5bfba93d6f59c0373bdb Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 2 Nov 2019 06:41:03 +0000
|
Date: Sat, 2 Nov 2019 06:41:03 +0000
|
||||||
Subject: [PATCH 07/19] Keyguard: Hide padlock unless UDFPS is in use
|
Subject: [PATCH 07/21] Keyguard: Hide padlock unless UDFPS is in use
|
||||||
|
|
||||||
Fair enough Google, but don't give me that otherwise
|
Fair enough Google, but don't give me that otherwise
|
||||||
|
|
||||||
@@ -11,13 +11,13 @@ Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
|
|||||||
1 file changed, 3 insertions(+), 9 deletions(-)
|
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
|
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||||
index cc452c6f3b79..477be22c60f5 100644
|
index 0887b220dee1..423549dd3ab2 100644
|
||||||
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||||
+++ b/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
|
@@ -295,20 +295,14 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean wasShowingUnlock = mShowUnlockIcon;
|
|
||||||
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon
|
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon
|
||||||
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon
|
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon
|
||||||
&& !mShowAodUnlockedIcon && !mShowAodLockIcon;
|
&& !mShowAodUnlockedIcon && !mShowAodLockIcon;
|
||||||
@@ -39,5 +39,5 @@ index cc452c6f3b79..477be22c60f5 100644
|
|||||||
// fp icon was shown by UdfpsView, and now we still want to animate the transition
|
// fp icon was shown by UdfpsView, and now we still want to animate the transition
|
||||||
// in this drawable
|
// in this drawable
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -1,7 +1,7 @@
|
|||||||
From 19bce23d94b7a5288cadc6523371b5155422808a Mon Sep 17 00:00:00 2001
|
From ff1164da64003d5a6d6e57fd75ba1d8684167dd7 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 1 Sep 2021 14:41:53 +0000
|
Date: Wed, 1 Sep 2021 14:41:53 +0000
|
||||||
Subject: [PATCH 08/19] Keyguard: Never switch to large clock
|
Subject: [PATCH 08/21] Keyguard: Never switch to large clock
|
||||||
|
|
||||||
It looks alright actually, but as always breaks under landscape
|
It looks alright actually, but as always breaks under landscape
|
||||||
|
|
||||||
@@ -11,18 +11,18 @@ Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
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
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
||||||
index 86b12d3c0c3d..6eb97228b880 100644
|
index ba217804c96e..ab3391372e2c 100644
|
||||||
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
||||||
+++ b/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
|
@@ -470,7 +470,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
||||||
|
|
||||||
private void updateDoubleLineClock() {
|
private void updateDoubleLineClock() {
|
||||||
mCanShowDoubleLineClock = mSecureSettings.getInt(
|
mCanShowDoubleLineClock = mSecureSettings.getIntForUser(
|
||||||
- Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 1) != 0;
|
- Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 1,
|
||||||
+ Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 0) != 0;
|
+ Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 0,
|
||||||
|
UserHandle.USER_CURRENT) != 0;
|
||||||
|
|
||||||
if (!mCanShowDoubleLineClock) {
|
if (!mCanShowDoubleLineClock) {
|
||||||
mUiExecutor.execute(() -> displayClock(KeyguardClockSwitch.SMALL));
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+59
-42
@@ -1,23 +1,23 @@
|
|||||||
From 595b07a5e1d1f446dea60072eb5fd35945aee741 Mon Sep 17 00:00:00 2001
|
From a8a951832a14ed9fb5e718a14c4dc9ec73d24693 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 2 Nov 2019 08:31:36 +0000
|
Date: Sat, 2 Nov 2019 08:31:36 +0000
|
||||||
Subject: [PATCH 09/19] Keyguard: Refine indication text
|
Subject: [PATCH 09/21] Keyguard: Refine indication text
|
||||||
|
|
||||||
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
|
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
|
||||||
---
|
---
|
||||||
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
.../SystemUI/res-keyguard/values/styles.xml | 2 --
|
||||||
.../SystemUI/res/layout/keyguard_bottom_area.xml | 1 +
|
.../res/layout/keyguard_bottom_area.xml | 1 +
|
||||||
packages/SystemUI/res/values/dimens.xml | 3 +--
|
packages/SystemUI/res/values/dimens.xml | 3 +--
|
||||||
.../KeyguardIndicationRotateTextViewController.java | 12 +++++++++++-
|
...ardIndicationRotateTextViewController.java | 12 ++++++++++-
|
||||||
.../statusbar/KeyguardIndicationController.java | 7 ++++---
|
.../KeyguardIndicationController.java | 21 ++-----------------
|
||||||
.../statusbar/phone/KeyguardIndicationTextView.java | 2 +-
|
.../phone/KeyguardIndicationTextView.java | 2 +-
|
||||||
6 files changed, 18 insertions(+), 9 deletions(-)
|
6 files changed, 16 insertions(+), 25 deletions(-)
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
index 7f47e274304a..bb6c56455d72 100644
|
index c81e018702bb..cc87f9f3d7cf 100644
|
||||||
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
@@ -131,8 +131,6 @@
|
@@ -132,8 +132,6 @@
|
||||||
<item name="android:maxLines">1</item>
|
<item name="android:maxLines">1</item>
|
||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
<item name="android:textColor">?attr/wallpaperTextColor</item>
|
<item name="android:textColor">?attr/wallpaperTextColor</item>
|
||||||
@@ -27,7 +27,7 @@ index 7f47e274304a..bb6c56455d72 100644
|
|||||||
|
|
||||||
<style name="TextAppearance.Keyguard.BottomArea.Button">
|
<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
|
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
index 759670e01e71..470c4ca488c2 100644
|
index 4048a39344bd..2f884baf0bd5 100644
|
||||||
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
@@ -35,6 +35,7 @@
|
@@ -35,6 +35,7 @@
|
||||||
@@ -39,16 +39,16 @@ index 759670e01e71..470c4ca488c2 100644
|
|||||||
android:paddingEnd="@dimen/keyguard_indication_text_padding"
|
android:paddingEnd="@dimen/keyguard_indication_text_padding"
|
||||||
android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
|
android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
|
||||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
index 79246750afbf..aa59fd6a9b51 100644
|
index ceebab2b08ef..e2c65f5542b7 100644
|
||||||
--- a/packages/SystemUI/res/values/dimens.xml
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
@@ -696,11 +696,10 @@
|
@@ -815,11 +815,10 @@
|
||||||
<dimen name="keyguard_lock_height">42dp</dimen>
|
<dimen name="keyguard_lock_height">42dp</dimen>
|
||||||
<dimen name="keyguard_lock_padding">20dp</dimen>
|
<dimen name="keyguard_lock_padding">20dp</dimen>
|
||||||
|
|
||||||
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
|
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
|
||||||
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
|
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
|
||||||
<dimen name="lock_icon_margin_bottom">110dp</dimen>
|
<dimen name="lock_icon_margin_bottom">74dp</dimen>
|
||||||
<dimen name="ambient_indication_margin_bottom">71dp</dimen>
|
<dimen name="ambient_indication_margin_bottom">71dp</dimen>
|
||||||
|
|
||||||
-
|
-
|
||||||
@@ -56,10 +56,10 @@ index 79246750afbf..aa59fd6a9b51 100644
|
|||||||
<dimen name="double_tap_slop">32dp</dimen>
|
<dimen name="double_tap_slop">32dp</dimen>
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||||
index d73d9cdb7d40..a7a23032963a 100644
|
index 0745456b3e43..0fc0b9e29fb7 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||||
@@ -218,12 +218,22 @@ public class KeyguardIndicationRotateTextViewController extends
|
@@ -224,12 +224,22 @@ public class KeyguardIndicationRotateTextViewController extends
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,7 +67,7 @@ index d73d9cdb7d40..a7a23032963a 100644
|
|||||||
+ * @return true if there are available non-resting indications to show.
|
+ * @return true if there are available non-resting indications to show.
|
||||||
*/
|
*/
|
||||||
public boolean hasIndications() {
|
public boolean hasIndications() {
|
||||||
+ if (hasIndication(INDICATION_TYPE_RESTING)) {
|
+ if (hasIndication(INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE)) {
|
||||||
+ return mIndicationMessages.keySet().size() > 1;
|
+ return mIndicationMessages.keySet().size() > 1;
|
||||||
+ }
|
+ }
|
||||||
return mIndicationMessages.keySet().size() > 0;
|
return mIndicationMessages.keySet().size() > 0;
|
||||||
@@ -84,42 +84,59 @@ index d73d9cdb7d40..a7a23032963a 100644
|
|||||||
* Clears all messages in the queue and sets the current message to an empty string.
|
* 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
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
index d7b4738340e6..d89440057975 100644
|
index 2b3444e64acb..b8567d17785a 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
@@ -471,12 +471,11 @@ public class KeyguardIndicationController {
|
@@ -407,7 +407,6 @@ public class KeyguardIndicationController {
|
||||||
|
updateLockScreenDisclosureMsg();
|
||||||
|
updateLockScreenOwnerInfo();
|
||||||
|
updateLockScreenBatteryMsg(animate);
|
||||||
|
- updateLockScreenUserLockedMsg(userId);
|
||||||
|
updateLockScreenTrustMsg(userId, getTrustGrantedIndication(), getTrustManagedIndication());
|
||||||
|
updateLockScreenAlignmentMsg();
|
||||||
|
updateLockScreenLogoutView();
|
||||||
|
@@ -518,22 +517,6 @@ public class KeyguardIndicationController {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateResting() {
|
- private void updateLockScreenUserLockedMsg(int userId) {
|
||||||
- if (!TextUtils.isEmpty(mRestingIndication)
|
- if (!mKeyguardUpdateMonitor.isUserUnlocked(userId)
|
||||||
- && !mRotateTextViewController.hasIndications()) {
|
- || mKeyguardUpdateMonitor.isEncryptedOrLockdown(userId)) {
|
||||||
|
- mRotateTextViewController.updateIndication(
|
||||||
|
- INDICATION_TYPE_USER_LOCKED,
|
||||||
|
- new KeyguardIndication.Builder()
|
||||||
|
- .setMessage(mContext.getResources().getText(
|
||||||
|
- com.android.internal.R.string.lockscreen_storage_locked))
|
||||||
|
- .setTextColor(mInitialTextColorState)
|
||||||
|
- .build(),
|
||||||
|
- false);
|
||||||
|
- } else {
|
||||||
|
- mRotateTextViewController.hideIndication(INDICATION_TYPE_USER_LOCKED);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
private void updateBiometricMessage() {
|
||||||
|
if (mDozing) {
|
||||||
|
updateDeviceEntryIndication(false);
|
||||||
|
@@ -626,11 +609,11 @@ public class KeyguardIndicationController {
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateLockScreenPersistentUnlockMsg() {
|
||||||
|
- if (!TextUtils.isEmpty(mPersistentUnlockMessage)) {
|
||||||
+ if (!mRotateTextViewController.hasIndications()) {
|
+ if (!mRotateTextViewController.hasIndications()) {
|
||||||
mRotateTextViewController.updateIndication(
|
mRotateTextViewController.updateIndication(
|
||||||
INDICATION_TYPE_RESTING,
|
INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE,
|
||||||
new KeyguardIndication.Builder()
|
new KeyguardIndication.Builder()
|
||||||
- .setMessage(mRestingIndication)
|
- .setMessage(mPersistentUnlockMessage)
|
||||||
+ .setMessage(mContext.getResources().getString(R.string.keyguard_unlock))
|
+ .setMessage(mContext.getResources().getString(R.string.keyguard_unlock))
|
||||||
.setTextColor(mInitialTextColorState)
|
.setTextColor(mInitialTextColorState)
|
||||||
.build(),
|
.build(),
|
||||||
false);
|
true);
|
||||||
@@ -861,10 +860,12 @@ public class KeyguardIndicationController {
|
|
||||||
public void handleMessage(Message msg) {
|
|
||||||
if (msg.what == MSG_HIDE_TRANSIENT) {
|
|
||||||
hideTransientIndication();
|
|
||||||
+ updatePersistentIndications(false /* animate */, KeyguardUpdateMonitor.getCurrentUser());
|
|
||||||
} else if (msg.what == MSG_SHOW_ACTION_TO_UNLOCK) {
|
|
||||||
showActionToUnlock();
|
|
||||||
} else if (msg.what == MSG_HIDE_BIOMETRIC_MESSAGE) {
|
|
||||||
hideBiometricMessage();
|
|
||||||
+ updatePersistentIndications(false /* animate */, KeyguardUpdateMonitor.getCurrentUser());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
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 339f371c0d12..bd1432303463 100644
|
index 9d30cb4c4852..f179194fb0e1 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||||
@@ -44,7 +44,7 @@ public class KeyguardIndicationTextView extends TextView {
|
@@ -46,7 +46,7 @@ public class KeyguardIndicationTextView extends TextView {
|
||||||
@StyleRes
|
@StyleRes
|
||||||
private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button;
|
private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button;
|
||||||
|
|
||||||
@@ -129,5 +146,5 @@ index 339f371c0d12..bd1432303463 100644
|
|||||||
private KeyguardIndication mKeyguardIndicationInfo;
|
private KeyguardIndication mKeyguardIndicationInfo;
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+92
-190
@@ -1,10 +1,10 @@
|
|||||||
From d1f90b64712601d17974e3651fa709e409f171d6 Mon Sep 17 00:00:00 2001
|
From 0425dac4b2f22dc37e117b55a0fdefe91f6e2ebb Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 20 Mar 2021 10:35:14 +0000
|
Date: Sat, 20 Mar 2021 10:35:14 +0000
|
||||||
Subject: [PATCH 10/19] Keyguard/UI: Fix status bar / quick settings margins
|
Subject: [PATCH 10/21] Keyguard/UI: Fix status bar / quick settings margins
|
||||||
and paddings
|
and paddings
|
||||||
|
|
||||||
Last revised on 2022/03/13, targeting s-v2
|
Last revised on 2023/03/22, targeting T QPR2
|
||||||
|
|
||||||
The way I think SB/QS margins/paddings should work:
|
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]
|
- Devices with left notch: [notch_definition][status_bar_padding_start][content]...[content][status_bar_padding_end][rounded_corner_content_padding]
|
||||||
@@ -14,28 +14,37 @@ Key point being:
|
|||||||
- Notch definition should only be the notch itself, without additional padding
|
- Notch definition should only be the notch itself, without additional padding
|
||||||
- Instead, these paddings should be covered by status_bar_padding_{start|end}
|
- Instead, these paddings should be covered by status_bar_padding_{start|end}
|
||||||
As a result, below changes have been made:
|
As a result, below changes have been made:
|
||||||
- Change keyguard_carrier_text_margin into a padding
|
- Change keyguard_carrier_text_margin into a padding and link to status_bar_padding_start
|
||||||
- Link keyguard paddings to status_bar_padding_{start|end}
|
|
||||||
- Add status_bar_padding_{start|end} to quick settings header
|
- Add status_bar_padding_{start|end} to quick settings header
|
||||||
- Remove several unnecessary margins and paddings
|
- Remove unnecessary margins and paddings if any
|
||||||
- Animate padding for new QS clock in s-qpr1
|
|
||||||
|
|
||||||
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
|
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
|
||||||
---
|
---
|
||||||
.../res/layout/keyguard_status_bar.xml | 2 +-
|
packages/SystemUI/res/layout/combined_qs_header.xml | 2 +-
|
||||||
.../res/layout/quick_qs_status_icons.xml | 6 ---
|
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
|
||||||
.../quick_status_bar_header_date_privacy.xml | 5 +-
|
packages/SystemUI/res/values-sw600dp/dimens.xml | 3 ---
|
||||||
.../SystemUI/res/values-sw600dp/dimens.xml | 3 --
|
packages/SystemUI/res/values/dimens.xml | 2 +-
|
||||||
packages/SystemUI/res/values/dimens.xml | 2 +-
|
packages/SystemUI/res/xml/qqs_header.xml | 4 ++--
|
||||||
.../systemui/qs/QuickStatusBarHeader.java | 51 ++++++++++++-------
|
.../android/systemui/shade/ShadeHeaderController.kt | 10 +++++++---
|
||||||
.../phone/KeyguardStatusBarView.java | 7 ---
|
.../statusbar/phone/KeyguardStatusBarView.java | 7 -------
|
||||||
7 files changed, 35 insertions(+), 41 deletions(-)
|
7 files changed, 12 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/layout/combined_qs_header.xml b/packages/SystemUI/res/layout/combined_qs_header.xml
|
||||||
|
index 828a4535e656..65c8e52d00ac 100644
|
||||||
|
--- a/packages/SystemUI/res/layout/combined_qs_header.xml
|
||||||
|
+++ b/packages/SystemUI/res/layout/combined_qs_header.xml
|
||||||
|
@@ -151,4 +151,4 @@
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
-</com.android.systemui.util.NoRemeasureMotionLayout>
|
||||||
|
\ No newline at end of file
|
||||||
|
+</com.android.systemui.util.NoRemeasureMotionLayout>
|
||||||
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
index 850b01717308..054db34023af 100644
|
index 9135e78f3e4c..ddaea938c858 100644
|
||||||
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
@@ -62,7 +62,7 @@
|
@@ -69,7 +69,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="@dimen/status_bar_padding_top"
|
android:paddingTop="@dimen/status_bar_padding_top"
|
||||||
@@ -44,92 +53,25 @@ index 850b01717308..054db34023af 100644
|
|||||||
android:layout_toStartOf="@id/system_icons_container"
|
android:layout_toStartOf="@id/system_icons_container"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:ellipsize="marquee"
|
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 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="@dimen/qs_header_row_min_height"
|
|
||||||
android:clickable="false"
|
|
||||||
android:focusable="true"
|
|
||||||
android:theme="@style/QSHeaderTheme">
|
|
||||||
@@ -39,10 +38,7 @@
|
|
||||||
android:id="@+id/clock"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
- 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"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="@style/TextAppearance.QS.Status" />
|
|
||||||
|
|
||||||
@@ -50,7 +46,6 @@
|
|
||||||
android:id="@+id/date_clock"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
- android:layout_marginStart="@dimen/status_bar_left_clock_end_padding"
|
|
||||||
android:gravity="center_vertical|start"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="@style/TextAppearance.QS.Status"
|
|
||||||
@@ -64,7 +59,6 @@
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
- android:minHeight="@dimen/qs_header_row_min_height"
|
|
||||||
android:minWidth="48dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
|
||||||
index b1e8c386fe21..cff67718bc47 100644
|
|
||||||
--- a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
|
||||||
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
|
||||||
@@ -25,14 +25,12 @@
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_gravity="top"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
- android:clickable="true"
|
|
||||||
- android:minHeight="48dp">
|
|
||||||
+ android:clickable="true">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/date_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
- android:minHeight="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical|start" >
|
|
||||||
|
|
||||||
@@ -76,7 +74,6 @@
|
|
||||||
android:id="@+id/privacy_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
- android:minHeight="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical|end" >
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||||
index 7d033018c27f..3cd67d844895 100644
|
index 59becc69506c..9168a5ce1ced 100644
|
||||||
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
|
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||||
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||||
@@ -27,9 +27,6 @@
|
@@ -28,9 +28,6 @@
|
||||||
<!-- The width of user avatar when on Keyguard -->
|
<!-- The width of user avatar when on Keyguard -->
|
||||||
<dimen name="multi_user_avatar_keyguard_size">30dp</dimen>
|
<dimen name="multi_user_avatar_keyguard_size">30dp</dimen>
|
||||||
|
|
||||||
- <!-- Margin on the left side of the carrier text on Keyguard -->
|
- <!-- Margin on the left side of the carrier text on Keyguard -->
|
||||||
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
|
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
|
||||||
-
|
-
|
||||||
<!-- The width/height of the phone/camera/unlock icon on keyguard. -->
|
<!-- Screen pinning request width -->
|
||||||
<dimen name="keyguard_affordance_height">80dp</dimen>
|
<dimen name="screen_pinning_request_width">400dp</dimen>
|
||||||
<dimen name="keyguard_affordance_width">120dp</dimen>
|
<!-- Screen pinning request bottom button circle widths -->
|
||||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
index aa59fd6a9b51..a55c394a3e53 100644
|
index e2c65f5542b7..d0a9055e1905 100644
|
||||||
--- a/packages/SystemUI/res/values/dimens.xml
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
@@ -672,7 +672,7 @@
|
@@ -790,7 +790,7 @@
|
||||||
<dimen name="kg_framed_avatar_size">32dp</dimen>
|
<dimen name="kg_framed_avatar_size">32dp</dimen>
|
||||||
|
|
||||||
<!-- Margin on the left side of the carrier text on Keyguard -->
|
<!-- Margin on the left side of the carrier text on Keyguard -->
|
||||||
@@ -138,112 +80,72 @@ index aa59fd6a9b51..a55c394a3e53 100644
|
|||||||
|
|
||||||
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
|
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
|
||||||
from Keyguard. -->
|
from Keyguard. -->
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
diff --git a/packages/SystemUI/res/xml/qqs_header.xml b/packages/SystemUI/res/xml/qqs_header.xml
|
||||||
index 5d3539b66141..a93c71987855 100644
|
index 00a0444a1c9d..a5c3f8e982ca 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
--- a/packages/SystemUI/res/xml/qqs_header.xml
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
+++ b/packages/SystemUI/res/xml/qqs_header.xml
|
||||||
@@ -98,6 +98,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
@@ -44,7 +44,7 @@
|
||||||
private StatusBarContentInsetsProvider mInsetsProvider;
|
<Layout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
|
||||||
|
- android:layout_marginStart="8dp"
|
||||||
|
+ android:layout_marginStart="2dp"
|
||||||
|
app:layout_constrainedWidth="true"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/clock"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/barrier"
|
||||||
|
@@ -109,4 +109,4 @@
|
||||||
|
app:layout_constraintHorizontal_bias="1"
|
||||||
|
/>
|
||||||
|
</Constraint>
|
||||||
|
-</ConstraintSet>
|
||||||
|
\ No newline at end of file
|
||||||
|
+</ConstraintSet>
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
index a6b88370f836..e7632971d37e 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
@@ -132,6 +132,8 @@ constructor(
|
||||||
|
|
||||||
private int mRoundedCornerPadding = 0;
|
private var roundedCorners = 0
|
||||||
+ private int mStatusBarPaddingStart;
|
private var cutout: DisplayCutout? = null
|
||||||
+ private int mStatusBarPaddingEnd;
|
+ private var statusBarPaddingStart = 0
|
||||||
+ private int mHeaderPaddingLeft;
|
+ private var statusBarPaddingEnd = 0
|
||||||
+ private int mHeaderPaddingRight;
|
private var lastInsets: WindowInsets? = null
|
||||||
private int mWaterfallTopInset;
|
private var textColorPrimary = Color.TRANSPARENT
|
||||||
private int mCutOutPaddingLeft;
|
|
||||||
private int mCutOutPaddingRight;
|
|
||||||
@@ -271,6 +275,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
mRoundedCornerPadding = resources.getDimensionPixelSize(
|
|
||||||
R.dimen.rounded_corner_content_padding);
|
|
||||||
|
|
||||||
+ mStatusBarPaddingStart = resources.getDimensionPixelSize(
|
@@ -364,14 +366,17 @@ constructor(
|
||||||
+ R.dimen.status_bar_padding_start);
|
val cutoutLeft = sbInsets.first
|
||||||
+ mStatusBarPaddingEnd = resources.getDimensionPixelSize(
|
val cutoutRight = sbInsets.second
|
||||||
+ R.dimen.status_bar_padding_end);
|
val hasCornerCutout: Boolean = insetsProvider.currentRotationHasCornerCutout()
|
||||||
+
|
+ roundedCorners = resources.getDimensionPixelSize(R.dimen.rounded_corner_content_padding)
|
||||||
int qsOffsetHeight = SystemBarUtils.getQuickQsOffsetHeight(mContext);
|
+ statusBarPaddingStart = resources.getDimensionPixelSize(R.dimen.status_bar_padding_start)
|
||||||
|
+ statusBarPaddingEnd = resources.getDimensionPixelSize(R.dimen.status_bar_padding_end)
|
||||||
|
updateQQSPaddings()
|
||||||
|
// Set these guides as the left/right limits for content that lives in the top row, using
|
||||||
|
// cutoutLeft and cutoutRight
|
||||||
|
var changes =
|
||||||
|
combinedShadeHeadersConstraintManager.edgesGuidelinesConstraints(
|
||||||
|
- if (view.isLayoutRtl) cutoutRight else cutoutLeft,
|
||||||
|
+ (if (view.isLayoutRtl) cutoutRight else cutoutLeft) + statusBarPaddingStart,
|
||||||
|
header.paddingStart,
|
||||||
|
- if (view.isLayoutRtl) cutoutLeft else cutoutRight,
|
||||||
|
+ (if (view.isLayoutRtl) cutoutLeft else cutoutRight) + statusBarPaddingEnd,
|
||||||
|
header.paddingEnd
|
||||||
|
)
|
||||||
|
|
||||||
mDatePrivacyView.getLayoutParams().height =
|
@@ -483,7 +488,6 @@ constructor(
|
||||||
@@ -358,6 +367,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)
|
|
||||||
+ // Use statusbar paddings when collapsed, align with QS when expanded, and animate translation
|
|
||||||
+ .addFloat(mClockContainer, "translationX", mHeaderPaddingLeft + mStatusBarPaddingStart, 0)
|
|
||||||
+ .addFloat(mRightLayout, "translationX", -(mHeaderPaddingRight + mStatusBarPaddingEnd), 0)
|
|
||||||
.setListener(new TouchAnimator.ListenerAdapter() {
|
|
||||||
@Override
|
|
||||||
public void onAnimationAtEnd() {
|
|
||||||
@@ -463,8 +475,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 =
|
|
||||||
@@ -528,34 +538,37 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
private void updateHeadersPadding() {
|
|
||||||
setContentMargins(mDatePrivacyView, 0, 0);
|
|
||||||
setContentMargins(mStatusIconsView, 0, 0);
|
|
||||||
- int paddingLeft = 0;
|
|
||||||
- int paddingRight = 0;
|
|
||||||
|
|
||||||
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
|
|
||||||
+ // Note: these are supposedly notification_side_paddings
|
|
||||||
int leftMargin = lp.leftMargin;
|
|
||||||
int rightMargin = lp.rightMargin;
|
|
||||||
|
|
||||||
// The clock might collide with cutouts, let's shift it out of the way.
|
|
||||||
- // We only do that if the inset is bigger than our own padding, since it's nicer to
|
|
||||||
- // align with
|
|
||||||
- if (mCutOutPaddingLeft > 0) {
|
|
||||||
- // if there's a cutout, let's use at least the rounded corner inset
|
|
||||||
- int cutoutPadding = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding);
|
|
||||||
- paddingLeft = Math.max(cutoutPadding - leftMargin, 0);
|
|
||||||
+ // Margin will be the reference point of paddings/translations
|
|
||||||
+ // and will have to be subtracted from cutout paddings
|
|
||||||
+ boolean headerPaddingUpdated = false;
|
|
||||||
+ int headerPaddingLeft = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding) - leftMargin;
|
|
||||||
+ if (headerPaddingLeft != mHeaderPaddingLeft) {
|
|
||||||
+ mHeaderPaddingLeft = headerPaddingLeft;
|
|
||||||
+ headerPaddingUpdated = true;
|
|
||||||
}
|
|
||||||
- if (mCutOutPaddingRight > 0) {
|
|
||||||
- // if there's a cutout, let's use at least the rounded corner inset
|
|
||||||
- int cutoutPadding = Math.max(mCutOutPaddingRight, mRoundedCornerPadding);
|
|
||||||
- paddingRight = Math.max(cutoutPadding - rightMargin, 0);
|
|
||||||
+ int headerPaddingRight = Math.max(mCutOutPaddingRight, mRoundedCornerPadding) - rightMargin;
|
|
||||||
+ if (headerPaddingRight != mHeaderPaddingRight) {
|
|
||||||
+ mHeaderPaddingRight = headerPaddingRight;
|
|
||||||
+ headerPaddingUpdated = true;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- mDatePrivacyView.setPadding(paddingLeft,
|
|
||||||
+ // Update header animator with new paddings
|
|
||||||
+ if (headerPaddingUpdated) {
|
|
||||||
+ updateAnimators();
|
|
||||||
+ }
|
|
||||||
+ mDatePrivacyView.setPadding(mHeaderPaddingLeft + mStatusBarPaddingStart,
|
|
||||||
mWaterfallTopInset,
|
|
||||||
- paddingRight,
|
|
||||||
+ mHeaderPaddingRight + mStatusBarPaddingEnd,
|
|
||||||
0);
|
|
||||||
- mStatusIconsView.setPadding(paddingLeft,
|
|
||||||
+ mStatusIconsView.setPadding(0,
|
|
||||||
mWaterfallTopInset,
|
|
||||||
- paddingRight,
|
|
||||||
+ 0,
|
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun updateResources() {
|
||||||
|
- roundedCorners = resources.getDimensionPixelSize(R.dimen.rounded_corner_content_padding)
|
||||||
|
val padding = resources.getDimensionPixelSize(R.dimen.qs_panel_padding)
|
||||||
|
header.setPadding(padding, header.paddingTop, padding, header.paddingBottom)
|
||||||
|
updateQQSPaddings()
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
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 b11843cd5d1f..049939ed41a2 100644
|
index 7b6fc66a208d..ab919f4c5882 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||||
@@ -151,14 +151,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
|
@@ -164,14 +164,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
|
||||||
mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
||||||
getResources().getDimensionPixelSize(
|
getResources().getDimensionPixelSize(
|
||||||
com.android.internal.R.dimen.text_size_small_material));
|
com.android.internal.R.dimen.text_size_small_material));
|
||||||
@@ -259,5 +161,5 @@ index b11843cd5d1f..049939ed41a2 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
From bfd123cf8cd9c926838c95d0a2eaf3a034cd359a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Sun, 17 Apr 2022 08:48:42 +0000
|
|
||||||
Subject: [PATCH 11/19] Replace NTP server
|
|
||||||
|
|
||||||
Change-Id: I938ab46026d841e7536d8fc02b0ef6b28ebb6ea1
|
|
||||||
---
|
|
||||||
core/res/res/values/config.xml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
|
||||||
index 60a4e15d93ec..999e5b95003c 100644
|
|
||||||
--- a/core/res/res/values/config.xml
|
|
||||||
+++ b/core/res/res/values/config.xml
|
|
||||||
@@ -2246,7 +2246,7 @@
|
|
||||||
<bool name="config_actionMenuItemAllCaps">true</bool>
|
|
||||||
|
|
||||||
<!-- Remote server that can provide NTP responses. -->
|
|
||||||
- <string translatable="false" name="config_ntpServer">time.android.com</string>
|
|
||||||
+ <string translatable="false" name="config_ntpServer">cn.pool.ntp.org</string>
|
|
||||||
<!-- Normal polling frequency in milliseconds -->
|
|
||||||
<integer name="config_ntpPollingInterval">86400000</integer>
|
|
||||||
<!-- Try-again polling interval in milliseconds, in case the network request failed -->
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+6
-6
@@ -1,7 +1,7 @@
|
|||||||
From 529ab35d8bff56cacbf77689fde2bbb4e720fa0a Mon Sep 17 00:00:00 2001
|
From 4803ddab6f362587e769b2aa5d60a041345d26af Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Tue, 31 May 2022 00:00:08 +0000
|
Date: Tue, 31 May 2022 00:00:08 +0000
|
||||||
Subject: [PATCH 12/19] Revert "SystemUI: Add left padding for keyguard slices"
|
Subject: [PATCH 11/21] Revert "SystemUI: Add left padding for keyguard slices"
|
||||||
|
|
||||||
This reverts commit 4a7a4426944e28e70a3eca6a696ff6c7599fb896.
|
This reverts commit 4a7a4426944e28e70a3eca6a696ff6c7599fb896.
|
||||||
---
|
---
|
||||||
@@ -9,7 +9,7 @@ This reverts commit 4a7a4426944e28e70a3eca6a696ff6c7599fb896.
|
|||||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
||||||
index 79ac96e3bde2..9b76bab5c2a7 100644
|
index 31d22eb38a24..65a71664e245 100644
|
||||||
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
||||||
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
||||||
@@ -49,7 +49,6 @@ import com.android.internal.graphics.ColorUtils;
|
@@ -49,7 +49,6 @@ import com.android.internal.graphics.ColorUtils;
|
||||||
@@ -19,8 +19,8 @@ index 79ac96e3bde2..9b76bab5c2a7 100644
|
|||||||
-import com.android.systemui.keyguard.KeyguardSliceProvider;
|
-import com.android.systemui.keyguard.KeyguardSliceProvider;
|
||||||
import com.android.systemui.util.wakelock.KeepAwakeAnimationListener;
|
import com.android.systemui.util.wakelock.KeepAwakeAnimationListener;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.PrintWriter;
|
||||||
@@ -447,15 +446,13 @@ public class KeyguardSliceView extends LinearLayout {
|
@@ -446,15 +445,13 @@ public class KeyguardSliceView extends LinearLayout {
|
||||||
|
|
||||||
private void updatePadding() {
|
private void updatePadding() {
|
||||||
boolean hasText = !TextUtils.isEmpty(getText());
|
boolean hasText = !TextUtils.isEmpty(getText());
|
||||||
@@ -40,5 +40,5 @@ index 79ac96e3bde2..9b76bab5c2a7 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From 243c196f3e5bacc8c05cbc7632f2846445836759 Mon Sep 17 00:00:00 2001
|
From f5ad15c1785d0a458bc2be47f0ef2a8d5283ae86 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 5 Sep 2021 01:20:12 +0000
|
Date: Sun, 5 Sep 2021 01:20:12 +0000
|
||||||
Subject: [PATCH 13/19] Revert "Update RAT icons to match Silk design"
|
Subject: [PATCH 12/21] Revert "Update RAT icons to match Silk design"
|
||||||
|
|
||||||
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
|
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
|
||||||
---
|
---
|
||||||
@@ -269,5 +269,5 @@ index 48faeb22416f..1511659ea42f 100644
|
|||||||
+ android:pathData="M14.21,12.81c0.36,-0.16 0.69,-0.36 0.97,-0.61c0.41,-0.38 0.72,-0.83 0.94,-1.37c0.21,-0.54 0.32,-1.14 0.32,-1.79c0,-0.92 -0.16,-1.7 -0.49,-2.33c-0.32,-0.64 -0.79,-1.12 -1.43,-1.45c-0.62,-0.33 -1.4,-0.49 -2.32,-0.49H8.23V19h1.8v-5.76h2.5L15.06,19h1.92v-0.12L14.21,12.81zM10.03,11.71V6.32h2.18c0.59,0 1.06,0.11 1.42,0.34c0.36,0.22 0.62,0.54 0.78,0.95c0.16,0.41 0.24,0.89 0.24,1.44c0,0.49 -0.09,0.93 -0.27,1.34c-0.18,0.4 -0.46,0.73 -0.82,0.97c-0.36,0.23 -0.82,0.35 -1.37,0.35H10.03z"/>
|
+ android:pathData="M14.21,12.81c0.36,-0.16 0.69,-0.36 0.97,-0.61c0.41,-0.38 0.72,-0.83 0.94,-1.37c0.21,-0.54 0.32,-1.14 0.32,-1.79c0,-0.92 -0.16,-1.7 -0.49,-2.33c-0.32,-0.64 -0.79,-1.12 -1.43,-1.45c-0.62,-0.33 -1.4,-0.49 -2.32,-0.49H8.23V19h1.8v-5.76h2.5L15.06,19h1.92v-0.12L14.21,12.81zM10.03,11.71V6.32h2.18c0.59,0 1.06,0.11 1.42,0.34c0.36,0.22 0.62,0.54 0.78,0.95c0.16,0.41 0.24,0.89 0.24,1.44c0,0.49 -0.09,0.93 -0.27,1.34c-0.18,0.4 -0.46,0.73 -0.82,0.97c-0.36,0.23 -0.82,0.35 -1.37,0.35H10.03z"/>
|
||||||
</vector>
|
</vector>
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
From 15e59be158a3305a17e14cc18883d323d2afc54b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 29 Sep 2022 11:27:57 +0000
|
||||||
|
Subject: [PATCH 13/21] Revert "Use the default top clock margin on h800
|
||||||
|
devices"
|
||||||
|
|
||||||
|
This reverts commits 50ba380f4d8d1c2523e0f76295ca556038796bfd
|
||||||
|
and 2a254b4d479029aec46f79a0ed14ffab6d0424bc.
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values-h800dp/dimens.xml | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values-h800dp/dimens.xml b/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
index 3a71994e07e2..4b9bce0eda99 100644
|
||||||
|
--- a/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
@@ -15,6 +15,9 @@
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
+ <!-- Minimum margin between clock and top of screen or ambient indication -->
|
||||||
|
+ <dimen name="keyguard_clock_top_margin">38dp</dimen>
|
||||||
|
+
|
||||||
|
<!-- With the large clock, move up slightly from the center -->
|
||||||
|
<dimen name="keyguard_large_clock_top_margin">-112dp</dimen>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+30
-34
@@ -1,50 +1,47 @@
|
|||||||
From b472b86f1bc17ade0b4b5e2e9743d11ef704ab4f Mon Sep 17 00:00:00 2001
|
From 6927e68fa4ec001ec72e9f68e4454a37c8bc7bb5 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 7 Oct 2020 14:00:35 +0000
|
Date: Wed, 7 Oct 2020 14:00:35 +0000
|
||||||
Subject: [PATCH 14/19] UI: Always render windows into cutouts
|
Subject: [PATCH 14/21] UI: Always render windows into cutouts
|
||||||
|
|
||||||
Eliminates black/white letterboxing
|
Eliminates black/white letterboxing
|
||||||
Quick and dirty way to do the latter - wait for proper fix from Google
|
Quick and dirty way to do the latter - wait for proper fix from Google
|
||||||
|
|
||||||
Change-Id: I4661c7979bfa7de453329fcddbaeefc2009e2da3
|
Change-Id: I4661c7979bfa7de453329fcddbaeefc2009e2da3
|
||||||
---
|
---
|
||||||
.../com/android/server/wm/DisplayFrames.java | 31 +++----------------
|
.../com/android/server/wm/DisplayFrames.java | 28 +++----------------
|
||||||
.../com/android/server/wm/DisplayPolicy.java | 2 +-
|
.../com/android/server/wm/DisplayPolicy.java | 1 +
|
||||||
2 files changed, 5 insertions(+), 28 deletions(-)
|
2 files changed, 5 insertions(+), 24 deletions(-)
|
||||||
|
|
||||||
diff --git a/services/core/java/com/android/server/wm/DisplayFrames.java b/services/core/java/com/android/server/wm/DisplayFrames.java
|
diff --git a/services/core/java/com/android/server/wm/DisplayFrames.java b/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||||
index 32e43ca4e56c..18c28ae674f9 100644
|
index 33641f72b2ff..6e201970ac03 100644
|
||||||
--- a/services/core/java/com/android/server/wm/DisplayFrames.java
|
--- a/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||||
+++ b/services/core/java/com/android/server/wm/DisplayFrames.java
|
+++ b/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||||
@@ -98,33 +98,10 @@ public class DisplayFrames {
|
@@ -92,30 +92,10 @@ public class DisplayFrames {
|
||||||
state.setDisplayCutout(cutout);
|
|
||||||
state.setRoundedCorners(roundedCorners);
|
state.setRoundedCorners(roundedCorners);
|
||||||
state.setPrivacyIndicatorBounds(indicatorBounds);
|
state.setPrivacyIndicatorBounds(indicatorBounds);
|
||||||
- if (!cutout.isEmpty()) {
|
state.getDisplayCutoutSafe(safe);
|
||||||
- if (cutout.getSafeInsetLeft() > 0) {
|
- if (safe.left > unrestricted.left) {
|
||||||
- safe.left = unrestricted.left + cutout.getSafeInsetLeft();
|
|
||||||
- }
|
|
||||||
- if (cutout.getSafeInsetTop() > 0) {
|
|
||||||
- safe.top = unrestricted.top + cutout.getSafeInsetTop();
|
|
||||||
- }
|
|
||||||
- if (cutout.getSafeInsetRight() > 0) {
|
|
||||||
- safe.right = unrestricted.right - cutout.getSafeInsetRight();
|
|
||||||
- }
|
|
||||||
- if (cutout.getSafeInsetBottom() > 0) {
|
|
||||||
- safe.bottom = unrestricted.bottom - cutout.getSafeInsetBottom();
|
|
||||||
- }
|
|
||||||
- state.getSource(ITYPE_LEFT_DISPLAY_CUTOUT).setFrame(
|
- state.getSource(ITYPE_LEFT_DISPLAY_CUTOUT).setFrame(
|
||||||
- unrestricted.left, unrestricted.top, safe.left, unrestricted.bottom);
|
- unrestricted.left, unrestricted.top, safe.left, unrestricted.bottom);
|
||||||
|
- } else {
|
||||||
|
- state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
||||||
|
- }
|
||||||
|
- if (safe.top > unrestricted.top) {
|
||||||
- state.getSource(ITYPE_TOP_DISPLAY_CUTOUT).setFrame(
|
- state.getSource(ITYPE_TOP_DISPLAY_CUTOUT).setFrame(
|
||||||
- unrestricted.left, unrestricted.top, unrestricted.right, safe.top);
|
- unrestricted.left, unrestricted.top, unrestricted.right, safe.top);
|
||||||
|
- } else {
|
||||||
|
- state.removeSource(ITYPE_TOP_DISPLAY_CUTOUT);
|
||||||
|
- }
|
||||||
|
- if (safe.right < unrestricted.right) {
|
||||||
- state.getSource(ITYPE_RIGHT_DISPLAY_CUTOUT).setFrame(
|
- state.getSource(ITYPE_RIGHT_DISPLAY_CUTOUT).setFrame(
|
||||||
- safe.right, unrestricted.top, unrestricted.right, unrestricted.bottom);
|
- safe.right, unrestricted.top, unrestricted.right, unrestricted.bottom);
|
||||||
|
- } else {
|
||||||
|
- state.removeSource(ITYPE_RIGHT_DISPLAY_CUTOUT);
|
||||||
|
- }
|
||||||
|
- if (safe.bottom < unrestricted.bottom) {
|
||||||
- state.getSource(ITYPE_BOTTOM_DISPLAY_CUTOUT).setFrame(
|
- state.getSource(ITYPE_BOTTOM_DISPLAY_CUTOUT).setFrame(
|
||||||
- unrestricted.left, safe.bottom, unrestricted.right, unrestricted.bottom);
|
- unrestricted.left, safe.bottom, unrestricted.right, unrestricted.bottom);
|
||||||
- } else {
|
- } else {
|
||||||
- state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
|
||||||
- state.removeSource(ITYPE_TOP_DISPLAY_CUTOUT);
|
|
||||||
- state.removeSource(ITYPE_RIGHT_DISPLAY_CUTOUT);
|
|
||||||
- state.removeSource(ITYPE_BOTTOM_DISPLAY_CUTOUT);
|
- state.removeSource(ITYPE_BOTTOM_DISPLAY_CUTOUT);
|
||||||
- }
|
- }
|
||||||
+ state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
+ state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
||||||
@@ -55,18 +52,17 @@ 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
|
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
index 969d70099cfb..3a64c085beaf 100644
|
index 1468360b37b7..a1f70e4c8deb 100644
|
||||||
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
@@ -1867,7 +1867,7 @@ public class DisplayPolicy {
|
@@ -1558,6 +1558,7 @@ public class DisplayPolicy {
|
||||||
pf.set((fl & FLAG_LAYOUT_IN_SCREEN) == 0 ? attached.getFrame() : df);
|
displayFrames = win.getDisplayFrames(displayFrames);
|
||||||
}
|
|
||||||
|
|
||||||
- final int cutoutMode = attrs.layoutInDisplayCutoutMode;
|
final WindowManager.LayoutParams attrs = win.mAttrs.forRotation(displayFrames.mRotation);
|
||||||
+ final int cutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
|
+ attrs.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
|
||||||
// Ensure that windows with a DEFAULT or NEVER display cutout mode are laid out in
|
sTmpClientFrames.attachedFrame = attached != null ? attached.getFrame() : null;
|
||||||
// the cutout safe zone.
|
|
||||||
if (cutoutMode != LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) {
|
// If this window has different LayoutParams for rotations, we cannot trust its requested
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -1,7 +1,7 @@
|
|||||||
From 9fe9c77b0d6ced77567fc17a09688ee6b6c4c9e5 Mon Sep 17 00:00:00 2001
|
From 89c565bf1a9ce56a64191059424bf9f5fe04f1d9 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 1 Sep 2021 14:10:50 +0000
|
Date: Wed, 1 Sep 2021 14:10:50 +0000
|
||||||
Subject: [PATCH 15/19] UI: Kill rounded corners in notification scrim
|
Subject: [PATCH 15/21] 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
|
Rounded corners in S is nicely implemented, but this is one occasion where it looks out of place
|
||||||
|
|
||||||
@@ -11,12 +11,12 @@ Change-Id: I09ed59e0e658ebd512a9d02a8ef3edfe2c9888da
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
index a55c394a3e53..f61b7564c732 100644
|
index d0a9055e1905..30881992795d 100644
|
||||||
--- a/packages/SystemUI/res/values/dimens.xml
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
@@ -608,7 +608,7 @@
|
@@ -726,7 +726,7 @@
|
||||||
<!-- Burmese line spacing multiplier between hours and minutes of the keyguard clock -->
|
<!-- With the large clock, move up slightly from the center -->
|
||||||
<item name="keyguard_clock_line_spacing_scale_burmese" type="dimen" format="float">1</item>
|
<dimen name="keyguard_large_clock_top_margin">-60dp</dimen>
|
||||||
|
|
||||||
- <dimen name="notification_scrim_corner_radius">32dp</dimen>
|
- <dimen name="notification_scrim_corner_radius">32dp</dimen>
|
||||||
+ <dimen name="notification_scrim_corner_radius">0dp</dimen>
|
+ <dimen name="notification_scrim_corner_radius">0dp</dimen>
|
||||||
@@ -24,5 +24,5 @@ index a55c394a3e53..f61b7564c732 100644
|
|||||||
<!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
|
<!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
|
||||||
<dimen name="keyguard_min_swipe_amount">110dp</dimen>
|
<dimen name="keyguard_min_swipe_amount">110dp</dimen>
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From 53ca533e468c5b88268399b905ad61585431361b Mon Sep 17 00:00:00 2001
|
From be2477f3314d044e1d7581905a4d358aa0f0a2a7 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Mon, 26 Oct 2020 14:06:56 +0000
|
Date: Mon, 26 Oct 2020 14:06:56 +0000
|
||||||
Subject: [PATCH 16/19] UI: Reconfigure power menu items
|
Subject: [PATCH 16/21] UI: Reconfigure power menu items
|
||||||
|
|
||||||
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
|
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
|
||||||
---
|
---
|
||||||
@@ -9,10 +9,10 @@ Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
|
|||||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||||
index 999e5b95003c..b61233bdf931 100644
|
index 87e3ddcf8fdf..64d592b2230b 100644
|
||||||
--- a/core/res/res/values/config.xml
|
--- a/core/res/res/values/config.xml
|
||||||
+++ b/core/res/res/values/config.xml
|
+++ b/core/res/res/values/config.xml
|
||||||
@@ -3016,13 +3016,10 @@
|
@@ -3305,13 +3305,10 @@
|
||||||
"logout" = Logout the current user
|
"logout" = Logout the current user
|
||||||
-->
|
-->
|
||||||
<string-array translatable="false" name="config_globalActionsList">
|
<string-array translatable="false" name="config_globalActionsList">
|
||||||
@@ -28,5 +28,5 @@ index 999e5b95003c..b61233bdf931 100644
|
|||||||
|
|
||||||
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
|
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -1,7 +1,7 @@
|
|||||||
From 819573575f21c3ebef03940d91b48ed1fe206034 Mon Sep 17 00:00:00 2001
|
From f22928416285a9ac0ab6f8cd683c8dd5d95bf15b Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 5 Mar 2022 01:43:37 +0000
|
Date: Sat, 5 Mar 2022 01:43:37 +0000
|
||||||
Subject: [PATCH 17/19] UI: Reconfigure quick settings tiles
|
Subject: [PATCH 17/21] UI: Reconfigure quick settings tiles
|
||||||
|
|
||||||
Change-Id: I743f52ef3a95db0ca2c02ae973faa4629e41885d
|
Change-Id: I743f52ef3a95db0ca2c02ae973faa4629e41885d
|
||||||
---
|
---
|
||||||
@@ -9,10 +9,10 @@ Change-Id: I743f52ef3a95db0ca2c02ae973faa4629e41885d
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||||
index 94cc561f5fb0..ad20d2227087 100644
|
index 418bbc7c7932..245bde4c543a 100644
|
||||||
--- a/packages/SystemUI/res/values/config.xml
|
--- a/packages/SystemUI/res/values/config.xml
|
||||||
+++ b/packages/SystemUI/res/values/config.xml
|
+++ b/packages/SystemUI/res/values/config.xml
|
||||||
@@ -74,7 +74,7 @@
|
@@ -68,7 +68,7 @@
|
||||||
|
|
||||||
<!-- The default tiles to display in QuickSettings -->
|
<!-- The default tiles to display in QuickSettings -->
|
||||||
<string name="quick_settings_tiles_default" translatable="false">
|
<string name="quick_settings_tiles_default" translatable="false">
|
||||||
@@ -20,7 +20,7 @@ index 94cc561f5fb0..ad20d2227087 100644
|
|||||||
+ wifi,cell,hotspot,location,rotation,flashlight
|
+ wifi,cell,hotspot,location,rotation,flashlight
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<!-- The minimum number of tiles to display in QuickSettings -->
|
<!-- The class path of the Safety Quick Settings Tile -->
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From 7b901ace4b384da0a0df89c08d9088e83a9f6f2a Mon Sep 17 00:00:00 2001
|
From fe8362152cdb0a17376ffedb37030cc57d14b375 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Tue, 29 Jun 2021 22:57:01 +0000
|
Date: Tue, 29 Jun 2021 22:57:01 +0000
|
||||||
Subject: [PATCH 18/19] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
|
Subject: [PATCH 18/21] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
|
||||||
|
|
||||||
I decide what's good enough for a wallpaper!
|
I decide what's good enough for a wallpaper!
|
||||||
|
|
||||||
@@ -11,10 +11,10 @@ Change-Id: I5ccd85b3df12e53746a4ac6cbc37ba8d11f6c336
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
||||||
index 7ef0a19ec44c..8dbf94a9caad 100644
|
index a34a50c4b7b0..028f77fb21b0 100644
|
||||||
--- a/core/java/android/app/WallpaperColors.java
|
--- a/core/java/android/app/WallpaperColors.java
|
||||||
+++ b/core/java/android/app/WallpaperColors.java
|
+++ b/core/java/android/app/WallpaperColors.java
|
||||||
@@ -543,7 +543,7 @@ public final class WallpaperColors implements Parcelable {
|
@@ -580,7 +580,7 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
|
||||||
int hints = 0;
|
int hints = 0;
|
||||||
double meanLuminance = totalLuminance / pixels.length;
|
double meanLuminance = totalLuminance / pixels.length;
|
||||||
@@ -24,5 +24,5 @@ index 7ef0a19ec44c..8dbf94a9caad 100644
|
|||||||
}
|
}
|
||||||
if (meanLuminance < DARK_THEME_MEAN_LUMINANCE) {
|
if (meanLuminance < DARK_THEME_MEAN_LUMINANCE) {
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
From 0a817f70313c950e3662f2c64b2d5c35d6a8b14d 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 19/19] UI: Remove privacy dot padding
|
|
||||||
|
|
||||||
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
|
|
||||||
---
|
|
||||||
packages/SystemUI/res/values/dimens.xml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
|
||||||
index f61b7564c732..bed34e0a6402 100644
|
|
||||||
--- a/packages/SystemUI/res/values/dimens.xml
|
|
||||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
|
||||||
@@ -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 -->
|
|
||||||
- <dimen name="ongoing_appops_dot_min_padding">20dp</dimen>
|
|
||||||
+ <dimen name="ongoing_appops_dot_min_padding">0dp</dimen>
|
|
||||||
|
|
||||||
<dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen>
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
From a0cd4caf1cd92218e44db206ec2f67839ce4dbe8 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 19/21] UI: Remove privacy dot
|
||||||
|
|
||||||
|
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values/dimens.xml | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
index 30881992795d..7ead38868815 100644
|
||||||
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
@@ -1059,12 +1059,12 @@
|
||||||
|
<dimen name="ongoing_appops_chip_min_width">56dp</dimen>
|
||||||
|
<!-- Three privacy items. This value must not be exceeded -->
|
||||||
|
<dimen name="ongoing_appops_chip_max_width">76dp</dimen>
|
||||||
|
- <dimen name="ongoing_appops_dot_diameter">6dp</dimen>
|
||||||
|
+ <dimen name="ongoing_appops_dot_diameter">0dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_min_animation_width">10dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_animation_in_status_bar_translation_x">15dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_animation_out_status_bar_translation_x">7dp</dimen>
|
||||||
|
<!-- Total minimum padding to enforce to ensure that the dot can always show -->
|
||||||
|
- <dimen name="ongoing_appops_dot_min_padding">20dp</dimen>
|
||||||
|
+ <dimen name="ongoing_appops_dot_min_padding">0dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
From 7cacf0df0092432cd2347e0cbae0c1c3d0f5dcf9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 22 Mar 2023 00:29:13 +0000
|
||||||
|
Subject: [PATCH 20/21] UI: Restore quick settings fonts to pre-T-QPR2
|
||||||
|
|
||||||
|
TODO: Large header clock looks better in Regular - perhaps figure out how to transition smoothly?
|
||||||
|
Change-Id: If2e57fee61b6bd4b6b7fedc7e3011164cd2cb56f
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values/styles.xml | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||||
|
index 6996e41e08da..5e6d45ac9305 100644
|
||||||
|
--- a/packages/SystemUI/res/values/styles.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/styles.xml
|
||||||
|
@@ -134,7 +134,7 @@
|
||||||
|
<!-- This is hard coded to be sans-serif-condensed to match the icons -->
|
||||||
|
|
||||||
|
<style name="TextAppearance.QS.Status">
|
||||||
|
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||||
|
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
|
||||||
|
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||||
|
<item name="android:textSize">14sp</item>
|
||||||
|
<item name="android:letterSpacing">0.01</item>
|
||||||
|
@@ -152,6 +152,7 @@
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextAppearance.QS.Status.Build">
|
||||||
|
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||||
|
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
From 9732bf6c88d489f587e62d9f6b382e876295cbd6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 30 Sep 2022 16:02:16 +0000
|
||||||
|
Subject: [PATCH 21/21] UI: Revert to HSL luminance for wallpaper dark hints
|
||||||
|
|
||||||
|
Y U no test for consistency, Google?
|
||||||
|
|
||||||
|
Change-Id: Ie5663bdf518b4ef93d6deb634e707a32d052ac55
|
||||||
|
---
|
||||||
|
core/java/android/app/WallpaperColors.java | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
||||||
|
index 028f77fb21b0..63ccf961a2d8 100644
|
||||||
|
--- a/core/java/android/app/WallpaperColors.java
|
||||||
|
+++ b/core/java/android/app/WallpaperColors.java
|
||||||
|
@@ -555,15 +555,15 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
float[] tmpHsl = new float[3];
|
||||||
|
for (int i = 0; i < pixels.length; i++) {
|
||||||
|
int pixelColor = pixels[i];
|
||||||
|
- ColorUtils.colorToHSL(pixelColor, tmpHsl);
|
||||||
|
final int alpha = Color.alpha(pixelColor);
|
||||||
|
|
||||||
|
// Apply composite colors where the foreground is a black layer with an alpha value of
|
||||||
|
// the dim amount and the background is the wallpaper pixel color.
|
||||||
|
int compositeColors = ColorUtils.compositeColors(blackTransparent, pixelColor);
|
||||||
|
|
||||||
|
- // Calculate the adjusted luminance of the dimmed wallpaper pixel color.
|
||||||
|
- double adjustedLuminance = ColorUtils.calculateLuminance(compositeColors);
|
||||||
|
+ // Calculate the luminance of the dimmed wallpaper pixel color.
|
||||||
|
+ ColorUtils.colorToHSL(compositeColors, tmpHsl);
|
||||||
|
+ double luminance = tmpHsl[2];
|
||||||
|
|
||||||
|
// Make sure we don't have a dark pixel mass that will
|
||||||
|
// make text illegible.
|
||||||
|
@@ -575,7 +575,7 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
pixels[i] = Color.RED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- totalLuminance += adjustedLuminance;
|
||||||
|
+ totalLuminance += luminance;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hints = 0;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+3049
File diff suppressed because it is too large
Load Diff
+16
-17
@@ -1,37 +1,36 @@
|
|||||||
From 3ae6c0a36285aee1b18aca199593c828d9d6d2ec Mon Sep 17 00:00:00 2001
|
From ef3810b1d55f079278f3ac3ef83f7b5b2eaaa7c1 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 5 Sep 2021 00:30:33 +0000
|
Date: Sun, 5 Sep 2021 00:30:33 +0000
|
||||||
Subject: [PATCH 1/3] DeskClock: Remove night mode
|
Subject: [PATCH 2/4] DeskClock: Remove night mode
|
||||||
|
|
||||||
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
|
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
|
||||||
---
|
---
|
||||||
res/xml/screensaver_settings.xml | 8 +-------
|
res/xml/screensaver_settings.xml | 7 -------
|
||||||
src/com/android/deskclock/Screensaver.java | 5 ++---
|
src/com/android/deskclock/Screensaver.java | 5 ++---
|
||||||
src/com/android/deskclock/ScreensaverActivity.java | 2 +-
|
src/com/android/deskclock/ScreensaverActivity.java | 2 +-
|
||||||
3 files changed, 4 insertions(+), 11 deletions(-)
|
3 files changed, 3 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
diff --git a/res/xml/screensaver_settings.xml b/res/xml/screensaver_settings.xml
|
diff --git a/res/xml/screensaver_settings.xml b/res/xml/screensaver_settings.xml
|
||||||
index 1680aab83..73375dcfa 100644
|
index 7b8c9764a..908f76fef 100644
|
||||||
--- a/res/xml/screensaver_settings.xml
|
--- a/res/xml/screensaver_settings.xml
|
||||||
+++ b/res/xml/screensaver_settings.xml
|
+++ b/res/xml/screensaver_settings.xml
|
||||||
@@ -24,10 +24,4 @@
|
@@ -26,11 +26,4 @@
|
||||||
android:key="screensaver_clock_style"
|
android:title="@string/clock_style"
|
||||||
android:title="@string/clock_style" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
- <CheckBoxPreference
|
- <CheckBoxPreference
|
||||||
- android:defaultValue="true"
|
- android:defaultValue="true"
|
||||||
- android:key="screensaver_night_mode"
|
- android:key="screensaver_night_mode"
|
||||||
- android:summary="@string/night_mode_summary"
|
- android:summary="@string/night_mode_summary"
|
||||||
- android:title="@string/night_mode_title" />
|
- android:title="@string/night_mode_title"
|
||||||
|
- app:iconSpaceReserved="false" />
|
||||||
-
|
-
|
||||||
-</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
\ No newline at end of file
|
|
||||||
+</PreferenceScreen>
|
|
||||||
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
|
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
|
||||||
index 29cc13ff9..8def22b30 100644
|
index ad92b1149..f6c03ed0a 100644
|
||||||
--- a/src/com/android/deskclock/Screensaver.java
|
--- a/src/com/android/deskclock/Screensaver.java
|
||||||
+++ b/src/com/android/deskclock/Screensaver.java
|
+++ b/src/com/android/deskclock/Screensaver.java
|
||||||
@@ -141,9 +141,8 @@ public final class Screensaver extends DreamService {
|
@@ -136,9 +136,8 @@ public final class Screensaver extends DreamService {
|
||||||
|
|
||||||
private void setClockStyle() {
|
private void setClockStyle() {
|
||||||
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
|
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
|
||||||
@@ -44,10 +43,10 @@ index 29cc13ff9..8def22b30 100644
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
|
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
index cf770086b..7a756df7d 100644
|
index b30f82ee7..90235351f 100644
|
||||||
--- a/src/com/android/deskclock/ScreensaverActivity.java
|
--- a/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
+++ b/src/com/android/deskclock/ScreensaverActivity.java
|
+++ b/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
@@ -107,7 +107,7 @@ public class ScreensaverActivity extends BaseActivity {
|
@@ -101,7 +101,7 @@ public class ScreensaverActivity extends BaseActivity {
|
||||||
Utils.setClockIconTypeface(mMainClockView);
|
Utils.setClockIconTypeface(mMainClockView);
|
||||||
Utils.setTimeFormat((TextClock) digitalClock, false);
|
Utils.setTimeFormat((TextClock) digitalClock, false);
|
||||||
Utils.setClockStyle(digitalClock, analogClock);
|
Utils.setClockStyle(digitalClock, analogClock);
|
||||||
@@ -57,5 +56,5 @@ index cf770086b..7a756df7d 100644
|
|||||||
|
|
||||||
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
|
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+131
-108
@@ -1,7 +1,7 @@
|
|||||||
From fe60811c629e1e8376955463f4f0dafc5b832056 Mon Sep 17 00:00:00 2001
|
From 3430de2c592c9d9b4a08c16477fff4ad1a4ca775 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 19 Jan 2022 18:04:36 +0000
|
Date: Wed, 19 Jan 2022 18:04:36 +0000
|
||||||
Subject: [PATCH 2/3] DeskClock: Adapt digital clocks to S style
|
Subject: [PATCH 3/4] DeskClock: Adapt digital clocks to S style
|
||||||
|
|
||||||
Lollipop is so yesterday...
|
Lollipop is so yesterday...
|
||||||
Bring the layouts of various digital clocks (app, widget, daydream)
|
Bring the layouts of various digital clocks (app, widget, daydream)
|
||||||
@@ -13,62 +13,21 @@ Caveats/TODO:
|
|||||||
|
|
||||||
Change-Id: I10c6fa213c89ac2f6e342be13fdd6390f7f787b0
|
Change-Id: I10c6fa213c89ac2f6e342be13fdd6390f7f787b0
|
||||||
---
|
---
|
||||||
res/layout-land/main_clock_frame.xml | 19 ++---
|
res/layout/date_and_next_alarm_time.xml | 53 +++++++------
|
||||||
res/layout/date_and_next_alarm_time.xml | 57 +++++++-------
|
res/layout/desk_clock_saver.xml | 10 +--
|
||||||
res/layout/desk_clock_saver.xml | 12 +--
|
res/layout/digital_widget.xml | 69 ++++++++---------
|
||||||
res/layout/digital_widget.xml | 71 ++++++++---------
|
|
||||||
res/layout/digital_widget_sizer.xml | 77 ++++++++-----------
|
res/layout/digital_widget_sizer.xml | 77 ++++++++-----------
|
||||||
res/layout/main_clock_frame.xml | 23 +++---
|
res/layout/main_clock_frame.xml | 36 +++------
|
||||||
res/values/dimens.xml | 12 ++-
|
res/values/dimens.xml | 12 ++-
|
||||||
res/values/styles.xml | 19 +++++
|
res/values/styles.xml | 18 +++++
|
||||||
.../alarmclock/DigitalAppWidgetProvider.java | 31 ++++----
|
.../alarmclock/DigitalAppWidgetProvider.java | 31 ++++----
|
||||||
src/com/android/deskclock/AlarmUtils.java | 2 +-
|
src/com/android/deskclock/AlarmUtils.java | 2 +-
|
||||||
10 files changed, 167 insertions(+), 156 deletions(-)
|
src/com/android/deskclock/ClockFragment.java | 3 -
|
||||||
|
src/com/android/deskclock/Utils.java | 19 -----
|
||||||
|
11 files changed, 155 insertions(+), 175 deletions(-)
|
||||||
|
|
||||||
diff --git a/res/layout-land/main_clock_frame.xml b/res/layout-land/main_clock_frame.xml
|
|
||||||
index 6abfdddd6..8ad98c0cf 100644
|
|
||||||
--- a/res/layout-land/main_clock_frame.xml
|
|
||||||
+++ b/res/layout-land/main_clock_frame.xml
|
|
||||||
@@ -21,10 +21,11 @@
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
- <FrameLayout
|
|
||||||
+ <LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
- android:layout_height="0dp"
|
|
||||||
- android:layout_weight="1">
|
|
||||||
+ android:layout_height="wrap_content"
|
|
||||||
+ android:gravity="center_vertical|start"
|
|
||||||
+ android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.android.deskclock.AnalogClock
|
|
||||||
android:id="@+id/analog_clock"
|
|
||||||
@@ -38,19 +39,13 @@
|
|
||||||
|
|
||||||
<com.android.deskclock.widget.AutoSizingTextClock
|
|
||||||
android:id="@+id/digital_clock"
|
|
||||||
- style="@style/display_time"
|
|
||||||
+ style="@style/sc_keyguard_clock"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
- android:ellipsize="none"
|
|
||||||
- android:singleLine="true"
|
|
||||||
- android:textSize="@dimen/main_clock_digital_font_size"
|
|
||||||
tools:text="01:23" />
|
|
||||||
|
|
||||||
- </FrameLayout>
|
|
||||||
+ <include layout="@layout/date_and_next_alarm_time" />
|
|
||||||
|
|
||||||
- <include layout="@layout/date_and_next_alarm_time"
|
|
||||||
- android:layout_width="wrap_content"
|
|
||||||
- android:layout_height="wrap_content"
|
|
||||||
- android:layout_gravity="center_horizontal"/>
|
|
||||||
+ </LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
|
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
|
||||||
index 23df1cd3b..b29ffedcf 100644
|
index 9a0cb9103..b29ffedcf 100644
|
||||||
--- a/res/layout/date_and_next_alarm_time.xml
|
--- a/res/layout/date_and_next_alarm_time.xml
|
||||||
+++ b/res/layout/date_and_next_alarm_time.xml
|
+++ b/res/layout/date_and_next_alarm_time.xml
|
||||||
@@ -18,36 +18,41 @@
|
@@ -18,36 +18,41 @@
|
||||||
@@ -111,9 +70,6 @@ index 23df1cd3b..b29ffedcf 100644
|
|||||||
- android:layout_height="wrap_content"
|
- android:layout_height="wrap_content"
|
||||||
- android:textAllCaps="true"
|
- android:textAllCaps="true"
|
||||||
- tools:text="Mo., 07:00"/>
|
- tools:text="Mo., 07:00"/>
|
||||||
-
|
|
||||||
-</LinearLayout>
|
|
||||||
\ No newline at end of file
|
|
||||||
+ <LinearLayout
|
+ <LinearLayout
|
||||||
+ android:layout_width="wrap_content"
|
+ android:layout_width="wrap_content"
|
||||||
+ android:layout_height="wrap_content"
|
+ android:layout_height="wrap_content"
|
||||||
@@ -138,13 +94,13 @@ index 23df1cd3b..b29ffedcf 100644
|
|||||||
+ tools:text="Mo., 07:00"/>
|
+ tools:text="Mo., 07:00"/>
|
||||||
+
|
+
|
||||||
+ </LinearLayout>
|
+ </LinearLayout>
|
||||||
+
|
|
||||||
+</LinearLayout>
|
</LinearLayout>
|
||||||
diff --git a/res/layout/desk_clock_saver.xml b/res/layout/desk_clock_saver.xml
|
diff --git a/res/layout/desk_clock_saver.xml b/res/layout/desk_clock_saver.xml
|
||||||
index dafabfddf..d24219dbb 100644
|
index c147bf7cd..d24219dbb 100644
|
||||||
--- a/res/layout/desk_clock_saver.xml
|
--- a/res/layout/desk_clock_saver.xml
|
||||||
+++ b/res/layout/desk_clock_saver.xml
|
+++ b/res/layout/desk_clock_saver.xml
|
||||||
@@ -42,19 +42,13 @@
|
@@ -42,16 +42,10 @@
|
||||||
|
|
||||||
<TextClock
|
<TextClock
|
||||||
android:id="@+id/digital_clock"
|
android:id="@+id/digital_clock"
|
||||||
@@ -163,13 +119,8 @@ index dafabfddf..d24219dbb 100644
|
|||||||
|
|
||||||
<include layout="@layout/date_and_next_alarm_time" />
|
<include layout="@layout/date_and_next_alarm_time" />
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
-</FrameLayout>
|
|
||||||
\ No newline at end of file
|
|
||||||
+</FrameLayout>
|
|
||||||
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
|
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
|
||||||
index c5b4837a6..e376a5a7a 100644
|
index 5cf896a84..e376a5a7a 100644
|
||||||
--- a/res/layout/digital_widget.xml
|
--- a/res/layout/digital_widget.xml
|
||||||
+++ b/res/layout/digital_widget.xml
|
+++ b/res/layout/digital_widget.xml
|
||||||
@@ -19,58 +19,53 @@
|
@@ -19,58 +19,53 @@
|
||||||
@@ -263,13 +214,6 @@ index c5b4837a6..e376a5a7a 100644
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -82,4 +77,4 @@
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:divider="@null" />
|
|
||||||
|
|
||||||
-</LinearLayout>
|
|
||||||
\ No newline at end of file
|
|
||||||
+</LinearLayout>
|
|
||||||
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
|
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
|
||||||
index f524cf536..b9a28c79f 100644
|
index f524cf536..b9a28c79f 100644
|
||||||
--- a/res/layout/digital_widget_sizer.xml
|
--- a/res/layout/digital_widget_sizer.xml
|
||||||
@@ -374,26 +318,34 @@ index f524cf536..b9a28c79f 100644
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
|
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
|
||||||
index 159956f19..d0701eaf0 100644
|
index c26f61dbd..c2e84eaa3 100644
|
||||||
--- a/res/layout/main_clock_frame.xml
|
--- a/res/layout/main_clock_frame.xml
|
||||||
+++ b/res/layout/main_clock_frame.xml
|
+++ b/res/layout/main_clock_frame.xml
|
||||||
@@ -24,11 +24,11 @@
|
@@ -26,44 +26,28 @@
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
- <FrameLayout
|
- <androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
- android:layout_width="match_parent"
|
||||||
+ <LinearLayout
|
+ <LinearLayout
|
||||||
android:layout_width="wrap_content"
|
+ android:layout_width="wrap_content"
|
||||||
- android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
- android:layout_weight="1"
|
|
||||||
- android:layout_gravity="start">
|
- android:layout_gravity="start">
|
||||||
+ android:layout_height="wrap_content"
|
|
||||||
+ android:gravity="center_vertical|start"
|
+ android:gravity="center_vertical|start"
|
||||||
+ android:orientation="vertical">
|
+ android:orientation="vertical">
|
||||||
|
|
||||||
<com.android.deskclock.AnalogClock
|
<com.android.deskclock.AnalogClock
|
||||||
android:id="@+id/analog_clock"
|
android:id="@+id/analog_clock"
|
||||||
@@ -42,17 +42,14 @@
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_marginTop="@dimen/circle_margin_top"
|
||||||
|
- app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
- app:layout_constraintDimensionRatio="1:1"
|
||||||
|
- app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
- app:layout_constraintStart_toStartOf="parent"
|
||||||
|
- app:layout_constraintTop_toTopOf="parent"
|
||||||
|
- app:layout_constraintWidth_percent="@dimen/analog_clock_width_percent"/>
|
||||||
|
+ android:layout_marginTop="@dimen/circle_margin_top"/>
|
||||||
|
|
||||||
<com.android.deskclock.widget.AutoSizingTextClock
|
<com.android.deskclock.widget.AutoSizingTextClock
|
||||||
android:id="@+id/digital_clock"
|
android:id="@+id/digital_clock"
|
||||||
@@ -407,22 +359,28 @@ index 159956f19..d0701eaf0 100644
|
|||||||
android:paddingTop="@dimen/main_clock_digital_padding"
|
android:paddingTop="@dimen/main_clock_digital_padding"
|
||||||
- android:singleLine="true"
|
- android:singleLine="true"
|
||||||
- android:textSize="@dimen/main_clock_digital_font_size"
|
- android:textSize="@dimen/main_clock_digital_font_size"
|
||||||
tools:text="01:23" />
|
- app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
- app:layout_constraintStart_toStartOf="parent"
|
||||||
|
- app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="01:23"/>
|
||||||
|
|
||||||
- </FrameLayout>
|
- </androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
+ <include layout="@layout/date_and_next_alarm_time" />
|
+ <include layout="@layout/date_and_next_alarm_time" />
|
||||||
+
|
+
|
||||||
+ </LinearLayout>
|
+ </LinearLayout>
|
||||||
|
|
||||||
- <include layout="@layout/date_and_next_alarm_time" />
|
- <include
|
||||||
-</LinearLayout>
|
- layout="@layout/date_and_next_alarm_time"
|
||||||
\ No newline at end of file
|
- android:id="@+id/date_and_next_alarm_time"
|
||||||
+</LinearLayout>
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="start"/>
|
||||||
|
</LinearLayout>
|
||||||
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
|
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
|
||||||
index 856ef8241..3061e27f6 100644
|
index c136fe25a..58a9fedc0 100644
|
||||||
--- a/res/values/dimens.xml
|
--- a/res/values/dimens.xml
|
||||||
+++ b/res/values/dimens.xml
|
+++ b/res/values/dimens.xml
|
||||||
@@ -61,7 +61,7 @@
|
@@ -62,7 +62,7 @@
|
||||||
<dimen name="body_font_padding">4dp</dimen>
|
<dimen name="body_font_padding">4dp</dimen>
|
||||||
|
|
||||||
<dimen name="alarm_label_size">14sp</dimen>
|
<dimen name="alarm_label_size">14sp</dimen>
|
||||||
@@ -431,10 +389,10 @@ index 856ef8241..3061e27f6 100644
|
|||||||
|
|
||||||
<dimen name="backspace_icon_size">24dp</dimen>
|
<dimen name="backspace_icon_size">24dp</dimen>
|
||||||
<dimen name="no_alarms_size">90dp</dimen>
|
<dimen name="no_alarms_size">90dp</dimen>
|
||||||
@@ -140,4 +140,14 @@
|
@@ -144,4 +144,14 @@
|
||||||
<dimen name="alarm_clock_expanded_vertical_margin">8dp</dimen>
|
|
||||||
|
|
||||||
<dimen name="settings_padding">4dp</dimen>
|
<dimen name="settings_padding">4dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="analog_clock_width_percent">0.5</dimen>
|
||||||
+
|
+
|
||||||
+ <!-- Keyguard dimens, taken from S fwb -->
|
+ <!-- Keyguard dimens, taken from S fwb -->
|
||||||
+ <dimen name="sc_keyguard_clock_text_size">86dp</dimen>
|
+ <dimen name="sc_keyguard_clock_text_size">86dp</dimen>
|
||||||
@@ -447,12 +405,12 @@ index 856ef8241..3061e27f6 100644
|
|||||||
+ <dimen name="sc_keyguard_row_alarm_start_padding">5.5dp</dimen>
|
+ <dimen name="sc_keyguard_row_alarm_start_padding">5.5dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
diff --git a/res/values/styles.xml b/res/values/styles.xml
|
diff --git a/res/values/styles.xml b/res/values/styles.xml
|
||||||
index 7ae54c97c..73a800383 100644
|
index 8c6364344..159f24766 100644
|
||||||
--- a/res/values/styles.xml
|
--- a/res/values/styles.xml
|
||||||
+++ b/res/values/styles.xml
|
+++ b/res/values/styles.xml
|
||||||
@@ -187,4 +187,23 @@
|
@@ -209,4 +209,22 @@
|
||||||
<style name="TextAppearance.Title" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
|
<item name="layout_constraintStart_toStartOf">parent</item>
|
||||||
<item name="android:textSize">22.0sp</item>
|
<item name="layout_constraintTop_toBottomOf">@id/timer_setup_time</item>
|
||||||
</style>
|
</style>
|
||||||
+
|
+
|
||||||
+ <style name="sc_keyguard_clock">
|
+ <style name="sc_keyguard_clock">
|
||||||
@@ -472,13 +430,12 @@ index 7ae54c97c..73a800383 100644
|
|||||||
+ <item name="android:includeFontPadding">false</item>
|
+ <item name="android:includeFontPadding">false</item>
|
||||||
+ <item name="android:maxLines">1</item>
|
+ <item name="android:maxLines">1</item>
|
||||||
+ </style>
|
+ </style>
|
||||||
+
|
|
||||||
</resources>
|
</resources>
|
||||||
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
index e31f2d801..a93766697 100644
|
index b54a500c5..fb1b30aa7 100644
|
||||||
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
@@ -212,7 +212,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -223,7 +223,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
if (Utils.isWidgetClickable(wm, widgetId)) {
|
if (Utils.isWidgetClickable(wm, widgetId)) {
|
||||||
final Intent openApp = new Intent(context, DeskClock.class);
|
final Intent openApp = new Intent(context, DeskClock.class);
|
||||||
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, FLAG_IMMUTABLE);
|
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, FLAG_IMMUTABLE);
|
||||||
@@ -487,7 +444,7 @@ index e31f2d801..a93766697 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Configure child views of the remote view.
|
// Configure child views of the remote view.
|
||||||
@@ -244,7 +244,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -255,7 +255,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
final int targetWidthPx = portrait ? minWidthPx : maxWidthPx;
|
final int targetWidthPx = portrait ? minWidthPx : maxWidthPx;
|
||||||
final int targetHeightPx = portrait ? maxHeightPx : minHeightPx;
|
final int targetHeightPx = portrait ? maxHeightPx : minHeightPx;
|
||||||
final int largestClockFontSizePx =
|
final int largestClockFontSizePx =
|
||||||
@@ -496,7 +453,7 @@ index e31f2d801..a93766697 100644
|
|||||||
|
|
||||||
// Create a size template that describes the widget bounds.
|
// Create a size template that describes the widget bounds.
|
||||||
final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx);
|
final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx);
|
||||||
@@ -316,13 +316,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -327,13 +327,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Measure the widget at the largest possible size.
|
// Measure the widget at the largest possible size.
|
||||||
@@ -512,7 +469,7 @@ index e31f2d801..a93766697 100644
|
|||||||
if (low.hasViolations()) {
|
if (low.hasViolations()) {
|
||||||
return low;
|
return low;
|
||||||
}
|
}
|
||||||
@@ -334,7 +334,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -345,7 +345,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
return low;
|
return low;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -521,7 +478,7 @@ index e31f2d801..a93766697 100644
|
|||||||
if (midSize.hasViolations()) {
|
if (midSize.hasViolations()) {
|
||||||
high = midSize;
|
high = midSize;
|
||||||
} else {
|
} else {
|
||||||
@@ -397,7 +397,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -411,7 +411,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
* the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting
|
* the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting
|
||||||
* size measurements.
|
* size measurements.
|
||||||
*/
|
*/
|
||||||
@@ -530,8 +487,8 @@ index e31f2d801..a93766697 100644
|
|||||||
// Create a copy of the given template sizes.
|
// Create a copy of the given template sizes.
|
||||||
final Sizes measuredSizes = template.newSize();
|
final Sizes measuredSizes = template.newSize();
|
||||||
|
|
||||||
@@ -408,13 +408,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -422,13 +422,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
final TextView nextAlarmIcon = (TextView) sizer.findViewById(R.id.nextAlarmIcon);
|
final TextView nextAlarmIcon = sizer.findViewById(R.id.nextAlarmIcon);
|
||||||
|
|
||||||
// Adjust the font sizes.
|
// Adjust the font sizes.
|
||||||
- measuredSizes.setClockFontSizePx(clockFontSize);
|
- measuredSizes.setClockFontSizePx(clockFontSize);
|
||||||
@@ -546,7 +503,7 @@ index e31f2d801..a93766697 100644
|
|||||||
|
|
||||||
// Measure and layout the sizer.
|
// Measure and layout the sizer.
|
||||||
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
||||||
@@ -495,12 +495,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -509,12 +509,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; }
|
private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; }
|
||||||
private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; }
|
private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; }
|
||||||
private int getClockFontSizePx() { return mClockFontSizePx; }
|
private int getClockFontSizePx() { return mClockFontSizePx; }
|
||||||
@@ -570,10 +527,10 @@ index e31f2d801..a93766697 100644
|
|||||||
/**
|
/**
|
||||||
* @return the amount of widget height available to the world cities list
|
* @return the amount of widget height available to the world cities list
|
||||||
diff --git a/src/com/android/deskclock/AlarmUtils.java b/src/com/android/deskclock/AlarmUtils.java
|
diff --git a/src/com/android/deskclock/AlarmUtils.java b/src/com/android/deskclock/AlarmUtils.java
|
||||||
index db60ace95..43767d313 100644
|
index c3739bac8..5b931a46d 100644
|
||||||
--- a/src/com/android/deskclock/AlarmUtils.java
|
--- a/src/com/android/deskclock/AlarmUtils.java
|
||||||
+++ b/src/com/android/deskclock/AlarmUtils.java
|
+++ b/src/com/android/deskclock/AlarmUtils.java
|
||||||
@@ -37,7 +37,7 @@ import java.util.Locale;
|
@@ -38,7 +38,7 @@ import java.util.Locale;
|
||||||
public class AlarmUtils {
|
public class AlarmUtils {
|
||||||
|
|
||||||
public static String getFormattedTime(Context context, Calendar time) {
|
public static String getFormattedTime(Context context, Calendar time) {
|
||||||
@@ -582,6 +539,72 @@ index db60ace95..43767d313 100644
|
|||||||
final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
|
final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
|
||||||
return (String) DateFormat.format(pattern, time);
|
return (String) DateFormat.format(pattern, time);
|
||||||
}
|
}
|
||||||
|
diff --git a/src/com/android/deskclock/ClockFragment.java b/src/com/android/deskclock/ClockFragment.java
|
||||||
|
index bf53584e4..7a0e3ae0b 100644
|
||||||
|
--- a/src/com/android/deskclock/ClockFragment.java
|
||||||
|
+++ b/src/com/android/deskclock/ClockFragment.java
|
||||||
|
@@ -123,7 +123,6 @@ public final class ClockFragment extends DeskClockFragment {
|
||||||
|
Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mClockFrame);
|
||||||
|
Utils.setClockStyle(mDigitalClock, mAnalogClock);
|
||||||
|
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
|
||||||
|
- Utils.updateDateGravity(mClockFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Schedule a runnable to update the date every quarter hour.
|
||||||
|
@@ -151,7 +150,6 @@ public final class ClockFragment extends DeskClockFragment {
|
||||||
|
if (mDigitalClock != null && mAnalogClock != null) {
|
||||||
|
Utils.setClockStyle(mDigitalClock, mAnalogClock);
|
||||||
|
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
|
||||||
|
- Utils.updateDateGravity(mClockFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
final View view = getView();
|
||||||
|
@@ -493,7 +491,6 @@ public final class ClockFragment extends DeskClockFragment {
|
||||||
|
Utils.updateDate(dateFormat, dateFormatForAccessibility, itemView);
|
||||||
|
Utils.setClockStyle(mDigitalClock, mAnalogClock);
|
||||||
|
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
|
||||||
|
- Utils.updateDateGravity(itemView);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/com/android/deskclock/Utils.java b/src/com/android/deskclock/Utils.java
|
||||||
|
index 4eea6beba..4a5ad5a0a 100644
|
||||||
|
--- a/src/com/android/deskclock/Utils.java
|
||||||
|
+++ b/src/com/android/deskclock/Utils.java
|
||||||
|
@@ -52,9 +52,7 @@ import android.text.style.RelativeSizeSpan;
|
||||||
|
import android.text.style.StyleSpan;
|
||||||
|
import android.text.style.TypefaceSpan;
|
||||||
|
import android.util.ArraySet;
|
||||||
|
-import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
-import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextClock;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@@ -302,23 +300,6 @@ public class Utils {
|
||||||
|
dateDisplay.setContentDescription(new SimpleDateFormat(descriptionPattern, l).format(now));
|
||||||
|
}
|
||||||
|
|
||||||
|
- public static void updateDateGravity(View clockFrame) {
|
||||||
|
- View dateAndNextAlarm = clockFrame.findViewById(R.id.date_and_next_alarm_time);
|
||||||
|
- LinearLayout.LayoutParams lp =
|
||||||
|
- (LinearLayout.LayoutParams)dateAndNextAlarm.getLayoutParams();
|
||||||
|
-
|
||||||
|
- final DataModel.ClockStyle clockStyle = DataModel.getDataModel().getClockStyle();
|
||||||
|
- switch (clockStyle) {
|
||||||
|
- case ANALOG:
|
||||||
|
- lp.gravity = Gravity.CENTER;
|
||||||
|
- break;
|
||||||
|
- case DIGITAL:
|
||||||
|
- lp.gravity = Gravity.START;
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- dateAndNextAlarm.setLayoutParams(lp);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/***
|
||||||
|
* Formats the time in the TextClock according to the Locale with a special
|
||||||
|
* formatting treatment for the am/pm label.
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+10
-10
@@ -1,7 +1,7 @@
|
|||||||
From dffc4d40020757da96c73e62a78ce94d6277feba Mon Sep 17 00:00:00 2001
|
From 169570068c3a78f7294d581b2df864ccd3057579 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 20 Jan 2022 04:42:03 +0000
|
Date: Thu, 20 Jan 2022 04:42:03 +0000
|
||||||
Subject: [PATCH 3/3] DeskClock: Wallpaper-based text coloring for digital
|
Subject: [PATCH 4/4] DeskClock: Wallpaper-based text coloring for digital
|
||||||
clock widget
|
clock widget
|
||||||
|
|
||||||
RemoteViews is such a restrictive PITA
|
RemoteViews is such a restrictive PITA
|
||||||
@@ -12,10 +12,10 @@ Change-Id: Ie22c4980526575f73ebb4e56780d4c2193cc45d3
|
|||||||
1 file changed, 57 insertions(+)
|
1 file changed, 57 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
index a93766697..de56f09ca 100644
|
index fb1b30aa7..c04528240 100644
|
||||||
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
@@ -19,6 +19,8 @@ package com.android.alarmclock;
|
@@ -38,6 +38,8 @@ import static java.lang.Math.round;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.AlarmManager;
|
import android.app.AlarmManager;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
@@ -23,8 +23,8 @@ index a93766697..de56f09ca 100644
|
|||||||
+import android.app.WallpaperManager;
|
+import android.app.WallpaperManager;
|
||||||
import android.appwidget.AppWidgetManager;
|
import android.appwidget.AppWidgetManager;
|
||||||
import android.appwidget.AppWidgetProvider;
|
import android.appwidget.AppWidgetProvider;
|
||||||
import android.content.ComponentName;
|
import android.content.BroadcastReceiver;
|
||||||
@@ -109,12 +111,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -111,12 +113,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
|
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
|
||||||
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
|
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ index a93766697..de56f09ca 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -204,6 +234,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -215,6 +245,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
*/
|
*/
|
||||||
private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId,
|
private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId,
|
||||||
Bundle options, boolean portrait) {
|
Bundle options, boolean portrait) {
|
||||||
@@ -85,7 +85,7 @@ index a93766697..de56f09ca 100644
|
|||||||
// Create a remote view for the digital clock.
|
// Create a remote view for the digital clock.
|
||||||
final String packageName = context.getPackageName();
|
final String packageName = context.getPackageName();
|
||||||
final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget);
|
final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget);
|
||||||
@@ -261,6 +304,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -272,6 +315,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
|
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
|
||||||
rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
|
rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ index a93766697..de56f09ca 100644
|
|||||||
final int smallestWorldCityListSizePx =
|
final int smallestWorldCityListSizePx =
|
||||||
resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size);
|
resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size);
|
||||||
if (sizes.getListHeight() <= smallestWorldCityListSizePx) {
|
if (sizes.getListHeight() <= smallestWorldCityListSizePx) {
|
||||||
@@ -416,6 +470,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -430,6 +484,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
|
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
|
||||||
nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
|
nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
|
||||||
|
|
||||||
@@ -114,5 +114,5 @@ index a93766697..de56f09ca 100644
|
|||||||
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
||||||
final int heightSize = View.MeasureSpec.getSize(measuredSizes.mTargetHeightPx);
|
final int heightSize = View.MeasureSpec.getSize(measuredSizes.mTargetHeightPx);
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+17
-15
@@ -1,4 +1,4 @@
|
|||||||
From aecf59a8082d92f24514c7475e2665424f8736a9 Mon Sep 17 00:00:00 2001
|
From 4c3fbe18f838dce0c06342016ca4c933cf077a05 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 13 Mar 2022 11:22:48 +0000
|
Date: Sun, 13 Mar 2022 11:22:48 +0000
|
||||||
Subject: [PATCH] Revert "[DO NOT MERGE] Allow a settings override for
|
Subject: [PATCH] Revert "[DO NOT MERGE] Allow a settings override for
|
||||||
@@ -7,6 +7,8 @@ Subject: [PATCH] Revert "[DO NOT MERGE] Allow a settings override for
|
|||||||
Sorry but I SAID NEVER!
|
Sorry but I SAID NEVER!
|
||||||
|
|
||||||
This reverts commit cb4836b4868adc1f06212ce82851a5f16169ab5c.
|
This reverts commit cb4836b4868adc1f06212ce82851a5f16169ab5c.
|
||||||
|
|
||||||
|
Change-Id: I8b4b1354f23981f6edbe7f3c81ec4f511da3cc1a
|
||||||
---
|
---
|
||||||
res/values/strings.xml | 4 -
|
res/values/strings.xml | 4 -
|
||||||
res/xml/security_lockscreen_settings.xml | 6 --
|
res/xml/security_lockscreen_settings.xml | 6 --
|
||||||
@@ -17,28 +19,28 @@ This reverts commit cb4836b4868adc1f06212ce82851a5f16169ab5c.
|
|||||||
delete mode 100644 tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.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
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
index 6fcff4103b..417669d4c0 100644
|
index 62062b5fe8..35a8a39689 100644
|
||||||
--- a/res/values/strings.xml
|
--- a/res/values/strings.xml
|
||||||
+++ b/res/values/strings.xml
|
+++ b/res/values/strings.xml
|
||||||
@@ -13291,10 +13291,6 @@
|
@@ -13812,10 +13812,6 @@
|
||||||
<string name="lockscreen_privacy_controls_setting_toggle">Show device controls</string>
|
<string name="lockscreen_trivial_controls_summary">Control external devices without unlocking your phone or tablet if allowed by the device controls app</string>
|
||||||
<!-- Device controls summary [CHAR LIMIT=NONE] -->
|
<!-- Trivial Device disabled controls summary [CHAR LIMIT=NONE] -->
|
||||||
<string name="lockscreen_privacy_controls_summary">Access controls when locked</string>
|
<string name="lockscreen_trivial_disabled_controls_summary">To use, first turn on \u0022Show device controls\u0022</string>
|
||||||
- <!-- Lockscreen double-line clock summary [CHAR LIMIT=NONE] -->
|
- <!-- Lockscreen double-line clock summary [CHAR LIMIT=NONE] -->
|
||||||
- <string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
|
- <string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
|
||||||
- <!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
|
- <!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
|
||||||
- <string name="lockscreen_double_line_clock_setting_toggle">Double-line clock</string>
|
- <string name="lockscreen_double_line_clock_setting_toggle">Double-line clock</string>
|
||||||
|
<!-- Lock screen shortcuts preference [CHAR LIMIT=60] -->
|
||||||
<!-- Title for RTT setting. [CHAR LIMIT=NONE] -->
|
<string name="lockscreen_quick_affordances_title">Shortcuts</string>
|
||||||
<string name="rtt_settings_title"></string>
|
<!-- Summary for the lock screen button preference [CHAR LIMIT=60] -->
|
||||||
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
|
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
|
||||||
index 60dc599c2e..755b3c2ee9 100644
|
index 77a32122ee..b71839fe23 100644
|
||||||
--- a/res/xml/security_lockscreen_settings.xml
|
--- a/res/xml/security_lockscreen_settings.xml
|
||||||
+++ b/res/xml/security_lockscreen_settings.xml
|
+++ b/res/xml/security_lockscreen_settings.xml
|
||||||
@@ -67,12 +67,6 @@
|
@@ -78,12 +78,6 @@
|
||||||
android:title="@string/lockscreen_privacy_controls_setting_toggle"
|
android:key="customizable_lock_screen_quick_affordances"
|
||||||
android:summary="@string/lockscreen_privacy_controls_summary"
|
android:title="@string/lockscreen_quick_affordances_title"
|
||||||
settings:controller="com.android.settings.display.ControlsPrivacyPreferenceController" />
|
settings:controller="com.android.settings.display.CustomizableLockScreenQuickAffordancesPreferenceController" />
|
||||||
-
|
-
|
||||||
- <SwitchPreference
|
- <SwitchPreference
|
||||||
- android:key="lockscreen_double_line_clock_switch"
|
- android:key="lockscreen_double_line_clock_switch"
|
||||||
@@ -221,5 +223,5 @@ index 94f2dc6655..0000000000
|
|||||||
- }
|
- }
|
||||||
-}
|
-}
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+10
-17
@@ -1,4 +1,4 @@
|
|||||||
From 32f8fec323dfe5f7d7f357e26e7f7a494bddaba3 Mon Sep 17 00:00:00 2001
|
From f32dde0ff88ec58029be1fe4a1b42b94ff1bdbab Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 28 Oct 2021 02:30:59 +0000
|
Date: Thu, 28 Oct 2021 02:30:59 +0000
|
||||||
Subject: [PATCH 1/2] Trebuchet: Make overview scrim transparent again
|
Subject: [PATCH 1/2] Trebuchet: Make overview scrim transparent again
|
||||||
@@ -7,18 +7,18 @@ Also revert texts/buttons to workspace color
|
|||||||
|
|
||||||
Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
|
Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
|
||||||
---
|
---
|
||||||
quickstep/res/values/styles.xml | 4 ++--
|
quickstep/res/values/styles.xml | 2 +-
|
||||||
quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +-
|
quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +-
|
||||||
res/color-v31/overview_scrim.xml | 2 +-
|
res/color-v31/overview_scrim.xml | 2 +-
|
||||||
res/color-v31/overview_scrim_dark.xml | 2 +-
|
res/color-v31/overview_scrim_dark.xml | 2 +-
|
||||||
res/color/overview_button.xml | 6 +++---
|
res/color/overview_button.xml | 6 +++---
|
||||||
5 files changed, 8 insertions(+), 8 deletions(-)
|
5 files changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
|
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
|
||||||
index 2efe72e651..03c28773a7 100644
|
index 8eea37f6c2..623f60f81a 100644
|
||||||
--- a/quickstep/res/values/styles.xml
|
--- a/quickstep/res/values/styles.xml
|
||||||
+++ b/quickstep/res/values/styles.xml
|
+++ b/quickstep/res/values/styles.xml
|
||||||
@@ -130,7 +130,7 @@
|
@@ -176,7 +176,7 @@
|
||||||
parent="@android:style/Widget.DeviceDefault.Button.Borderless">
|
parent="@android:style/Widget.DeviceDefault.Button.Borderless">
|
||||||
<item name="android:textColor">@color/overview_button</item>
|
<item name="android:textColor">@color/overview_button</item>
|
||||||
<item name="android:drawableTint">@color/overview_button</item>
|
<item name="android:drawableTint">@color/overview_button</item>
|
||||||
@@ -27,18 +27,11 @@ index 2efe72e651..03c28773a7 100644
|
|||||||
<item name="android:drawablePadding">8dp</item>
|
<item name="android:drawablePadding">8dp</item>
|
||||||
<item name="android:textAllCaps">false</item>
|
<item name="android:textAllCaps">false</item>
|
||||||
</style>
|
</style>
|
||||||
@@ -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
|
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
index 13295f27c1..c0e4429804 100644
|
index 9222e456e5..678c0dfd80 100644
|
||||||
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
@@ -702,7 +702,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
@@ -783,7 +783,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
mEmptyIcon.setCallback(this);
|
mEmptyIcon.setCallback(this);
|
||||||
mEmptyMessage = context.getText(R.string.recents_empty_message);
|
mEmptyMessage = context.getText(R.string.recents_empty_message);
|
||||||
mEmptyMessagePaint = new TextPaint();
|
mEmptyMessagePaint = new TextPaint();
|
||||||
@@ -48,14 +41,14 @@ index 13295f27c1..c0e4429804 100644
|
|||||||
.getDimension(R.dimen.recents_empty_message_text_size));
|
.getDimension(R.dimen.recents_empty_message_text_size));
|
||||||
mEmptyMessagePaint.setTypeface(Typeface.create(Themes.getDefaultBodyFont(context),
|
mEmptyMessagePaint.setTypeface(Typeface.create(Themes.getDefaultBodyFont(context),
|
||||||
diff --git a/res/color-v31/overview_scrim.xml b/res/color-v31/overview_scrim.xml
|
diff --git a/res/color-v31/overview_scrim.xml b/res/color-v31/overview_scrim.xml
|
||||||
index 80799957ff..894997c59a 100644
|
index 212518ff65..894997c59a 100644
|
||||||
--- a/res/color-v31/overview_scrim.xml
|
--- a/res/color-v31/overview_scrim.xml
|
||||||
+++ b/res/color-v31/overview_scrim.xml
|
+++ b/res/color-v31/overview_scrim.xml
|
||||||
@@ -14,5 +14,5 @@
|
@@ -14,5 +14,5 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
- <item android:color="@android:color/system_neutral2_500" android:lStar="87" />
|
- <item android:color="@android:color/system_neutral2_200" />
|
||||||
+ <item android:color="@android:color/transparent" />
|
+ <item android:color="@android:color/transparent" />
|
||||||
</selector>
|
</selector>
|
||||||
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
|
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
|
||||||
@@ -89,5 +82,5 @@ index aa48b78604..e638ac2d4a 100644
|
|||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
+</selector>
|
+</selector>
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -1,4 +1,4 @@
|
|||||||
From e8b6e0902bc8c77df404b67a9a619d7705940125 Mon Sep 17 00:00:00 2001
|
From c04fae6b45b624a39d684c4b6cf02440a3fe83b5 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Fri, 18 Mar 2022 08:42:18 +0000
|
Date: Fri, 18 Mar 2022 08:42:18 +0000
|
||||||
Subject: [PATCH 2/2] Trebuchet: Kill haptics in recents
|
Subject: [PATCH 2/2] Trebuchet: Kill haptics in recents
|
||||||
@@ -13,14 +13,14 @@ Change-Id: Ie3b0eabe8cc0421e696720740edc492cae2f5153
|
|||||||
3 files changed, 32 deletions(-)
|
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
|
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
|
index 847114a960..eef4be2964 100644
|
||||||
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
|
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
|
||||||
+++ b/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,
|
@@ -419,14 +419,6 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
|
||||||
nonOverviewAnim.setFloatValues(startProgress, endProgress);
|
nonOverviewAnim.setFloatValues(startProgress, endProgress);
|
||||||
mNonOverviewAnim.dispatchOnStart();
|
mNonOverviewAnim.dispatchOnStart();
|
||||||
}
|
}
|
||||||
- if (targetState == QUICK_SWITCH) {
|
- if (targetState == QUICK_SWITCH_FROM_HOME) {
|
||||||
- // Navigating to quick switch, add scroll feedback since the first time is not
|
- // Navigating to quick switch, add scroll feedback since the first time is not
|
||||||
- // considered a scroll by the RecentsView.
|
- // considered a scroll by the RecentsView.
|
||||||
- VibratorWrapper.INSTANCE.get(mLauncher).vibrate(
|
- VibratorWrapper.INSTANCE.get(mLauncher).vibrate(
|
||||||
@@ -32,10 +32,10 @@ index f6148a7c8f..546f5f3c18 100644
|
|||||||
nonOverviewAnim.setDuration(Math.max(xDuration, yDuration));
|
nonOverviewAnim.setDuration(Math.max(xDuration, yDuration));
|
||||||
mNonOverviewAnim.setEndAction(() -> onAnimationToStateCompleted(targetState));
|
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
|
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
|
index eddc50c64f..09f253b08d 100644
|
||||||
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
|
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
|
||||||
+++ b/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>
|
@@ -369,11 +369,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
||||||
mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
|
mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
|
||||||
velocity * orientationHandler.getSecondaryTranslationDirectionFactor(),
|
velocity * orientationHandler.getSecondaryTranslationDirectionFactor(),
|
||||||
mEndDisplacement, animationDuration);
|
mEndDisplacement, animationDuration);
|
||||||
@@ -48,10 +48,10 @@ index 308bca62e4..d964371784 100644
|
|||||||
|
|
||||||
private void clearState() {
|
private void clearState() {
|
||||||
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
index c0e4429804..436f3521a6 100644
|
index 678c0dfd80..8e75a7c18d 100644
|
||||||
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
+++ b/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
|
@@ -1466,25 +1466,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,5 +78,5 @@ index c0e4429804..436f3521a6 100644
|
|||||||
protected void determineScrollingStart(MotionEvent ev, float touchSlopScale) {
|
protected void determineScrollingStart(MotionEvent ev, float touchSlopScale) {
|
||||||
// Enables swiping to the left or right only if the task overlay is not modal.
|
// Enables swiping to the left or right only if the task overlay is not modal.
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+13
-6
@@ -1,4 +1,4 @@
|
|||||||
From 9f56f5ced9534094a72c14d996bd21dd7800a059 Mon Sep 17 00:00:00 2001
|
From b09034c7e5f9bbc2d29c3f10452259956fcb9f46 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 16 Oct 2021 00:33:15 +0000
|
Date: Sat, 16 Oct 2021 00:33:15 +0000
|
||||||
Subject: [PATCH] Replace captive portal URLs globally
|
Subject: [PATCH] Replace captive portal URLs globally
|
||||||
@@ -8,17 +8,17 @@ URLs from Chinese OEM UIs are faster and more reliable than g.cn and other int'l
|
|||||||
|
|
||||||
Change-Id: Ic3e124b2b62838a2bcf1dad0d670515f3d056964
|
Change-Id: Ic3e124b2b62838a2bcf1dad0d670515f3d056964
|
||||||
---
|
---
|
||||||
res/values-mcc460/config.xml | 24 ------------------------
|
res/values-mcc460/config.xml | 31 -------------------------------
|
||||||
res/values/config.xml | 7 +++----
|
res/values/config.xml | 7 +++----
|
||||||
2 files changed, 3 insertions(+), 28 deletions(-)
|
2 files changed, 3 insertions(+), 35 deletions(-)
|
||||||
delete mode 100644 res/values-mcc460/config.xml
|
delete mode 100644 res/values-mcc460/config.xml
|
||||||
|
|
||||||
diff --git a/res/values-mcc460/config.xml b/res/values-mcc460/config.xml
|
diff --git a/res/values-mcc460/config.xml b/res/values-mcc460/config.xml
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 2863edd7..00000000
|
index 3c4b4933..00000000
|
||||||
--- a/res/values-mcc460/config.xml
|
--- a/res/values-mcc460/config.xml
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,24 +0,0 @@
|
@@ -1,31 +0,0 @@
|
||||||
-<?xml version="1.0" encoding="utf-8"?>
|
-<?xml version="1.0" encoding="utf-8"?>
|
||||||
-<resources>
|
-<resources>
|
||||||
- <!-- Network validation URL configuration for devices using a Chinese SIM (MCC 460).
|
- <!-- Network validation URL configuration for devices using a Chinese SIM (MCC 460).
|
||||||
@@ -26,13 +26,20 @@ index 2863edd7..00000000
|
|||||||
- general case as this could degrade the user experience (portals not detected properly).
|
- general case as this could degrade the user experience (portals not detected properly).
|
||||||
- However in China the default URLs are not accessible in general. The below alternatives
|
- However in China the default URLs are not accessible in general. The below alternatives
|
||||||
- should allow users to connect to local networks normally. -->
|
- should allow users to connect to local networks normally. -->
|
||||||
|
- <!-- default_captive_portal_http_url is not configured as overlayable so
|
||||||
|
- OEMs that wish to change captive_portal_http_url configuration must
|
||||||
|
- do so via configuring runtime resource overlay to
|
||||||
|
- config_captive_portal_http_url and *NOT* by changing or overlaying
|
||||||
|
- this resource. It will break if the enforcement of overlayable starts.
|
||||||
|
- -->
|
||||||
|
- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.cn/generate_204</string>
|
||||||
- <!-- default_captive_portal_https_url is not configured as overlayable so
|
- <!-- default_captive_portal_https_url is not configured as overlayable so
|
||||||
- OEMs that wish to change captive_portal_https_url configuration must
|
- OEMs that wish to change captive_portal_https_url configuration must
|
||||||
- do so via configuring runtime resource overlay to
|
- do so via configuring runtime resource overlay to
|
||||||
- config_captive_portal_https_url and *NOT* by changing or overlaying
|
- config_captive_portal_https_url and *NOT* by changing or overlaying
|
||||||
- this resource. It will break if the enforcement of overlayable starts.
|
- this resource. It will break if the enforcement of overlayable starts.
|
||||||
- -->
|
- -->
|
||||||
- <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.com/generate_204</string>
|
- <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.cn/generate_204</string>
|
||||||
- <!-- default_captive_portal_fallback_urls is not configured as overlayable
|
- <!-- default_captive_portal_fallback_urls is not configured as overlayable
|
||||||
- so OEMs that wish to change captive_portal_fallback_urls configuration
|
- so OEMs that wish to change captive_portal_fallback_urls configuration
|
||||||
- must do so via configuring runtime resource overlay to
|
- must do so via configuring runtime resource overlay to
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
From d8b053839dd5514000f7e57a4591bad19ade8d79 Mon Sep 17 00:00:00 2001
|
From 863e8f70e3a4f987938ff4ad01c22822bc38e409 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 20 Jun 2021 09:09:15 +0000
|
Date: Sun, 20 Jun 2021 09:09:15 +0000
|
||||||
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)
|
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)
|
||||||
@@ -32,5 +32,5 @@ index 28044e2c..c5aa9617 100644
|
|||||||
ADDITIONAL_SYSTEM_PROPERTIES += \
|
ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||||
ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION)
|
ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION)
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From e86607a8d98ad07a972c0885850e904ae458b42f Mon Sep 17 00:00:00 2001
|
From 34f8aa093286970f82014f1dae0e86e4cbeba896 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 16 Oct 2021 00:41:07 +0000
|
Date: Sat, 16 Oct 2021 00:41:07 +0000
|
||||||
Subject: [PATCH 2/4] build: Remove Stk (2/2)
|
Subject: [PATCH 2/4] build: Remove Stk (2/2)
|
||||||
@@ -36,5 +36,5 @@ index 6adf48d9..e63b320d 100644
|
|||||||
# Default ringtone
|
# Default ringtone
|
||||||
PRODUCT_PRODUCT_PROPERTIES += \
|
PRODUCT_PRODUCT_PROPERTIES += \
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
From 445d002e99fec39a330eb92ae7a4fe1f0cf66463 Mon Sep 17 00:00:00 2001
|
From 84b5b23519166701423a324cac955e9110e36eae Mon Sep 17 00:00:00 2001
|
||||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Mon, 1 Jul 2019 07:03:04 +0000
|
Date: Mon, 1 Jul 2019 07:03:04 +0000
|
||||||
Subject: [PATCH 3/4] vendor_lineage: Ignore neverallows... again
|
Subject: [PATCH 3/4] vendor_lineage: Ignore neverallows... again
|
||||||
@@ -26,5 +26,5 @@ index f2e595ff..d6d036a9 100644
|
|||||||
# Rules for QCOM targets
|
# Rules for QCOM targets
|
||||||
include $(TOPDIR)vendor/lineage/build/core/qcom_target.mk
|
include $(TOPDIR)vendor/lineage/build/core/qcom_target.mk
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+982
-47
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From 2dc2ed499505821a535319138e70e64af56ddc87 Mon Sep 17 00:00:00 2001
|
From 1a8eee6d2a1d79412902331b74283eec77414c6b Mon Sep 17 00:00:00 2001
|
||||||
From: Pierre-Hugues Husson <phh@phh.me>
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
Date: Sat, 19 Feb 2022 08:20:25 -0500
|
Date: Sat, 19 Feb 2022 08:20:25 -0500
|
||||||
Subject: [PATCH 2/2] Add new mechanism to fake vendor props on a per-process
|
Subject: [PATCH 1/2] Add new mechanism to fake vendor props on a per-process
|
||||||
basis
|
basis
|
||||||
|
|
||||||
This reads debug.phh.props.<process name>. If its value is "vendor",
|
This reads debug.phh.props.<process name>. If its value is "vendor",
|
||||||
@@ -74,5 +74,5 @@ index 1cb15c3df..d6e7e3e68 100644
|
|||||||
|
|
||||||
if (pi != nullptr) {
|
if (pi != nullptr) {
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
From ad25fd64270b2c3dc9fbce5e97c2eb75d63f015b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Thu, 19 Jan 2023 16:44:01 -0500
|
||||||
|
Subject: [PATCH 2/2] Rework property overriding
|
||||||
|
|
||||||
|
- Support property read with callback in addition to previous
|
||||||
|
constant-size property_get
|
||||||
|
- Add another class of redirect "keymaster", to redirect to AOSP/GSI
|
||||||
|
props + SPL based on boot.img
|
||||||
|
---
|
||||||
|
libc/system_properties/system_properties.cpp | 77 +++++++++++++++-----
|
||||||
|
1 file changed, 58 insertions(+), 19 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
|
||||||
|
index d6e7e3e68..40ff48bad 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 <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <new>
|
||||||
|
@@ -60,23 +61,70 @@ static void read_self() {
|
||||||
|
if(self_ok) return;
|
||||||
|
self_ok = true;
|
||||||
|
|
||||||
|
- int fd = open("/proc/self/comm", O_RDONLY);
|
||||||
|
+ char cmdline[128];
|
||||||
|
+ int fd = open("/proc/self/cmdline", 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;
|
||||||
|
+ read(fd, cmdline, sizeof(cmdline)-1);
|
||||||
|
+ for(unsigned i=0; i<sizeof(cmdline); i++)
|
||||||
|
+ if(cmdline[i] == '\n')
|
||||||
|
+ cmdline[i] = 0;
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
+ // Truncate to last /, we don't want `/` in the prop
|
||||||
|
+ const char *c = strrchr(cmdline, '/');
|
||||||
|
+ if (c != nullptr) {
|
||||||
|
+ c = c+1;
|
||||||
|
+ } else {
|
||||||
|
+ c = cmdline;
|
||||||
|
+ }
|
||||||
|
+ // Take only the last 16 bytes (prop names max is 32)
|
||||||
|
+ if(strlen(c) < 15) {
|
||||||
|
+ strcpy(comm, c);
|
||||||
|
+ } else {
|
||||||
|
+ strcpy(comm, c + strlen(c) - 15);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
//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);
|
||||||
|
+ strncat(propName, comm, PROP_NAME_MAX - strlen(propName) - 1);
|
||||||
|
|
||||||
|
+ //async_safe_format_log(ANDROID_LOG_WARN, "libc", "Reading debug prop %s", propName);
|
||||||
|
__system_property_get(propName, comm_override);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static const char* redirectToProp(const char *name) {
|
||||||
|
+ read_self();
|
||||||
|
+ /*if(strstr(name, "ro.keymaster") != nullptr || strstr(name, "security_patch") != nullptr || strstr(name, "release") != nullptr) {
|
||||||
|
+ async_safe_format_log(ANDROID_LOG_WARN, "libc", "Process/comm %s/%s is reading %s", comm, comm_override, name);
|
||||||
|
+ }*/
|
||||||
|
+ if(strcmp(comm_override, "vendor") == 0) {
|
||||||
|
+ if(strcmp(name, "ro.product.device") == 0) {
|
||||||
|
+ return "ro.product.vendor.device";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.product.manufacturer") == 0) {
|
||||||
|
+ return "ro.product.vendor.manufacturer";
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(comm_override, "keymaster") == 0) {
|
||||||
|
+ if(strcmp(name, "ro.product.model") == 0) {
|
||||||
|
+ return "ro.keymaster.mod";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.product.brand") == 0) {
|
||||||
|
+ return "ro.keymaster.brn";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.build.version.release") == 0) {
|
||||||
|
+ return "ro.keymaster.xxx.release";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.build.version.security_patch") == 0) {
|
||||||
|
+ return "ro.keymaster.xxx.security_patch";
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return name;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static bool is_dir(const char* pathname) {
|
||||||
|
struct stat info;
|
||||||
|
if (stat(pathname, &info) == -1) {
|
||||||
|
@@ -150,17 +198,19 @@ uint32_t SystemProperties::AreaSerial() {
|
||||||
|
}
|
||||||
|
|
||||||
|
const prop_info* SystemProperties::Find(const char* name) {
|
||||||
|
+ const char* newName = redirectToProp(name);
|
||||||
|
+
|
||||||
|
if (!initialized_) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- prop_area* pa = contexts_->GetPropAreaForName(name);
|
||||||
|
+ prop_area* pa = contexts_->GetPropAreaForName(newName);
|
||||||
|
if (!pa) {
|
||||||
|
async_safe_format_log(ANDROID_LOG_WARN, "libc", "Access denied finding property \"%s\"", name);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- return pa->find(name);
|
||||||
|
+ return pa->find(newName);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool is_read_only(const char* name) {
|
||||||
|
@@ -243,17 +293,6 @@ 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.34.1
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
From 7891d4dd5e8ef676e94f65cc66a362c21af24a84 Mon Sep 17 00:00:00 2001
|
From faff60c8814e2d31519d86e92faf08761a1d1de1 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 8 Dec 2021 07:04:53 +0000
|
Date: Wed, 8 Dec 2021 07:04:53 +0000
|
||||||
Subject: [PATCH] Remove init.vndk-nodef.rc
|
Subject: [PATCH] Remove init.vndk-nodef.rc
|
||||||
@@ -11,18 +11,18 @@ Thanks @Kethen for the insight!
|
|||||||
|
|
||||||
Change-Id: I7c14fe5229e953f620bb225fa5c981752d0ac5f9
|
Change-Id: I7c14fe5229e953f620bb225fa5c981752d0ac5f9
|
||||||
---
|
---
|
||||||
target/product/gsi/Android.mk | 12 ------------
|
target/product/gsi/Android.mk | 13 -------------
|
||||||
target/product/gsi/init.gsi.rc | 2 --
|
target/product/gsi/init.gsi.rc | 2 --
|
||||||
target/product/gsi/init.vndk-nodef.rc | 3 ---
|
target/product/gsi/init.vndk-nodef.rc | 3 ---
|
||||||
target/product/gsi_release.mk | 3 +--
|
target/product/gsi_release.mk | 1 -
|
||||||
4 files changed, 1 insertion(+), 19 deletions(-)
|
4 files changed, 19 deletions(-)
|
||||||
delete mode 100644 target/product/gsi/init.vndk-nodef.rc
|
delete mode 100644 target/product/gsi/init.vndk-nodef.rc
|
||||||
|
|
||||||
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
|
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
|
||||||
index cb4fdcb33..f2c0f212c 100644
|
index 85e551d3f..c1f37e07f 100644
|
||||||
--- a/target/product/gsi/Android.mk
|
--- a/target/product/gsi/Android.mk
|
||||||
+++ b/target/product/gsi/Android.mk
|
+++ b/target/product/gsi/Android.mk
|
||||||
@@ -228,15 +228,3 @@ LOCAL_SYSTEM_EXT_MODULE := true
|
@@ -247,16 +247,3 @@ LOCAL_SYSTEM_EXT_MODULE := true
|
||||||
LOCAL_MODULE_RELATIVE_PATH := init
|
LOCAL_MODULE_RELATIVE_PATH := init
|
||||||
|
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
@@ -30,16 +30,17 @@ index cb4fdcb33..f2c0f212c 100644
|
|||||||
-
|
-
|
||||||
-include $(CLEAR_VARS)
|
-include $(CLEAR_VARS)
|
||||||
-LOCAL_MODULE := init.vndk-nodef.rc
|
-LOCAL_MODULE := init.vndk-nodef.rc
|
||||||
-LOCAL_LICENSE_KINDS := legacy_restricted
|
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||||
-LOCAL_LICENSE_CONDITIONS := restricted
|
-LOCAL_LICENSE_CONDITIONS := notice
|
||||||
|
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
||||||
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
||||||
-LOCAL_MODULE_CLASS := ETC
|
-LOCAL_MODULE_CLASS := ETC
|
||||||
-LOCAL_SYSTEM_EXT_MODULE := true
|
-LOCAL_SYSTEM_EXT_MODULE := true
|
||||||
-LOCAL_MODULE_RELATIVE_PATH := init
|
-LOCAL_MODULE_RELATIVE_PATH := gsi
|
||||||
-
|
-
|
||||||
-include $(BUILD_PREBUILT)
|
-include $(BUILD_PREBUILT)
|
||||||
diff --git a/target/product/gsi/init.gsi.rc b/target/product/gsi/init.gsi.rc
|
diff --git a/target/product/gsi/init.gsi.rc b/target/product/gsi/init.gsi.rc
|
||||||
index f48284322..c6faba78d 100644
|
index 69c8e467b..c6faba78d 100644
|
||||||
--- a/target/product/gsi/init.gsi.rc
|
--- a/target/product/gsi/init.gsi.rc
|
||||||
+++ b/target/product/gsi/init.gsi.rc
|
+++ b/target/product/gsi/init.gsi.rc
|
||||||
@@ -1,5 +1,3 @@
|
@@ -1,5 +1,3 @@
|
||||||
@@ -47,27 +48,25 @@ index f48284322..c6faba78d 100644
|
|||||||
# Android init script for GSI required initialization
|
# Android init script for GSI required initialization
|
||||||
#
|
#
|
||||||
-
|
-
|
||||||
-import /system/system_ext/etc/init/init.vndk-${ro.vndk.version:-nodef}.rc
|
-import /system/system_ext/etc/gsi/init.vndk-${ro.vndk.version:-nodef}.rc
|
||||||
diff --git a/target/product/gsi/init.vndk-nodef.rc b/target/product/gsi/init.vndk-nodef.rc
|
diff --git a/target/product/gsi/init.vndk-nodef.rc b/target/product/gsi/init.vndk-nodef.rc
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index efeef117b..000000000
|
index 1b141a05e..000000000
|
||||||
--- a/target/product/gsi/init.vndk-nodef.rc
|
--- a/target/product/gsi/init.vndk-nodef.rc
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,3 +0,0 @@
|
@@ -1,3 +0,0 @@
|
||||||
-on early-init
|
-on early-init
|
||||||
- # Must define BOARD_VNDK_VERSION
|
- # Reboot if BOARD_VNDK_VERSION is not defined
|
||||||
- exec - root -- /system/bin/reboot bootloader
|
- exec - root -- /system/bin/reboot bootloader
|
||||||
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
|
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
|
||||||
index a2a29ed0f..74413b191 100644
|
index 74501cd1f..575e90b14 100644
|
||||||
--- a/target/product/gsi_release.mk
|
--- a/target/product/gsi_release.mk
|
||||||
+++ b/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
|
@@ -60,7 +60,6 @@ PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_with_prebuilts.flattened
|
||||||
# GSI specific tasks on boot
|
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
gsi_skip_mount.cfg \
|
gsi_skip_mount.cfg \
|
||||||
- init.gsi.rc \
|
init.gsi.rc \
|
||||||
- init.vndk-nodef.rc \
|
- init.vndk-nodef.rc \
|
||||||
+ init.gsi.rc
|
|
||||||
|
|
||||||
# Support additional VNDK snapshots
|
# Support additional VNDK snapshots
|
||||||
PRODUCT_EXTRA_VNDK_VERSIONS := \
|
PRODUCT_EXTRA_VNDK_VERSIONS := \
|
||||||
|
|||||||
@@ -1,207 +0,0 @@
|
|||||||
From 36d4972e3fa6befa6d5a05d46b53239bea3943ed 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/9] treble: Lineage-ify
|
|
||||||
|
|
||||||
Squash of:
|
|
||||||
- Proper target names
|
|
||||||
- Remove fsck SELinux labels
|
|
||||||
- treble: Add overlay-lineage
|
|
||||||
- treble: Don't specify config_wallpaperCropperPackage
|
|
||||||
- treble: Don't handle apns-conf
|
|
||||||
|
|
||||||
Change-Id: I25eee7a3804f335430a447ae1424402d7e37851b
|
|
||||||
---
|
|
||||||
base-pre.mk | 3 -
|
|
||||||
base.mk | 16 ++--
|
|
||||||
generate.sh | 4 +-
|
|
||||||
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
|
|
||||||
.../base/core/res/res/values/config.xml | 1 -
|
|
||||||
sepolicy/file_contexts | 3 -
|
|
||||||
6 files changed, 92 insertions(+), 16 deletions(-)
|
|
||||||
create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
|
||||||
|
|
||||||
diff --git a/base-pre.mk b/base-pre.mk
|
|
||||||
index 6a317e4..e69de29 100644
|
|
||||||
--- a/base-pre.mk
|
|
||||||
+++ b/base-pre.mk
|
|
||||||
@@ -1,3 +0,0 @@
|
|
||||||
-#Use a more decent APN config
|
|
||||||
-PRODUCT_COPY_FILES += \
|
|
||||||
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
|
||||||
diff --git a/base.mk b/base.mk
|
|
||||||
index d3a0a20..b6c1d25 100644
|
|
||||||
--- a/base.mk
|
|
||||||
+++ b/base.mk
|
|
||||||
@@ -8,12 +8,14 @@ PRODUCT_COPY_FILES := \
|
|
||||||
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
|
|
||||||
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
|
|
||||||
|
|
||||||
-#Use a more decent APN config
|
|
||||||
-PRODUCT_COPY_FILES += \
|
|
||||||
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
|
||||||
-
|
|
||||||
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/phh/treble/sepolicy
|
|
||||||
-PRODUCT_PACKAGE_OVERLAYS += device/phh/treble/overlay
|
|
||||||
+
|
|
||||||
+PRODUCT_PACKAGE_OVERLAYS += \
|
|
||||||
+ device/phh/treble/overlay \
|
|
||||||
+ device/phh/treble/overlay-lineage
|
|
||||||
+
|
|
||||||
+PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += \
|
|
||||||
+ device/phh/treble/overlay-lineage/lineage-sdk
|
|
||||||
|
|
||||||
$(call inherit-product, vendor/hardware_overlay/overlay.mk)
|
|
||||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
|
||||||
@@ -30,11 +32,11 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
||||||
ro.build.version.security_patch=$(PLATFORM_SECURITY_PATCH) \
|
|
||||||
ro.adb.secure=0 \
|
|
||||||
ro.logd.auditd=true
|
|
||||||
-
|
|
||||||
+
|
|
||||||
#Huawei HiSuite (also other OEM custom programs I guess) it's of no use in AOSP builds
|
|
||||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
||||||
persist.sys.usb.config=adb \
|
|
||||||
- ro.cust.cdrom=/dev/null
|
|
||||||
+ ro.cust.cdrom=/dev/null
|
|
||||||
|
|
||||||
#VNDK config files
|
|
||||||
PRODUCT_COPY_FILES += \
|
|
||||||
diff --git a/generate.sh b/generate.sh
|
|
||||||
index fac8208..2160786 100644
|
|
||||||
--- a/generate.sh
|
|
||||||
+++ b/generate.sh
|
|
||||||
@@ -54,7 +54,7 @@ for part in a ab;do
|
|
||||||
su_suffix='N'
|
|
||||||
if [ "$su" == "yes" ];then
|
|
||||||
su_suffix='S'
|
|
||||||
- extra_packages+=' phh-su me.phh.superuser'
|
|
||||||
+ extra_packages+=' phh-su me.phh.superuser su'
|
|
||||||
fi
|
|
||||||
|
|
||||||
part_suffix='a'
|
|
||||||
@@ -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}"
|
|
||||||
+ target="lineage_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
|
|
||||||
|
|
||||||
baseArch="$arch"
|
|
||||||
if [ "$arch" = "a64" ];then
|
|
||||||
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..8df673a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
|
||||||
@@ -0,0 +1,81 @@
|
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
+<!--
|
|
||||||
+ Copyright (C) 2015-2016 The CyanogenMod Project
|
|
||||||
+ 2017-2018 The LineageOS Project
|
|
||||||
+
|
|
||||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
+ you may not use this file except in compliance with the License.
|
|
||||||
+ You may obtain a copy of the License at
|
|
||||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
+ Unless required by applicable law or agreed to in writing, software
|
|
||||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
+ See the License for the specific language governing permissions and
|
|
||||||
+ limitations under the License.
|
|
||||||
+-->
|
|
||||||
+<resources>
|
|
||||||
+ <!-- Whether device has screen with higher aspect ratio -->
|
|
||||||
+ <bool name="config_haveHigherAspectRatioScreen">true</bool>
|
|
||||||
+
|
|
||||||
+ <!-- All the capabilities of the LEDs on this device, stored as a bit field.
|
|
||||||
+ This integer should equal the sum of the corresponding value for each
|
|
||||||
+ of the following capabilities present:
|
|
||||||
+ // Device has a color adjustable battery light.
|
|
||||||
+ LIGHTS_RGB_NOTIFICATION_LED = 1
|
|
||||||
+ // Device has a color adjustable notification light.
|
|
||||||
+ LIGHTS_RGB_BATTERY_LED = 2
|
|
||||||
+ LIGHTS_MULTIPLE_NOTIFICATION_LED = 4 (deprecated)
|
|
||||||
+ // The notification light has adjustable pulsing capability.
|
|
||||||
+ LIGHTS_PULSATING_LED = 8
|
|
||||||
+ // Device has a multi-segment battery light that is able to
|
|
||||||
+ // use the light brightness value to determine how many
|
|
||||||
+ // segments to show (in order to represent battery level).
|
|
||||||
+ LIGHTS_SEGMENTED_BATTERY_LED = 16
|
|
||||||
+ // The notification light supports HAL adjustable brightness
|
|
||||||
+ // via the alpha channel.
|
|
||||||
+ // Note: if a device notification light supports LIGHTS_RGB_NOTIFICATION_LED
|
|
||||||
+ // then HAL support is not necessary for brightness control. In this case,
|
|
||||||
+ // brightness support will be provided by lineage-sdk through the scaling of
|
|
||||||
+ // RGB color values.
|
|
||||||
+ LIGHTS_ADJUSTABLE_NOTIFICATION_LED_BRIGHTNESS = 32
|
|
||||||
+ // Device has a battery light.
|
|
||||||
+ LIGHTS_BATTERY_LED = 64
|
|
||||||
+ // The battery light supports HAL adjustable brightness via
|
|
||||||
+ // the alpha channel.
|
|
||||||
+ // Note: if a device battery light supports LIGHTS_RGB_BATTERY_LED then HAL
|
|
||||||
+ // support is not necessary for brightness control. In this case,
|
|
||||||
+ // brightness support will be provided by lineage-sdk through the scaling of
|
|
||||||
+ // RGB color values.
|
|
||||||
+ LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS = 128
|
|
||||||
+ For example, a device with notification and battery lights that supports
|
|
||||||
+ pulsating and RGB control would set this config to 75. -->
|
|
||||||
+ <integer name="config_deviceLightCapabilities">255</integer>
|
|
||||||
+
|
|
||||||
+ <!-- Hardware keys present on the device, stored as a bit field.
|
|
||||||
+ This integer should equal the sum of the corresponding value for each
|
|
||||||
+ of the following keys present:
|
|
||||||
+ 1 - Home
|
|
||||||
+ 2 - Back
|
|
||||||
+ 4 - Menu
|
|
||||||
+ 8 - Assistant (search)
|
|
||||||
+ 16 - App switch
|
|
||||||
+ 32 - Camera
|
|
||||||
+ 64 - Volume rocker
|
|
||||||
+ For example, a device with Home, Back and Menu keys would set this
|
|
||||||
+ config to 7. -->
|
|
||||||
+ <integer name="config_deviceHardwareKeys">127</integer>
|
|
||||||
+
|
|
||||||
+ <!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
|
|
||||||
+ This integer should equal the sum of the corresponding value for each
|
|
||||||
+ of the following keys present:
|
|
||||||
+ 1 - Home
|
|
||||||
+ 2 - Back
|
|
||||||
+ 4 - Menu
|
|
||||||
+ 8 - Assistant (search)
|
|
||||||
+ 16 - App switch
|
|
||||||
+ 32 - Camera
|
|
||||||
+ 64 - Volume rocker
|
|
||||||
+ For example, a device with Home, Back and Menu keys would set this
|
|
||||||
+ config to 7. -->
|
|
||||||
+ <integer name="config_deviceHardwareWakeKeys">127</integer>
|
|
||||||
+</resources>
|
|
||||||
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
|
|
||||||
index 0bc3350..045f4b3 100644
|
|
||||||
--- a/overlay/frameworks/base/core/res/res/values/config.xml
|
|
||||||
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
|
|
||||||
@@ -22,7 +22,6 @@
|
|
||||||
<string name="config_icon_mask" translatable="false">"M50 0C77.6 0 100 22.4 100 50C100 77.6 77.6 100 50 100C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0Z"</string>
|
|
||||||
<bool name="config_useRoundIcon">true</bool>
|
|
||||||
|
|
||||||
- <string name="config_wallpaperCropperPackage">com.android.wallpaperpicker</string>
|
|
||||||
<bool name="config_unplugTurnsOnScreen">true</bool>
|
|
||||||
<integer name="config_multiuserMaximumUsers">5</integer>
|
|
||||||
<bool name="config_enableMultiUserUI">true</bool>
|
|
||||||
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
|
|
||||||
index 999ff97..11dd447 100644
|
|
||||||
--- a/sepolicy/file_contexts
|
|
||||||
+++ b/sepolicy/file_contexts
|
|
||||||
@@ -7,9 +7,6 @@
|
|
||||||
/system/bin/asus-motor u:object_r:phhsu_exec:s0
|
|
||||||
/system/bin/xiaomi-touch u:object_r:phhsu_exec:s0
|
|
||||||
|
|
||||||
-#/system/bin/fsck\.exfat u:object_r:fsck_exec:s0
|
|
||||||
-/system/bin/fsck\.ntfs u:object_r:fsck_exec:s0
|
|
||||||
-
|
|
||||||
/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
|
|
||||||
|
|
||||||
/sec_storage(/.*)? u:object_r:teecd_data_file:s0
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
From 061dfa999de1fef818ec82a9d7b3b97c151f8995 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/9] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
|
|
||||||
|
|
||||||
Change-Id: I725443154fabde548d2e6c1b072d34c27596c421
|
|
||||||
---
|
|
||||||
board-base.mk | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/board-base.mk b/board-base.mk
|
|
||||||
index 1ddacaf..e363dd5 100644
|
|
||||||
--- a/board-base.mk
|
|
||||||
+++ b/board-base.mk
|
|
||||||
@@ -7,3 +7,5 @@ BOARD_ROOT_EXTRA_FOLDERS += bt_firmware sec_storage efs persist
|
|
||||||
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
|
||||||
|
|
||||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
|
||||||
+
|
|
||||||
+BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
From 08c5d49779061a407875159591a564ef8f5fcc0b 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/9] treble: Set TARGET_NO_KERNEL_OVERRIDE
|
|
||||||
|
|
||||||
Taken from Lineage generic targets - skips building kernel cleanly
|
|
||||||
|
|
||||||
Change-Id: Id71d3a3aed56fd4e815a64ef4191b125fc5026ce
|
|
||||||
---
|
|
||||||
board-base.mk | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/board-base.mk b/board-base.mk
|
|
||||||
index e363dd5..3900f97 100644
|
|
||||||
--- a/board-base.mk
|
|
||||||
+++ b/board-base.mk
|
|
||||||
@@ -9,3 +9,5 @@ BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
|
||||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
|
||||||
|
|
||||||
BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
|
||||||
+
|
|
||||||
+TARGET_NO_KERNEL_OVERRIDE := true
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
From 5befcded0b6af0c0141f368544fc802815a5821d 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/9] 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.34.1
|
|
||||||
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
From aae7db89b8e8c2898a9c34adc6dde18bd8a61445 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Tue, 11 Oct 2022 11:29:02 +0000
|
|
||||||
Subject: [PATCH 5/9] treble: Enable call recording
|
|
||||||
|
|
||||||
Change-Id: I57ca3604363547419a566b37b5151b6b30c46d28
|
|
||||||
---
|
|
||||||
.../dialer/callrecord/res/values/config.xml | 20 +++++++++++++++++++
|
|
||||||
1 file changed, 20 insertions(+)
|
|
||||||
create mode 100644 overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
|
|
||||||
|
|
||||||
diff --git a/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..4cacde5
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
|
|
||||||
@@ -0,0 +1,20 @@
|
|
||||||
+<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
+<!--
|
|
||||||
+ Copyright (C) 2021 The LineageOS Project
|
|
||||||
+
|
|
||||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
+ you may not use this file except in compliance with the License.
|
|
||||||
+ You may obtain a copy of the License at
|
|
||||||
+
|
|
||||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
+
|
|
||||||
+ Unless required by applicable law or agreed to in writing, software
|
|
||||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
+ See the License for the specific language governing permissions and
|
|
||||||
+ limitations under the License.
|
|
||||||
+-->
|
|
||||||
+<resources>
|
|
||||||
+ <bool name="call_recording_enabled">true</bool>
|
|
||||||
+ <integer name="call_recording_audio_source">4</integer>
|
|
||||||
+</resources>
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
From 878d2b2112f37bfca6da9cee0b5b4d17ae1ee9ab Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Tue, 22 Nov 2022 00:36:15 +0000
|
|
||||||
Subject: [PATCH 6/9] treble: Stop securing ADB
|
|
||||||
|
|
||||||
Seems to kill USB Debugging altogether on certain devices,
|
|
||||||
and unrelated to SN anyway
|
|
||||||
Build-time macro coupled with vendor/lineage might do better...
|
|
||||||
|
|
||||||
Change-Id: I0215b3ed970dd53a124f48e30ca2cf4b0c6d2899
|
|
||||||
---
|
|
||||||
rw-system.sh | 4 ----
|
|
||||||
1 file changed, 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/rw-system.sh b/rw-system.sh
|
|
||||||
index 5f324b3..33b3591 100644
|
|
||||||
--- a/rw-system.sh
|
|
||||||
+++ b/rw-system.sh
|
|
||||||
@@ -764,14 +764,10 @@ if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
|
|
||||||
resetprop_phh ro.boot.veritymode enforcing
|
|
||||||
resetprop_phh ro.boot.warranty_bit 0
|
|
||||||
resetprop_phh ro.warranty_bit 0
|
|
||||||
- resetprop_phh ro.debuggable 0
|
|
||||||
resetprop_phh ro.secure 1
|
|
||||||
resetprop_phh ro.build.type user
|
|
||||||
resetprop_phh ro.build.selinux 0
|
|
||||||
|
|
||||||
- resetprop_phh ro.adb.secure 1
|
|
||||||
- setprop ctl.restart adbd
|
|
||||||
-
|
|
||||||
# Hide system/xbin/su
|
|
||||||
mount /mnt/phh/empty_dir /system/xbin
|
|
||||||
mount /mnt/phh/empty_dir /system/app/me.phh.superuser
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
From 184de8e7227f21de180bb36916abcb316e2986c9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Thu, 29 Dec 2022 15:12:03 +0000
|
|
||||||
Subject: [PATCH 7/9] treble: Securize on-demand
|
|
||||||
|
|
||||||
Status is stored in /metadata and controlled by persist prop
|
|
||||||
|
|
||||||
Change-Id: I8069b6f471ad87ab34c18b743689ab3584cee35b
|
|
||||||
---
|
|
||||||
phh-prop-handler.sh | 14 ++++++++++++++
|
|
||||||
vndk.rc | 2 ++
|
|
||||||
2 files changed, 16 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh
|
|
||||||
index 4371632..a8cea3f 100644
|
|
||||||
--- a/phh-prop-handler.sh
|
|
||||||
+++ b/phh-prop-handler.sh
|
|
||||||
@@ -210,3 +210,17 @@ if [ "$1" == "persist.sys.phh.disable_soundvolume_effect" ];then
|
|
||||||
restartAudio
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
+
|
|
||||||
+if [ "$1" == "persist.sys.phh.securize" ];then
|
|
||||||
+ if [[ "$prop_value" != "true" && "$prop_value" != "false" ]]; then
|
|
||||||
+ exit 1
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ if [[ "$prop_value" == "true" ]]; then
|
|
||||||
+ mkdir /metadata/phh
|
|
||||||
+ touch /metadata/phh/secure
|
|
||||||
+ else
|
|
||||||
+ rm /metadata/phh/secure
|
|
||||||
+ fi
|
|
||||||
+ exit
|
|
||||||
+fi
|
|
||||||
diff --git a/vndk.rc b/vndk.rc
|
|
||||||
index c150ace..74402a8 100644
|
|
||||||
--- a/vndk.rc
|
|
||||||
+++ b/vndk.rc
|
|
||||||
@@ -83,3 +83,5 @@ on property:sys.phh.uninstall-ota=true
|
|
||||||
on property:ro.vendor.radio.default_network=*
|
|
||||||
setprop ro.telephony.default_network ${ro.vendor.radio.default_network}
|
|
||||||
|
|
||||||
+on property:persist.sys.phh.securize=*
|
|
||||||
+ exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.securize"
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
From 5301dd1c023179e5db95be2e7eed56a64b947da2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Wed, 22 Mar 2023 23:37:05 +0000
|
|
||||||
Subject: [PATCH 8/9] treble: Also use /data/adb for securize status
|
|
||||||
|
|
||||||
Change-Id: I778f2be5407ae0a548a098c72031cce9be83cf96
|
|
||||||
---
|
|
||||||
phh-prop-handler.sh | 5 ++++-
|
|
||||||
rw-system.sh | 2 +-
|
|
||||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh
|
|
||||||
index a8cea3f..3739eb4 100644
|
|
||||||
--- a/phh-prop-handler.sh
|
|
||||||
+++ b/phh-prop-handler.sh
|
|
||||||
@@ -217,10 +217,13 @@ if [ "$1" == "persist.sys.phh.securize" ];then
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$prop_value" == "true" ]]; then
|
|
||||||
- mkdir /metadata/phh
|
|
||||||
+ mkdir -p /metadata/phh
|
|
||||||
touch /metadata/phh/secure
|
|
||||||
+ mkdir -p /data/adb/phh
|
|
||||||
+ touch /data/adb/phh/secure
|
|
||||||
else
|
|
||||||
rm /metadata/phh/secure
|
|
||||||
+ rm /data/adb/phh/secure
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
diff --git a/rw-system.sh b/rw-system.sh
|
|
||||||
index 33b3591..3812b12 100644
|
|
||||||
--- a/rw-system.sh
|
|
||||||
+++ b/rw-system.sh
|
|
||||||
@@ -727,7 +727,7 @@ copyprop() {
|
|
||||||
resetprop_phh "$1" "$(getprop "$2")"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
-if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
|
|
||||||
+if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ] || [ -f /data/adb/phh/secure ];then
|
|
||||||
copyprop ro.build.device ro.vendor.build.device
|
|
||||||
copyprop ro.system.build.fingerprint ro.vendor.build.fingerprint
|
|
||||||
copyprop ro.bootimage.build.fingerprint ro.vendor.build.fingerprint
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
From 273e01312171fa003667343330ce08d6d127597f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Victor Bo <bvoid@yandex.ru>
|
|
||||||
Date: Tue, 15 Sep 2020 21:26:45 -0400
|
|
||||||
Subject: [PATCH 9/9] add offline charger sepolicy
|
|
||||||
|
|
||||||
---
|
|
||||||
sepolicy/gsicharger.te | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
create mode 100644 sepolicy/gsicharger.te
|
|
||||||
|
|
||||||
diff --git a/sepolicy/gsicharger.te b/sepolicy/gsicharger.te
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..91cfb5c
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sepolicy/gsicharger.te
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+permissive charger;
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
+317
@@ -0,0 +1,317 @@
|
|||||||
|
From 1ae4e6c6b0af6ed394f5009e950c79bd50a83b7c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Cai <peter@typeblog.net>
|
||||||
|
Date: Thu, 18 Aug 2022 15:44:46 -0400
|
||||||
|
Subject: [PATCH 1/3] APM: Restore S, R and Q behavior respectively for
|
||||||
|
telephony audio
|
||||||
|
|
||||||
|
This conditionally reverts part of b2e5cb (T), 51c9cc (S) and afd4ce (R)
|
||||||
|
when the VNDK version is equal to or before S, R and Q respectively.
|
||||||
|
|
||||||
|
On R, commit afd4ce made it so that both HW and SW bridging go through
|
||||||
|
`createAudioPatch()`, which is broken on some devices such as on MTK Q
|
||||||
|
vendor, because their HAL do not support HW patching via the newer
|
||||||
|
`createAudioPatch()` method. Instead, the patching on Q was done through
|
||||||
|
`setOutputDevices()`.
|
||||||
|
|
||||||
|
On S, commit 51c9cc refactored the related code again such that HW
|
||||||
|
bridging for the Rx direction is essentially removed, replaced with SW
|
||||||
|
bridging through `startAudioSource()`. This is, again, broken on MTK R
|
||||||
|
vendor devices.
|
||||||
|
|
||||||
|
On T, commit b2e5cb applied the same SW bridging to the Tx direction.
|
||||||
|
|
||||||
|
All of these commits rely on assumptions that are not tested through
|
||||||
|
VTS and just presumed to be true. Although we can blame MTK for not
|
||||||
|
supporting all the possible cases in their HAL, it will not fix
|
||||||
|
anything, and really frameworks code should not depend on such untested
|
||||||
|
assumptions.
|
||||||
|
|
||||||
|
To work around said issues, we restore old behavior from S, R and Q
|
||||||
|
relying on the value of `ro.vndk.version`.
|
||||||
|
|
||||||
|
Change-Id: I56d36d2aef4319935cb88a3e4771b23c6d5b2145
|
||||||
|
---
|
||||||
|
.../managerdefault/AudioPolicyManager.cpp | 197 +++++++++++++-----
|
||||||
|
.../managerdefault/AudioPolicyManager.h | 3 +
|
||||||
|
2 files changed, 143 insertions(+), 57 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||||
|
index 4573382a06..b7d0dbcca4 100644
|
||||||
|
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||||
|
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||||
|
@@ -675,6 +675,17 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
disconnectTelephonyAudioSource(mCallRxSourceClient);
|
||||||
|
disconnectTelephonyAudioSource(mCallTxSourceClient);
|
||||||
|
|
||||||
|
+ // release existing RX patch if any
|
||||||
|
+ if (mCallRxPatch != 0) {
|
||||||
|
+ releaseAudioPatchInternal(mCallRxPatch->getHandle());
|
||||||
|
+ mCallRxPatch.clear();
|
||||||
|
+ }
|
||||||
|
+ // release TX patch if any
|
||||||
|
+ if (mCallTxPatch != 0) {
|
||||||
|
+ releaseAudioPatchInternal(mCallTxPatch->getHandle());
|
||||||
|
+ mCallTxPatch.clear();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
auto telephonyRxModule =
|
||||||
|
mHwModules.getModuleForDeviceType(AUDIO_DEVICE_IN_TELEPHONY_RX, AUDIO_FORMAT_DEFAULT);
|
||||||
|
auto telephonyTxModule =
|
||||||
|
@@ -697,9 +708,20 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
ALOGE("%s() no telephony Tx and/or RX device", __func__);
|
||||||
|
return INVALID_OPERATION;
|
||||||
|
}
|
||||||
|
- // createAudioPatchInternal now supports both HW / SW bridging
|
||||||
|
- createRxPatch = true;
|
||||||
|
- createTxPatch = true;
|
||||||
|
+ if (property_get_int32("ro.vndk.version", 31) >= 30) {
|
||||||
|
+ // createAudioPatchInternal now supports both HW / SW bridging
|
||||||
|
+ createRxPatch = true;
|
||||||
|
+ createTxPatch = true;
|
||||||
|
+ } else {
|
||||||
|
+ // pre-R behavior: some devices before VNDK 30 do not support createAudioPatch correctly
|
||||||
|
+ // for HW bridging even though they declare support for it
|
||||||
|
+ // do not create a patch (aka Sw Bridging) if Primary HW module has declared supporting a
|
||||||
|
+ // route between telephony RX to Sink device and Source device to telephony TX
|
||||||
|
+ ALOGI("%s() Using pre-R behavior for createRxPatch and createTxPatch", __func__);
|
||||||
|
+ const auto &primaryModule = telephonyRxModule;
|
||||||
|
+ createRxPatch = !primaryModule->supportsPatch(rxSourceDevice, rxDevices.itemAt(0));
|
||||||
|
+ createTxPatch = !primaryModule->supportsPatch(txSourceDevice, txSinkDevice);
|
||||||
|
+ }
|
||||||
|
} else {
|
||||||
|
// If the RX device is on the primary HW module, then use legacy routing method for
|
||||||
|
// voice calls via setOutputDevice() on primary output.
|
||||||
|
@@ -716,7 +738,14 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
if (!createRxPatch) {
|
||||||
|
muteWaitMs = setOutputDevices(mPrimaryOutput, rxDevices, true, delayMs);
|
||||||
|
} else { // create RX path audio patch
|
||||||
|
- connectTelephonyRxAudioSource();
|
||||||
|
+ if (property_get_int32("ro.vndk.version", 31) >= 31) {
|
||||||
|
+ connectTelephonyRxAudioSource();
|
||||||
|
+ } else {
|
||||||
|
+ // pre-S behavior: some devices do not support SW bridging correctly when HW bridge is
|
||||||
|
+ // available through createAudioPatch(); startAudioSource() forces SW bridging.
|
||||||
|
+ ALOGI("%s() Using pre-S behavior to create HW Rx patch", __func__);
|
||||||
|
+ mCallRxPatch = createTelephonyPatch(true /*isRx*/, rxDevices.itemAt(0), delayMs);
|
||||||
|
+ }
|
||||||
|
// If the TX device is on the primary HW module but RX device is
|
||||||
|
// on other HW module, SinkMetaData of telephony input should handle it
|
||||||
|
// assuming the device uses audio HAL V5.0 and above
|
||||||
|
@@ -731,7 +760,12 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
closeActiveClients(activeDesc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- connectTelephonyTxAudioSource(txSourceDevice, txSinkDevice, delayMs);
|
||||||
|
+ if (property_get_int32("ro.vndk.version", 33) >= 33) {
|
||||||
|
+ connectTelephonyTxAudioSource(txSourceDevice, txSinkDevice, delayMs);
|
||||||
|
+ } else {
|
||||||
|
+ // pre-T behavior: hw bridging for tx too; skip the SwOutput
|
||||||
|
+ mCallTxPatch = createTelephonyPatch(false /*isRx*/, txSourceDevice, delayMs);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
if (waitMs != nullptr) {
|
||||||
|
*waitMs = muteWaitMs;
|
||||||
|
@@ -739,6 +773,36 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
return NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
+sp<AudioPatch> AudioPolicyManager::createTelephonyPatch(
|
||||||
|
+ bool isRx, const sp<DeviceDescriptor> &device, uint32_t delayMs) {
|
||||||
|
+ PatchBuilder patchBuilder;
|
||||||
|
+
|
||||||
|
+ if (device == nullptr) {
|
||||||
|
+ return nullptr;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // @TODO: still ignoring the address, or not dealing platform with multiple telephony devices
|
||||||
|
+ if (isRx) {
|
||||||
|
+ patchBuilder.addSink(device).
|
||||||
|
+ addSource(mAvailableInputDevices.getDevice(
|
||||||
|
+ AUDIO_DEVICE_IN_TELEPHONY_RX, String8(), AUDIO_FORMAT_DEFAULT));
|
||||||
|
+ } else {
|
||||||
|
+ patchBuilder.addSource(device).
|
||||||
|
+ addSink(mAvailableOutputDevices.getDevice(
|
||||||
|
+ AUDIO_DEVICE_OUT_TELEPHONY_TX, String8(), AUDIO_FORMAT_DEFAULT));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ audio_patch_handle_t patchHandle = AUDIO_PATCH_HANDLE_NONE;
|
||||||
|
+ status_t status =
|
||||||
|
+ createAudioPatchInternal(patchBuilder.patch(), &patchHandle, mUidCached, delayMs, nullptr);
|
||||||
|
+ ssize_t index = mAudioPatches.indexOfKey(patchHandle);
|
||||||
|
+ if (status != NO_ERROR || index < 0) {
|
||||||
|
+ ALOGW("%s() error %d creating %s audio patch", __func__, status, isRx ? "RX" : "TX");
|
||||||
|
+ return nullptr;
|
||||||
|
+ }
|
||||||
|
+ return mAudioPatches.valueAt(index);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool AudioPolicyManager::isDeviceOfModule(
|
||||||
|
const sp<DeviceDescriptor>& devDesc, const char *moduleId) const {
|
||||||
|
sp<HwModule> module = mHwModules.getModuleFromName(moduleId);
|
||||||
|
@@ -4541,78 +4605,97 @@ status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch *
|
||||||
|
// in config XML to reach the sink so that is can be declared as available.
|
||||||
|
audio_io_handle_t output = AUDIO_IO_HANDLE_NONE;
|
||||||
|
sp<SwAudioOutputDescriptor> outputDesc;
|
||||||
|
- if (!sourceDesc->isInternal()) {
|
||||||
|
- // take care of dynamic routing for SwOutput selection,
|
||||||
|
- audio_attributes_t attributes = sourceDesc->attributes();
|
||||||
|
- audio_stream_type_t stream = sourceDesc->stream();
|
||||||
|
- audio_attributes_t resultAttr;
|
||||||
|
- audio_config_t config = AUDIO_CONFIG_INITIALIZER;
|
||||||
|
- config.sample_rate = sourceDesc->config().sample_rate;
|
||||||
|
- config.channel_mask = sourceDesc->config().channel_mask;
|
||||||
|
- config.format = sourceDesc->config().format;
|
||||||
|
- audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE;
|
||||||
|
- audio_port_handle_t selectedDeviceId = AUDIO_PORT_HANDLE_NONE;
|
||||||
|
- bool isRequestedDeviceForExclusiveUse = false;
|
||||||
|
- output_type_t outputType;
|
||||||
|
- bool isSpatialized;
|
||||||
|
- getOutputForAttrInt(&resultAttr, &output, AUDIO_SESSION_NONE, &attributes,
|
||||||
|
- &stream, sourceDesc->uid(), &config, &flags,
|
||||||
|
- &selectedDeviceId, &isRequestedDeviceForExclusiveUse,
|
||||||
|
- nullptr, &outputType, &isSpatialized);
|
||||||
|
- if (output == AUDIO_IO_HANDLE_NONE) {
|
||||||
|
- ALOGV("%s no output for device %s",
|
||||||
|
- __FUNCTION__, sinkDevice->toString().c_str());
|
||||||
|
- return INVALID_OPERATION;
|
||||||
|
- }
|
||||||
|
- outputDesc = mOutputs.valueFor(output);
|
||||||
|
- if (outputDesc->isDuplicated()) {
|
||||||
|
- ALOGE("%s output is duplicated", __func__);
|
||||||
|
- return INVALID_OPERATION;
|
||||||
|
- }
|
||||||
|
- bool closeOutput = outputDesc->mDirectOpenCount != 0;
|
||||||
|
- sourceDesc->setSwOutput(outputDesc, closeOutput);
|
||||||
|
- } else {
|
||||||
|
- // Same for "raw patches" aka created from createAudioPatch API
|
||||||
|
- SortedVector<audio_io_handle_t> outputs =
|
||||||
|
- getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
|
||||||
|
- // if the sink device is reachable via an opened output stream, request to
|
||||||
|
- // go via this output stream by adding a second source to the patch
|
||||||
|
- // description
|
||||||
|
- output = selectOutput(outputs);
|
||||||
|
- if (output == AUDIO_IO_HANDLE_NONE) {
|
||||||
|
- ALOGE("%s no output available for internal patch sink", __func__);
|
||||||
|
- return INVALID_OPERATION;
|
||||||
|
- }
|
||||||
|
- outputDesc = mOutputs.valueFor(output);
|
||||||
|
- if (outputDesc->isDuplicated()) {
|
||||||
|
- ALOGV("%s output for device %s is duplicated",
|
||||||
|
- __func__, sinkDevice->toString().c_str());
|
||||||
|
- return INVALID_OPERATION;
|
||||||
|
+ if (sourceDesc != nullptr) {
|
||||||
|
+ if (!sourceDesc->isInternal()) {
|
||||||
|
+ // take care of dynamic routing for SwOutput selection,
|
||||||
|
+ audio_attributes_t attributes = sourceDesc->attributes();
|
||||||
|
+ audio_stream_type_t stream = sourceDesc->stream();
|
||||||
|
+ audio_attributes_t resultAttr;
|
||||||
|
+ audio_config_t config = AUDIO_CONFIG_INITIALIZER;
|
||||||
|
+ config.sample_rate = sourceDesc->config().sample_rate;
|
||||||
|
+ config.channel_mask = sourceDesc->config().channel_mask;
|
||||||
|
+ config.format = sourceDesc->config().format;
|
||||||
|
+ audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE;
|
||||||
|
+ audio_port_handle_t selectedDeviceId = AUDIO_PORT_HANDLE_NONE;
|
||||||
|
+ bool isRequestedDeviceForExclusiveUse = false;
|
||||||
|
+ output_type_t outputType;
|
||||||
|
+ bool isSpatialized;
|
||||||
|
+ getOutputForAttrInt(&resultAttr, &output, AUDIO_SESSION_NONE, &attributes,
|
||||||
|
+ &stream, sourceDesc->uid(), &config, &flags,
|
||||||
|
+ &selectedDeviceId, &isRequestedDeviceForExclusiveUse,
|
||||||
|
+ nullptr, &outputType, &isSpatialized);
|
||||||
|
+ if (output == AUDIO_IO_HANDLE_NONE) {
|
||||||
|
+ ALOGV("%s no output for device %s",
|
||||||
|
+ __FUNCTION__, sinkDevice->toString().c_str());
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ outputDesc = mOutputs.valueFor(output);
|
||||||
|
+ if (outputDesc->isDuplicated()) {
|
||||||
|
+ ALOGE("%s output is duplicated", __func__);
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ bool closeOutput = outputDesc->mDirectOpenCount != 0;
|
||||||
|
+ sourceDesc->setSwOutput(outputDesc, closeOutput);
|
||||||
|
+ } else {
|
||||||
|
+ // Same for "raw patches" aka created from createAudioPatch API
|
||||||
|
+ SortedVector<audio_io_handle_t> outputs =
|
||||||
|
+ getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
|
||||||
|
+ // if the sink device is reachable via an opened output stream, request to
|
||||||
|
+ // go via this output stream by adding a second source to the patch
|
||||||
|
+ // description
|
||||||
|
+ output = selectOutput(outputs);
|
||||||
|
+ if (output == AUDIO_IO_HANDLE_NONE) {
|
||||||
|
+ ALOGE("%s no output available for internal patch sink", __func__);
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ outputDesc = mOutputs.valueFor(output);
|
||||||
|
+ if (outputDesc->isDuplicated()) {
|
||||||
|
+ ALOGV("%s output for device %s is duplicated",
|
||||||
|
+ __func__, sinkDevice->toString().c_str());
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ sourceDesc->setSwOutput(outputDesc, /* closeOutput= */ false);
|
||||||
|
}
|
||||||
|
- sourceDesc->setSwOutput(outputDesc, /* closeOutput= */ false);
|
||||||
|
}
|
||||||
|
// create a software bridge in PatchPanel if:
|
||||||
|
// - source and sink devices are on different HW modules OR
|
||||||
|
// - audio HAL version is < 3.0
|
||||||
|
// - audio HAL version is >= 3.0 but no route has been declared between devices
|
||||||
|
- // - called from startAudioSource (aka sourceDesc is not internal) and source device
|
||||||
|
+ // - called from startAudioSource (aka sourceDesc is neither null nor internal) and source device
|
||||||
|
// does not have a gain controller
|
||||||
|
if (!srcDevice->hasSameHwModuleAs(sinkDevice) ||
|
||||||
|
(srcDevice->getModuleVersionMajor() < 3) ||
|
||||||
|
!srcDevice->getModule()->supportsPatch(srcDevice, sinkDevice) ||
|
||||||
|
- (!sourceDesc->isInternal() &&
|
||||||
|
+ ((sourceDesc != nullptr && !sourceDesc->isInternal()) &&
|
||||||
|
srcDevice->getAudioPort()->getGains().size() == 0)) {
|
||||||
|
// support only one sink device for now to simplify output selection logic
|
||||||
|
if (patch->num_sinks > 1) {
|
||||||
|
return INVALID_OPERATION;
|
||||||
|
}
|
||||||
|
- sourceDesc->setUseSwBridge();
|
||||||
|
+ if (sourceDesc == nullptr) {
|
||||||
|
+ SortedVector<audio_io_handle_t> outputs =
|
||||||
|
+ getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
|
||||||
|
+ // if the sink device is reachable via an opened output stream, request to
|
||||||
|
+ // go via this output stream by adding a second source to the patch
|
||||||
|
+ // description
|
||||||
|
+ output = selectOutput(outputs);
|
||||||
|
+ if (output != AUDIO_IO_HANDLE_NONE) {
|
||||||
|
+ outputDesc = mOutputs.valueFor(output);
|
||||||
|
+ if (outputDesc->isDuplicated()) {
|
||||||
|
+ ALOGV("%s output for device %s is duplicated",
|
||||||
|
+ __FUNCTION__, sinkDevice->toString().c_str());
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ sourceDesc->setUseSwBridge();
|
||||||
|
+ }
|
||||||
|
if (outputDesc != nullptr) {
|
||||||
|
audio_port_config srcMixPortConfig = {};
|
||||||
|
outputDesc->toAudioPortConfig(&srcMixPortConfig, nullptr);
|
||||||
|
// for volume control, we may need a valid stream
|
||||||
|
srcMixPortConfig.ext.mix.usecase.stream =
|
||||||
|
- (!sourceDesc->isInternal() || isCallTxAudioSource(sourceDesc)) ?
|
||||||
|
+ (sourceDesc != nullptr && (!sourceDesc->isInternal() || isCallTxAudioSource(sourceDesc))) ?
|
||||||
|
mEngine->getStreamTypeForAttributes(sourceDesc->attributes()) :
|
||||||
|
AUDIO_STREAM_PATCH;
|
||||||
|
patchBuilder.addSource(srcMixPortConfig);
|
||||||
|
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
|
||||||
|
index a69e08871b..f8762016db 100644
|
||||||
|
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
|
||||||
|
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
|
||||||
|
@@ -944,6 +944,9 @@ protected:
|
||||||
|
|
||||||
|
SoundTriggerSessionCollection mSoundTriggerSessions;
|
||||||
|
|
||||||
|
+ sp<AudioPatch> mCallTxPatch;
|
||||||
|
+ sp<AudioPatch> mCallRxPatch;
|
||||||
|
+
|
||||||
|
HwAudioOutputCollection mHwOutputs;
|
||||||
|
SourceClientCollection mAudioSources;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
From 80d395514dc245fb27204d31075af7145e763723 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Cai <peter@typeblog.net>
|
||||||
|
Date: Wed, 24 Aug 2022 15:42:39 -0400
|
||||||
|
Subject: [PATCH 2/3] APM: Optionally force-load audio policy for system-side
|
||||||
|
bt audio HAL
|
||||||
|
|
||||||
|
Required to support our system-side bt audio implementation, i.e.
|
||||||
|
`sysbta`.
|
||||||
|
|
||||||
|
Co-authored-by: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Change-Id: I279fff541a531f922f3fa55b8f14d00237db59ff
|
||||||
|
---
|
||||||
|
.../managerdefinitions/src/Serializer.cpp | 25 +++++++++++++++++++
|
||||||
|
1 file changed, 25 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
index d446e9667b..f5233f2a42 100644
|
||||||
|
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
@@ -25,6 +25,7 @@
|
||||||
|
#include <libxml/parser.h>
|
||||||
|
#include <libxml/xinclude.h>
|
||||||
|
#include <media/convert.h>
|
||||||
|
+#include <cutils/properties.h>
|
||||||
|
#include <utils/Log.h>
|
||||||
|
#include <utils/StrongPointer.h>
|
||||||
|
#include <utils/Errors.h>
|
||||||
|
@@ -890,6 +891,30 @@ status_t PolicySerializer::deserialize(const char *configFile, AudioPolicyConfig
|
||||||
|
if (status != NO_ERROR) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Remove modules called bluetooth, bluetooth_qti or a2dp, and inject our own
|
||||||
|
+ if (property_get_bool("persist.bluetooth.system_audio_hal.enabled", false)) {
|
||||||
|
+ for (auto it = modules.begin(); it != modules.end(); it++) {
|
||||||
|
+ const char *name = (*it)->getName();
|
||||||
|
+ if (strcmp(name, "a2dp") == 0 ||
|
||||||
|
+ strcmp(name, "a2dpsink") == 0 ||
|
||||||
|
+ strcmp(name, "bluetooth") == 0 ||
|
||||||
|
+ strcmp(name, "bluetooth_qti") == 0) {
|
||||||
|
+
|
||||||
|
+ ALOGE("Removed module %s\n", name);
|
||||||
|
+ it = modules.erase(it);
|
||||||
|
+ }
|
||||||
|
+ if (it == modules.end()) break;
|
||||||
|
+ }
|
||||||
|
+ const char* a2dpFileName = "/system/etc/sysbta_audio_policy_configuration.xml";
|
||||||
|
+ if (version == "7.0")
|
||||||
|
+ a2dpFileName = "/system/etc/sysbta_audio_policy_configuration_7_0.xml";
|
||||||
|
+ auto doc = make_xmlUnique(xmlParseFile(a2dpFileName));
|
||||||
|
+ xmlNodePtr root = xmlDocGetRootElement(doc.get());
|
||||||
|
+ auto maybeA2dpModule = deserialize<ModuleTraits>(root, config);
|
||||||
|
+ modules.add(std::get<1>(maybeA2dpModule));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
config->setHwModules(modules);
|
||||||
|
|
||||||
|
// Global Configuration
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+79
@@ -0,0 +1,79 @@
|
|||||||
|
From 02eb4803499890a0cba2f6dfc7bfa5a03d043dd2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Cai <peter@typeblog.net>
|
||||||
|
Date: Thu, 25 Aug 2022 13:30:29 -0400
|
||||||
|
Subject: [PATCH 3/3] APM: Remove A2DP audio ports from the primary HAL
|
||||||
|
|
||||||
|
These ports defined in the primary HAL are intended for A2DP offloading,
|
||||||
|
however they do not work in general on GSIs, and will interfere with
|
||||||
|
sysbta, the system-side generic bluetooth audio implementation.
|
||||||
|
|
||||||
|
Remove them as we parse the policy XML.
|
||||||
|
|
||||||
|
Co-authored-by: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Change-Id: I3305594a17285da113167b419543543f0ef71122
|
||||||
|
---
|
||||||
|
.../managerdefinitions/src/Serializer.cpp | 26 ++++++++++++++++---
|
||||||
|
1 file changed, 22 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
index f5233f2a42..6630d06f6d 100644
|
||||||
|
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
#include <libxml/xinclude.h>
|
||||||
|
#include <media/convert.h>
|
||||||
|
#include <cutils/properties.h>
|
||||||
|
+#include <system/audio.h>
|
||||||
|
#include <utils/Log.h>
|
||||||
|
#include <utils/StrongPointer.h>
|
||||||
|
#include <utils/Errors.h>
|
||||||
|
@@ -334,11 +335,8 @@ status_t PolicySerializer::deserializeCollection(const xmlNode *cur,
|
||||||
|
Trait::collectionTag);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
- } else if (mIgnoreVendorExtensions && std::get<status_t>(maybeElement) == NO_INIT) {
|
||||||
|
- // Skip a vendor extension element.
|
||||||
|
- } else {
|
||||||
|
- return BAD_VALUE;
|
||||||
|
}
|
||||||
|
+ // Ignore elements that failed to parse, e.g. routes with invalid sinks
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!xmlStrcmp(cur->name, reinterpret_cast<const xmlChar*>(Trait::tag))) {
|
||||||
|
@@ -679,6 +677,7 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||||
|
ALOGE("%s: No %s found", __func__, Attributes::name);
|
||||||
|
return BAD_VALUE;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
uint32_t versionMajor = 0, versionMinor = 0;
|
||||||
|
std::string versionLiteral = getXmlAttribute(cur, Attributes::version);
|
||||||
|
if (!versionLiteral.empty()) {
|
||||||
|
@@ -704,6 +703,25 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||||
|
if (status != NO_ERROR) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
+ bool shouldEraseA2DP = name == "primary" && property_get_bool("persist.bluetooth.system_audio_hal.enabled", false);
|
||||||
|
+ if (shouldEraseA2DP) {
|
||||||
|
+ // Having A2DP ports in the primary audio HAL module will interfere with sysbta
|
||||||
|
+ // so remove them here. Note that we do not need to explicitly remove the
|
||||||
|
+ // corresponding routes below, because routes with invalid sinks will be ignored
|
||||||
|
+ auto iter = devicePorts.begin();
|
||||||
|
+ while (iter != devicePorts.end()) {
|
||||||
|
+ auto port = *iter;
|
||||||
|
+ auto type = port->type();
|
||||||
|
+ if (type == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP
|
||||||
|
+ || type == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES
|
||||||
|
+ || type == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER) {
|
||||||
|
+ ALOGE("Erasing A2DP device port %s", port->getTagName().c_str());
|
||||||
|
+ iter = devicePorts.erase(iter);
|
||||||
|
+ } else {
|
||||||
|
+ iter++;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
module->setDeclaredDevices(devicePorts);
|
||||||
|
|
||||||
|
RouteTraits::Collection routes;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+64
@@ -0,0 +1,64 @@
|
|||||||
|
From 5cd85c5a58621bd1365a22f7dad6f3d8ede2c194 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 1/3] Re-implement fnmatch-like behaviour for RRO java-side
|
||||||
|
|
||||||
|
T: Also apply to FrameworkParsingPackageUtils (@PeterCxy)
|
||||||
|
|
||||||
|
Change-Id: Id38292a9a1453aa87b8401c1fdb390fa4e63c7d1
|
||||||
|
---
|
||||||
|
core/java/android/content/pm/PackageParser.java | 13 +++++++++++--
|
||||||
|
.../pm/parsing/FrameworkParsingPackageUtils.java | 13 +++++++++++--
|
||||||
|
2 files changed, 22 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
|
||||||
|
index c01e30ded50e..db6a36ee1b66 100644
|
||||||
|
--- a/core/java/android/content/pm/PackageParser.java
|
||||||
|
+++ b/core/java/android/content/pm/PackageParser.java
|
||||||
|
@@ -2554,8 +2554,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]);
|
||||||
|
- if (!TextUtils.equals(currValue, propValues[i])) {
|
||||||
|
- return false;
|
||||||
|
+ final String value = propValues[i];
|
||||||
|
+ if(value.startsWith("+")) {
|
||||||
|
+ final java.util.regex.Pattern regex = java.util.regex.Pattern.compile(value.substring(1, value.length()).replace("*", ".*"));
|
||||||
|
+ java.util.regex.Matcher matcher = regex.matcher(currValue);
|
||||||
|
+ if (!matcher.find()) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ if(!value.equals(currValue)) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
diff --git a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||||
|
index b75ba82ad091..b344f7232190 100644
|
||||||
|
--- a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||||
|
+++ b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||||
|
@@ -223,8 +223,17 @@ public class FrameworkParsingPackageUtils {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 3. Check if prop is equal to expected value.
|
||||||
|
- if (!currValue.equals(propValues[i])) {
|
||||||
|
- return false;
|
||||||
|
+ final String value = propValues[i];
|
||||||
|
+ if(value.startsWith("+")) {
|
||||||
|
+ final java.util.regex.Pattern regex = java.util.regex.Pattern.compile(value.substring(1, value.length()).replace("*", ".*"));
|
||||||
|
+ java.util.regex.Matcher matcher = regex.matcher(currValue);
|
||||||
|
+ if (!matcher.find()) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ if(!value.equals(currValue)) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
From eca6f07922f3804f6f1844f067941fc8097459c5 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 2/3] LightsService: Alternative backlight scale
|
||||||
|
|
||||||
|
Reserved a manual override just in case
|
||||||
|
|
||||||
|
Change-Id: I46ae69c758d1a4609d89cf1c293488ea5fc76787
|
||||||
|
---
|
||||||
|
.../com/android/server/lights/LightsService.java | 13 +++++++++++++
|
||||||
|
1 file changed, 13 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/services/core/java/com/android/server/lights/LightsService.java b/services/core/java/com/android/server/lights/LightsService.java
|
||||||
|
index fea6b29d9260..2a9a3b63ea2e 100644
|
||||||
|
--- a/services/core/java/com/android/server/lights/LightsService.java
|
||||||
|
+++ b/services/core/java/com/android/server/lights/LightsService.java
|
||||||
|
@@ -32,6 +32,7 @@ import android.os.IBinder;
|
||||||
|
import android.os.Looper;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.os.ServiceManager;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
import android.os.Trace;
|
||||||
|
import android.provider.Settings;
|
||||||
|
import android.util.Slog;
|
||||||
|
@@ -295,6 +296,18 @@ public class LightsService extends SystemService {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int brightnessInt = BrightnessSynchronizer.brightnessFloatToInt(brightness);
|
||||||
|
+ if (mHwLight.id == 0) {
|
||||||
|
+ int scaleOverrideValue = SystemProperties.getInt("persist.sys.treble.backlight_scale.override_value", -1);
|
||||||
|
+ if (scaleOverrideValue != -1) {
|
||||||
|
+ setLightLocked(brightnessInt * scaleOverrideValue / 255, LIGHT_FLASH_NONE, 0, 0, brightnessMode);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ int scaleValue = SystemProperties.getInt("persist.sys.treble.backlight_scale.value", -1);
|
||||||
|
+ if (scaleValue != -1) {
|
||||||
|
+ setLightLocked(brightnessInt * scaleValue / 255, LIGHT_FLASH_NONE, 0, 0, brightnessMode);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
int color = brightnessInt & 0x000000ff;
|
||||||
|
color = 0xff000000 | (color << 16) | (color << 8) | color;
|
||||||
|
setLightLocked(color, LIGHT_FLASH_NONE, 0, 0, brightnessMode);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+127
@@ -0,0 +1,127 @@
|
|||||||
|
From 2bee84fb2e576ffb56d8ad428ba180aee67d2d8c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 15 Oct 2022 09:33:56 +0000
|
||||||
|
Subject: [PATCH 3/3] Revert "Remove more FDE methods from StorageManager"
|
||||||
|
|
||||||
|
This reverts commit bd13f84152449a3ead6fa8604fd31f48c0224676.
|
||||||
|
---
|
||||||
|
.../android/os/storage/StorageManager.java | 69 ++++++++++++++++---
|
||||||
|
.../internal/os/RoSystemProperties.java | 4 ++
|
||||||
|
2 files changed, 65 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
|
||||||
|
index d9604b3f0145..603612e82007 100644
|
||||||
|
--- a/core/java/android/os/storage/StorageManager.java
|
||||||
|
+++ b/core/java/android/os/storage/StorageManager.java
|
||||||
|
@@ -1681,13 +1681,18 @@ public class StorageManager {
|
||||||
|
}
|
||||||
|
|
||||||
|
/** {@hide}
|
||||||
|
- * Is this device encrypted?
|
||||||
|
- * <p>
|
||||||
|
- * Note: all devices launching with Android 10 (API level 29) or later are
|
||||||
|
- * required to be encrypted. This should only ever return false for
|
||||||
|
- * in-development devices on which encryption has not yet been configured.
|
||||||
|
- *
|
||||||
|
- * @return true if encrypted, false if not encrypted
|
||||||
|
+ * Is this device encryptable or already encrypted?
|
||||||
|
+ * @return true for encryptable or encrypted
|
||||||
|
+ * false not encrypted and not encryptable
|
||||||
|
+ */
|
||||||
|
+ public static boolean isEncryptable() {
|
||||||
|
+ return RoSystemProperties.CRYPTO_ENCRYPTABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device already encrypted?
|
||||||
|
+ * @return true for encrypted. (Implies isEncryptable() == true)
|
||||||
|
+ * false not encrypted
|
||||||
|
*/
|
||||||
|
public static boolean isEncrypted() {
|
||||||
|
return RoSystemProperties.CRYPTO_ENCRYPTED;
|
||||||
|
@@ -1696,7 +1701,7 @@ public class StorageManager {
|
||||||
|
/** {@hide}
|
||||||
|
* Is this device file encrypted?
|
||||||
|
* @return true for file encrypted. (Implies isEncrypted() == true)
|
||||||
|
- * false not encrypted or using "managed" encryption
|
||||||
|
+ * false not encrypted or block encrypted
|
||||||
|
*/
|
||||||
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||||
|
public static boolean isFileEncryptedNativeOnly() {
|
||||||
|
@@ -1706,6 +1711,54 @@ public class StorageManager {
|
||||||
|
return RoSystemProperties.CRYPTO_FILE_ENCRYPTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device block encrypted?
|
||||||
|
+ * @return true for block encrypted. (Implies isEncrypted() == true)
|
||||||
|
+ * false not encrypted or file encrypted
|
||||||
|
+ */
|
||||||
|
+ public static boolean isBlockEncrypted() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device block encrypted with credentials?
|
||||||
|
+ * @return true for crediential block encrypted.
|
||||||
|
+ * (Implies isBlockEncrypted() == true)
|
||||||
|
+ * false not encrypted, file encrypted or default block encrypted
|
||||||
|
+ */
|
||||||
|
+ public static boolean isNonDefaultBlockEncrypted() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device in the process of being block encrypted?
|
||||||
|
+ * @return true for encrypting.
|
||||||
|
+ * false otherwise
|
||||||
|
+ * Whether device isEncrypted at this point is undefined
|
||||||
|
+ * Note that only system services and CryptKeeper will ever see this return
|
||||||
|
+ * true - no app will ever be launched in this state.
|
||||||
|
+ * Also note that this state will not change without a teardown of the
|
||||||
|
+ * framework, so no service needs to check for changes during their lifespan
|
||||||
|
+ */
|
||||||
|
+ public static boolean isBlockEncrypting() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device non default block encrypted and in the process of
|
||||||
|
+ * prompting for credentials?
|
||||||
|
+ * @return true for prompting for credentials.
|
||||||
|
+ * (Implies isNonDefaultBlockEncrypted() == true)
|
||||||
|
+ * false otherwise
|
||||||
|
+ * Note that only system services and CryptKeeper will ever see this return
|
||||||
|
+ * true - no app will ever be launched in this state.
|
||||||
|
+ * Also note that this state will not change without a teardown of the
|
||||||
|
+ * framework, so no service needs to check for changes during their lifespan
|
||||||
|
+ */
|
||||||
|
+ public static boolean inCryptKeeperBounce() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/** {@hide} */
|
||||||
|
public static boolean isFileEncryptedEmulatedOnly() {
|
||||||
|
return SystemProperties.getBoolean(StorageManager.PROP_EMULATE_FBE, false);
|
||||||
|
diff --git a/core/java/com/android/internal/os/RoSystemProperties.java b/core/java/com/android/internal/os/RoSystemProperties.java
|
||||||
|
index cccd80e82420..adb5c107bc62 100644
|
||||||
|
--- a/core/java/com/android/internal/os/RoSystemProperties.java
|
||||||
|
+++ b/core/java/com/android/internal/os/RoSystemProperties.java
|
||||||
|
@@ -62,10 +62,14 @@ public class RoSystemProperties {
|
||||||
|
public static final CryptoProperties.type_values CRYPTO_TYPE =
|
||||||
|
CryptoProperties.type().orElse(CryptoProperties.type_values.NONE);
|
||||||
|
// These are pseudo-properties
|
||||||
|
+ public static final boolean CRYPTO_ENCRYPTABLE =
|
||||||
|
+ CRYPTO_STATE != CryptoProperties.state_values.UNSUPPORTED;
|
||||||
|
public static final boolean CRYPTO_ENCRYPTED =
|
||||||
|
CRYPTO_STATE == CryptoProperties.state_values.ENCRYPTED;
|
||||||
|
public static final boolean CRYPTO_FILE_ENCRYPTED =
|
||||||
|
CRYPTO_TYPE == CryptoProperties.type_values.FILE;
|
||||||
|
+ public static final boolean CRYPTO_BLOCK_ENCRYPTED =
|
||||||
|
+ CRYPTO_TYPE == CryptoProperties.type_values.BLOCK;
|
||||||
|
|
||||||
|
public static final boolean CONTROL_PRIVAPP_PERMISSIONS_LOG =
|
||||||
|
"log".equalsIgnoreCase(CONTROL_PRIVAPP_PERMISSIONS);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,8 +1,8 @@
|
|||||||
From f0e836ccbe617db0670c68e1f4f5a9ec2ec0ab8f Mon Sep 17 00:00:00 2001
|
From 3778b8ef0ea5026e222d88c7ac3a67f8b6bab69f Mon Sep 17 00:00:00 2001
|
||||||
From: Pierre-Hugues Husson <phh@phh.me>
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
Date: Fri, 25 Mar 2022 05:37:56 -0400
|
Date: Fri, 25 Mar 2022 05:37:56 -0400
|
||||||
Subject: [PATCH 16/17] MIUI13 devices hide their vibrator HAL behind
|
Subject: [PATCH 1/2] MIUI13 devices hide their vibrator HAL behind non-default
|
||||||
non-default name: "vibratorfeature"
|
name: "vibratorfeature"
|
||||||
|
|
||||||
---
|
---
|
||||||
services/vibratorservice/VibratorHalController.cpp | 6 ++++++
|
services/vibratorservice/VibratorHalController.cpp | 6 ++++++
|
||||||
@@ -26,5 +26,5 @@ index c1795f5c32..345016efd6 100644
|
|||||||
if (halV1_0 == nullptr) {
|
if (halV1_0 == nullptr) {
|
||||||
ALOGV("Vibrator HAL service not available.");
|
ALOGV("Vibrator HAL service not available.");
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
-42
@@ -1,42 +0,0 @@
|
|||||||
From 21961afe4adcc0e4d56420afaa28ded058178436 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] Revert "Add suspend_resume trace events to the atrace 'freq'
|
|
||||||
category."
|
|
||||||
|
|
||||||
This reverts commit 581c22f979af05e48ad4843cdfa9605186d286da.
|
|
||||||
|
|
||||||
Change-Id: I48895242e8567e91418c61d67a51de2b42f1008b
|
|
||||||
---
|
|
||||||
cmds/atrace/atrace.cpp | 1 -
|
|
||||||
cmds/atrace/atrace.rc | 2 --
|
|
||||||
2 files changed, 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
|
|
||||||
index 783a475829..8feba981da 100644
|
|
||||||
--- a/cmds/atrace/atrace.cpp
|
|
||||||
+++ b/cmds/atrace/atrace.cpp
|
|
||||||
@@ -173,7 +173,6 @@ static const TracingCategory k_categories[] = {
|
|
||||||
{ OPT, "events/clk/clk_disable/enable" },
|
|
||||||
{ OPT, "events/clk/clk_enable/enable" },
|
|
||||||
{ OPT, "events/power/cpu_frequency_limits/enable" },
|
|
||||||
- { OPT, "events/power/suspend_resume/enable" },
|
|
||||||
{ OPT, "events/cpuhp/cpuhp_enter/enable" },
|
|
||||||
{ OPT, "events/cpuhp/cpuhp_exit/enable" },
|
|
||||||
{ OPT, "events/cpuhp/cpuhp_pause/enable" },
|
|
||||||
diff --git a/cmds/atrace/atrace.rc b/cmds/atrace/atrace.rc
|
|
||||||
index e3c4edebbd..94e4796f45 100644
|
|
||||||
--- a/cmds/atrace/atrace.rc
|
|
||||||
+++ b/cmds/atrace/atrace.rc
|
|
||||||
@@ -61,8 +61,6 @@ on late-init
|
|
||||||
chmod 0666 /sys/kernel/tracing/events/cpuhp/cpuhp_pause/enable
|
|
||||||
chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_frequency/enable
|
|
||||||
chmod 0666 /sys/kernel/tracing/events/power/gpu_frequency/enable
|
|
||||||
- chmod 0666 /sys/kernel/debug/tracing/events/power/suspend_resume/enable
|
|
||||||
- chmod 0666 /sys/kernel/tracing/events/power/suspend_resume/enable
|
|
||||||
chmod 0666 /sys/kernel/debug/tracing/events/cpufreq_interactive/enable
|
|
||||||
chmod 0666 /sys/kernel/tracing/events/cpufreq_interactive/enable
|
|
||||||
chmod 0666 /sys/kernel/debug/tracing/events/vmscan/mm_vmscan_direct_reclaim_begin/enable
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
From 0cc0dd5e5dcea5e0c0b2ab20e27b119d0a1477e1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 18 Apr 2023 23:48:15 +0000
|
||||||
|
Subject: [PATCH 2/2] Fix light sensor crash on Xiaomi 13
|
||||||
|
|
||||||
|
SensorService expects a scalar, but Xiaomi HAL returns a pose6DOF vector encapsulation
|
||||||
|
Thanks @phhusson for the analysis
|
||||||
|
|
||||||
|
Change-Id: Ie358321d5328d01541f455d6af86944ff413c9c9
|
||||||
|
---
|
||||||
|
services/sensorservice/AidlSensorHalWrapper.cpp | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/services/sensorservice/AidlSensorHalWrapper.cpp b/services/sensorservice/AidlSensorHalWrapper.cpp
|
||||||
|
index f67c610550..32fd9240b3 100644
|
||||||
|
--- a/services/sensorservice/AidlSensorHalWrapper.cpp
|
||||||
|
+++ b/services/sensorservice/AidlSensorHalWrapper.cpp
|
||||||
|
@@ -171,7 +171,14 @@ void convertToSensorEvent(const Event &src, sensors_event_t *dst) {
|
||||||
|
case SensorType::MOTION_DETECT:
|
||||||
|
case SensorType::HEART_BEAT:
|
||||||
|
case SensorType::LOW_LATENCY_OFFBODY_DETECT: {
|
||||||
|
- dst->data[0] = src.payload.get<Event::EventPayload::scalar>();
|
||||||
|
+ if (src.payload.getTag() == Event::EventPayload::pose6DOF) {
|
||||||
|
+ auto d = src.payload.get<Event::EventPayload::pose6DOF>();
|
||||||
|
+ auto dstr = ::android::internal::ToString(d);
|
||||||
|
+ // ALOGE("Received 6DOF for expected scalar %s", dstr.c_str());
|
||||||
|
+ dst->data[0] = d.values[0];
|
||||||
|
+ } else {
|
||||||
|
+ dst->data[0] = src.payload.get<Event::EventPayload::scalar>();
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
From 5e51de4ac017a91e01dbf5514f433adcdd191e63 Mon Sep 17 00:00:00 2001
|
From 2bb0d801335970b8f0e9b8b7ffdf86128ae19468 Mon Sep 17 00:00:00 2001
|
||||||
From: Pierre-Hugues Husson <phh@phh.me>
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
Date: Sun, 14 Nov 2021 13:47:29 -0500
|
Date: Sun, 14 Nov 2021 13:47:29 -0500
|
||||||
Subject: [PATCH] Pie MTK IMS calls static
|
Subject: [PATCH] Pie MTK IMS calls static
|
||||||
@@ -10,11 +10,11 @@ Change-Id: I3dd66d436629d37c8ec795df6569736195ae570e
|
|||||||
1 file changed, 8 insertions(+)
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/java/com/android/ims/ImsManager.java b/src/java/com/android/ims/ImsManager.java
|
diff --git a/src/java/com/android/ims/ImsManager.java b/src/java/com/android/ims/ImsManager.java
|
||||||
index 345cbc5..e7e3722 100644
|
index c41426d..2c6d656 100644
|
||||||
--- a/src/java/com/android/ims/ImsManager.java
|
--- a/src/java/com/android/ims/ImsManager.java
|
||||||
+++ b/src/java/com/android/ims/ImsManager.java
|
+++ b/src/java/com/android/ims/ImsManager.java
|
||||||
@@ -1642,6 +1642,14 @@ public class ImsManager implements FeatureUpdates {
|
@@ -1667,6 +1667,14 @@ public class ImsManager implements FeatureUpdates {
|
||||||
return true;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public static void updateImsServiceConfig(Context context, int phoneId, boolean force) {
|
+ public static void updateImsServiceConfig(Context context, int phoneId, boolean force) {
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From 346ae5f3e226cb46c7e281d327785e2a600ea6f8 Mon Sep 17 00:00:00 2001
|
From fc4ecc73093f88934a65a9371ae7af274c2b143d Mon Sep 17 00:00:00 2001
|
||||||
From: ironydelerium <42721860+ironydelerium@users.noreply.github.com>
|
From: ironydelerium <42721860+ironydelerium@users.noreply.github.com>
|
||||||
Date: Fri, 31 Dec 2021 02:20:28 -0800
|
Date: Fri, 31 Dec 2021 02:20:28 -0800
|
||||||
Subject: [PATCH 4/5] Reintroduce 'public void
|
Subject: [PATCH] Reintroduce 'public void
|
||||||
TelephonyMetrics.writeRilSendSms(int, int, int, int)'. (#8)
|
TelephonyMetrics.writeRilSendSms(int, int, int, int)'. (#8)
|
||||||
|
|
||||||
The MediaTek IMS package for Android Q, at the very least (likely for the rest, too)
|
The MediaTek IMS package for Android Q, at the very least (likely for the rest, too)
|
||||||
@@ -13,16 +13,16 @@ in a MethodNotFoundException being raised in com.mediatek.ims, crashing it.
|
|||||||
Fixes https://github.com/phhusson/treble_experimentations/issues/2125.
|
Fixes https://github.com/phhusson/treble_experimentations/issues/2125.
|
||||||
|
|
||||||
Co-authored-by: Sarah Vandomelen <sarah@sightworks.com>
|
Co-authored-by: Sarah Vandomelen <sarah@sightworks.com>
|
||||||
Change-Id: Ib7a3a41e049cb9c9f937e8c6f771a29495738223
|
Change-Id: I789f470fb38d86dd37e8408536e208a7a49e7e26
|
||||||
---
|
---
|
||||||
.../telephony/metrics/TelephonyMetrics.java | 13 +++++++++++++
|
.../telephony/metrics/TelephonyMetrics.java | 13 +++++++++++++
|
||||||
1 file changed, 13 insertions(+)
|
1 file changed, 13 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
diff --git a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
||||||
index 5e43876df8..c375d9c8b6 100644
|
index 5b47ae5b7a..f3e7717aca 100644
|
||||||
--- a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
--- a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
||||||
+++ b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
+++ b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
||||||
@@ -2311,6 +2311,19 @@ public class TelephonyMetrics {
|
@@ -2324,6 +2324,19 @@ public class TelephonyMetrics {
|
||||||
smsSession.increaseExpectedResponse();
|
smsSession.increaseExpectedResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From 25edd8e7b0afd85ea1bc6f39878b557c47366518 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 30 Sep 2022 11:32:24 +0000
|
||||||
|
Subject: [PATCH] Add an enum for Treble settings
|
||||||
|
|
||||||
|
Change-Id: I8dc25afa27e938ee82594a8343e73c7c494003e2
|
||||||
|
---
|
||||||
|
stats/enums/app/settings_enums.proto | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/stats/enums/app/settings_enums.proto b/stats/enums/app/settings_enums.proto
|
||||||
|
index ed241b6c..41b5efe0 100644
|
||||||
|
--- a/stats/enums/app/settings_enums.proto
|
||||||
|
+++ b/stats/enums/app/settings_enums.proto
|
||||||
|
@@ -2006,6 +2006,9 @@ enum PageId {
|
||||||
|
// OPEN: Settings > System > Input & Gesture > Double twist gesture
|
||||||
|
SETTINGS_GESTURE_DOUBLE_TWIST = 755;
|
||||||
|
|
||||||
|
+ // OPEN: Settings > Treble Settings
|
||||||
|
+ SETTINGS_TREBLE_CATEGORY = 777;
|
||||||
|
+
|
||||||
|
// OPEN: Settings > Apps > Default Apps > Default browser
|
||||||
|
DEFAULT_BROWSER_PICKER = 785;
|
||||||
|
// OPEN: Settings > Apps > Default Apps > Default emergency app
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
+360
@@ -0,0 +1,360 @@
|
|||||||
|
From 67b3720b1972d7290e93a9369b9a319583bba482 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 22 Sep 2022 12:37:50 +0000
|
||||||
|
Subject: [PATCH 1/8] TrebleSettings: Screen resolution & refresh rate
|
||||||
|
|
||||||
|
Change-Id: I4a4679cdb6d4ede55479e9ab2f014342025b0fec
|
||||||
|
---
|
||||||
|
AndroidManifest.xml | 8 +
|
||||||
|
res/drawable/ic_settings_treble.xml | 10 +
|
||||||
|
res/values/menu_keys.xml | 1 +
|
||||||
|
res/values/strings.xml | 10 +
|
||||||
|
res/xml/top_level_settings.xml | 9 +
|
||||||
|
res/xml/treble_settings.xml | 18 ++
|
||||||
|
...lutionRefreshRatePreferenceController.java | 173 ++++++++++++++++++
|
||||||
|
.../settings/treble/TrebleSettings.java | 39 ++++
|
||||||
|
8 files changed, 268 insertions(+)
|
||||||
|
create mode 100644 res/drawable/ic_settings_treble.xml
|
||||||
|
create mode 100644 res/xml/treble_settings.xml
|
||||||
|
create mode 100644 src/com/android/settings/treble/ScreenResolutionRefreshRatePreferenceController.java
|
||||||
|
create mode 100644 src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
|
||||||
|
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||||
|
index 80e0f4b61b..6b138b1f60 100644
|
||||||
|
--- a/AndroidManifest.xml
|
||||||
|
+++ b/AndroidManifest.xml
|
||||||
|
@@ -223,6 +223,14 @@
|
||||||
|
android:value="com.android.settings.shortcut.CreateShortcut" />
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
+ <receiver
|
||||||
|
+ android:name=".treble.ScreenResolutionRefreshRatePreferenceController$BootReceiver"
|
||||||
|
+ android:exported="true">
|
||||||
|
+ <intent-filter>
|
||||||
|
+ <action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||||
|
+ </intent-filter>
|
||||||
|
+ </receiver>
|
||||||
|
+
|
||||||
|
<!-- Wireless Controls -->
|
||||||
|
<activity
|
||||||
|
android:name=".Settings$NetworkDashboardActivity"
|
||||||
|
diff --git a/res/drawable/ic_settings_treble.xml b/res/drawable/ic_settings_treble.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..3c56ed7032
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/res/drawable/ic_settings_treble.xml
|
||||||
|
@@ -0,0 +1,10 @@
|
||||||
|
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
+ android:width="24dp"
|
||||||
|
+ android:height="24dp"
|
||||||
|
+ android:viewportWidth="24.0"
|
||||||
|
+ android:viewportHeight="24.0"
|
||||||
|
+ android:tint="?attr/colorControlNormal">
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="@android:color/white"
|
||||||
|
+ android:pathData="M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"/>
|
||||||
|
+</vector>
|
||||||
|
diff --git a/res/values/menu_keys.xml b/res/values/menu_keys.xml
|
||||||
|
index 27e9639122..ef25f9971c 100755
|
||||||
|
--- a/res/values/menu_keys.xml
|
||||||
|
+++ b/res/values/menu_keys.xml
|
||||||
|
@@ -16,6 +16,7 @@
|
||||||
|
|
||||||
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
|
|
||||||
|
+ <string name="menu_key_treble" translatable="false">top_level_treble</string>
|
||||||
|
<string name="menu_key_network" translatable="false">top_level_network</string>
|
||||||
|
<string name="menu_key_communal" translatable="false">top_level_communal</string>
|
||||||
|
<string name="menu_key_connected_devices" translatable="false">top_level_connected_devices</string>
|
||||||
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
|
index d8a2c3b41c..ae520f9c64 100644
|
||||||
|
--- a/res/values/strings.xml
|
||||||
|
+++ b/res/values/strings.xml
|
||||||
|
@@ -8498,6 +8498,16 @@
|
||||||
|
<item quantity="other">Show %d hidden items</item>
|
||||||
|
</plurals>
|
||||||
|
|
||||||
|
+ <!-- Title for setting tile leading to Treble settings [CHAR LIMIT=40]-->
|
||||||
|
+ <string name="treble_settings">Treble settings</string>
|
||||||
|
+ <!-- Summary for Treble settings [CHAR LIMIT=NONE]-->
|
||||||
|
+ <string name="treble_settings_summary">Fixes & tweaks for GSIs</string>
|
||||||
|
+ <!-- Display category name [CHAR LIMIT=none] -->
|
||||||
|
+ <string name="treble_settings_category_name_display">Display</string>
|
||||||
|
+
|
||||||
|
+ <!-- Treble settings screen, screen resolution and refresh rate settings title -->
|
||||||
|
+ <string name="screen_resolution_refresh_rate_title">Screen resolution & refresh rate</string>
|
||||||
|
+
|
||||||
|
<!-- Title for setting tile leading to network and Internet settings [CHAR LIMIT=40]-->
|
||||||
|
<string name="network_dashboard_title">Network & internet</string>
|
||||||
|
<!-- Summary for Network and Internet settings, explaining it contains mobile, wifi setting and data usage settings [CHAR LIMIT=NONE]-->
|
||||||
|
diff --git a/res/xml/top_level_settings.xml b/res/xml/top_level_settings.xml
|
||||||
|
index 8c82b67168..04f763514e 100644
|
||||||
|
--- a/res/xml/top_level_settings.xml
|
||||||
|
+++ b/res/xml/top_level_settings.xml
|
||||||
|
@@ -20,6 +20,15 @@
|
||||||
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:key="top_level_settings">
|
||||||
|
|
||||||
|
+ <com.android.settings.widget.HomepagePreference
|
||||||
|
+ android:fragment="com.android.settings.treble.TrebleSettings"
|
||||||
|
+ android:icon="@drawable/ic_settings_treble"
|
||||||
|
+ android:key="top_level_treble"
|
||||||
|
+ android:order="-160"
|
||||||
|
+ android:title="@string/treble_settings"
|
||||||
|
+ android:summary="@string/treble_settings_summary"
|
||||||
|
+ settings:highlightableMenuKey="@string/menu_key_treble"/>
|
||||||
|
+
|
||||||
|
<com.android.settings.widget.HomepagePreference
|
||||||
|
android:fragment="com.android.settings.network.NetworkDashboardFragment"
|
||||||
|
android:icon="@drawable/ic_settings_wireless"
|
||||||
|
diff --git a/res/xml/treble_settings.xml b/res/xml/treble_settings.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..1a82c468a2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/res/xml/treble_settings.xml
|
||||||
|
@@ -0,0 +1,18 @@
|
||||||
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
+
|
||||||
|
+<PreferenceScreen
|
||||||
|
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
+ xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
|
+ android:key="treble_settings_screen"
|
||||||
|
+ android:title="@string/treble_settings">
|
||||||
|
+
|
||||||
|
+ <PreferenceCategory
|
||||||
|
+ android:title="@string/treble_settings_category_name_display">
|
||||||
|
+
|
||||||
|
+ <ListPreference
|
||||||
|
+ android:key="screen_resolution_refresh_rate"
|
||||||
|
+ android:title="@string/screen_resolution_refresh_rate_title" />
|
||||||
|
+
|
||||||
|
+ </PreferenceCategory>
|
||||||
|
+
|
||||||
|
+</PreferenceScreen>
|
||||||
|
diff --git a/src/com/android/settings/treble/ScreenResolutionRefreshRatePreferenceController.java b/src/com/android/settings/treble/ScreenResolutionRefreshRatePreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..35d67f2da1
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/ScreenResolutionRefreshRatePreferenceController.java
|
||||||
|
@@ -0,0 +1,173 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import static android.content.Intent.ACTION_BOOT_COMPLETED;
|
||||||
|
+
|
||||||
|
+import android.app.ActivityManager;
|
||||||
|
+import android.content.BroadcastReceiver;
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.content.Intent;
|
||||||
|
+import android.os.IBinder;
|
||||||
|
+import android.os.Parcel;
|
||||||
|
+import android.os.RemoteException;
|
||||||
|
+import android.os.ServiceManager;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+import android.view.SurfaceControl;
|
||||||
|
+import android.view.SurfaceControl.DisplayMode;
|
||||||
|
+
|
||||||
|
+import androidx.preference.ListPreference;
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+import java.util.ArrayList;
|
||||||
|
+import java.util.Collections;
|
||||||
|
+import java.util.Comparator;
|
||||||
|
+import java.util.HashSet;
|
||||||
|
+import java.util.List;
|
||||||
|
+import java.util.Set;
|
||||||
|
+
|
||||||
|
+public class ScreenResolutionRefreshRatePreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String SCREEN_RESOLUTION_REFRESH_RATE_KEY = "screen_resolution_refresh_rate";
|
||||||
|
+ private static final String SURFACE_FLINGER_SERVICE_KEY = "SurfaceFlinger";
|
||||||
|
+ private static final String SURFACE_COMPOSER_INTERFACE_KEY = "android.ui.ISurfaceComposer";
|
||||||
|
+ private static final int SURFACE_FLINGER_CODE = 1035;
|
||||||
|
+ private static final String TREBLE_DISPLAY_MODE_PROPERTY = "persist.sys.treble.display_mode";
|
||||||
|
+ private static final String SYSTEMUI_PACKAGE_NAME = "com.android.systemui";
|
||||||
|
+
|
||||||
|
+ private ActivityManager mAm;
|
||||||
|
+ private ListPreference mListPreference;
|
||||||
|
+ private List<DisplayMode> mModes = new ArrayList<>();
|
||||||
|
+ private List<String> mEntries = new ArrayList<>();
|
||||||
|
+ private List<String> mValues = new ArrayList<>();
|
||||||
|
+
|
||||||
|
+ public ScreenResolutionRefreshRatePreferenceController(Context context) {
|
||||||
|
+ super(context, SCREEN_RESOLUTION_REFRESH_RATE_KEY);
|
||||||
|
+
|
||||||
|
+ mAm = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||||
|
+
|
||||||
|
+ DisplayMode[] supportedDisplayModes =
|
||||||
|
+ SurfaceControl.getDynamicDisplayInfo(SurfaceControl.getInternalDisplayToken()).supportedDisplayModes;
|
||||||
|
+ Set<String> summarySet = new HashSet<>();
|
||||||
|
+ for (DisplayMode m : supportedDisplayModes) {
|
||||||
|
+ String summary = String.format("%dx%d @ %dHz", m.width, m.height, Math.round(m.refreshRate));
|
||||||
|
+ if (!summarySet.contains(summary)) {
|
||||||
|
+ summarySet.add(summary);
|
||||||
|
+ mModes.add(m);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ Collections.sort(mModes, Comparator.comparing((DisplayMode m)->m.width)
|
||||||
|
+ .thenComparing(m->m.height)
|
||||||
|
+ .thenComparing(m->m.refreshRate)
|
||||||
|
+ .thenComparing(m->m.id));
|
||||||
|
+ for (DisplayMode m : mModes) {
|
||||||
|
+ String summary = String.format("%dx%d @ %dHz", m.width, m.height, Math.round(m.refreshRate));
|
||||||
|
+ mEntries.add(summary);
|
||||||
|
+ mValues.add(String.valueOf(m.id));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return SCREEN_RESOLUTION_REFRESH_RATE_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mListPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+ mListPreference.setEntries(mEntries.toArray(new String[mEntries.size()]));
|
||||||
|
+ mListPreference.setEntryValues(mValues.toArray(new String[mValues.size()]));
|
||||||
|
+
|
||||||
|
+ if (mEntries.size() <= 1) {
|
||||||
|
+ mListPreference.setEnabled(false);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ int id = SurfaceControl.getDynamicDisplayInfo(SurfaceControl.getInternalDisplayToken()).activeDisplayModeId;
|
||||||
|
+ int index = mListPreference.findIndexOfValue(String.valueOf(id));
|
||||||
|
+ try {
|
||||||
|
+ mListPreference.setValueIndex(index);
|
||||||
|
+ mListPreference.setSummary(mListPreference.getEntries()[index]);
|
||||||
|
+ } catch (ArrayIndexOutOfBoundsException e) {
|
||||||
|
+ e.printStackTrace();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ DisplayMode currentMode = getCurrentMode();
|
||||||
|
+ int id = Integer.valueOf((String) newValue);
|
||||||
|
+ DisplayMode newMode = getModeById(id);
|
||||||
|
+ setModeFromBackdoor(id);
|
||||||
|
+ SystemProperties.set(TREBLE_DISPLAY_MODE_PROPERTY, (String) newValue);
|
||||||
|
+ int index = mListPreference.findIndexOfValue((String) newValue);
|
||||||
|
+ mListPreference.setValueIndex(index);
|
||||||
|
+ mListPreference.setSummary(mListPreference.getEntries()[index]);
|
||||||
|
+ if ((newMode.width != currentMode.width) || (newMode.height != currentMode.height)) {
|
||||||
|
+ try {
|
||||||
|
+ for (ActivityManager.RunningAppProcessInfo app: mAm.getRunningAppProcesses()) {
|
||||||
|
+ if (app.processName.equals(SYSTEMUI_PACKAGE_NAME)) {
|
||||||
|
+ ActivityManager.getService().killApplicationProcess(app.processName, app.uid);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ } catch (Exception e) {
|
||||||
|
+ e.printStackTrace();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private DisplayMode getCurrentMode() {
|
||||||
|
+ int id = SurfaceControl.getDynamicDisplayInfo(SurfaceControl.getInternalDisplayToken()).activeDisplayModeId;
|
||||||
|
+ return getModeById(id);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private DisplayMode getModeById(int id) {
|
||||||
|
+ for (DisplayMode m : mModes) {
|
||||||
|
+ if (m.id == id) {
|
||||||
|
+ return m;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return null;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public static void setModeFromBackdoor(int id) {
|
||||||
|
+ IBinder surfaceFlinger = ServiceManager.getService(SURFACE_FLINGER_SERVICE_KEY);
|
||||||
|
+ try {
|
||||||
|
+ if (surfaceFlinger != null) {
|
||||||
|
+ Parcel data = Parcel.obtain();
|
||||||
|
+ data.writeInterfaceToken(SURFACE_COMPOSER_INTERFACE_KEY);
|
||||||
|
+ data.writeInt(id);
|
||||||
|
+ surfaceFlinger.transact(SURFACE_FLINGER_CODE, data, null, 0);
|
||||||
|
+ data.recycle();
|
||||||
|
+ }
|
||||||
|
+ } catch (RemoteException ex) {}
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public static class BootReceiver extends BroadcastReceiver {
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void onReceive(Context context, Intent intent) {
|
||||||
|
+ if (ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
||||||
|
+ int id = SystemProperties.getInt(TREBLE_DISPLAY_MODE_PROPERTY, -1);
|
||||||
|
+ if (id != -1) {
|
||||||
|
+ setModeFromBackdoor(id);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/settings/treble/TrebleSettings.java b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..e581539229
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
@@ -0,0 +1,39 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.app.settings.SettingsEnums;
|
||||||
|
+import android.content.Context;
|
||||||
|
+
|
||||||
|
+import com.android.settings.R;
|
||||||
|
+import com.android.settings.dashboard.DashboardFragment;
|
||||||
|
+import com.android.settingslib.core.AbstractPreferenceController;
|
||||||
|
+
|
||||||
|
+import java.util.ArrayList;
|
||||||
|
+import java.util.List;
|
||||||
|
+
|
||||||
|
+public class TrebleSettings extends DashboardFragment {
|
||||||
|
+
|
||||||
|
+ private static final String TAG = "TrebleSettings";
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ protected int getPreferenceScreenResId() {
|
||||||
|
+ return R.xml.treble_settings;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ protected String getLogTag() {
|
||||||
|
+ return TAG;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getMetricsCategory() {
|
||||||
|
+ return SettingsEnums.SETTINGS_TREBLE_CATEGORY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||||
|
+ final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||||
|
+ controllers.add(new ScreenResolutionRefreshRatePreferenceController(context));
|
||||||
|
+ return controllers;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+288
@@ -0,0 +1,288 @@
|
|||||||
|
From 5e8b0836fb7eff4ea034ce5b9981ce9e9971ec4b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 24 Sep 2022 03:38:41 +0000
|
||||||
|
Subject: [PATCH 2/8] TrebleSettings: Basic audio and display fixes
|
||||||
|
|
||||||
|
- Alternative audio policy
|
||||||
|
- Disable soundvolume effect
|
||||||
|
- Alternative backlight scale
|
||||||
|
|
||||||
|
Change-Id: I4f22dcd9c59c40b3fd70ba642db35b9466467b7d
|
||||||
|
---
|
||||||
|
res/values/strings.xml | 8 +++
|
||||||
|
res/xml/treble_settings.xml | 17 ++++++
|
||||||
|
...SoundvolumeEffectPreferenceController.java | 59 +++++++++++++++++++
|
||||||
|
.../settings/treble/TrebleSettings.java | 3 +
|
||||||
|
...nativeAudioPolicyPreferenceController.java | 59 +++++++++++++++++++
|
||||||
|
...iveBacklightScalePreferenceController.java | 53 +++++++++++++++++
|
||||||
|
6 files changed, 199 insertions(+)
|
||||||
|
create mode 100644 src/com/android/settings/treble/DisableSoundvolumeEffectPreferenceController.java
|
||||||
|
create mode 100644 src/com/android/settings/treble/UseAlternativeAudioPolicyPreferenceController.java
|
||||||
|
create mode 100644 src/com/android/settings/treble/UseAlternativeBacklightScalePreferenceController.java
|
||||||
|
|
||||||
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
|
index ae520f9c64..df16c68eab 100644
|
||||||
|
--- a/res/values/strings.xml
|
||||||
|
+++ b/res/values/strings.xml
|
||||||
|
@@ -8502,11 +8502,19 @@
|
||||||
|
<string name="treble_settings">Treble settings</string>
|
||||||
|
<!-- Summary for Treble settings [CHAR LIMIT=NONE]-->
|
||||||
|
<string name="treble_settings_summary">Fixes & tweaks for GSIs</string>
|
||||||
|
+ <!-- Audio category name [CHAR LIMIT=none] -->
|
||||||
|
+ <string name="treble_settings_category_name_audio">Audio</string>
|
||||||
|
<!-- Display category name [CHAR LIMIT=none] -->
|
||||||
|
<string name="treble_settings_category_name_display">Display</string>
|
||||||
|
|
||||||
|
+ <!-- Treble settings screen, use alternative audio policy title -->
|
||||||
|
+ <string name="use_alternative_audio_policy_title">Use alternative audio policy</string>
|
||||||
|
+ <!-- Treble settings screen, disable soundvolume effect title -->
|
||||||
|
+ <string name="disable_soundvolume_effect_title">Disable soundvolume effect</string>
|
||||||
|
<!-- Treble settings screen, screen resolution and refresh rate settings title -->
|
||||||
|
<string name="screen_resolution_refresh_rate_title">Screen resolution & refresh rate</string>
|
||||||
|
+ <!-- Treble settings screen, use alternative backlight scale title -->
|
||||||
|
+ <string name="use_alternative_backlight_scale_title">Use alternative backlight scale</string>
|
||||||
|
|
||||||
|
<!-- Title for setting tile leading to network and Internet settings [CHAR LIMIT=40]-->
|
||||||
|
<string name="network_dashboard_title">Network & internet</string>
|
||||||
|
diff --git a/res/xml/treble_settings.xml b/res/xml/treble_settings.xml
|
||||||
|
index 1a82c468a2..336137c95f 100644
|
||||||
|
--- a/res/xml/treble_settings.xml
|
||||||
|
+++ b/res/xml/treble_settings.xml
|
||||||
|
@@ -6,6 +6,19 @@
|
||||||
|
android:key="treble_settings_screen"
|
||||||
|
android:title="@string/treble_settings">
|
||||||
|
|
||||||
|
+ <PreferenceCategory
|
||||||
|
+ android:title="@string/treble_settings_category_name_audio">
|
||||||
|
+
|
||||||
|
+ <SwitchPreference
|
||||||
|
+ android:key="use_alternative_audio_policy"
|
||||||
|
+ android:title="@string/use_alternative_audio_policy_title" />
|
||||||
|
+
|
||||||
|
+ <SwitchPreference
|
||||||
|
+ android:key="disable_soundvolume_effect"
|
||||||
|
+ android:title="@string/disable_soundvolume_effect_title" />
|
||||||
|
+
|
||||||
|
+ </PreferenceCategory>
|
||||||
|
+
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="@string/treble_settings_category_name_display">
|
||||||
|
|
||||||
|
@@ -13,6 +26,10 @@
|
||||||
|
android:key="screen_resolution_refresh_rate"
|
||||||
|
android:title="@string/screen_resolution_refresh_rate_title" />
|
||||||
|
|
||||||
|
+ <SwitchPreference
|
||||||
|
+ android:key="use_alternative_backlight_scale"
|
||||||
|
+ android:title="@string/use_alternative_backlight_scale_title" />
|
||||||
|
+
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
</PreferenceScreen>
|
||||||
|
diff --git a/src/com/android/settings/treble/DisableSoundvolumeEffectPreferenceController.java b/src/com/android/settings/treble/DisableSoundvolumeEffectPreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..8feb318f55
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/DisableSoundvolumeEffectPreferenceController.java
|
||||||
|
@@ -0,0 +1,59 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+import androidx.preference.SwitchPreference;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+public class DisableSoundvolumeEffectPreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String DISABLE_SOUNDVOLUME_EFFECT_KEY = "disable_soundvolume_effect";
|
||||||
|
+ private static final String RO_HARDWARE_PROPERTY = "ro.hardware";
|
||||||
|
+ private static final String TREBLE_CAF_DISABLE_SOUNDVOLUME_EFFECT_PROPERTY = "persist.sys.treble.caf.disable_soundvolume_effect";
|
||||||
|
+
|
||||||
|
+ private SwitchPreference mSwitchPreference;
|
||||||
|
+
|
||||||
|
+ public DisableSoundvolumeEffectPreferenceController(Context context) {
|
||||||
|
+ super(context, DISABLE_SOUNDVOLUME_EFFECT_KEY);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return DISABLE_SOUNDVOLUME_EFFECT_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mSwitchPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+
|
||||||
|
+ if (!SystemProperties.get(RO_HARDWARE_PROPERTY, "N/A").equals("qcom")) {
|
||||||
|
+ mSwitchPreference.setEnabled(false);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ boolean checked = SystemProperties.getBoolean(TREBLE_CAF_DISABLE_SOUNDVOLUME_EFFECT_PROPERTY, false);
|
||||||
|
+ mSwitchPreference.setChecked(checked);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ SystemProperties.set(TREBLE_CAF_DISABLE_SOUNDVOLUME_EFFECT_PROPERTY, String.valueOf((boolean) newValue));
|
||||||
|
+ mSwitchPreference.setChecked((boolean) newValue);
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/settings/treble/TrebleSettings.java b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
index e581539229..5c1611c053 100644
|
||||||
|
--- a/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
+++ b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
@@ -32,7 +32,10 @@ public class TrebleSettings extends DashboardFragment {
|
||||||
|
@Override
|
||||||
|
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||||
|
final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||||
|
+ controllers.add(new UseAlternativeAudioPolicyPreferenceController(context));
|
||||||
|
+ controllers.add(new DisableSoundvolumeEffectPreferenceController(context));
|
||||||
|
controllers.add(new ScreenResolutionRefreshRatePreferenceController(context));
|
||||||
|
+ controllers.add(new UseAlternativeBacklightScalePreferenceController(context));
|
||||||
|
return controllers;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/com/android/settings/treble/UseAlternativeAudioPolicyPreferenceController.java b/src/com/android/settings/treble/UseAlternativeAudioPolicyPreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..fbc327cba0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/UseAlternativeAudioPolicyPreferenceController.java
|
||||||
|
@@ -0,0 +1,59 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+import androidx.preference.SwitchPreference;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+public class UseAlternativeAudioPolicyPreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String USE_ALTERNATIVE_AUDIO_POLICY_KEY = "use_alternative_audio_policy";
|
||||||
|
+ private static final String RO_HARDWARE_PROPERTY = "ro.hardware";
|
||||||
|
+ private static final String TREBLE_CAF_AUDIO_POLICY_PROPERTY = "persist.sys.treble.caf.audio_policy";
|
||||||
|
+
|
||||||
|
+ private SwitchPreference mSwitchPreference;
|
||||||
|
+
|
||||||
|
+ public UseAlternativeAudioPolicyPreferenceController(Context context) {
|
||||||
|
+ super(context, USE_ALTERNATIVE_AUDIO_POLICY_KEY);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return USE_ALTERNATIVE_AUDIO_POLICY_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mSwitchPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+
|
||||||
|
+ if (!SystemProperties.get(RO_HARDWARE_PROPERTY, "N/A").equals("qcom")) {
|
||||||
|
+ mSwitchPreference.setEnabled(false);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ boolean checked = SystemProperties.getBoolean(TREBLE_CAF_AUDIO_POLICY_PROPERTY, false);
|
||||||
|
+ mSwitchPreference.setChecked(checked);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ SystemProperties.set(TREBLE_CAF_AUDIO_POLICY_PROPERTY, String.valueOf((boolean) newValue));
|
||||||
|
+ mSwitchPreference.setChecked((boolean) newValue);
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/settings/treble/UseAlternativeBacklightScalePreferenceController.java b/src/com/android/settings/treble/UseAlternativeBacklightScalePreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..bd9de82d90
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/UseAlternativeBacklightScalePreferenceController.java
|
||||||
|
@@ -0,0 +1,53 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+import androidx.preference.SwitchPreference;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+public class UseAlternativeBacklightScalePreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String USE_ALTERNATIVE_BACKLIGHT_SCALE_KEY = "use_alternative_backlight_scale";
|
||||||
|
+ private static final String TREBLE_BACKLIGHT_SCALE_PROPERTY = "persist.sys.treble.backlight_scale";
|
||||||
|
+
|
||||||
|
+ private SwitchPreference mSwitchPreference;
|
||||||
|
+
|
||||||
|
+ public UseAlternativeBacklightScalePreferenceController(Context context) {
|
||||||
|
+ super(context, USE_ALTERNATIVE_BACKLIGHT_SCALE_KEY);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return USE_ALTERNATIVE_BACKLIGHT_SCALE_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mSwitchPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ boolean checked = SystemProperties.getBoolean(TREBLE_BACKLIGHT_SCALE_PROPERTY, false);
|
||||||
|
+ mSwitchPreference.setChecked(checked);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ SystemProperties.set(TREBLE_BACKLIGHT_SCALE_PROPERTY, String.valueOf((boolean) newValue));
|
||||||
|
+ mSwitchPreference.setChecked((boolean) newValue);
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user