Changes for December 2022
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From b94084cca9202c12ea41de9f6f23785c818a64c0 Mon Sep 17 00:00:00 2001
|
||||
From ae74e74a16845c786042581f0fae8c8685ee5be7 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 13 Jan 2022 14:22:24 +0000
|
||||
Subject: [PATCH 01/12] Add SPenPointerOverlay
|
||||
Subject: [PATCH 01/14] Add SPenPointerOverlay
|
||||
|
||||
Toggle this overlay with property "persist.ui.spen.pointer"
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
From 4e591984e8f533e0ad305caf8aa03c60cd9314d0 Mon Sep 17 00:00:00 2001
|
||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||
Date: Fri, 22 Mar 2019 00:41:20 +0800
|
||||
Subject: [PATCH 02/14] 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.25.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 5d4c54f6956862135a6066f4c0e322690145cce8 Mon Sep 17 00:00:00 2001
|
||||
From 3b4a0dc39f8d03ddac9c45fd3e7fc4577334a645 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 5 Apr 2018 10:01:19 +0800
|
||||
Subject: [PATCH 02/12] Disable vendor mismatch warning
|
||||
Subject: [PATCH 03/14] Disable vendor mismatch warning
|
||||
|
||||
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
||||
1 file changed, 2 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||
index 43b66d181326..1f0d60cf3a38 100644
|
||||
index 01490f029e97..6199267cac0b 100644
|
||||
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||
@@ -5696,20 +5696,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
@@ -5856,20 +5856,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
}
|
||||
|
||||
if (!Build.isBuildConsistent()) {
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4dc4d1ec5be6658812b82c09d745975674707572 Mon Sep 17 00:00:00 2001
|
||||
From becd4bf809789b1d0d53956539d3d452e9f20e5a Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 16 Oct 2021 02:23:48 +0000
|
||||
Subject: [PATCH 03/12] UI: Adjust default navbar layouts
|
||||
Subject: [PATCH 04/14] UI: Adjust default navbar layouts
|
||||
|
||||
- Slightly tighten nodpi layout
|
||||
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
|
||||
@@ -45,10 +45,10 @@ index 07b797a32428..000000000000
|
||||
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
|
||||
-</resources>
|
||||
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||
index ba31e7f1f1d1..c4625e7e784d 100644
|
||||
index d7d88cea2dbc..8a2b88d3cf9a 100644
|
||||
--- a/packages/SystemUI/res/values/config.xml
|
||||
+++ b/packages/SystemUI/res/values/config.xml
|
||||
@@ -307,7 +307,7 @@
|
||||
@@ -301,7 +301,7 @@
|
||||
</string-array>
|
||||
|
||||
<!-- Nav bar button default ordering/layout -->
|
||||
@@ -1,7 +1,7 @@
|
||||
From 06c01a490bf6379a8f9d8e4e8499add7a4ea2cbc Mon Sep 17 00:00:00 2001
|
||||
From 1d9cba70b8a820933b6e54afef69a72e7e1ab85e Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 10 Jan 2021 11:44:29 +0000
|
||||
Subject: [PATCH 04/12] UI: Disable wallpaper zoom
|
||||
Subject: [PATCH 05/14] UI: Disable wallpaper zoom
|
||||
|
||||
It does little more than inducing motion sickness
|
||||
|
||||
@@ -11,10 +11,10 @@ Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index 34b5589bf81f..be2dbc3cd5dc 100644
|
||||
index 659d0f37bf05..272df37188bf 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -5029,7 +5029,7 @@
|
||||
@@ -5104,7 +5104,7 @@
|
||||
<item name="config_wallpaperMinScale" format="float" type="dimen">1</item>
|
||||
|
||||
<!-- The max scale for the wallpaper when it's zoomed in -->
|
||||
@@ -1,7 +1,7 @@
|
||||
From 202ed6730a9b3182c33ef3d5169ff026ab269a2a Mon Sep 17 00:00:00 2001
|
||||
From 4c3587987591a1c4545322b0855ea138e7fd26ce 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 05/12] UI: Follow Monet and light/dark theme in user 1 icon
|
||||
Subject: [PATCH 06/14] UI: Follow Monet and light/dark theme in user 1 icon
|
||||
|
||||
Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8
|
||||
---
|
||||
@@ -10,7 +10,7 @@ Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8
|
||||
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 33c9b95c5819..f3531caa47d9 100644
|
||||
index ffaccd3ddc57..e2a955b89c77 100644
|
||||
--- a/core/res/res/values-night/colors.xml
|
||||
+++ b/core/res/res/values-night/colors.xml
|
||||
@@ -33,6 +33,7 @@
|
||||
@@ -22,7 +22,7 @@ index 33c9b95c5819..f3531caa47d9 100644
|
||||
<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 b515abc4000f..87a4bb9da02b 100644
|
||||
index d5875f547e91..c7711ed3e493 100644
|
||||
--- a/core/res/res/values/colors.xml
|
||||
+++ b/core/res/res/values/colors.xml
|
||||
@@ -174,7 +174,7 @@
|
||||
@@ -1,7 +1,7 @@
|
||||
From 448d7cb6f0689082ec63820f72e8ef221154fcfd Mon Sep 17 00:00:00 2001
|
||||
From cd200004d3b59dcb33187a3228a4bdab6b16619b Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 3 Jun 2020 01:31:34 +0000
|
||||
Subject: [PATCH 06/12] UI: Increase default status bar height
|
||||
Subject: [PATCH 07/14] UI: Increase default status bar height
|
||||
|
||||
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
||||
---
|
||||
@@ -9,7 +9,7 @@ Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
|
||||
index b754100a3ed6..1851b42c0f3b 100644
|
||||
index 2542268a153a..099a6badc034 100644
|
||||
--- a/core/res/res/values/dimens.xml
|
||||
+++ b/core/res/res/values/dimens.xml
|
||||
@@ -41,7 +41,7 @@
|
||||
@@ -1,25 +1,32 @@
|
||||
From 057673be164d2bc9cefbe2161bb8293909e72ae6 Mon Sep 17 00:00:00 2001
|
||||
From 6bc225de6c671c50ed045eef9575b0aa2ab5835f 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 07/12] UI: Remove QS footer background
|
||||
Subject: [PATCH 08/14] UI: Remove QS footer background
|
||||
|
||||
Change-Id: I68e82e0c5e3eddb2d3f767fe792b1436eae506ef
|
||||
---
|
||||
packages/SystemUI/res-keyguard/layout/footer_actions.xml | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
packages/SystemUI/res-keyguard/layout/footer_actions.xml | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res-keyguard/layout/footer_actions.xml b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||
index 876f275ab042..497181d9ee03 100644
|
||||
index a101c64a48e0..028ab29b8643 100644
|
||||
--- a/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||
+++ b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||
@@ -24,7 +24,6 @@
|
||||
@@ -25,7 +25,6 @@
|
||||
android:elevation="@dimen/qs_panel_elevation"
|
||||
android:paddingTop="8dp"
|
||||
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"
|
||||
android:gravity="center_vertical|end"
|
||||
android:layout_gravity="bottom"
|
||||
>
|
||||
@@ -98,4 +97,4 @@
|
||||
android:tint="?androidprv:attr/textColorPrimaryInverse" />
|
||||
|
||||
</LinearLayout>
|
||||
-</com.android.systemui.qs.FooterActionsView>
|
||||
\ No newline at end of file
|
||||
+</com.android.systemui.qs.FooterActionsView>
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From e5ac2b04e10ce9b900e9a3ca0c1c609a26e4aaee Mon Sep 17 00:00:00 2001
|
||||
From b421fc2bb853966ede836e09203718dfc8d0cb56 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 19 Mar 2022 09:22:24 +0000
|
||||
Subject: [PATCH 08/12] UI: Restore split-screen divider to pre-Sv2 looks
|
||||
Subject: [PATCH 09/14] 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
|
||||
@@ -26,10 +26,10 @@ index 049980803ee3..cd54ac26a7fd 100644
|
||||
+ <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 c94455d9151a..5eedb1fdb824 100644
|
||||
index 419e62daf586..229844e42a49 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
|
||||
@@ -138,20 +138,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||
@@ -152,20 +152,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||
}
|
||||
|
||||
private int getDividerInsets(Resources resources, Display display) {
|
||||
@@ -1,7 +1,7 @@
|
||||
From d9518a3ec3b88c36f16d8a7417d1d2c29bec25fc Mon Sep 17 00:00:00 2001
|
||||
From 03ed62fb9ce9ce4da4f666f24a9c9c65cc5b9c03 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 6 Oct 2020 01:41:16 +0000
|
||||
Subject: [PATCH 09/12] UI: Revive navbar layout tuning via sysui_nav_bar
|
||||
Subject: [PATCH 10/14] UI: Revive navbar layout tuning via sysui_nav_bar
|
||||
tunable
|
||||
|
||||
Google keeps fixing what ain't broken.
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1556f8d5c97d6fdec1099d6c587a2cac128d4f97 Mon Sep 17 00:00:00 2001
|
||||
From 69581c7e2ab9106877b8c8951244c63c14ea97e4 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 26 Apr 2020 08:56:13 +0000
|
||||
Subject: [PATCH 10/12] UI: Use SNAP_FIXED_RATIO for multi-window globally
|
||||
Subject: [PATCH 11/14] UI: Use SNAP_FIXED_RATIO for multi-window globally
|
||||
|
||||
Enables multiple snap targets under landscape for phone UI
|
||||
|
||||
@@ -40,7 +40,7 @@ index 7308dc5882c1..000000000000
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
|
||||
index d686dd2ea690..03dcf51846dd 100644
|
||||
index 34b6a54be493..3921c9edfeac 100644
|
||||
--- a/core/res/res/values-sw600dp/config.xml
|
||||
+++ b/core/res/res/values-sw600dp/config.xml
|
||||
@@ -3,16 +3,16 @@
|
||||
@@ -78,10 +78,10 @@ index d686dd2ea690..03dcf51846dd 100644
|
||||
Only applies if the device display is not square. -->
|
||||
<bool name="config_navBarCanMove">false</bool>
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index be2dbc3cd5dc..c62cce393ff0 100644
|
||||
index 272df37188bf..58cd819b9404 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -3726,7 +3726,7 @@
|
||||
@@ -3790,7 +3790,7 @@
|
||||
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
|
||||
2 - 1 snap target: 1:1
|
||||
-->
|
||||
@@ -1,7 +1,7 @@
|
||||
From f7e374407e133b9c53ecfbc9a5dc99a1460b6eb0 Mon Sep 17 00:00:00 2001
|
||||
From 5dd8363ed108cb2443fad9e7cd25a3ad54e020b9 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 3 Nov 2020 22:43:12 -0800
|
||||
Subject: [PATCH 11/12] core: Remove old app target SDK dialog
|
||||
Subject: [PATCH 12/14] core: Remove old app target SDK dialog
|
||||
|
||||
If an app is old, users should already know that, and there's usually no
|
||||
point in warning them about it because they would already be using a
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1e6d2e5f957d1a0f497248d1673d9ecaa1a676a3 Mon Sep 17 00:00:00 2001
|
||||
From 84e2133ee773923f221a9b9754e4b1ce6bcf5e1a Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 5 Oct 2021 21:01:50 -0700
|
||||
Subject: [PATCH 12/12] Paint: Enable subpixel text positioning by default
|
||||
Subject: [PATCH 13/14] Paint: Enable subpixel text positioning by default
|
||||
|
||||
On desktop Linux, subpixel text positioning is necessary to avoid
|
||||
kerning issues, and Android is no different. Even though most phone
|
||||
@@ -0,0 +1,163 @@
|
||||
From 8fc6fb99d86c4e4887d49d7bbff571b50b76c73f 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/14] 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 c8a43db2f9c2..277183036c60 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 1b90803404f7..d1cb6c3241f2 100644
|
||||
--- a/core/res/AndroidManifest.xml
|
||||
+++ b/core/res/AndroidManifest.xml
|
||||
@@ -3542,6 +3542,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 5763345aba4d..8ffdbdd6f15b 100644
|
||||
--- a/core/res/res/values/strings.xml
|
||||
+++ b/core/res/res/values/strings.xml
|
||||
@@ -974,6 +974,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.25.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ff8f6e85177a0bab9c27785c3c0d9a59c4952e49 Mon Sep 17 00:00:00 2001
|
||||
From d8f9f479012d522aed7377e5996cf7a5265ea268 Mon Sep 17 00:00:00 2001
|
||||
From: Vachounet <vachounet@live.fr>
|
||||
Date: Mon, 26 Oct 2020 17:05:18 +0100
|
||||
Subject: [PATCH] Trebuchet: Move clear all button to actions view
|
||||
@@ -73,10 +73,10 @@ index 0fda0bf8d4..9a6f5ae062 100644
|
||||
\ No newline at end of file
|
||||
+</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
|
||||
index 77db6b79f4..c0b6771e6a 100644
|
||||
index 223eba5b95..75f8baed6b 100644
|
||||
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
||||
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
||||
@@ -102,7 +102,7 @@ public class RecentsState implements BaseState<RecentsState> {
|
||||
@@ -105,7 +105,7 @@ public class RecentsState implements BaseState<RecentsState> {
|
||||
* For this state, whether clear all button should be shown.
|
||||
*/
|
||||
public boolean hasClearAllButton() {
|
||||
@@ -86,10 +86,10 @@ index 77db6b79f4..c0b6771e6a 100644
|
||||
|
||||
/**
|
||||
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
||||
index 306ebd73c8..5b2f544c02 100644
|
||||
index bb8506d26f..e8c18f1d45 100644
|
||||
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
||||
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
||||
@@ -133,8 +133,7 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun
|
||||
@@ -143,8 +143,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher
|
||||
super.setOverviewStateEnabled(enabled);
|
||||
if (enabled) {
|
||||
LauncherState state = mActivity.getStateManager().getState();
|
||||
@@ -100,10 +100,10 @@ index 306ebd73c8..5b2f544c02 100644
|
||||
}
|
||||
}
|
||||
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
index 2360396cf7..4a4202ecc6 100644
|
||||
index 7ad0e48ccb..e888aa2c74 100644
|
||||
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
@@ -103,6 +103,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
|
||||
@@ -110,6 +110,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.view.animation.Interpolator;
|
||||
@@ -111,7 +111,7 @@ index 2360396cf7..4a4202ecc6 100644
|
||||
import android.widget.ListView;
|
||||
import android.widget.OverScroller;
|
||||
import android.widget.Toast;
|
||||
@@ -431,6 +432,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
@@ -464,6 +465,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
private final RecentsModel mModel;
|
||||
private final int mSplitPlaceholderSize;
|
||||
private final int mSplitPlaceholderInset;
|
||||
@@ -119,7 +119,7 @@ index 2360396cf7..4a4202ecc6 100644
|
||||
private final ClearAllButton mClearAllButton;
|
||||
private final Rect mClearAllButtonDeadZoneRect = new Rect();
|
||||
private final Rect mTaskViewDeadZoneRect = new Rect();
|
||||
@@ -875,6 +877,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
@@ -911,6 +913,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mActionsView = actionsView;
|
||||
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
|
||||
mSplitSelectStateController = splitController;
|
||||
@@ -127,8 +127,8 @@ index 2360396cf7..4a4202ecc6 100644
|
||||
+ mActionClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||
}
|
||||
|
||||
public SplitSelectStateController getSplitPlaceholder() {
|
||||
@@ -1194,7 +1198,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
public SplitSelectStateController getSplitSelectController() {
|
||||
@@ -1230,7 +1234,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
* button fully visible, center page is Clear All button.
|
||||
*/
|
||||
public boolean isClearAllHidden() {
|
||||
|
||||
Reference in New Issue
Block a user