Initial unified commit for Android 14, with "light" GSI target
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
From 9d54280afa329e036ba97cd5f39e1371c4beea0a Mon Sep 17 00:00:00 2001
|
||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||
Date: Fri, 22 Mar 2019 00:41:20 +0800
|
||||
Subject: [PATCH 01/31] 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 36d56c8a1544..7ee15e97a383 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
|
||||
@@ -27,6 +27,7 @@ import android.content.IntentFilter;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.SystemClock;
|
||||
+import android.os.SystemProperties;
|
||||
import android.util.Slog;
|
||||
import android.util.SparseBooleanArray;
|
||||
import android.util.SparseIntArray;
|
||||
@@ -46,6 +47,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
|
||||
@@ -105,23 +107,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
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From cdbb1b13a0c0577db791e0826e55cbd922a3d533 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/31] Disable vendor mismatch warning
|
||||
|
||||
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
||||
---
|
||||
.../server/wm/ActivityTaskManagerService.java | 16 ++--------------
|
||||
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 8382fa97c5c5..a3e37193d513 100644
|
||||
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||
@@ -6116,20 +6116,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
}
|
||||
|
||||
if (!Build.isBuildConsistent()) {
|
||||
- Slog.e(TAG, "Build fingerprint is not consistent, warning user");
|
||||
- mUiHandler.post(() -> {
|
||||
- if (mShowDialogs) {
|
||||
- AlertDialog d = new BaseErrorDialog(mUiContext);
|
||||
- d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
|
||||
- d.setCancelable(false);
|
||||
- d.setTitle(mUiContext.getText(R.string.android_system_label));
|
||||
- d.setMessage(mUiContext.getText(R.string.system_error_manufacturer));
|
||||
- d.setButton(DialogInterface.BUTTON_POSITIVE,
|
||||
- mUiContext.getText(R.string.ok),
|
||||
- mUiHandler.obtainMessage(DISMISS_DIALOG_UI_MSG, d));
|
||||
- d.show();
|
||||
- }
|
||||
- });
|
||||
+ Slog.e(TAG, "Build fingerprint is not consistent");
|
||||
+ // Do not emit warning about vendor mismatch
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From dc1b9d58a7f5522fb1c5b7155b52c733b9f5080d Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 21 Jan 2024 22:03:47 +0800
|
||||
Subject: [PATCH 03/31] Keyguard: Allow locking to any rotation mode
|
||||
|
||||
Change-Id: I0f12c433f3547e9bfcdbc2cf50e2a4f3ec8ca311
|
||||
---
|
||||
.../shade/NotificationShadeWindowControllerImpl.java | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
|
||||
index 2ebe2bcf7099..6e51746c6ea7 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
|
||||
@@ -382,12 +382,9 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
|
||||
}
|
||||
|
||||
private void adjustScreenOrientation(NotificationShadeWindowState state) {
|
||||
- if (state.bouncerShowing || state.isKeyguardShowingAndNotOccluded() || state.dozing) {
|
||||
- if (shouldEnableKeyguardScreenRotation()) {
|
||||
- mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER;
|
||||
- } else {
|
||||
- mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
|
||||
- }
|
||||
+ if ((state.bouncerShowing || state.isKeyguardShowingAndNotOccluded() || state.dozing)
|
||||
+ && shouldEnableKeyguardScreenRotation()) {
|
||||
+ mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER;
|
||||
} else {
|
||||
mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 966dbb52453bb6bd3d301a23c6ab4101951a2489 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 04/31] 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 c314586e4a21..5262a2c04c00 100644
|
||||
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
|
||||
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
|
||||
@@ -207,6 +207,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 87eeff2c3157..8d531913b3c0 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
|
||||
@@ -4637,6 +4637,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
||||
public void onDozeAmountChanged(float linearAmount, float amount) {
|
||||
mInterpolatedDarkAmount = amount;
|
||||
mLinearDarkAmount = linearAmount;
|
||||
+ mKeyguardStatusViewController.setDarkAmount(mInterpolatedDarkAmount);
|
||||
positionClockAndNotifications();
|
||||
}
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From 2ef56aadc11858d1cddad3a4b0083a3708d6528c 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 05/31] UI: Adjust default navbar layouts
|
||||
|
||||
- Slightly tighten nodpi layout
|
||||
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
|
||||
|
||||
Change-Id: Ia32f5d92e6c9e36560c53e7dffce7d2c29a81fe5
|
||||
---
|
||||
.../SystemUI/res/values-sw372dp/config.xml | 25 -------------------
|
||||
packages/SystemUI/res/values/config.xml | 2 +-
|
||||
2 files changed, 1 insertion(+), 26 deletions(-)
|
||||
delete mode 100644 packages/SystemUI/res/values-sw372dp/config.xml
|
||||
|
||||
diff --git a/packages/SystemUI/res/values-sw372dp/config.xml b/packages/SystemUI/res/values-sw372dp/config.xml
|
||||
deleted file mode 100644
|
||||
index 07b797a32428..000000000000
|
||||
--- a/packages/SystemUI/res/values-sw372dp/config.xml
|
||||
+++ /dev/null
|
||||
@@ -1,25 +0,0 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!--
|
||||
-/*
|
||||
-** Copyright 2017, 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.
|
||||
-*/
|
||||
--->
|
||||
-
|
||||
-<!-- These resources are around just to allow their values to be customized
|
||||
- for different hardware and product builds. -->
|
||||
-<resources>
|
||||
- <!-- Nav bar button default ordering/layout -->
|
||||
- <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 f530d0d6e06f..9cd22313e0a1 100644
|
||||
--- a/packages/SystemUI/res/values/config.xml
|
||||
+++ b/packages/SystemUI/res/values/config.xml
|
||||
@@ -315,7 +315,7 @@
|
||||
</string-array>
|
||||
|
||||
<!-- 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[.6W],back[1WC];home;recent[1WC],right[.6W]</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>
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
From 78487f8b35969298a76f61ae71651f537fe8e90e 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/31] UI: Adjust split-screen divider
|
||||
|
||||
- Kill rounded corners - where two rectangles collide should be perfectly straight
|
||||
- Make it black (pre-Sv2) for phones
|
||||
- Follow taskbar theme for tablets
|
||||
|
||||
Change-Id: I240b627793b615c82bd07ebd77638cde180ef80f
|
||||
---
|
||||
.../color-night-v31/taskbar_background.xml | 20 +++++++++++++++++
|
||||
.../taskbar_nav_icon_color.xml | 18 +++++++++++++++
|
||||
.../res/color-v31/taskbar_background.xml | 18 +++++++++++++++
|
||||
.../res/color-v31/taskbar_nav_icon_color.xml | 18 +++++++++++++++
|
||||
.../Shell/res/values-sw600dp/colors.xml | 22 +++++++++++++++++++
|
||||
.../WindowManager/Shell/res/values/colors.xml | 2 +-
|
||||
.../wm/shell/common/split/SplitLayout.java | 19 ++--------------
|
||||
7 files changed, 99 insertions(+), 18 deletions(-)
|
||||
create mode 100644 libs/WindowManager/Shell/res/color-night-v31/taskbar_background.xml
|
||||
create mode 100644 libs/WindowManager/Shell/res/color-night-v31/taskbar_nav_icon_color.xml
|
||||
create mode 100644 libs/WindowManager/Shell/res/color-v31/taskbar_background.xml
|
||||
create mode 100644 libs/WindowManager/Shell/res/color-v31/taskbar_nav_icon_color.xml
|
||||
create mode 100644 libs/WindowManager/Shell/res/values-sw600dp/colors.xml
|
||||
|
||||
diff --git a/libs/WindowManager/Shell/res/color-night-v31/taskbar_background.xml b/libs/WindowManager/Shell/res/color-night-v31/taskbar_background.xml
|
||||
new file mode 100644
|
||||
index 000000000000..ec7a6823d34d
|
||||
--- /dev/null
|
||||
+++ b/libs/WindowManager/Shell/res/color-night-v31/taskbar_background.xml
|
||||
@@ -0,0 +1,20 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright (C) 2023 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.
|
||||
+-->
|
||||
+<!-- Make sure to align any changes to
|
||||
+ frameworks/base/libs/WindowManager/Shell/res/color/taskbar_background_dark.xml -->
|
||||
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <item android:color="@android:color/system_neutral1_500" android:lStar="6" />
|
||||
+</selector>
|
||||
diff --git a/libs/WindowManager/Shell/res/color-night-v31/taskbar_nav_icon_color.xml b/libs/WindowManager/Shell/res/color-night-v31/taskbar_nav_icon_color.xml
|
||||
new file mode 100644
|
||||
index 000000000000..cc8e3b30b1b5
|
||||
--- /dev/null
|
||||
+++ b/libs/WindowManager/Shell/res/color-night-v31/taskbar_nav_icon_color.xml
|
||||
@@ -0,0 +1,18 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright (C) 2023 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.
|
||||
+-->
|
||||
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <item android:color="@android:color/system_neutral2_200"/>
|
||||
+</selector>
|
||||
diff --git a/libs/WindowManager/Shell/res/color-v31/taskbar_background.xml b/libs/WindowManager/Shell/res/color-v31/taskbar_background.xml
|
||||
new file mode 100644
|
||||
index 000000000000..5c53e4a0c9c6
|
||||
--- /dev/null
|
||||
+++ b/libs/WindowManager/Shell/res/color-v31/taskbar_background.xml
|
||||
@@ -0,0 +1,18 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright (C) 2022 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.
|
||||
+-->
|
||||
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <item android:color="@android:color/system_neutral1_500" android:lStar="98" />
|
||||
+</selector>
|
||||
diff --git a/libs/WindowManager/Shell/res/color-v31/taskbar_nav_icon_color.xml b/libs/WindowManager/Shell/res/color-v31/taskbar_nav_icon_color.xml
|
||||
new file mode 100644
|
||||
index 000000000000..7951e123afc4
|
||||
--- /dev/null
|
||||
+++ b/libs/WindowManager/Shell/res/color-v31/taskbar_nav_icon_color.xml
|
||||
@@ -0,0 +1,18 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright (C) 2023 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.
|
||||
+-->
|
||||
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <item android:color="@android:color/system_neutral2_700"/>
|
||||
+</selector>
|
||||
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..8a1907da76e5
|
||||
--- /dev/null
|
||||
+++ b/libs/WindowManager/Shell/res/values-sw600dp/colors.xml
|
||||
@@ -0,0 +1,22 @@
|
||||
+<?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="docked_divider_handle">@color/taskbar_nav_icon_color</color>
|
||||
+ <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 b2ec98bc1b15..b21a6f50c9ab 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">#ffffff</color>
|
||||
- <color name="split_divider_background">@color/taskbar_background_dark</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 755dba0c895f..9a2c9bfdab5d 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
|
||||
@@ -157,23 +157,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
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 2df74582c930fc05aa5eeed48ed766d74652bf45 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 07/31] UI: Disable wallpaper zoom
|
||||
|
||||
It does little more than inducing motion sickness
|
||||
|
||||
Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
|
||||
---
|
||||
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 04a69f8c1e6d..15c4a37b76cd 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -5534,7 +5534,7 @@
|
||||
<item name="config_wallpaperMinScale" format="float" type="dimen">1</item>
|
||||
|
||||
<!-- 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</item>
|
||||
|
||||
<!-- If true, the wallpaper will scale regardless of the value of shouldZoomOutWallpaper() -->
|
||||
<bool name="config_alwaysScaleWallpaper">false</bool>
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 1f5882a5305f1a5e01ebfcd3cc7fb30faaa69074 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 08/31] 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 d3f998fb70cf..4f7b9e093bb7 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 a6830a6e3793..bbeb4e371018 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
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 0f62a57ac11e78a3595ba7598f151e7fd891e7c1 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 09/31] UI: Increase default status bar height
|
||||
|
||||
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
||||
---
|
||||
core/res/res/values/dimens.xml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
|
||||
index 190b7a62e2e0..32589b542a1d 100644
|
||||
--- a/core/res/res/values/dimens.xml
|
||||
+++ b/core/res/res/values/dimens.xml
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<!-- The default height of the status bar used in {@link SystemBarUtils#getStatusBarHeight} to
|
||||
calculate the status bar height. -->
|
||||
- <dimen name="status_bar_height_default">24dp</dimen>
|
||||
+ <dimen name="status_bar_height_default">28dp</dimen>
|
||||
<!-- Height of the status bar.
|
||||
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
|
||||
-->
|
||||
@@ -49,7 +49,7 @@
|
||||
<!-- Height of the status bar in portrait.
|
||||
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
|
||||
-->
|
||||
- <dimen name="status_bar_height_portrait">24dp</dimen>
|
||||
+ <dimen name="status_bar_height_portrait">28dp</dimen>
|
||||
<!-- Height of the status bar in landscape.
|
||||
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
|
||||
-->
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 7efb158bc07f7366ff2d2d92752e663e16c9e03d 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 10/31] 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 4a2a1cb9dc6d..b7f30d9e4344 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"
|
||||
/>
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
From 1edb91ecfa56336cc94aa2bd49c1a3e07274447a 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 11/31] UI: Use SNAP_FIXED_RATIO for multi-window globally
|
||||
|
||||
Enables multiple snap targets under landscape for phone UI
|
||||
|
||||
Change-Id: I36e08f1e277dca0b0f9f99418671026e61b01496
|
||||
---
|
||||
core/res/res/values-land/config.xml | 19 -------------------
|
||||
core/res/res/values-sw600dp/config.xml | 18 ++++++++----------
|
||||
core/res/res/values/config.xml | 2 +-
|
||||
3 files changed, 9 insertions(+), 30 deletions(-)
|
||||
delete mode 100644 core/res/res/values-land/config.xml
|
||||
|
||||
diff --git a/core/res/res/values-land/config.xml b/core/res/res/values-land/config.xml
|
||||
deleted file mode 100644
|
||||
index 7308dc5882c1..000000000000
|
||||
--- a/core/res/res/values-land/config.xml
|
||||
+++ /dev/null
|
||||
@@ -1,19 +0,0 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!--
|
||||
- ~ Copyright (C) 2015 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>
|
||||
- <integer name="config_dockedStackDividerSnapMode">2</integer>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
|
||||
index 34b6a54be493..3921c9edfeac 100644
|
||||
--- a/core/res/res/values-sw600dp/config.xml
|
||||
+++ b/core/res/res/values-sw600dp/config.xml
|
||||
@@ -3,16 +3,16 @@
|
||||
/*
|
||||
** Copyright 2009, 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
|
||||
+** 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
|
||||
+** 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
|
||||
+** 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.
|
||||
*/
|
||||
-->
|
||||
@@ -40,8 +40,6 @@
|
||||
<!-- Use a larger scaling span for larger screen devices. -->
|
||||
<dimen name="config_minScalingSpan">32mm</dimen>
|
||||
|
||||
- <integer name="config_dockedStackDividerSnapMode">1</integer>
|
||||
-
|
||||
<!-- Controls whether the nav bar can move from the bottom to the side in landscape.
|
||||
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 15c4a37b76cd..43dbb1513f8a 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -4081,7 +4081,7 @@
|
||||
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
|
||||
2 - 1 snap target: 1:1
|
||||
-->
|
||||
- <integer name="config_dockedStackDividerSnapMode">0</integer>
|
||||
+ <integer name="config_dockedStackDividerSnapMode">1</integer>
|
||||
|
||||
<!-- The maximum aspect ratio (longerSide/shorterSide) that is treated as close-to-square. The
|
||||
orientation requests from apps would be ignored if the display is close-to-square. -->
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 5dbac2415145bea20ff01debbe03e815bce09334 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 3 Nov 2020 22:43:12 -0800
|
||||
Subject: [PATCH 12/31] 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
|
||||
newer version if one existed. Sometimes, using an old app is necessary
|
||||
for one reason or another, so remove this annoyance and let the user use
|
||||
their old app in peace.
|
||||
|
||||
Change-Id: I1a3021f0f9bec1ab6ff7641776391e1bd4c3cc49
|
||||
---
|
||||
services/core/java/com/android/server/wm/AppWarnings.java | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/wm/AppWarnings.java b/services/core/java/com/android/server/wm/AppWarnings.java
|
||||
index 0273a30e157c..d54aadfd6d24 100644
|
||||
--- a/services/core/java/com/android/server/wm/AppWarnings.java
|
||||
+++ b/services/core/java/com/android/server/wm/AppWarnings.java
|
||||
@@ -206,7 +206,6 @@ class AppWarnings {
|
||||
public void onStartActivity(ActivityRecord r) {
|
||||
showUnsupportedCompileSdkDialogIfNeeded(r);
|
||||
showUnsupportedDisplaySizeDialogIfNeeded(r);
|
||||
- showDeprecatedTargetDialogIfNeeded(r);
|
||||
showDeprecatedAbiDialogIfNeeded(r);
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 11a651e734f3b32ca60f6a17d7b8a1f11cca5800 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 5 Oct 2021 21:01:50 -0700
|
||||
Subject: [PATCH 13/31] 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
|
||||
displays have relatively high DPIs, the lack of subpixel text
|
||||
positioning is only unnoticeable on high-end devices such as the Pixel 4
|
||||
XL (1440x3040 @ 6.3 in => 537 dpi).
|
||||
|
||||
For example, on the Pixel 5 (1080 x 2340 @ 6.0 in => 432 dpi),
|
||||
horizontally-scrolling labels in QS tiles can be seen "jittering"
|
||||
slightly upon close observation. This was tested with the Google Sans
|
||||
font on Google's stock OS. At this lower DPI, there is still a need for
|
||||
subpixel text positioning (at least in some cases).
|
||||
|
||||
Enable subpixel text positioning by default to fix occasional kerning
|
||||
issues and jittering when text is in motion.
|
||||
|
||||
Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09
|
||||
---
|
||||
graphics/java/android/graphics/Paint.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
|
||||
index d35dcab11f49..e4e814a1c941 100644
|
||||
--- a/graphics/java/android/graphics/Paint.java
|
||||
+++ b/graphics/java/android/graphics/Paint.java
|
||||
@@ -260,7 +260,7 @@ public class Paint {
|
||||
|
||||
// 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
|
||||
- | FILTER_BITMAP_FLAG;
|
||||
+ | FILTER_BITMAP_FLAG | SUBPIXEL_TEXT_FLAG;
|
||||
|
||||
/**
|
||||
* Font hinter option that disables font hinting.
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
From 1001116630f817f53c2b6adbe51499ca6ff6ab4f 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/31] 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 288ab479c0fb..2124d89c6e6f 100644
|
||||
--- a/core/api/current.txt
|
||||
+++ b/core/api/current.txt
|
||||
@@ -95,6 +95,7 @@ package android {
|
||||
field public static final String EXECUTE_APP_ACTION = "android.permission.EXECUTE_APP_ACTION";
|
||||
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 FOREGROUND_SERVICE_CAMERA = "android.permission.FOREGROUND_SERVICE_CAMERA";
|
||||
field public static final String FOREGROUND_SERVICE_CONNECTED_DEVICE = "android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE";
|
||||
@@ -326,6 +327,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 14cb052b121f..09dc7b293b73 100644
|
||||
--- a/core/res/AndroidManifest.xml
|
||||
+++ b/core/res/AndroidManifest.xml
|
||||
@@ -4258,6 +4258,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 9c018c30f9e3..966fec172070 100644
|
||||
--- a/core/res/res/values/strings.xml
|
||||
+++ b/core/res/res/values/strings.xml
|
||||
@@ -991,6 +991,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 78f1fa60b69f..fb2f7da97cda 100644
|
||||
--- a/services/core/java/com/android/server/pm/ComputerEngine.java
|
||||
+++ b/services/core/java/com/android/server/pm/ComputerEngine.java
|
||||
@@ -1450,6 +1450,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;
|
||||
@@ -1483,13 +1506,14 @@ public class ComputerEngine implements Computer {
|
||||
|| ArrayUtils.isEmpty(p.getPermissions())) ? Collections.emptySet()
|
||||
: mPermissionManager.getInstalledPermissions(ps.getPackageName());
|
||||
// Compute granted permissions only if package has requested permissions
|
||||
- final Set<String> grantedPermissions = ((flags & PackageManager.GET_PERMISSIONS) == 0
|
||||
+ final Set<String> grantedPermissions = (((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.getFirstInstallTimeMillis(), ps.getLastUpdateTime(), installedPermissions,
|
||||
- grantedPermissions, state, userId, ps);
|
||||
+ grantedPermissions, state, userId, ps), grantedPermissions);
|
||||
|
||||
if (packageInfo == null) {
|
||||
return null;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 15d6e574126494d166fda1bdfaa22568e0c4aa1c Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Wed, 6 Oct 2021 18:40:30 -0700
|
||||
Subject: [PATCH 15/31] Revert "Make QS always use dark theme colors"
|
||||
|
||||
This reverts commit d62f7249f9e3222da95ecf6816601c408aac6be5.
|
||||
|
||||
This is a prerequisite for making the QS panel follow the light system
|
||||
theme setting.
|
||||
|
||||
Change-Id: Iac4c96ccb3845812ca3df820bf27dc533816f72e
|
||||
---
|
||||
packages/SystemUI/res/values/styles.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index d520670ec012..bd38548dbc65 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -370,7 +370,7 @@
|
||||
<item name="containerStyle">@style/AuthCredentialPinPasswordContainerStyle</item>
|
||||
</style>
|
||||
|
||||
- <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault">
|
||||
+ <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
||||
<item name="isQsTheme">true</item>
|
||||
<item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
<item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 7a570109ab3deea49d6c77e2fd731629e4edabb2 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Wed, 6 Oct 2021 18:41:11 -0700
|
||||
Subject: [PATCH 16/31] Revert "Do not re-inflate QS and SB when
|
||||
CONFIG_UI_MODE"
|
||||
|
||||
This reverts commit 8a40ff855b86bc86e23367017002289920855a4e.
|
||||
|
||||
This is a prerequisite for making the QS panel follow the light system
|
||||
mode setting.
|
||||
|
||||
Change-Id: Ibad399ece587505559cc73febdda2f2d8558e94d
|
||||
---
|
||||
.../com/android/systemui/fragments/FragmentHostManager.java | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
index 81a520661cfe..5e0b34db0965 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
@@ -59,7 +59,8 @@ public class FragmentHostManager {
|
||||
private final LeakDetector mLeakDetector;
|
||||
private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
|
||||
ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE
|
||||
- | ActivityInfo.CONFIG_ASSETS_PATHS);
|
||||
+ | ActivityInfo.CONFIG_ASSETS_PATHS
|
||||
+ | ActivityInfo.CONFIG_UI_MODE);
|
||||
private final FragmentService mManager;
|
||||
private final ExtensionFragmentManager mPlugins = new ExtensionFragmentManager();
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
From 48c44b93881a1d839f9906c666a8f40e110bab93 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Mon, 11 Oct 2021 19:24:58 -0700
|
||||
Subject: [PATCH 17/31] SystemUI: Follow light/dark theme in quick settings
|
||||
|
||||
Android 12's dual-tone style where the quick settings panel is always
|
||||
dark makes the light theme look like a second-class citizen. Pure black
|
||||
also looks out-of-place next to QS tiles and the notification panel
|
||||
because dynamic themes don't affect it at all.
|
||||
|
||||
Revert to the ~Beta 1 style where quick settings used the same theme as
|
||||
the notification shade.
|
||||
|
||||
- colorAccentPrimary has been replaced with colorAccent for contrast in
|
||||
light mode, because colorAccentPrimary is system_accent1_100 (dark
|
||||
accent color)
|
||||
- Footer chips have been converted to surfaces (similar to QS tiles and
|
||||
notifications), which makes more sense with the new style
|
||||
- The QS background is now the same as the notification shade background
|
||||
in both light and dark modes
|
||||
|
||||
Demo screenshots (with dual-tone commit):
|
||||
https://twitter.com/kdrag0n/status/1445922541218922496
|
||||
|
||||
[kdrag0n: ported to 12L]
|
||||
[neobuddy89: adapted for 14QPR1]
|
||||
|
||||
TODO: Fix QS customizer background in light theme
|
||||
|
||||
Change-Id: I3d45b72f0f119e100505409d178ab8f698993881
|
||||
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
|
||||
---
|
||||
packages/SystemUI/res/values-night/styles.xml | 31 ++++++++++++++++++-
|
||||
packages/SystemUI/res/values/styles.xml | 20 ++++++------
|
||||
.../statusbar/phone/ScrimController.java | 2 +-
|
||||
.../systemui/statusbar/phone/ScrimState.java | 16 +++++-----
|
||||
4 files changed, 49 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml
|
||||
index b6971d3c1fa4..8972df2b7490 100644
|
||||
--- a/packages/SystemUI/res/values-night/styles.xml
|
||||
+++ b/packages/SystemUI/res/values-night/styles.xml
|
||||
@@ -14,7 +14,8 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
|
||||
<style name="Theme.SystemUI.DayNightDialog" parent="@android:style/Theme.DeviceDefault.Dialog"/>
|
||||
|
||||
@@ -24,6 +25,34 @@
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
</style>
|
||||
|
||||
+ <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
||||
+ <item name="isQsTheme">true</item>
|
||||
+ <item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
+ <item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
+ <item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
+ <item name="android:windowIsFloating">true</item>
|
||||
+ <item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
||||
+
|
||||
+ <item name="surfaceBright">?androidprv:attr/materialColorSurfaceBright</item>
|
||||
+ <item name="android:colorBackground">?attr/surfaceBright</item>
|
||||
+ <item name="scHigh">?androidprv:attr/materialColorSurfaceContainerHigh</item>
|
||||
+ <item name="primary">?androidprv:attr/materialColorPrimary</item>
|
||||
+ <item name="tertiary">?androidprv:attr/materialColorTertiary</item>
|
||||
+ <item name="onSurface">?androidprv:attr/materialColorOnSurface</item>
|
||||
+ <item name="onSurfaceVariant">?androidprv:attr/materialColorOnSurfaceVariant</item>
|
||||
+ <item name="outline">?androidprv:attr/materialColorOutline</item>
|
||||
+
|
||||
+ <item name="shadeActive">?android:attr/colorAccent</item>
|
||||
+ <item name="onShadeActive">?android:attr/textColorPrimaryInverse</item>
|
||||
+ <item name="onShadeActiveVariant">?android:attr/textColorSecondaryInverse</item>
|
||||
+ <item name="shadeInactive">@android:color/system_neutral1_800</item>
|
||||
+ <item name="onShadeInactive">?android:attr/textColorPrimary</item>
|
||||
+ <item name="onShadeInactiveVariant">?android:attr/textColorSecondary</item>
|
||||
+ <item name="shadeDisabled">@color/shade_disabled</item>
|
||||
+ <item name="underSurface">@android:color/system_neutral1_900</item>
|
||||
+ <item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
+ </style>
|
||||
+
|
||||
<!-- Screenshots -->
|
||||
<style name="LongScreenshotActivity" parent="@android:style/Theme.DeviceDefault.DayNight">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index bd38548dbc65..af92c021ec62 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -374,7 +374,7 @@
|
||||
<item name="isQsTheme">true</item>
|
||||
<item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
<item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
- <item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
+ <item name="android:colorError">@*android:color/error_color_material_light</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
||||
|
||||
@@ -387,14 +387,14 @@
|
||||
<item name="onSurfaceVariant">?androidprv:attr/materialColorOnSurfaceVariant</item>
|
||||
<item name="outline">?androidprv:attr/materialColorOutline</item>
|
||||
|
||||
- <item name="shadeActive">@color/material_dynamic_primary90</item>
|
||||
- <item name="onShadeActive">@color/material_dynamic_primary10</item>
|
||||
- <item name="onShadeActiveVariant">@color/material_dynamic_primary30</item>
|
||||
- <item name="shadeInactive">@color/material_dynamic_neutral20</item>
|
||||
- <item name="onShadeInactive">@color/material_dynamic_neutral90</item>
|
||||
- <item name="onShadeInactiveVariant">@color/material_dynamic_neutral_variant80</item>
|
||||
- <item name="shadeDisabled">@color/shade_disabled</item>
|
||||
- <item name="underSurface">@color/material_dynamic_neutral0</item>
|
||||
+ <item name="shadeActive">?android:attr/colorAccent</item>
|
||||
+ <item name="onShadeActive">?android:attr/textColorPrimaryInverse</item>
|
||||
+ <item name="onShadeActiveVariant">?android:attr/textColorSecondaryInverse</item>
|
||||
+ <item name="shadeInactive">@*android:color/surface_light</item>
|
||||
+ <item name="onShadeInactive">?android:attr/textColorPrimary</item>
|
||||
+ <item name="onShadeInactiveVariant">?android:attr/textColorSecondary</item>
|
||||
+ <item name="shadeDisabled">@*android:color/surface_light</item>
|
||||
+ <item name="underSurface">@android:color/system_neutral1_100</item>
|
||||
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
</style>
|
||||
|
||||
@@ -634,7 +634,7 @@
|
||||
|
||||
<style name="QSCustomizeToolbar" parent="@*android:style/Widget.DeviceDefault.Toolbar">
|
||||
<item name="android:textColor">?attr/onSurface</item>
|
||||
- <item name="android:elevation">10dp</item>
|
||||
+ <item name="android:elevation">0dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Media controls always have light background -->
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
index b0f8276e460d..fe64f08558f5 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
@@ -940,7 +940,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
mNotificationsAlpha = behindAlpha;
|
||||
mNotificationsTint = behindTint;
|
||||
mBehindAlpha = 1;
|
||||
- mBehindTint = Color.BLACK;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
} else {
|
||||
mBehindAlpha = behindAlpha;
|
||||
if (mState == ScrimState.KEYGUARD && mTransitionToFullShadeProgress > 0.0f) {
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
||||
index e3b65ab27f48..44297566d0f4 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
||||
@@ -82,7 +82,7 @@ public enum ScrimState {
|
||||
mBehindAlpha = mClipQsScrim ? 1 : mScrimBehindAlphaKeyguard;
|
||||
mNotifAlpha = mClipQsScrim ? mScrimBehindAlphaKeyguard : 0;
|
||||
if (mClipQsScrim) {
|
||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -122,7 +122,7 @@ public enum ScrimState {
|
||||
@Override
|
||||
public void prepare(ScrimState previousState) {
|
||||
mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha;
|
||||
- mBehindTint = mClipQsScrim ? Color.BLACK : mSurfaceColor;
|
||||
+ mBehindTint = mSurfaceColor;
|
||||
mNotifAlpha = mClipQsScrim ? mDefaultScrimAlpha : 0;
|
||||
mNotifTint = Color.TRANSPARENT;
|
||||
mFrontAlpha = 0f;
|
||||
@@ -154,10 +154,10 @@ public enum ScrimState {
|
||||
mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha;
|
||||
mNotifAlpha = 1f;
|
||||
mFrontAlpha = 0f;
|
||||
- mBehindTint = mClipQsScrim ? Color.TRANSPARENT : Color.BLACK;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
|
||||
if (mClipQsScrim) {
|
||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -259,22 +259,22 @@ public enum ScrimState {
|
||||
&& !fromAod;
|
||||
|
||||
mFrontTint = Color.TRANSPARENT;
|
||||
- mBehindTint = Color.BLACK;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
mBlankScreen = false;
|
||||
|
||||
if (mDisplayRequiresBlanking && previousState == ScrimState.AOD) {
|
||||
// Set all scrims black, before they fade transparent.
|
||||
updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */);
|
||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */);
|
||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT /* tint */);
|
||||
|
||||
// Scrims should still be black at the end of the transition.
|
||||
mFrontTint = Color.BLACK;
|
||||
- mBehindTint = Color.BLACK;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
mBlankScreen = true;
|
||||
}
|
||||
|
||||
if (mClipQsScrim) {
|
||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
},
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 98ec3af75b139f7bf445d296ededc1e1b2c349d3 Mon Sep 17 00:00:00 2001
|
||||
From: Pranav Vashi <neobuddy89@gmail.com>
|
||||
Date: Wed, 13 Dec 2023 23:24:29 +0530
|
||||
Subject: [PATCH 18/31] SystemUI: Use themewrapper for QSCustomizer and tune
|
||||
colorUnavailable
|
||||
|
||||
* Restores behvavior from A13 for colorUnavailable, shadeDisabled is now unused.
|
||||
|
||||
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
|
||||
---
|
||||
.../com/android/systemui/qs/customize/QSCustomizer.java | 9 ++++++---
|
||||
.../com/android/systemui/qs/tileimpl/QSTileViewImpl.kt | 2 +-
|
||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
|
||||
index 7ef47ab2293a..969bce57699b 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
|
||||
@@ -23,6 +23,7 @@ import android.content.res.Configuration;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
+import android.view.ContextThemeWrapper;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
@@ -67,13 +68,15 @@ public class QSCustomizer extends LinearLayout {
|
||||
public QSCustomizer(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
- LayoutInflater.from(getContext()).inflate(R.layout.qs_customize_panel_content, this);
|
||||
+ Context themedContext =
|
||||
+ new ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings);
|
||||
+ LayoutInflater.from(themedContext).inflate(R.layout.qs_customize_panel_content, this);
|
||||
mClipper = new QSDetailClipper(findViewById(R.id.customize_container));
|
||||
Toolbar toolbar = findViewById(com.android.internal.R.id.action_bar);
|
||||
TypedValue value = new TypedValue();
|
||||
- mContext.getTheme().resolveAttribute(android.R.attr.homeAsUpIndicator, value, true);
|
||||
+ themedContext.getTheme().resolveAttribute(android.R.attr.homeAsUpIndicator, value, true);
|
||||
toolbar.setNavigationIcon(
|
||||
- getResources().getDrawable(value.resourceId, mContext.getTheme()));
|
||||
+ getResources().getDrawable(value.resourceId, themedContext.getTheme()));
|
||||
|
||||
toolbar.getMenu().add(Menu.NONE, MENU_RESET, 0, com.android.internal.R.string.reset)
|
||||
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
index 764ef681106b..4e59e8c98424 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
@@ -95,7 +95,7 @@ open class QSTileViewImpl @JvmOverloads constructor(
|
||||
|
||||
private val colorActive = Utils.getColorAttrDefaultColor(context, R.attr.shadeActive)
|
||||
private val colorInactive = Utils.getColorAttrDefaultColor(context, R.attr.shadeInactive)
|
||||
- private val colorUnavailable = Utils.getColorAttrDefaultColor(context, R.attr.shadeDisabled)
|
||||
+ private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive)
|
||||
|
||||
private val colorLabelActive = Utils.getColorAttrDefaultColor(context, R.attr.onShadeActive)
|
||||
private val colorLabelInactive = Utils.getColorAttrDefaultColor(context, R.attr.onShadeInactive)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From ff212e50fa84225c115cb7583b22c4bfdd5aac65 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Mon, 11 Oct 2021 19:25:02 -0700
|
||||
Subject: [PATCH 19/31] SystemUI: Initialize QS tiles in inactive state
|
||||
|
||||
Now that the QS fragment is recreated when changing the UI mode (so that
|
||||
it follows light/dark themes), all tiles flash with active color briefly
|
||||
because the new views become visible before states are refreshed.
|
||||
|
||||
Initializing tiles in the inactive state is much less disruptive, and
|
||||
the effect is very hard to see as compared to the active color because
|
||||
the background color is much less prominent.
|
||||
|
||||
Change-Id: I048171d503f5533e91bab486b8805ac15c329f31
|
||||
---
|
||||
.../plugin/src/com/android/systemui/plugins/qs/QSTile.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
|
||||
index 25f77ea4e6d5..7934c5023329 100644
|
||||
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
|
||||
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
|
||||
@@ -156,7 +156,7 @@ public interface QSTile {
|
||||
@ProvidesInterface(version = State.VERSION)
|
||||
public static class State {
|
||||
public static final int VERSION = 1;
|
||||
- public static final int DEFAULT_STATE = Tile.STATE_ACTIVE;
|
||||
+ public static final int DEFAULT_STATE = Tile.STATE_INACTIVE;
|
||||
|
||||
public Icon icon;
|
||||
public Supplier<Icon> iconSupplier;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
From e390498360800b89f064fb96145f204b98dc5dbe Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Mon, 11 Oct 2021 19:25:08 -0700
|
||||
Subject: [PATCH 20/31] SystemUI: Add dual-tone light and dark themes for QS
|
||||
|
||||
Google's dual-tone QS design where the notification panel has a
|
||||
semantically higher elevation adds depth to the notification+QS shade,
|
||||
and we don't necessarily have to give it up just because our QS has
|
||||
light and dark themes.
|
||||
|
||||
To preserve the dual-tone effect, use a darker background color for the
|
||||
QS section:
|
||||
|
||||
Light:
|
||||
Notifications: neutral1 20 (surface_light)
|
||||
Notification panel: neutral1 50 (light BG)
|
||||
QS background: neutral1 100 (darker light BG / surface_header_light)
|
||||
Inactive QS tiles: neutral1 20 (surface_light)
|
||||
|
||||
Dark:
|
||||
Notifications: neutral1 800 (surface_dark)
|
||||
Notification panel: neutral1 900 (dark BG)
|
||||
QS background: neutral1 950 (surface_header_dark_sysui modulated to L* 5)
|
||||
Inactive QS tiles: neutral1 800 (surface_dark)
|
||||
|
||||
The dark QS background could be neutral1 0 (black) like it was before,
|
||||
but I don't think it looks as good because it can't be tinted based on
|
||||
the active wallpaper and thus stands out from other colors.
|
||||
|
||||
Unfortunately, Google's current CAM16-based modulation causes hue shifts
|
||||
in extreme light and dark shades (e.g. L* = 98 / 5), but we'll fix this
|
||||
by generating and overlaying modulated surface colors in our
|
||||
ThemeOverlayController implementation.
|
||||
|
||||
Demo screenshots: https://twitter.com/kdrag0n/status/1445922541218922496
|
||||
|
||||
Change-Id: Icdc4957ecb4e0201377351f1a3e1c6928d6b3955
|
||||
Signed-off-by: PainKiller3 <ninadpatil100@gmail.com>
|
||||
---
|
||||
.../res/color/surface_header_dark_sysui.xml | 18 ++++++++++++++++++
|
||||
core/res/res/values-night/values.xml | 1 +
|
||||
.../statusbar/phone/ScrimController.java | 12 +++++++++++-
|
||||
3 files changed, 30 insertions(+), 1 deletion(-)
|
||||
create mode 100644 core/res/res/color/surface_header_dark_sysui.xml
|
||||
|
||||
diff --git a/core/res/res/color/surface_header_dark_sysui.xml b/core/res/res/color/surface_header_dark_sysui.xml
|
||||
new file mode 100644
|
||||
index 000000000000..ec070c96f91a
|
||||
--- /dev/null
|
||||
+++ b/core/res/res/color/surface_header_dark_sysui.xml
|
||||
@@ -0,0 +1,18 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- 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.
|
||||
+-->
|
||||
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <item android:color="@color/system_neutral1_500" android:lStar="5" />
|
||||
+</selector>
|
||||
diff --git a/core/res/res/values-night/values.xml b/core/res/res/values-night/values.xml
|
||||
index 1571fab66a5b..0683c20a4a4c 100644
|
||||
--- a/core/res/res/values-night/values.xml
|
||||
+++ b/core/res/res/values-night/values.xml
|
||||
@@ -22,6 +22,7 @@
|
||||
<item name="colorSecondary">@color/secondary_device_default_settings</item>
|
||||
<item name="colorAccent">@color/accent_device_default_dark</item>
|
||||
<item name="colorError">@color/error_color_device_default_dark</item>
|
||||
+ <item name="colorSurfaceHeader">@color/surface_header_dark_sysui</item>
|
||||
<item name="colorControlNormal">?attr/textColorPrimary</item>
|
||||
<item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item>
|
||||
<item name="forceDarkAllowed">false</item>
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
index fe64f08558f5..842f3dd8f54c 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
@@ -215,6 +215,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
|
||||
|
||||
private GradientColors mColors;
|
||||
+ private GradientColors mBehindColors;
|
||||
private boolean mNeedsDrawableColorUpdate;
|
||||
|
||||
private float mAdditionalScrimBehindAlphaKeyguard = 0f;
|
||||
@@ -352,6 +353,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
mKeyguardTransitionInteractor = keyguardTransitionInteractor;
|
||||
mWallpaperRepository = wallpaperRepository;
|
||||
mMainDispatcher = mainDispatcher;
|
||||
+ mBehindColors = new GradientColors();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1127,7 +1129,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
&& !mBlankScreen;
|
||||
|
||||
mScrimInFront.setColors(mColors, animateScrimInFront);
|
||||
- mScrimBehind.setColors(mColors, animateBehindScrim);
|
||||
+ mScrimBehind.setColors(mBehindColors, animateBehindScrim);
|
||||
mNotificationsScrim.setColors(mColors, animateScrimNotifications);
|
||||
|
||||
dispatchBackScrimState(mScrimBehind.getViewAlpha());
|
||||
@@ -1492,7 +1494,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
if (mScrimBehind == null) return;
|
||||
int background = Utils.getColorAttr(mScrimBehind.getContext(),
|
||||
android.R.attr.colorBackgroundFloating).getDefaultColor();
|
||||
+ int surfaceBackground = Utils.getColorAttr(mScrimBehind.getContext(),
|
||||
+ com.android.internal.R.attr.colorSurfaceHeader).getDefaultColor();
|
||||
int accent = Utils.getColorAccent(mScrimBehind.getContext()).getDefaultColor();
|
||||
+
|
||||
mColors.setMainColor(background);
|
||||
mColors.setSecondaryColor(accent);
|
||||
final boolean isBackgroundLight = !ContrastColorUtil.isColorDark(background);
|
||||
@@ -1504,6 +1509,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
state.setSurfaceColor(surface);
|
||||
}
|
||||
|
||||
+ mBehindColors.setMainColor(surfaceBackground);
|
||||
+ mBehindColors.setSecondaryColor(accent);
|
||||
+ mBehindColors.setSupportsDarkText(
|
||||
+ ColorUtils.calculateContrast(mBehindColors.getMainColor(), Color.WHITE) > 4.5);
|
||||
+
|
||||
mNeedsDrawableColorUpdate = true;
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
From a4b814c2e24e9a5c3bb9d1f50393b207216df6ac Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 8 Mar 2022 20:37:33 -0800
|
||||
Subject: [PATCH 21/31] SystemUI: Follow light/dark theme in power menu
|
||||
|
||||
Now that we've modified the power menu to refresh on UI mode changes,
|
||||
make it follow the system light/dark theme for better integration in
|
||||
light mode.
|
||||
|
||||
SystemUI: Always refresh power menu on UI mode change
|
||||
|
||||
This is necessary for reliably theming the global actions dialog with
|
||||
dynamic colors and adapting it to light/dark themes.
|
||||
|
||||
Demo screenshots (with color overlays applied):
|
||||
https://twitter.com/kdrag0n/status/1445960685427433473
|
||||
|
||||
[kdrag0n: ported to 12L]
|
||||
|
||||
Change-Id: If58fb4079a4cd11414ff928fad3576beecb14ff5
|
||||
Signed-off-by: althafvly <althafvly@gmail.com>
|
||||
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
|
||||
---
|
||||
packages/SystemUI/res/values-night/colors.xml | 5 +++++
|
||||
packages/SystemUI/res/values/colors.xml | 8 ++++----
|
||||
.../systemui/globalactions/GlobalActionsDialogLite.java | 9 +++++++++
|
||||
3 files changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml
|
||||
index 99311e3d1e1b..6e61294327f7 100644
|
||||
--- a/packages/SystemUI/res/values-night/colors.xml
|
||||
+++ b/packages/SystemUI/res/values-night/colors.xml
|
||||
@@ -55,6 +55,11 @@
|
||||
<!-- The color of the text in the Global Actions menu -->
|
||||
<color name="global_actions_text">@color/GM2_grey_200</color>
|
||||
|
||||
+ <!-- Colors for Power Menu Lite -->
|
||||
+ <color name="global_actions_lite_background">@*android:color/primary_device_default_dark</color>
|
||||
+ <color name="global_actions_lite_button_background">@*android:color/surface_dark</color>
|
||||
+ <color name="global_actions_lite_text">@*android:color/foreground_device_default_dark</color>
|
||||
+
|
||||
<!-- The color of the text in the Global Actions menu -->
|
||||
<color name="global_actions_alert_text">@color/GM2_red_300</color>
|
||||
|
||||
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
|
||||
index fed2f9172dc3..b494973b319f 100644
|
||||
--- a/packages/SystemUI/res/values/colors.xml
|
||||
+++ b/packages/SystemUI/res/values/colors.xml
|
||||
@@ -36,10 +36,10 @@
|
||||
<color name="global_actions_grid_background">#F1F3F4</color>
|
||||
|
||||
<!-- Colors for Power Menu Lite -->
|
||||
- <color name="global_actions_lite_background">#191C18</color>
|
||||
- <color name="global_actions_lite_button_background">#303030</color>
|
||||
- <color name="global_actions_lite_button_background_focused">#666666</color>
|
||||
- <color name="global_actions_lite_text">#F0F0F0</color>
|
||||
+ <color name="global_actions_lite_background">@*android:color/primary_device_default_light</color>
|
||||
+ <color name="global_actions_lite_button_background">@*android:color/surface_light</color>
|
||||
+ <color name="global_actions_lite_button_background_focused">#666666</color> <!-- LOS TV-specific, don't care -->
|
||||
+ <color name="global_actions_lite_text">@*android:color/foreground_device_default_light</color>
|
||||
<color name="global_actions_lite_emergency_background">#F85D4D</color>
|
||||
<color name="global_actions_lite_emergency_icon">@color/GM2_grey_900</color>
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
||||
index cb8e7c4ca073..3ec6a7cde410 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
||||
@@ -831,6 +831,15 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
|
||||
user.id) != 0;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public void onUiModeChanged() {
|
||||
+ // Colors may change, depending on UI mode
|
||||
+ mContext.getTheme().applyStyle(mContext.getThemeResId(), true);
|
||||
+ if (mDialog != null && mDialog.isShowing()) {
|
||||
+ mDialog.refreshDialog();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
public void onConfigChanged(Configuration newConfig) {
|
||||
if (mDialog != null && mDialog.isShowing()
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
From 5bfb64b6e1fe6e78a1b15869332a33c40afde56c Mon Sep 17 00:00:00 2001
|
||||
From: althafvly <althafvly@gmail.com>
|
||||
Date: Tue, 26 May 2020 21:17:59 +0800
|
||||
Subject: [PATCH 22/31] SystemUI: Re-evaluate system theme on UI mode change
|
||||
|
||||
- Need for power menu to set accurate colors
|
||||
|
||||
Change-Id: I05d41eaf8ea19ce3b6ce659d01da33cf55de3b7e
|
||||
---
|
||||
.../systemui/theme/ThemeOverlayController.java | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
||||
index 395bb6c6f1af..e27ec424a444 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
||||
@@ -75,6 +75,8 @@ import com.android.systemui.monet.ColorScheme;
|
||||
import com.android.systemui.monet.Style;
|
||||
import com.android.systemui.monet.TonalPalette;
|
||||
import com.android.systemui.settings.UserTracker;
|
||||
+import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
+import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
|
||||
import com.android.systemui.util.settings.SecureSettings;
|
||||
@@ -138,6 +140,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
|
||||
private final boolean mIsMonetEnabled;
|
||||
private final boolean mIsFidelityEnabled;
|
||||
private final UserTracker mUserTracker;
|
||||
+ private final ConfigurationController mConfigurationController;
|
||||
private final DeviceProvisionedController mDeviceProvisionedController;
|
||||
private final Resources mResources;
|
||||
// Current wallpaper colors associated to a user.
|
||||
@@ -176,6 +179,15 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
|
||||
// Determines if we should ignore THEME_CUSTOMIZATION_OVERLAY_PACKAGES setting changes.
|
||||
private boolean mSkipSettingChange;
|
||||
|
||||
+ private final ConfigurationListener mConfigurationListener =
|
||||
+ new ConfigurationListener() {
|
||||
+ @Override
|
||||
+ public void onUiModeChanged() {
|
||||
+ Log.i(TAG, "Re-applying theme on UI change");
|
||||
+ reevaluateSystemTheme(true /* forceReload */);
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
private final DeviceProvisionedListener mDeviceProvisionedListener =
|
||||
new DeviceProvisionedListener() {
|
||||
@Override
|
||||
@@ -402,11 +414,13 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
|
||||
FeatureFlags featureFlags,
|
||||
@Main Resources resources,
|
||||
WakefulnessLifecycle wakefulnessLifecycle,
|
||||
- UiModeManager uiModeManager) {
|
||||
+ UiModeManager uiModeManager,
|
||||
+ ConfigurationController configurationController) {
|
||||
mContext = context;
|
||||
mIsMonochromaticEnabled = featureFlags.isEnabled(Flags.MONOCHROMATIC_THEME);
|
||||
mIsMonetEnabled = featureFlags.isEnabled(Flags.MONET);
|
||||
mIsFidelityEnabled = featureFlags.isEnabled(Flags.COLOR_FIDELITY);
|
||||
+ mConfigurationController = configurationController;
|
||||
mDeviceProvisionedController = deviceProvisionedController;
|
||||
mBroadcastDispatcher = broadcastDispatcher;
|
||||
mUserManager = userManager;
|
||||
@@ -518,6 +532,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
|
||||
|
||||
mUserTracker.addCallback(mUserTrackerCallback, mMainExecutor);
|
||||
|
||||
+ mConfigurationController.addCallback(mConfigurationListener);
|
||||
mDeviceProvisionedController.addCallback(mDeviceProvisionedListener);
|
||||
|
||||
// All wallpaper color and keyguard logic only applies when Monet is enabled.
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 7a6c86c406d9fc8ef0be07caa5d87982402f6d2a Mon Sep 17 00:00:00 2001
|
||||
From: Danny Baumann <dannybaumann@web.de>
|
||||
Date: Wed, 20 Jul 2022 15:53:13 +0200
|
||||
Subject: [PATCH 23/31] SystemUI: Fix QS header clock color
|
||||
|
||||
Now that we're flipping QS colors by theme (dark/light), we can no longer
|
||||
rely on wallpaper colors for QS clock. Instead, we now can rely on clock color
|
||||
being updated correctly on QS re-inflation (via
|
||||
QuickStatusBarHeader.updateResources).
|
||||
|
||||
Change-Id: Icdf2484793cb63b7c0ab6ab87e94185e6bdc9ca4
|
||||
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
|
||||
---
|
||||
.../src/com/android/systemui/statusbar/policy/Clock.java | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
|
||||
index b5b2f0d98733..8664b9c984e5 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
|
||||
@@ -42,7 +42,6 @@ import android.text.style.CharacterStyle;
|
||||
import android.text.style.RelativeSizeSpan;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
-import android.view.ContextThemeWrapper;
|
||||
import android.view.Display;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -432,13 +431,6 @@ public class Clock extends TextView implements
|
||||
setTextColor(mNonAdaptedColor);
|
||||
}
|
||||
|
||||
- // Update text color based when shade scrim changes color.
|
||||
- public void onColorsChanged(boolean lightTheme) {
|
||||
- final Context context = new ContextThemeWrapper(mContext,
|
||||
- lightTheme ? R.style.Theme_SystemUI_LightWallpaper : R.style.Theme_SystemUI);
|
||||
- setTextColor(Utils.getColorAttrDefaultColor(context, R.attr.wallpaperTextColor));
|
||||
- }
|
||||
-
|
||||
@Override
|
||||
public void onDensityOrFontScaleChanged() {
|
||||
reloadDimens();
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From b3ea300144d8d4924754f0516cc2adcb26c7f710 Mon Sep 17 00:00:00 2001
|
||||
From: Adithya R <gh0strider.2k18.reborn@gmail.com>
|
||||
Date: Mon, 30 May 2022 00:13:02 +0530
|
||||
Subject: [PATCH 24/31] SystemUI: Calculate paged QS tiles height properly
|
||||
|
||||
When QS is re-inflated during UI mode change and we're on the
|
||||
3rd or higher QS page, the first QS page is misaligned and
|
||||
hence height returns 0, resulting in footer and media panel
|
||||
position overlapping the QS panel. Return the maximum height
|
||||
among all present QS pages to fix this issue.
|
||||
|
||||
Change-Id: I539babdb75c114cc44b4213ff114d4272be22ef6
|
||||
---
|
||||
.../com/android/systemui/qs/PagedTileLayout.java | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
|
||||
index 9a5f43b0d6f3..3ec1221f5d01 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
|
||||
@@ -123,12 +123,16 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
|
||||
|
||||
@Override
|
||||
public int getTilesHeight() {
|
||||
- // Use the first page as that is the maximum height we need to show.
|
||||
- TileLayout tileLayout = mPages.get(0);
|
||||
- if (tileLayout == null) {
|
||||
- return 0;
|
||||
+ // Find the maximum height among all pages.
|
||||
+ int height = 0;
|
||||
+ for (int i = 0; i < mPages.size(); i++) {
|
||||
+ TileLayout tileLayout = mPages.get(i);
|
||||
+ if (tileLayout != null) {
|
||||
+ height = Math.max(height, tileLayout.getTilesHeight());
|
||||
+ }
|
||||
}
|
||||
- return tileLayout.getTilesHeight();
|
||||
+ mLogger.d("getTilesHeight ret=", height);
|
||||
+ return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 8d7d5edb443453eac836fd1595bdc67e79164a75 Mon Sep 17 00:00:00 2001
|
||||
From: althafvly <althafvly@gmail.com>
|
||||
Date: Tue, 4 Oct 2022 18:34:08 +0530
|
||||
Subject: [PATCH 25/31] SystemUI: Re-inflate QS and SB when
|
||||
CONFIG_SCREEN_LAYOUT
|
||||
|
||||
- It was removed in a13, needed for light theme change in landscape.
|
||||
|
||||
Change-Id: I1872f5d90e6f6b8debecbc69eb80c3a11d8984e2
|
||||
---
|
||||
.../src/com/android/systemui/fragments/FragmentHostManager.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
index 5e0b34db0965..5aa7ceb7b5f5 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
@@ -59,7 +59,7 @@ public class FragmentHostManager {
|
||||
private final LeakDetector mLeakDetector;
|
||||
private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
|
||||
ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE
|
||||
- | ActivityInfo.CONFIG_ASSETS_PATHS
|
||||
+ | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS
|
||||
| ActivityInfo.CONFIG_UI_MODE);
|
||||
private final FragmentService mManager;
|
||||
private final ExtensionFragmentManager mPlugins = new ExtensionFragmentManager();
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
From cbb3174a2aca29c815b00c840cba3771defa8298 Mon Sep 17 00:00:00 2001
|
||||
From: ReallySnow <reallysnow233@gmail.com>
|
||||
Date: Thu, 15 Sep 2022 13:38:48 +0800
|
||||
Subject: [PATCH 26/31] SystemUI: Follow light/dark theme in SplitShade Header
|
||||
|
||||
* Google's default implementation is dark, which means
|
||||
it doesn't need to follow the light/dark color change,
|
||||
but we broke it, so add it to complete the SplitShade
|
||||
Header color change
|
||||
|
||||
Co-authored-by: Col_or <col_or@qq.com>
|
||||
Change-Id: I5464039885197eeb43bd31b822bfcba7a1b08776
|
||||
---
|
||||
.../systemui/shade/ShadeHeaderController.kt | 27 +++++++++++++++++++
|
||||
.../systemui/shade/carrier/ShadeCarrier.java | 8 ++++++
|
||||
.../shade/carrier/ShadeCarrierGroup.java | 16 +++++++++++
|
||||
3 files changed, 51 insertions(+)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||
index 3c08389a7ca2..5cdd6f44d4a0 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||
@@ -22,7 +22,10 @@ import android.annotation.IdRes
|
||||
import android.app.PendingIntent
|
||||
import android.app.StatusBarManager
|
||||
import android.content.Intent
|
||||
+import android.content.Context
|
||||
+import android.content.res.ColorStateList
|
||||
import android.content.res.Configuration
|
||||
+import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.os.Trace
|
||||
import android.os.Trace.TRACE_TAG_APP
|
||||
@@ -91,6 +94,7 @@ constructor(
|
||||
private val privacyIconsController: HeaderPrivacyIconsController,
|
||||
private val insetsProvider: StatusBarContentInsetsProvider,
|
||||
private val configurationController: ConfigurationController,
|
||||
+ private val context: Context,
|
||||
private val variableDateViewControllerFactory: VariableDateViewController.Factory,
|
||||
@Named(SHADE_HEADER) private val batteryMeterViewController: BatteryMeterViewController,
|
||||
private val dumpManager: DumpManager,
|
||||
@@ -141,6 +145,7 @@ constructor(
|
||||
private var cutout: DisplayCutout? = null
|
||||
private var lastInsets: WindowInsets? = null
|
||||
private var nextAlarmIntent: PendingIntent? = null
|
||||
+ private var textColorPrimary = Color.TRANSPARENT
|
||||
|
||||
private var qsDisabled = false
|
||||
private var visible = false
|
||||
@@ -283,6 +288,10 @@ constructor(
|
||||
updateCarrierGroupPadding()
|
||||
clock.onDensityOrFontScaleChanged()
|
||||
}
|
||||
+
|
||||
+ override fun onUiModeChanged() {
|
||||
+ updateResources()
|
||||
+ }
|
||||
}
|
||||
|
||||
private val nextAlarmCallback =
|
||||
@@ -335,6 +344,7 @@ constructor(
|
||||
demoModeController.addCallback(demoModeReceiver)
|
||||
statusBarIconController.addIconGroup(iconManager)
|
||||
nextAlarmController.addCallback(nextAlarmCallback)
|
||||
+ updateResources()
|
||||
systemIcons.setOnHoverListener(
|
||||
statusOverlayHoverListenerFactory.createListener(systemIcons)
|
||||
)
|
||||
@@ -538,6 +548,23 @@ constructor(
|
||||
header.setPadding(padding, header.paddingTop, padding, header.paddingBottom)
|
||||
updateQQSPaddings()
|
||||
qsBatteryModeController.updateResources()
|
||||
+
|
||||
+ val fillColor = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary)
|
||||
+ iconManager.setTint(fillColor)
|
||||
+ val textColor = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary)
|
||||
+ val colorStateList = Utils.getColorAttr(context, android.R.attr.textColorPrimary)
|
||||
+ if (textColor != textColorPrimary) {
|
||||
+ val textColorSecondary = Utils.getColorAttrDefaultColor(context,
|
||||
+ android.R.attr.textColorSecondary)
|
||||
+ textColorPrimary = textColor
|
||||
+ if (iconManager != null) {
|
||||
+ iconManager.setTint(textColor)
|
||||
+ }
|
||||
+ clock.setTextColor(textColorPrimary)
|
||||
+ date.setTextColor(textColorPrimary)
|
||||
+ mShadeCarrierGroup.updateColors(textColorPrimary, colorStateList)
|
||||
+ batteryIcon.updateColors(textColorPrimary, textColorSecondary, textColorPrimary)
|
||||
+ }
|
||||
}
|
||||
|
||||
private fun updateQQSPaddings() {
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrier.java b/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrier.java
|
||||
index 8612cdf12c6e..5940677c4842 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrier.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrier.java
|
||||
@@ -152,6 +152,14 @@ public class ShadeCarrier extends LinearLayout {
|
||||
com.android.settingslib.R.string.not_default_data_content_description));
|
||||
}
|
||||
|
||||
+ public void updateColors(ColorStateList colorStateList) {
|
||||
+ final boolean visible = !mIsSingleCarrier;
|
||||
+ if (visible) {
|
||||
+ mMobileRoaming.setImageTintList(colorStateList);
|
||||
+ mMobileSignal.setImageTintList(colorStateList);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@VisibleForTesting
|
||||
View getRSSIView() {
|
||||
return mMobileGroup;
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrierGroup.java b/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrierGroup.java
|
||||
index 68561d1cfd0f..97964c38a92f 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrierGroup.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrierGroup.java
|
||||
@@ -18,8 +18,11 @@ package com.android.systemui.shade.carrier;
|
||||
|
||||
import android.annotation.StyleRes;
|
||||
import android.content.Context;
|
||||
+import android.content.res.ColorStateList;
|
||||
+import android.graphics.PorterDuff;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
+import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -58,6 +61,19 @@ public class ShadeCarrierGroup extends LinearLayout {
|
||||
return findViewById(R.id.shade_carrier_divider2);
|
||||
}
|
||||
|
||||
+ public void updateColors(int color, ColorStateList colorStateList) {
|
||||
+ getNoSimTextView().setTextColor(color);
|
||||
+ ShadeCarrier[] shadeCarriers = { getCarrier1View(), getCarrier2View(), getCarrier3View() };
|
||||
+ for (ShadeCarrier shadeCarrier : shadeCarriers) {
|
||||
+ for (int i = 0; i < shadeCarrier.getChildCount(); i++) {
|
||||
+ shadeCarrier.updateColors(colorStateList);
|
||||
+ if (shadeCarrier.getChildAt(i) instanceof TextView) {
|
||||
+ ((TextView) shadeCarrier.getChildAt(i)).setTextColor(color);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public void updateTextAppearance(@StyleRes int resId) {
|
||||
FontSizeUtils.updateFontSizeFromStyle(getNoSimTextView(), resId);
|
||||
getCarrier1View().updateTextAppearance(resId);
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 8fc39e71d3601ff02b1da15b8db234e4e8952045 Mon Sep 17 00:00:00 2001
|
||||
From: Adithya R <gh0strider.2k18.reborn@gmail.com>
|
||||
Date: Thu, 19 Jan 2023 14:37:43 +0530
|
||||
Subject: [PATCH 27/31] SystemUI: Remove visibility check in setting QSCarrier
|
||||
color
|
||||
|
||||
This fixes a corner case where the signal icon color is incorrect:
|
||||
Have dual sim -> switch to dark theme -> turn off one sim -> switch
|
||||
to light theme -> turn the other sim back on. QS carrier signal
|
||||
is colored white instead of black.
|
||||
|
||||
Ensure that the signal icon color is always up to date, by removing
|
||||
visibility check, to avoid this issue.
|
||||
|
||||
Fixes: 816b8ddf ("Follow light/dark theme in SplitShade Header")
|
||||
Change-Id: I092c06053fc4bc8d9ca51d1d31128da27ef6a823
|
||||
---
|
||||
.../com/android/systemui/shade/carrier/ShadeCarrier.java | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrier.java b/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrier.java
|
||||
index 5940677c4842..fef896579bbf 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrier.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/shade/carrier/ShadeCarrier.java
|
||||
@@ -153,11 +153,8 @@ public class ShadeCarrier extends LinearLayout {
|
||||
}
|
||||
|
||||
public void updateColors(ColorStateList colorStateList) {
|
||||
- final boolean visible = !mIsSingleCarrier;
|
||||
- if (visible) {
|
||||
- mMobileRoaming.setImageTintList(colorStateList);
|
||||
- mMobileSignal.setImageTintList(colorStateList);
|
||||
- }
|
||||
+ mMobileRoaming.setImageTintList(colorStateList);
|
||||
+ mMobileSignal.setImageTintList(colorStateList);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
From ee07d3b1026400a4aac3743d8fb6feff5242c5ac Mon Sep 17 00:00:00 2001
|
||||
From: DillerOFire <niktofe1@gmail.com>
|
||||
Date: Wed, 27 Jul 2022 15:28:16 +1000
|
||||
Subject: [PATCH 28/31] SystemUI: Switch notification background to monet on
|
||||
heads up
|
||||
|
||||
Change-Id: If1822acc3ea604444f2083d7fadec06ffb8eec19
|
||||
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
|
||||
---
|
||||
.../notification_material_bg_monet.xml | 26 +++++++++++++++++++
|
||||
.../row/ActivatableNotificationView.java | 9 ++++++-
|
||||
.../row/ExpandableNotificationRow.java | 3 +++
|
||||
3 files changed, 37 insertions(+), 1 deletion(-)
|
||||
create mode 100644 packages/SystemUI/res/drawable/notification_material_bg_monet.xml
|
||||
|
||||
diff --git a/packages/SystemUI/res/drawable/notification_material_bg_monet.xml b/packages/SystemUI/res/drawable/notification_material_bg_monet.xml
|
||||
new file mode 100644
|
||||
index 000000000000..61a8e8e9c6e1
|
||||
--- /dev/null
|
||||
+++ b/packages/SystemUI/res/drawable/notification_material_bg_monet.xml
|
||||
@@ -0,0 +1,26 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!--
|
||||
+ ~ Copyright (C) 2014 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
|
||||
+ -->
|
||||
+
|
||||
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||
+ android:color="?android:attr/colorControlHighlight">
|
||||
+ <item>
|
||||
+ <shape>
|
||||
+ <solid android:color="?androidprv:attr/colorSurface" />
|
||||
+ </shape>
|
||||
+ </item>
|
||||
+</ripple>
|
||||
\ No newline at end of file
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
|
||||
index 1b790fdc35c1..e958cbf452db 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
|
||||
@@ -168,7 +168,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
||||
* be useful in a configuration change.
|
||||
*/
|
||||
protected void initBackground() {
|
||||
- mBackgroundNormal.setCustomBackground(R.drawable.notification_material_bg);
|
||||
+ setTranslucentBackground(true);
|
||||
}
|
||||
|
||||
protected boolean hideBackground() {
|
||||
@@ -179,6 +179,13 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
||||
mBackgroundNormal.setVisibility(hideBackground() ? INVISIBLE : VISIBLE);
|
||||
}
|
||||
|
||||
+ public void setTranslucentBackground(boolean translucent) {
|
||||
+ if (translucent) {
|
||||
+ mBackgroundNormal.setCustomBackground(R.drawable.notification_material_bg);
|
||||
+ } else {
|
||||
+ mBackgroundNormal.setCustomBackground(R.drawable.notification_material_bg_monet);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
|
||||
index d92d11b18d74..ce9eac753550 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
|
||||
@@ -1047,6 +1047,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
if (intrinsicHeight != getIntrinsicHeight()) {
|
||||
notifyHeightChanged(false /* needsAnimation */);
|
||||
}
|
||||
+
|
||||
+ setTranslucentBackground(!pinned);
|
||||
+
|
||||
if (pinned) {
|
||||
setAnimationRunning(true);
|
||||
mExpandedWhenPinned = false;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 84c5455182edb1703ba9cb0c209eb66c636fec6b Mon Sep 17 00:00:00 2001
|
||||
From: Pulkit077 <pulkitagarwal2k1@gmail.com>
|
||||
Date: Fri, 16 Sep 2022 14:46:37 +0530
|
||||
Subject: [PATCH 29/31] SystemUI: Follow Dark/Light theme for Safe Mode dialog
|
||||
|
||||
Change-Id: Ia9864a45551e969abaccd351e8b6d65e21d99165
|
||||
Signed-off-by: Pulkit077 <pulkitagarwal2k1@gmail.com>
|
||||
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
|
||||
---
|
||||
.../java/com/android/server/power/ShutdownThread.java | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java
|
||||
index 3630ae26fbc2..98a37d0a8e96 100644
|
||||
--- a/services/core/java/com/android/server/power/ShutdownThread.java
|
||||
+++ b/services/core/java/com/android/server/power/ShutdownThread.java
|
||||
@@ -30,6 +30,7 @@ import android.content.IIntentReceiver;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManagerInternal;
|
||||
+import android.content.res.Configuration;
|
||||
import android.media.AudioAttributes;
|
||||
import android.os.Bundle;
|
||||
import android.os.FileUtils;
|
||||
@@ -185,6 +186,11 @@ public final class ShutdownThread extends Thread {
|
||||
? com.android.internal.R.string.shutdown_confirm_question
|
||||
: com.android.internal.R.string.shutdown_confirm);
|
||||
|
||||
+ boolean isNightMode = (context.getResources().getConfiguration().uiMode
|
||||
+ & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
|
||||
+ int themeResId = isNightMode ? android.R.style.Theme_DeviceDefault_Dialog_Alert :
|
||||
+ android.R.style.Theme_DeviceDefault_Light_Dialog_Alert;
|
||||
+
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Notifying thread to start shutdown longPressBehavior=" + longPressBehavior);
|
||||
}
|
||||
@@ -194,7 +200,7 @@ public final class ShutdownThread extends Thread {
|
||||
if (sConfirmDialog != null) {
|
||||
sConfirmDialog.dismiss();
|
||||
}
|
||||
- sConfirmDialog = new AlertDialog.Builder(context)
|
||||
+ sConfirmDialog = new AlertDialog.Builder(context, themeResId)
|
||||
.setTitle(mRebootSafeMode
|
||||
? com.android.internal.R.string.reboot_safemode_title
|
||||
: com.android.internal.R.string.power_off)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From a4b5ee62c8b2e49ce188631cb9155cef5c2dd143 Mon Sep 17 00:00:00 2001
|
||||
From: minaripenguin <minaripenguin@users.noreply.github.com>
|
||||
Date: Fri, 24 Mar 2023 13:04:06 +0800
|
||||
Subject: [PATCH 30/31] SystemUI: Follow monet theme on privacy indicators
|
||||
|
||||
Change-Id: Ib713cb3283fcf3a49086c5da8360d2a1b6cd6704
|
||||
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
|
||||
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
|
||||
---
|
||||
packages/SystemUI/res/values/colors.xml | 2 +-
|
||||
.../src/com/android/systemui/privacy/OngoingPrivacyChip.kt | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
|
||||
index b494973b319f..d65f5d66c5e4 100644
|
||||
--- a/packages/SystemUI/res/values/colors.xml
|
||||
+++ b/packages/SystemUI/res/values/colors.xml
|
||||
@@ -217,7 +217,7 @@
|
||||
<color name="screenrecord_status_color">#E94235</color>
|
||||
<color name="screenrecord_icon_color">#D93025</color><!-- red 600 -->
|
||||
|
||||
- <color name="privacy_chip_background">#3ddc84</color>
|
||||
+ <color name="privacy_chip_background">?android:attr/colorAccent</color>
|
||||
|
||||
<!-- Accessibility floating menu -->
|
||||
<color name="accessibility_floating_menu_background">#CCFFFFFF</color> <!-- 80% -->
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
index 310d23407d5d..957fc8faad2c 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
@@ -123,7 +123,7 @@ class OngoingPrivacyChip @JvmOverloads constructor(
|
||||
iconSize = context.resources
|
||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_size)
|
||||
iconColor =
|
||||
- Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.colorPrimary)
|
||||
+ Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimaryInverse)
|
||||
|
||||
val height = context.resources
|
||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_height)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From c84b629202ee60515734b3798e5914cda8a6424b Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 10 Jan 2024 23:36:41 +0800
|
||||
Subject: [PATCH 31/31] SystemUI: Follow monet theme on battery chip
|
||||
|
||||
Why does this chip even exist...
|
||||
|
||||
Change-Id: I178fdda5d8d310c4c7fa5f05f9911b3f94986cb9
|
||||
---
|
||||
packages/SystemUI/res/drawable/statusbar_chip_bg.xml | 8 +++-----
|
||||
.../com/android/systemui/statusbar/BatteryStatusChip.kt | 4 ++--
|
||||
2 files changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/drawable/statusbar_chip_bg.xml b/packages/SystemUI/res/drawable/statusbar_chip_bg.xml
|
||||
index d7de16d7c5bb..dd1db04e77d7 100644
|
||||
--- a/packages/SystemUI/res/drawable/statusbar_chip_bg.xml
|
||||
+++ b/packages/SystemUI/res/drawable/statusbar_chip_bg.xml
|
||||
@@ -15,9 +15,7 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
-<shape
|
||||
- xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
- <solid android:color="?androidprv:attr/colorAccentPrimary" />
|
||||
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <solid android:color="@color/privacy_chip_background" />
|
||||
<corners android:radius="@dimen/ongoing_appops_chip_bg_corner_radius" />
|
||||
-</shape>
|
||||
\ No newline at end of file
|
||||
+</shape>
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt b/packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt
|
||||
index 520976746785..e22a599ed80e 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt
|
||||
@@ -64,9 +64,9 @@ class BatteryStatusChip @JvmOverloads constructor(context: Context, attrs: Attri
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
private fun updateResources() {
|
||||
val primaryColor =
|
||||
- Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.colorPrimary)
|
||||
+ Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimaryInverse)
|
||||
val textColorSecondary =
|
||||
- Utils.getColorAttrDefaultColor(mContext, android.R.attr.textColorSecondary)
|
||||
+ Utils.getColorAttrDefaultColor(mContext, android.R.attr.textColorSecondaryInverse)
|
||||
batteryMeterView.updateColors(primaryColor, textColorSecondary, primaryColor)
|
||||
roundedContainer.background = mContext.getDrawable(R.drawable.statusbar_chip_bg)
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user