Initial unified commit for Android 14, with "light" GSI target
This commit is contained in:
commit
ea765d3ff5
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/patches_treble_personal/vendor_hardware_overlay
|
27
patches_platform/build_make/0001-build-Remove-llkd.patch
Normal file
27
patches_platform/build_make/0001-build-Remove-llkd.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 89f1eee05a62af665555ff9dc6852e320140fbf1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 14 Oct 2021 12:20:52 +0000
|
||||||
|
Subject: [PATCH] build: Remove llkd
|
||||||
|
|
||||||
|
...until someone figures out why Genshin Impact fails it
|
||||||
|
|
||||||
|
Change-Id: I29384a820a0c07b29d3f11d7039bed40eeaee926
|
||||||
|
---
|
||||||
|
target/product/base_system.mk | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
|
||||||
|
index ba239a2a4a..b201f15177 100644
|
||||||
|
--- a/target/product/base_system.mk
|
||||||
|
+++ b/target/product/base_system.mk
|
||||||
|
@@ -208,7 +208,6 @@ PRODUCT_PACKAGES += \
|
||||||
|
libvulkan \
|
||||||
|
libwilhelm \
|
||||||
|
linker \
|
||||||
|
- llkd \
|
||||||
|
lmkd \
|
||||||
|
LocalTransport \
|
||||||
|
locksettings \
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -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
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 95ef97f5aa82c15e47f9313eca4899d89dba5dd0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 4 Jul 2018 17:59:14 +0800
|
||||||
|
Subject: [PATCH] sdk: Invert per-app stretch-to-fullscreen implementation
|
||||||
|
|
||||||
|
Change-Id: Idf7dab4e1e0c79953fa672f33ec65fecffb37c83
|
||||||
|
---
|
||||||
|
sdk/src/java/org/lineageos/internal/applications/LongScreen.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sdk/src/java/org/lineageos/internal/applications/LongScreen.java b/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
|
||||||
|
index 7fe0d68..26ea349 100644
|
||||||
|
--- a/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
|
||||||
|
+++ b/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
|
||||||
|
@@ -57,7 +57,7 @@ public class LongScreen {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldForceLongScreen(String packageName) {
|
||||||
|
- return isSupported() && mApps.contains(packageName);
|
||||||
|
+ return isSupported() && !(mApps.contains(packageName));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getApps() {
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
@ -0,0 +1,105 @@
|
|||||||
|
From 3dda22bc6cad9da7d937218f157fe762dafb5d7d Mon Sep 17 00:00:00 2001
|
||||||
|
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 13 Jan 2019 21:44:48 +0800
|
||||||
|
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
|
||||||
|
|
||||||
|
Change-Id: Icb02c8dfd84882f736e37d6cd92c35e5eb288faa
|
||||||
|
---
|
||||||
|
res/layout/long_screen_layout.xml | 2 +-
|
||||||
|
res/values-zh-rCN/strings.xml | 6 +++---
|
||||||
|
res/values/strings.xml | 6 +++---
|
||||||
|
res/xml/long_screen_prefs.xml | 2 +-
|
||||||
|
res/xml/parts_catalog.xml | 4 ++--
|
||||||
|
.../lineageparts/applications/LongScreenSettings.java | 2 +-
|
||||||
|
6 files changed, 11 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/res/layout/long_screen_layout.xml b/res/layout/long_screen_layout.xml
|
||||||
|
index 3252c10..ed4efd9 100644
|
||||||
|
--- a/res/layout/long_screen_layout.xml
|
||||||
|
+++ b/res/layout/long_screen_layout.xml
|
||||||
|
@@ -25,7 +25,7 @@
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
- android:text="@string/long_screen_settings_no_apps"
|
||||||
|
+ android:text="@string/inverse_long_screen_settings_no_apps"
|
||||||
|
android:textSize="18dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
|
||||||
|
index 9823209..a15a439 100644
|
||||||
|
--- a/res/values-zh-rCN/strings.xml
|
||||||
|
+++ b/res/values-zh-rCN/strings.xml
|
||||||
|
@@ -456,9 +456,9 @@
|
||||||
|
<string name="display_rotation_90_title">90 度</string>
|
||||||
|
<string name="display_rotation_180_title">180 度</string>
|
||||||
|
<string name="display_rotation_270_title">270 度</string>
|
||||||
|
- <string name="long_screen_settings_title">全屏应用</string>
|
||||||
|
- <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
|
||||||
|
- <string name="long_screen_settings_no_apps">无应用</string>
|
||||||
|
+ <string name="inverse_long_screen_settings_title">禁用拉伸全屏</string>
|
||||||
|
+ <string name="inverse_long_screen_settings_summary">对选定的应用禁用拉伸全屏</string>
|
||||||
|
+ <string name="inverse_long_screen_settings_no_apps">无应用</string>
|
||||||
|
<string name="charging_sounds_settings_title">充电提示音</string>
|
||||||
|
<string name="charging_sounds_enable_title">启用充电提示音</string>
|
||||||
|
<string name="charging_sounds_summary">连接或断开电源时发出声音</string>
|
||||||
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
|
index 0358a7e..5996a8f 100644
|
||||||
|
--- a/res/values/strings.xml
|
||||||
|
+++ b/res/values/strings.xml
|
||||||
|
@@ -579,9 +579,9 @@
|
||||||
|
<string name="display_rotation_270_title">270 degrees</string>
|
||||||
|
|
||||||
|
<!-- Applications: Long screen -->
|
||||||
|
- <string name="long_screen_settings_title">Full screen apps</string>
|
||||||
|
- <string name="long_screen_settings_summary">Force legacy apps to use full screen aspect ratio</string>
|
||||||
|
- <string name="long_screen_settings_no_apps">No apps</string>
|
||||||
|
+ <string name="inverse_long_screen_settings_title">Disable stretch-to-fullscreen</string>
|
||||||
|
+ <string name="inverse_long_screen_settings_summary">Prevent selected apps from utilizing stretch-to-fullscreen</string>
|
||||||
|
+ <string name="inverse_long_screen_settings_no_apps">No apps</string>
|
||||||
|
|
||||||
|
<!-- Sounds: Charging sounds -->
|
||||||
|
<string name="charging_sounds_settings_title">Charging sounds</string>
|
||||||
|
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
|
||||||
|
index 9a4f7bb..ece52c9 100644
|
||||||
|
--- a/res/xml/long_screen_prefs.xml
|
||||||
|
+++ b/res/xml/long_screen_prefs.xml
|
||||||
|
@@ -6,6 +6,6 @@
|
||||||
|
<PreferenceScreen
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="long_screen_settings"
|
||||||
|
- android:title="@string/long_screen_settings_title">
|
||||||
|
+ android:title="@string/inverse_long_screen_settings_title">
|
||||||
|
|
||||||
|
</PreferenceScreen>
|
||||||
|
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
|
||||||
|
index d6b19c0..6e65a31 100644
|
||||||
|
--- a/res/xml/parts_catalog.xml
|
||||||
|
+++ b/res/xml/parts_catalog.xml
|
||||||
|
@@ -75,8 +75,8 @@
|
||||||
|
lineage:xmlRes="@xml/power_menu_settings" />
|
||||||
|
|
||||||
|
<part android:key="long_screen_settings"
|
||||||
|
- android:title="@string/long_screen_settings_title"
|
||||||
|
- android:summary="@string/long_screen_settings_summary"
|
||||||
|
+ android:title="@string/inverse_long_screen_settings_title"
|
||||||
|
+ android:summary="@string/inverse_long_screen_settings_summary"
|
||||||
|
android:fragment="org.lineageos.lineageparts.applications.LongScreenSettings"
|
||||||
|
lineage:xmlRes="@xml/long_screen_prefs" />
|
||||||
|
|
||||||
|
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
|
index 7155e12..4b89260 100644
|
||||||
|
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
|
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
|
@@ -222,7 +222,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
|
||||||
|
mApplicationsState.ensureIcon(entry);
|
||||||
|
holder.icon.setImageDrawable(entry.icon);
|
||||||
|
holder.state.setTag(entry);
|
||||||
|
- holder.state.setChecked(mLongScreen.shouldForceLongScreen(entry.info.packageName));
|
||||||
|
+ holder.state.setChecked(!(mLongScreen.shouldForceLongScreen(entry.info.packageName)));
|
||||||
|
return holder.rootView;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,232 @@
|
|||||||
|
From b98a354d5dd11302672f2feed6eff815e8927342 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Keith <javelinanddart@gmail.com>
|
||||||
|
Date: Tue, 30 Oct 2018 15:46:18 +0100
|
||||||
|
Subject: [PATCH 1/2] Messaging: Add "Mark as read" quick action for message
|
||||||
|
notifications
|
||||||
|
|
||||||
|
Change-Id: I7194dca022e5062926fa35709de282721ca64320
|
||||||
|
---
|
||||||
|
res/drawable/ic_wear_read.xml | 9 +++++++++
|
||||||
|
res/values-zh-rCN/cm_strings.xml | 1 +
|
||||||
|
res/values/cm_strings.xml | 3 +++
|
||||||
|
.../messaging/datamodel/BugleNotifications.java | 14 ++++++++++++++
|
||||||
|
.../datamodel/MessageNotificationState.java | 8 ++++++++
|
||||||
|
.../messaging/datamodel/NotificationState.java | 12 +++++++++++-
|
||||||
|
.../messaging/receiver/NotificationReceiver.java | 12 +++++++++++-
|
||||||
|
src/com/android/messaging/ui/UIIntents.java | 11 +++++++++++
|
||||||
|
src/com/android/messaging/ui/UIIntentsImpl.java | 14 ++++++++++++++
|
||||||
|
9 files changed, 82 insertions(+), 2 deletions(-)
|
||||||
|
create mode 100644 res/drawable/ic_wear_read.xml
|
||||||
|
|
||||||
|
diff --git a/res/drawable/ic_wear_read.xml b/res/drawable/ic_wear_read.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..9d017e6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/res/drawable/ic_wear_read.xml
|
||||||
|
@@ -0,0 +1,9 @@
|
||||||
|
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
+ android:height="24dp"
|
||||||
|
+ android:width="24dp"
|
||||||
|
+ android:viewportWidth="24"
|
||||||
|
+ android:viewportHeight="24">
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="#ffffff"
|
||||||
|
+ android:pathData="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z" />
|
||||||
|
+</vector>
|
||||||
|
diff --git a/res/values-zh-rCN/cm_strings.xml b/res/values-zh-rCN/cm_strings.xml
|
||||||
|
index 074c13f..988d9f4 100644
|
||||||
|
--- a/res/values-zh-rCN/cm_strings.xml
|
||||||
|
+++ b/res/values-zh-rCN/cm_strings.xml
|
||||||
|
@@ -18,4 +18,5 @@
|
||||||
|
<string name="swipe_to_delete_conversation_pref_title">滑动删除邮件</string>
|
||||||
|
<string name="swipe_to_delete_conversation_pref_summary">向右滑动以删除会话</string>
|
||||||
|
<string name="notification_channel_messages_title">短信</string>
|
||||||
|
+ <string name="notification_mark_as_read">标记为已读</string>
|
||||||
|
</resources>
|
||||||
|
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
||||||
|
index 9f2382c..743cb8b 100644
|
||||||
|
--- a/res/values/cm_strings.xml
|
||||||
|
+++ b/res/values/cm_strings.xml
|
||||||
|
@@ -21,4 +21,7 @@
|
||||||
|
|
||||||
|
<!-- Notification channel -->
|
||||||
|
<string name="notification_channel_messages_title">Messages</string>
|
||||||
|
+
|
||||||
|
+ <!-- Mark message as read -->
|
||||||
|
+ <string name="notification_mark_as_read">Mark as read</string>
|
||||||
|
</resources>
|
||||||
|
diff --git a/src/com/android/messaging/datamodel/BugleNotifications.java b/src/com/android/messaging/datamodel/BugleNotifications.java
|
||||||
|
index 6df9e88..dbe86ff 100644
|
||||||
|
--- a/src/com/android/messaging/datamodel/BugleNotifications.java
|
||||||
|
+++ b/src/com/android/messaging/datamodel/BugleNotifications.java
|
||||||
|
@@ -789,6 +789,7 @@ public class BugleNotifications {
|
||||||
|
(MultiMessageNotificationState) notificationState);
|
||||||
|
addDownloadMmsAction(notifBuilder, wearableExtender, notificationState);
|
||||||
|
addWearableVoiceReplyAction(notifBuilder, wearableExtender, notificationState);
|
||||||
|
+ addReadAction(notifBuilder, wearableExtender, notificationState);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply the wearable options and build & post the notification
|
||||||
|
@@ -876,6 +877,19 @@ public class BugleNotifications {
|
||||||
|
wearableExtender.addAction(wearActionBuilder.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private static void addReadAction(final NotificationCompat.Builder notifBuilder,
|
||||||
|
+ final WearableExtender wearableExtender, final NotificationState notificationState) {
|
||||||
|
+ final Context context = Factory.get().getApplicationContext();
|
||||||
|
+ final PendingIntent readPendingIntent = notificationState.getReadIntent();
|
||||||
|
+ final NotificationCompat.Action.Builder readActionBuilder =
|
||||||
|
+ new NotificationCompat.Action.Builder(R.drawable.ic_wear_read,
|
||||||
|
+ context.getString(R.string.notification_mark_as_read), readPendingIntent);
|
||||||
|
+ notifBuilder.addAction(readActionBuilder.build());
|
||||||
|
+
|
||||||
|
+ // Support the action on a wearable device as well
|
||||||
|
+ wearableExtender.addAction(readActionBuilder.build());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
private static void addDownloadMmsAction(final NotificationCompat.Builder notifBuilder,
|
||||||
|
final WearableExtender wearableExtender, final NotificationState notificationState) {
|
||||||
|
if (!(notificationState instanceof MultiMessageNotificationState)) {
|
||||||
|
diff --git a/src/com/android/messaging/datamodel/MessageNotificationState.java b/src/com/android/messaging/datamodel/MessageNotificationState.java
|
||||||
|
index fd82f74..b49774f 100644
|
||||||
|
--- a/src/com/android/messaging/datamodel/MessageNotificationState.java
|
||||||
|
+++ b/src/com/android/messaging/datamodel/MessageNotificationState.java
|
||||||
|
@@ -335,6 +335,14 @@ public abstract class MessageNotificationState extends NotificationState {
|
||||||
|
getClearIntentRequestCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
+ @Override
|
||||||
|
+ public PendingIntent getReadIntent() {
|
||||||
|
+ return UIIntents.get().getPendingIntentForMarkingAsRead(
|
||||||
|
+ Factory.get().getApplicationContext(),
|
||||||
|
+ mConversationIds,
|
||||||
|
+ getReadIntentRequestCode());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Notification for multiple messages in at least 2 different conversations.
|
||||||
|
*/
|
||||||
|
diff --git a/src/com/android/messaging/datamodel/NotificationState.java b/src/com/android/messaging/datamodel/NotificationState.java
|
||||||
|
index 144f0fe..4c11537 100644
|
||||||
|
--- a/src/com/android/messaging/datamodel/NotificationState.java
|
||||||
|
+++ b/src/com/android/messaging/datamodel/NotificationState.java
|
||||||
|
@@ -43,7 +43,8 @@ import java.util.HashSet;
|
||||||
|
public abstract class NotificationState {
|
||||||
|
private static final int CONTENT_INTENT_REQUEST_CODE_OFFSET = 0;
|
||||||
|
private static final int CLEAR_INTENT_REQUEST_CODE_OFFSET = 1;
|
||||||
|
- private static final int NUM_REQUEST_CODES_NEEDED = 2;
|
||||||
|
+ private static final int READ_INTENT_REQUEST_CODE_OFFSET = 2;
|
||||||
|
+ private static final int NUM_REQUEST_CODES_NEEDED = 3;
|
||||||
|
|
||||||
|
public interface FailedMessageQuery {
|
||||||
|
static final String FAILED_MESSAGES_WHERE_CLAUSE =
|
||||||
|
@@ -78,6 +79,11 @@ public abstract class NotificationState {
|
||||||
|
*/
|
||||||
|
public abstract PendingIntent getClearIntent();
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * The intent to be triggered when mark as read is pressed.
|
||||||
|
+ */
|
||||||
|
+ public abstract PendingIntent getReadIntent();
|
||||||
|
+
|
||||||
|
protected Uri getAttachmentUri() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
@@ -116,6 +122,10 @@ public abstract class NotificationState {
|
||||||
|
return mBaseRequestCode + CLEAR_INTENT_REQUEST_CODE_OFFSET;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public int getReadIntentRequestCode() {
|
||||||
|
+ return mBaseRequestCode + READ_INTENT_REQUEST_CODE_OFFSET;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Gets the appropriate icon needed for notifications.
|
||||||
|
*/
|
||||||
|
diff --git a/src/com/android/messaging/receiver/NotificationReceiver.java b/src/com/android/messaging/receiver/NotificationReceiver.java
|
||||||
|
index bbb847d..f87779c 100644
|
||||||
|
--- a/src/com/android/messaging/receiver/NotificationReceiver.java
|
||||||
|
+++ b/src/com/android/messaging/receiver/NotificationReceiver.java
|
||||||
|
@@ -20,6 +20,7 @@ import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
|
||||||
|
import com.android.messaging.datamodel.BugleNotifications;
|
||||||
|
+import com.android.messaging.datamodel.action.MarkAsReadAction;
|
||||||
|
import com.android.messaging.datamodel.action.MarkAsSeenAction;
|
||||||
|
import com.android.messaging.ui.UIIntents;
|
||||||
|
import com.android.messaging.util.ConversationIdSet;
|
||||||
|
@@ -52,6 +53,15 @@ public class NotificationReceiver extends BroadcastReceiver {
|
||||||
|
BugleNotifications.resetLastMessageDing(conversationId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ } else if (intent.getAction().equals(UIIntents.ACTION_MARK_AS_READ)) {
|
||||||
|
+ final String conversationIdSetString =
|
||||||
|
+ intent.getStringExtra(UIIntents.UI_INTENT_EXTRA_CONVERSATION_ID_SET);
|
||||||
|
+ if (conversationIdSetString != null) {
|
||||||
|
+ for (final String conversationId :
|
||||||
|
+ ConversationIdSet.createSet(conversationIdSetString)) {
|
||||||
|
+ MarkAsReadAction.markAsRead(conversationId);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-}
|
||||||
|
\ No newline at end of file
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/messaging/ui/UIIntents.java b/src/com/android/messaging/ui/UIIntents.java
|
||||||
|
index 2d10527..144e831 100644
|
||||||
|
--- a/src/com/android/messaging/ui/UIIntents.java
|
||||||
|
+++ b/src/com/android/messaging/ui/UIIntents.java
|
||||||
|
@@ -69,6 +69,9 @@ public abstract class UIIntents {
|
||||||
|
public static final String ACTION_RESET_NOTIFICATIONS =
|
||||||
|
"com.android.messaging.reset_notifications";
|
||||||
|
|
||||||
|
+ public static final String ACTION_MARK_AS_READ =
|
||||||
|
+ "com.android.messaging.mark_as_read";
|
||||||
|
+
|
||||||
|
// Sending VCard uri to VCard detail activity
|
||||||
|
public static final String UI_INTENT_EXTRA_VCARD_URI = "vcard_uri";
|
||||||
|
|
||||||
|
@@ -323,6 +326,14 @@ public abstract class UIIntents {
|
||||||
|
final int updateTargets, final ConversationIdSet conversationIdSet,
|
||||||
|
final int requestCode);
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * Get a PendingIntent for marking a conversation as read.
|
||||||
|
+ *
|
||||||
|
+ * <p>This is intended to be used by notifications.
|
||||||
|
+ */
|
||||||
|
+ public abstract PendingIntent getPendingIntentForMarkingAsRead(final Context context,
|
||||||
|
+ final ConversationIdSet conversationIdSet, final int requestCode);
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Get a PendingIntent for showing low storage notifications.
|
||||||
|
*/
|
||||||
|
diff --git a/src/com/android/messaging/ui/UIIntentsImpl.java b/src/com/android/messaging/ui/UIIntentsImpl.java
|
||||||
|
index d64082d..9281899 100644
|
||||||
|
--- a/src/com/android/messaging/ui/UIIntentsImpl.java
|
||||||
|
+++ b/src/com/android/messaging/ui/UIIntentsImpl.java
|
||||||
|
@@ -430,6 +430,20 @@ public class UIIntentsImpl extends UIIntents {
|
||||||
|
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ @Override
|
||||||
|
+ public PendingIntent getPendingIntentForMarkingAsRead(final Context context,
|
||||||
|
+ final ConversationIdSet conversationIdSet, final int requestCode) {
|
||||||
|
+ final Intent intent = new Intent(context, NotificationReceiver.class);
|
||||||
|
+ intent.setAction(ACTION_MARK_AS_READ);
|
||||||
|
+ if (conversationIdSet != null) {
|
||||||
|
+ intent.putExtra(UI_INTENT_EXTRA_CONVERSATION_ID_SET,
|
||||||
|
+ conversationIdSet.getDelimitedString());
|
||||||
|
+ }
|
||||||
|
+ return PendingIntent.getBroadcast(context,
|
||||||
|
+ requestCode, intent,
|
||||||
|
+ PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Gets a PendingIntent associated with an Intent to start an Activity. All notifications
|
||||||
|
* that starts an Activity must use this method to get a PendingIntent, which achieves two
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,143 @@
|
|||||||
|
From a544ce840f27fbf140b43652e76f6cc6c8b5b00e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Luca Stefani <luca.stefani.ge1@gmail.com>
|
||||||
|
Date: Sat, 28 Mar 2020 15:10:57 +0100
|
||||||
|
Subject: [PATCH 2/2] Properly set conversation as read
|
||||||
|
|
||||||
|
* We were currently set the whole conversation set as read
|
||||||
|
-> Get only the matching notification instead
|
||||||
|
|
||||||
|
Test: m, manual
|
||||||
|
Change-Id: I468e0d50f82129a029fb1f27bb9fa4fec45f2945
|
||||||
|
---
|
||||||
|
.../messaging/datamodel/BugleNotifications.java | 16 +++++++++++++++-
|
||||||
|
.../datamodel/MessageNotificationState.java | 8 --------
|
||||||
|
.../messaging/datamodel/NotificationState.java | 5 -----
|
||||||
|
.../messaging/receiver/NotificationReceiver.java | 11 ++++-------
|
||||||
|
src/com/android/messaging/ui/UIIntents.java | 2 +-
|
||||||
|
src/com/android/messaging/ui/UIIntentsImpl.java | 7 +++----
|
||||||
|
6 files changed, 23 insertions(+), 26 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/com/android/messaging/datamodel/BugleNotifications.java b/src/com/android/messaging/datamodel/BugleNotifications.java
|
||||||
|
index dbe86ff..c9c6fca 100644
|
||||||
|
--- a/src/com/android/messaging/datamodel/BugleNotifications.java
|
||||||
|
+++ b/src/com/android/messaging/datamodel/BugleNotifications.java
|
||||||
|
@@ -879,11 +879,25 @@ public class BugleNotifications {
|
||||||
|
|
||||||
|
private static void addReadAction(final NotificationCompat.Builder notifBuilder,
|
||||||
|
final WearableExtender wearableExtender, final NotificationState notificationState) {
|
||||||
|
+ if (!(notificationState instanceof MultiMessageNotificationState)) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ final MultiMessageNotificationState multiMessageNotificationState =
|
||||||
|
+ (MultiMessageNotificationState) notificationState;
|
||||||
|
final Context context = Factory.get().getApplicationContext();
|
||||||
|
- final PendingIntent readPendingIntent = notificationState.getReadIntent();
|
||||||
|
+
|
||||||
|
+ final String conversationId = notificationState.mConversationIds.first();
|
||||||
|
+
|
||||||
|
+ final int requestCode = multiMessageNotificationState.getReadIntentRequestCode();
|
||||||
|
+ final PendingIntent readPendingIntent = UIIntents.get().getPendingIntentForMarkingAsRead(
|
||||||
|
+ Factory.get().getApplicationContext(),
|
||||||
|
+ conversationId,
|
||||||
|
+ requestCode);
|
||||||
|
+
|
||||||
|
final NotificationCompat.Action.Builder readActionBuilder =
|
||||||
|
new NotificationCompat.Action.Builder(R.drawable.ic_wear_read,
|
||||||
|
context.getString(R.string.notification_mark_as_read), readPendingIntent);
|
||||||
|
+
|
||||||
|
notifBuilder.addAction(readActionBuilder.build());
|
||||||
|
|
||||||
|
// Support the action on a wearable device as well
|
||||||
|
diff --git a/src/com/android/messaging/datamodel/MessageNotificationState.java b/src/com/android/messaging/datamodel/MessageNotificationState.java
|
||||||
|
index b49774f..fd82f74 100644
|
||||||
|
--- a/src/com/android/messaging/datamodel/MessageNotificationState.java
|
||||||
|
+++ b/src/com/android/messaging/datamodel/MessageNotificationState.java
|
||||||
|
@@ -335,14 +335,6 @@ public abstract class MessageNotificationState extends NotificationState {
|
||||||
|
getClearIntentRequestCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
- @Override
|
||||||
|
- public PendingIntent getReadIntent() {
|
||||||
|
- return UIIntents.get().getPendingIntentForMarkingAsRead(
|
||||||
|
- Factory.get().getApplicationContext(),
|
||||||
|
- mConversationIds,
|
||||||
|
- getReadIntentRequestCode());
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* Notification for multiple messages in at least 2 different conversations.
|
||||||
|
*/
|
||||||
|
diff --git a/src/com/android/messaging/datamodel/NotificationState.java b/src/com/android/messaging/datamodel/NotificationState.java
|
||||||
|
index 4c11537..780cb8e 100644
|
||||||
|
--- a/src/com/android/messaging/datamodel/NotificationState.java
|
||||||
|
+++ b/src/com/android/messaging/datamodel/NotificationState.java
|
||||||
|
@@ -79,11 +79,6 @@ public abstract class NotificationState {
|
||||||
|
*/
|
||||||
|
public abstract PendingIntent getClearIntent();
|
||||||
|
|
||||||
|
- /**
|
||||||
|
- * The intent to be triggered when mark as read is pressed.
|
||||||
|
- */
|
||||||
|
- public abstract PendingIntent getReadIntent();
|
||||||
|
-
|
||||||
|
protected Uri getAttachmentUri() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
diff --git a/src/com/android/messaging/receiver/NotificationReceiver.java b/src/com/android/messaging/receiver/NotificationReceiver.java
|
||||||
|
index f87779c..ae30f03 100644
|
||||||
|
--- a/src/com/android/messaging/receiver/NotificationReceiver.java
|
||||||
|
+++ b/src/com/android/messaging/receiver/NotificationReceiver.java
|
||||||
|
@@ -54,13 +54,10 @@ public class NotificationReceiver extends BroadcastReceiver {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (intent.getAction().equals(UIIntents.ACTION_MARK_AS_READ)) {
|
||||||
|
- final String conversationIdSetString =
|
||||||
|
- intent.getStringExtra(UIIntents.UI_INTENT_EXTRA_CONVERSATION_ID_SET);
|
||||||
|
- if (conversationIdSetString != null) {
|
||||||
|
- for (final String conversationId :
|
||||||
|
- ConversationIdSet.createSet(conversationIdSetString)) {
|
||||||
|
- MarkAsReadAction.markAsRead(conversationId);
|
||||||
|
- }
|
||||||
|
+ final String conversationId =
|
||||||
|
+ intent.getStringExtra(UIIntents.UI_INTENT_EXTRA_CONVERSATION_ID);
|
||||||
|
+ if (conversationId != null) {
|
||||||
|
+ MarkAsReadAction.markAsRead(conversationId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/com/android/messaging/ui/UIIntents.java b/src/com/android/messaging/ui/UIIntents.java
|
||||||
|
index 144e831..ab81cab 100644
|
||||||
|
--- a/src/com/android/messaging/ui/UIIntents.java
|
||||||
|
+++ b/src/com/android/messaging/ui/UIIntents.java
|
||||||
|
@@ -332,7 +332,7 @@ public abstract class UIIntents {
|
||||||
|
* <p>This is intended to be used by notifications.
|
||||||
|
*/
|
||||||
|
public abstract PendingIntent getPendingIntentForMarkingAsRead(final Context context,
|
||||||
|
- final ConversationIdSet conversationIdSet, final int requestCode);
|
||||||
|
+ final String conversationId, final int requestCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a PendingIntent for showing low storage notifications.
|
||||||
|
diff --git a/src/com/android/messaging/ui/UIIntentsImpl.java b/src/com/android/messaging/ui/UIIntentsImpl.java
|
||||||
|
index 9281899..858072d 100644
|
||||||
|
--- a/src/com/android/messaging/ui/UIIntentsImpl.java
|
||||||
|
+++ b/src/com/android/messaging/ui/UIIntentsImpl.java
|
||||||
|
@@ -432,12 +432,11 @@ public class UIIntentsImpl extends UIIntents {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PendingIntent getPendingIntentForMarkingAsRead(final Context context,
|
||||||
|
- final ConversationIdSet conversationIdSet, final int requestCode) {
|
||||||
|
+ final String conversationId, final int requestCode) {
|
||||||
|
final Intent intent = new Intent(context, NotificationReceiver.class);
|
||||||
|
intent.setAction(ACTION_MARK_AS_READ);
|
||||||
|
- if (conversationIdSet != null) {
|
||||||
|
- intent.putExtra(UI_INTENT_EXTRA_CONVERSATION_ID_SET,
|
||||||
|
- conversationIdSet.getDelimitedString());
|
||||||
|
+ if (conversationId != null) {
|
||||||
|
+ intent.putExtra(UI_INTENT_EXTRA_CONVERSATION_ID, conversationId);
|
||||||
|
}
|
||||||
|
return PendingIntent.getBroadcast(context,
|
||||||
|
requestCode, intent,
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From 80d66b7f255176e7cf761ce9c62c436cb729df71 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 5 Sep 2019 02:08:22 +0000
|
||||||
|
Subject: [PATCH 1/2] vendor_lineage: Log privapp-permissions whitelist
|
||||||
|
violations instead
|
||||||
|
|
||||||
|
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
|
||||||
|
---
|
||||||
|
config/common.mk | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config/common.mk b/config/common.mk
|
||||||
|
index 7048c9cb..9dc5c710 100644
|
||||||
|
--- a/config/common.mk
|
||||||
|
+++ b/config/common.mk
|
||||||
|
@@ -74,9 +74,9 @@ PRODUCT_COPY_FILES += \
|
||||||
|
PRODUCT_COPY_FILES += \
|
||||||
|
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/org.lineageos.android.xml
|
||||||
|
|
||||||
|
-# Enforce privapp-permissions whitelist
|
||||||
|
+# Log privapp-permissions whitelist violations
|
||||||
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||||
|
- ro.control_privapp_permissions=enforce
|
||||||
|
+ ro.control_privapp_permissions=log
|
||||||
|
|
||||||
|
ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
|
||||||
|
# Lineage SDK
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,34 @@
|
|||||||
|
From 9218670153d5aa40fd05f51d89240fc7859293a2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 14 Mar 2022 03:44:59 +0000
|
||||||
|
Subject: [PATCH 2/2] Revert "overlay: Default to night mode"
|
||||||
|
|
||||||
|
This reverts commit 4d4e39a845d54e37b20728f1448ae6e3fde4b97d.
|
||||||
|
|
||||||
|
Change-Id: I036bdd576e536392cf41e3c536d5ca2eb04e5a0f
|
||||||
|
---
|
||||||
|
.../common/frameworks/base/core/res/res/values/config.xml | 8 --------
|
||||||
|
1 file changed, 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/overlay/common/frameworks/base/core/res/res/values/config.xml b/overlay/common/frameworks/base/core/res/res/values/config.xml
|
||||||
|
index 94687fe1..579b98f7 100644
|
||||||
|
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
|
||||||
|
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
|
||||||
|
@@ -146,14 +146,6 @@
|
||||||
|
<!-- Whether this device is supporting the camera toggle -->
|
||||||
|
<bool name="config_supportsCamToggle">true</bool>
|
||||||
|
|
||||||
|
- <!-- Control the default night mode to use when there is no other mode override set.
|
||||||
|
- One of the following values (see UiModeManager.java):
|
||||||
|
- 0 - MODE_NIGHT_AUTO
|
||||||
|
- 1 - MODE_NIGHT_NO
|
||||||
|
- 2 - MODE_NIGHT_YES
|
||||||
|
- -->
|
||||||
|
- <integer name="config_defaultNightMode">2</integer>
|
||||||
|
-
|
||||||
|
<!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
|
||||||
|
in hardware. -->
|
||||||
|
<bool name="config_setColorTransformAccelerated">true</bool>
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,46 @@
|
|||||||
|
From 2a644e6a7d3dbdea344fc24408c86e0676811333 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 20 Jun 2021 09:08:43 +0000
|
||||||
|
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2)
|
||||||
|
|
||||||
|
Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61
|
||||||
|
---
|
||||||
|
tools/buildinfo.sh | 9 +++++++--
|
||||||
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
|
||||||
|
index 4c82ec9edc..c01872c369 100755
|
||||||
|
--- a/tools/buildinfo.sh
|
||||||
|
+++ b/tools/buildinfo.sh
|
||||||
|
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then
|
||||||
|
else
|
||||||
|
echo "ro.build.id=$BUILD_ID"
|
||||||
|
fi
|
||||||
|
-echo "ro.build.display.id=$BUILD_DISPLAY_ID"
|
||||||
|
+echo "ro.build.display.id=$BUILD_ID"
|
||||||
|
echo "ro.build.version.incremental=$BUILD_NUMBER"
|
||||||
|
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
|
||||||
|
echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
|
||||||
|
@@ -23,7 +23,7 @@ echo "ro.build.version.release_or_preview_display=$PLATFORM_DISPLAY_VERSION"
|
||||||
|
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
|
||||||
|
echo "ro.build.version.base_os=$PLATFORM_BASE_OS"
|
||||||
|
echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION"
|
||||||
|
-echo "ro.build.date=`$DATE`"
|
||||||
|
+echo "ro.build.date=`$DATE +\"%B %-d, %Y\"`"
|
||||||
|
echo "ro.build.date.utc=`$DATE +%s`"
|
||||||
|
echo "ro.build.type=$TARGET_BUILD_TYPE"
|
||||||
|
echo "ro.build.user=$BUILD_USERNAME"
|
||||||
|
@@ -55,5 +55,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "ro.lineage.device=$LINEAGE_DEVICE"
|
||||||
|
+echo "ro.lineage.version=LineageOS 21 Self-built CGMod"
|
||||||
|
+echo "ro.lineage.display.version=LineageOS 21 Self-built CGMod"
|
||||||
|
+echo "ro.modversion=LineageOS 21 Self-built CGMod"
|
||||||
|
+
|
||||||
|
+echo "lockscreen.rot_override=true"
|
||||||
|
|
||||||
|
echo "# end build properties"
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
From 614df52d701e164b0da9586209e4a45e404df52b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 16 Oct 2021 00:39:15 +0000
|
||||||
|
Subject: [PATCH 2/2] build: Remove Stk (1/2)
|
||||||
|
|
||||||
|
Change-Id: I24ef17c74c3137a11b463cde96c74d0edc853edd
|
||||||
|
---
|
||||||
|
target/product/generic_system.mk | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
|
||||||
|
index 98d6046854..da9adc3af5 100644
|
||||||
|
--- a/target/product/generic_system.mk
|
||||||
|
+++ b/target/product/generic_system.mk
|
||||||
|
@@ -33,7 +33,6 @@ PRODUCT_PACKAGES += \
|
||||||
|
LiveWallpapersPicker \
|
||||||
|
PartnerBookmarksProvider \
|
||||||
|
preinstalled-packages-platform-generic-system.xml \
|
||||||
|
- Stk \
|
||||||
|
Tag \
|
||||||
|
|
||||||
|
# OTA support
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
From a72755422c5a5a8ddd6bb4ca94cd98672f25b30b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 18 Jun 2023 19:33:27 +0800
|
||||||
|
Subject: [PATCH 01/21] Add keylayout for Backbone One for Android, with AB/XY
|
||||||
|
keys swapped
|
||||||
|
|
||||||
|
Change-Id: Ia057c084099015b544c926cd57c37b4ac314867a
|
||||||
|
---
|
||||||
|
data/keyboards/Vendor_358a_Product_0201.kl | 31 ++++++++++++++++++++++
|
||||||
|
1 file changed, 31 insertions(+)
|
||||||
|
create mode 100644 data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
|
||||||
|
diff --git a/data/keyboards/Vendor_358a_Product_0201.kl b/data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..e15907f9c6f2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
@@ -0,0 +1,31 @@
|
||||||
|
+#
|
||||||
|
+# Backbone One for Android
|
||||||
|
+#
|
||||||
|
+
|
||||||
|
+# AB/XY swapped
|
||||||
|
+key 305 BUTTON_A
|
||||||
|
+key 304 BUTTON_B
|
||||||
|
+key 308 BUTTON_X
|
||||||
|
+key 307 BUTTON_Y
|
||||||
|
+
|
||||||
|
+key 310 BUTTON_L1
|
||||||
|
+key 311 BUTTON_R1
|
||||||
|
+key 312 BUTTON_L2
|
||||||
|
+key 313 BUTTON_R2
|
||||||
|
+
|
||||||
|
+key 317 BUTTON_THUMBL
|
||||||
|
+key 318 BUTTON_THUMBR
|
||||||
|
+
|
||||||
|
+axis 0x00 X flat 4096
|
||||||
|
+axis 0x01 Y flat 4096
|
||||||
|
+axis 0x02 Z flat 4096
|
||||||
|
+axis 0x05 RZ flat 4096
|
||||||
|
+
|
||||||
|
+axis 0x0a LTRIGGER
|
||||||
|
+axis 0x09 RTRIGGER
|
||||||
|
+
|
||||||
|
+axis 0x10 HAT_X
|
||||||
|
+axis 0x11 HAT_Y
|
||||||
|
+
|
||||||
|
+key 315 BUTTON_START
|
||||||
|
+key 314 BUTTON_SELECT
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,389 @@
|
|||||||
|
From 9e9d9ca5a1497cee04b47825e37dbded5fb90bab Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 20 Jun 2021 03:39:32 +0000
|
||||||
|
Subject: [PATCH 02/21] Add MiuiNavbarOverlay
|
||||||
|
|
||||||
|
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
|
||||||
|
---
|
||||||
|
packages/overlays/Android.mk | 1 +
|
||||||
|
.../overlays/MiuiNavbarOverlay/Android.bp | 28 ++++++++++++++++++
|
||||||
|
.../MiuiNavbarOverlay/AndroidManifest.xml | 22 ++++++++++++++
|
||||||
|
.../res/drawable-440dpi-v4/ic_sysbar_back.png | Bin 0 -> 2756 bytes
|
||||||
|
.../ic_sysbar_back_darkmode.png | Bin 0 -> 2547 bytes
|
||||||
|
.../drawable-440dpi-v4/ic_sysbar_docked.png | Bin 0 -> 3642 bytes
|
||||||
|
.../ic_sysbar_docked_darkmode.png | Bin 0 -> 2810 bytes
|
||||||
|
.../res/drawable-440dpi-v4/ic_sysbar_home.png | Bin 0 -> 1362 bytes
|
||||||
|
.../ic_sysbar_home_darkmode.png | Bin 0 -> 980 bytes
|
||||||
|
.../drawable-440dpi-v4/ic_sysbar_recent.png | Bin 0 -> 278 bytes
|
||||||
|
.../ic_sysbar_recent_darkmode.png | Bin 0 -> 205 bytes
|
||||||
|
11 files changed, 51 insertions(+)
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/Android.bp
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back_darkmode.png
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked.png
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked_darkmode.png
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home.png
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home_darkmode.png
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent.png
|
||||||
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
|
||||||
|
|
||||||
|
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
|
||||||
|
index a41d0e57cd21..8f2090ed807a 100644
|
||||||
|
--- a/packages/overlays/Android.mk
|
||||||
|
+++ b/packages/overlays/Android.mk
|
||||||
|
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \
|
||||||
|
DisplayCutoutEmulationTallOverlay \
|
||||||
|
DisplayCutoutEmulationWaterfallOverlay \
|
||||||
|
FontNotoSerifSourceOverlay \
|
||||||
|
+ MiuiNavbarOverlay \
|
||||||
|
NavigationBarMode3ButtonOverlay \
|
||||||
|
NavigationBarModeGesturalOverlay \
|
||||||
|
NavigationBarModeGesturalOverlayNarrowBack \
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/Android.bp b/packages/overlays/MiuiNavbarOverlay/Android.bp
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..fc724fb7a686
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/packages/overlays/MiuiNavbarOverlay/Android.bp
|
||||||
|
@@ -0,0 +1,28 @@
|
||||||
|
+//
|
||||||
|
+// Copyright 2021, The Android Open Source Project
|
||||||
|
+//
|
||||||
|
+// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
+// you may not use this file except in compliance with the License.
|
||||||
|
+// You may obtain a copy of the License at
|
||||||
|
+//
|
||||||
|
+// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
+//
|
||||||
|
+// Unless required by applicable law or agreed to in writing, software
|
||||||
|
+// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
+// See the License for the specific language governing permissions and
|
||||||
|
+// limitations under the License.
|
||||||
|
+//
|
||||||
|
+package {
|
||||||
|
+ // See: http://go/android-license-faq
|
||||||
|
+ // A large-scale-change added 'default_applicable_licenses' to import
|
||||||
|
+ // all of the 'license_kinds' from "frameworks_base_license"
|
||||||
|
+ // to get the below license kinds:
|
||||||
|
+ // SPDX-license-identifier-Apache-2.0
|
||||||
|
+ default_applicable_licenses: ["frameworks_base_license"],
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+runtime_resource_overlay {
|
||||||
|
+ name: "MiuiNavbarOverlay",
|
||||||
|
+ product_specific: true,
|
||||||
|
+}
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml b/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..3f10e2e03675
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+<!--
|
||||||
|
+ ~ Copyright (C) 2021 The Android Open Source Project
|
||||||
|
+ ~
|
||||||
|
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
+ ~ you may not use this file except in compliance with the License.
|
||||||
|
+ ~ You may obtain a copy of the License at
|
||||||
|
+ ~
|
||||||
|
+ ~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
+ ~
|
||||||
|
+ ~ Unless required by applicable law or agreed to in writing, software
|
||||||
|
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
+ ~ See the License for the specific language governing permissions and
|
||||||
|
+ ~ limitations under the License.
|
||||||
|
+ -->
|
||||||
|
+
|
||||||
|
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
+ package="com.miui.systemui.navbar.overlay"
|
||||||
|
+ android:versionCode="1"
|
||||||
|
+ android:versionName="1.0">
|
||||||
|
+ <overlay android:targetPackage="com.android.systemui" android:priority="1337" android:isStatic="true"/>
|
||||||
|
+</manifest>
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..be2b145b4c698679bfdfdc3e5834ad12a56724c0
|
||||||
|
GIT binary patch
|
||||||
|
literal 2756
|
||||||
|
zcmcgu3s4hx8V?1-3OZnL5L?tGprz_2n-D@036KXu)CfXOJj=t)?k3rRWWy$qfRADd
|
||||||
|
zhu~RzrHmZ`k!wBAa-g0-rC<@UbSw%?@2-FjLbWI3sc4FiE8=+@UZak6oX*Yd%<lg8
|
||||||
|
z|Nnj8_xql+C5ap3=6k*A#b7YztKyYO^xNUO0Ve${b@zQjzvi0be`{edy!~9a8{=SQ
|
||||||
|
z0E02-I-%KO-J;$gK}jPA!ALF6u^Y`an!$*Swwn<&6Ssm|Tu+#!?7J;(Y>>dD?38dd
|
||||||
|
ztTrof0}-E3;mP?MHE4b&D#qB+QDCH9LMt%hRs^&gvrHC=UCN%+E1}n}Z7v&}gjh4B
|
||||||
|
zY?;d-xJ8`^Do6?k!#P3-<q7y;gqXt<!eYK)HOPl~5nMQe%L{{Go&*+3!o=Y8#ip%M
|
||||||
|
zm`;+UTsv)x{*tl{R;yXU<=SjEjxCHsQhF{=EEaQNK9|pjXar=*Gg%QkWU>U$Xi(x7
|
||||||
|
zlp@Slf;53Hjfj@au}axA(<v8>=2^8S%XFCNfN|}JnaktAE|(^O7&?nH=TKRb#xazO
|
||||||
|
zXW>TNWVO&(-YnK^Ag!duK>mX2+2iL7(4keUXKlQci_ti1!eWihrQMhg$V<@{O`aL&
|
||||||
|
zCgBz`heGk#T$*OE%Nw&qLE(s%q%<U%HIt~s8OoqS;Yy4M3{4?S7-_S-^Nb9xM69@!
|
||||||
|
z&4>9g1PdUZSi=)Z;4q0mv<jvd@Dx-{VuUX5c_<&&z+wr^e-1~N42D>dS0gc0q9Z9I
|
||||||
|
zLVHUX5k1Z|oAhjOHii-fnMG2xNt##Kv->KAB9S6>L>7HuNs5z$s#t}PCl(4JK8H6+
|
||||||
|
zRIQe%OcpC*LUEN+%BCa3AqY&Oi@?J$Ow5Nc1V$i!xIhPKg(wU~XoZ+CLZFL41n7*s
|
||||||
|
zl0<V{`Ja);Xn7tSCgcf3;dFTT0*D_WKq0M&r-igAj_`Ftfmj4%Gx7-(LH8e$^{e%`
|
||||||
|
zy3$oRl6b;Gr!;T6Z<6us=~Wg1PS%P9L0vr{Wuva-<1~Y*ZQ>;ncs&oM<ZT9=R{DyH
|
||||||
|
zn1WeIoz;d=xJ*w+>vf8b`%C;SNbalIzh3@c#{R`3{gu?GBa0dklOCsMDwpkYhU=O>
|
||||||
|
zQ+eUOn6k;UXC~DQoF0F!<?P(0KV~O4ZlYCF^j!XUap^q<!=qTGlxgghcLpzI2I7Hd
|
||||||
|
zop&1=Rb{C=O13WFv&cEW&Z{wW;e<Q&?MZ<+BoVl;U0-vbb#Cc)|K)p_8jp83c{$Qs
|
||||||
|
zf#$i|iq9(c4X9IU6PsEtnf9^*eRi@sPh4r$f7vp`odAP8ZY+*k++U>^ZVLS7lRN7l
|
||||||
|
zGj9J74={mtxg3rG{8<h+`H2sG=lME{3bz&bt`6~VFWeRs6aad7&uwP}ZTX)=m&8A2
|
||||||
|
z<bEDn+B8vnHu!AKy$90a>eHA0^M}}$j0Nn&!DSa(^KN}#w`^tkw+ViJesRq{pPnhb
|
||||||
|
zetNmiJ2qydzrX+F*1FBVSA4B?vU;l?=0D88{Gim=ZOI}|s)%}cdtiN9T3S#2#PE$v
|
||||||
|
z718cb|70_~Q{Hs`<9eWKq`PVjExG8r^3<tQ%iQ<7J^n7e=TLQ9gAX_dsM2>==4BGZ
|
||||||
|
zu@9BzC*uzicE4Tlr0%{ayKp?GGHU1ezBRVdAIpHh4&2tewg0R3&kcRSg@f;(a14JD
|
||||||
|
z;%IJe?&)Lu%KdusfwggQ`!y@ee+~z}x_$Fz9tFJ-BydIo?Z=XjrXSa=w5UAB#>O(j
|
||||||
|
z<zV58Lu-NG6&Ghf2f7AA97RP%U4w&z2~#JMC6U?J&UgKj%FCVaAir0*&`d!05%AN`
|
||||||
|
z6Xp9r+EfCo{X*H>87s@zrIZ0)Md!+|UcGuW!Vv?gBUb@TCNq6?`MS0h3s!SDyZZY2
|
||||||
|
z9$j3!0H`VP6!i`bJ>79kGrqiJxO3lIL!|$1--Gso`c%#%ge8lre(JpULr0I%U$#bW
|
||||||
|
zIM%X1JMeD8uC~_J3ERS0V`Dqkbp*=xJPvp=Jv}o*4|M%4v)=2iT}OILNAQjj?j84j
|
||||||
|
z8PGd?=6!k1y*oPIXJ?iMW%;}j^G$DW@2Z@u>WTcYfbY`x`!@Nw9Y!(i$HsL>eu|!V
|
||||||
|
zYcRuC?!BRE^Qh>?M*&oGYR8%n<c8fu;-D00P960={75z_mFq8Ob;wx?VMSd_P%NO1
|
||||||
|
zy7hNM^|g?aouxE-ASTDg>A84uN0N`?@~s8uMrC^ny2nO(+S2Marz|s+To)apFUHaY
|
||||||
|
zZTxnryk82`26T3Ie(;;xe+-oc)TgyP+{BualgDfAM>p3#ImztsJp1Xt3)YWyuh?7A
|
||||||
|
z?Q}YAnT?mLRr8XQlkd7$5y#_z?e55&j+zZCEEA)HE$`LEg!=D2Ky(yuOO7sB81xtI
|
||||||
|
zX}j~9^U4=wM%vb`2P-Nocld}taaHOcjg{w%KR515?39hZm&k0m>4`VY^SF`@H7YJN
|
||||||
|
h9r{0Z;ER1d?z2;NqUud$cCPC`Qx&^WSufw__%Gd*;i3Ql
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back_darkmode.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back_darkmode.png
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..4873f84ff7f4750fa3adc70428ffb123502c1051
|
||||||
|
GIT binary patch
|
||||||
|
literal 2547
|
||||||
|
zcmb_eeQeZZ81J!-O&ofY7;XsC6~zzi_3L(9o89Ji-N!}lm~(+4Q|z_9t?aJ7wPkn1
|
||||||
|
zfy<Q1N5sVaL5?ZINzkZ#i3x{-Y|2E!v6)~*5ZF)|2|5SPgf9`_?&AVxDjF|o`}Xbc
|
||||||
|
z`8~hq<9%|gOFhMtCrz6KLC|DZ30nr9O~#cn5!}}#n6HD!9l?@?8U)=r#kfq+hSx0+
|
||||||
|
zl=PESUZGdG=Q6w!uyTUp6|Lbw5TGF_Codf2_!?1%y<(LlJCMPT_am?*IFJRIZrmMo
|
||||||
|
ziq%rdGF5zPnWvmzR>RW*l9vnTgc(2(5Ood?2mG?egdNB*F9X)bHip2%5WU8M<Qop*
|
||||||
|
z3U?{&R8$epwAxXgu#s>UZ6)kDP1+uVNu0>S@GOj=P@G_JJ44a%=nnzjRKdrTu|=c4
|
||||||
|
zz?%c9*7YERVWCjS8ltR<T7?lbO=CETkt7Nbs8%oQTo{$LSz`>WsPU>4)FnlR4MxtZ
|
||||||
|
zEY%$dP&yJqAQ-2Wwb3+zgkfPWh!IxY2x%B7@Nrylsp=ngF7TM>7XzZKYXD2cvB7FZ
|
||||||
|
zSF~#7FR0_6Z*c%p>vqR|jH@LOh`Z4A!a5MfXhOzCYvuJp5i1ilWvR-Gg>^vYEF+pA
|
||||||
|
z<5WdXSJZMv@sAa%bWAerbQ*=ph96!a$$}En9=XXzWI0`QAS6!WC~iXux}3;naEh^I
|
||||||
|
z&%wb0AA!0RLGsn#3MKJ!oMv#6!HHX-plbw9=l&5a@QhDU100B13UE~-7L=<HIG#zy
|
||||||
|
zsrVHYI0ovdoA+H#XQ`_ABtQ6|l@%Aju0p4spzU^)v=YN|-EPJuYdR<MqKkDPAU{?~
|
||||||
|
z5*Q!n&BA${LP-(NMrofd3-x+QaO3TnbS6)6w2d6IXBB>_(FJ4nf?>~lMcU3$XeKX^
|
||||||
|
zC{5YCD2-?0C_&PkS0rsbne7|1pQlRT6mtIm%wwEQqkWhXNdtwgA3Z%!iM69EzXT6=
|
||||||
|
z48!rpNpK*%(E_4?jBZQgW#G0V7@-YSi-7cR`eFp8DLy^KsbYQ=$ky$&9`;xIHLmU-
|
||||||
|
z)ZbS9##28|tNuszqsir~Ik`#%!xck}crarOjg$uabJd2w-88bs;9w3K%lH5WFYysB
|
||||||
|
z%79u01Ns?xr3r!(wz}B-^6={er+U|J(JTiqUYb=r=?+)j*+%v?w(NOt*UUFdHlyw5
|
||||||
|
zewov1Kk?#Ly5gAsp5x!BkN<A+KDn+0K~`^eKX8v{`o-)h)=(Ad^0W*NeA2sp*Ojk4
|
||||||
|
z$L0?1Ydf)g%fk2P&)M9vZ04p~Jkiv=$(u4EHNVT8XlYuLk%A}Q>oh-?@@O;MVJ=V2
|
||||||
|
zZ_Ied(gZn6iT@dxz2}l?QDA3<|9p?wU)Pu3XY1=ft6n)i|8!<uZdzmP<ix$ElTc+s
|
||||||
|
z&X<?kZ=C+g`9*BVf<$*jde7^gtX+3yP(4Y{CR>;EFHfs|=cwyc%>Gg==jDv1wXO9i
|
||||||
|
za{teI*@9iE0OJeO(an)d#Rr^kc+Sgp8Md^_6WwXGFTCAS#LdqT`WJT8bcjb9py>9V
|
||||||
|
z!taSzGdVQ34-eK;c_x;P{l0rsHv(uA!uLkoBW)9Ywl{VD0E8S(N1`7@?w$~u*1350
|
||||||
|
zjDo_TCHiipEvYWOv#4eAn@Bi4`cdR=Q^?Y}b9Q=xZ{wuBiIv~RdI<KyqPF)w5A1x}
|
||||||
|
z{Udhp>eZ`{bj;~k=UZ`q^g(3B_1$e%OM2J8Kz2R!scbL0fIMXBobD!GdTald#UE8(
|
||||||
|
z%%i%@UpIy}ys9K^?2aAT$BVOPPc2}7OFfyg_uJTRQ}Qck2Hn=g##NVBpE*@Dm^n1i
|
||||||
|
z(ein)p(WJ>BP)beXRiBBC*{bg2RHarptOq#pB+Ase57IO4mtHcH)B|BJag#6lT>d)
|
||||||
|
z&e!MKYd16)pcy-+T#iQ8NA~PL>UxV>Ywqi@Y)j6S`k$w?tzd_2HABdEi<&LDf&OGl
|
||||||
|
zTMQD)&(DC^16irql!1BVKzD548=h$^kFSKxX^W`?7wW0OL$Ts(m0$Hf=7d(Q+HUb)
|
||||||
|
zZja176mx*WEKzSvUf!OU*cv&PpiG!*8*(2$`^!o+r{-7RHTJTToo?Eeu+BEr?K!7Y
|
||||||
|
z*9^Z;G+Rzj%oUn%d}G_QeqvzVy#Kj5|3$lBneo8k53^T$kGYM%Wv)UGyRG24rau72
|
||||||
|
C-gtlj
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked.png
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..1c88fc5d571d0ec91b735082cb9c512603b9ceec
|
||||||
|
GIT binary patch
|
||||||
|
literal 3642
|
||||||
|
zcmd5<c|4T)AAgXLtU?sZ>`;z1=4ec27}t!mFecWOW6V65n4>u|Nyt(m{I-K4RF+T?
|
||||||
|
zD;v2IE9>Y`v5jG4)vknAtz6k>N?yCa-~O)sYv(o3Jm2U0eSbg4`}_WUW+sK=?xeCt
|
||||||
|
zdkp{pDlX1sDs)ejUW%)s&s4c}i_lGp>+Ht|0A+RQB?IJ~+Xw*ix=b%$fv?*x0-eJ$
|
||||||
|
zqcJ$4pqYrph0p+CWh3I!=#iiR77B(l*+lr{%_caE$sodg%-v9KToM?;bdKSHyJOtF
|
||||||
|
z=rNIWJOgfH4YLvvAOkE=K!b@`QEWazM1;S$OMu4GX(Sx>9wLY&!tJCEVZLq@7>UCJ
|
||||||
|
zVdiEy1RagVz;@ux&^QzxgEfU=Q0N^<)D9$iI|79!pm2okc-Zm_4te7-!U$Bd<FYU4
|
||||||
|
zi3pDn2)G0!GCDfiEPA^chZl}S<MDVT3WLO85D)^vKfo5yL<lxt|Dy#m$fxs|Tmh5A
|
||||||
|
zhDj~bLODVK5e`NAAq5t9#Vnh@OcO*HQbgk-(Pk)VO7DRT`U;LK<VC%A&Y&Z~D3ArR
|
||||||
|
z1$+pLUcquBI06nog7a@ouPpz;0Yt5v+lr4rjfKTpalscj?1$1=Cge}ie6Iss5J?63
|
||||||
|
z93hVmI_!tS)R$(%C6IU^O~B!KaX3*Q4~p_JWEhDgJs1m^kq?v2;6(F{f42uD(*z(9
|
||||||
|
zjzM8i2ox59#(QBf1aor&8v7Z_f`CGOfVy!Q%&-Ih3f)dXLvP$4ppa@9Gy(0uf*Eu|
|
||||||
|
z7>CEAK{+#7v~Uo~WrxFID@+ndoG1<tatuYc{rB@OBoc+k31db<3w)}RJ<P>{ghS(T
|
||||||
|
zI0VKF{XSebH-ZbBFQBpMpbMD@hxjpLG8u$WIxRE|2Z9JRnt?{(vDi=qEewl6phC?-
|
||||||
|
z9NIh-1%hE8_meqvp;QGQ_cQ*_{T@6fRE4ytzidZZn^O4@oSA&+U=J);&u(zv@+gW4
|
||||||
|
zd#@M*jV`SOBAhOj0LXwZPc#2A10T#rM}Uyg|DcNxFg_<t5KZHOcHt0P|BLjHQ2a<~
|
||||||
|
z*?vd``OjItU;AB&e}qGQLpoe(SkS{t%LCa^pW{Idtrjhl4*-g-E@V3|(Ycp-tO$+S
|
||||||
|
z&FxK=+vlxrqVESZoEf;j@ym6`TKrmdN42#hk`pIQVr1+tAak^g?MGujO?qpO{vqvD
|
||||||
|
zHRYZ@)@0Cf=sFkqkax9h%U4c?&Y?!xhLT5C<2_vy<2|I{u6V)m>NPj(CVp9L&g@tS
|
||||||
|
z-yi+VrXX+DW}!c6PoMm!)CSdrdOgZ2*#!7H83!0(B)k6a@^F|sDOZw3F?#K~J^@wF
|
||||||
|
z-woWEO3H4<*{t)OyK%TkFGEo$LH;~E3%OXB=D5_PrGm5vf)gHIkL-&ZkVqCw%gXXP
|
||||||
|
z7(6GeHtRHqU;oL`lc^UCNEiOG3aBz|H*lc>&HK)!vc%hf8|9IHS>9K?O#F+e#yQ2a
|
||||||
|
z4^hXj6f>93=I1vGhg(w)0$33hTO(s#{sJdZv<HSqMn(!od9?>8#BF|lezimlrb^HD
|
||||||
|
z3UjP-P=WGBNkn#Za#B50JUjlTuM+oDU84mS`%rG5&mo`Z^EL1v>(UQ}D<4QtLMSUM
|
||||||
|
z_gNAMahe04n`QTX{r&hib>+y&oSHo*ryuVuI^k)mseHnqR!2uiUR=WhC>jnfmwL-a
|
||||||
|
zEG{rGXH&`W4w2Ph&aQ1@Z||4=jfdvr96V3lnkmT5y;*l~W+GVb&W;%3V@c~?xdaS>
|
||||||
|
z5YsFSG@MEnhJ}SSj!#Yw$(>iR)wWf$)g63kwFU-<o3;dJrXEroHfI6>3JMA{J$LU8
|
||||||
|
ztsUH8+KHK)o3maGdvtS4S$TVmo~;V`n535fe8(;2*Hce#>j2iaES=jlz%nZ<i>+W2
|
||||||
|
z$>aT^1)PfMBVE70c0|#YkT>z#CrWG<STA}dn_w=I)cbqNT#Fg`Hhub5%Vx{{f{RKq
|
||||||
|
z!QHULugb>U<3XYD&8^YSY%NNFQmn}(_q;iuO5fOLTGiFnvB$QRv>&mN0o*T8d|&za
|
||||||
|
z2L#OM5@V`2bDjriTgShP^|0D9G^VAoCRw*$=F*YkP2_7h98Pm#gM+79_}%<PL;_;U
|
||||||
|
zaYJOX?0F%VJCznf!{sh+87!fbdNtq!4F_k;Wc6bu5=nuFheyGSmoFC;Z9hxUs1It+
|
||||||
|
zeZ4WUVfBWfiVLiekdT@2@$pFlbX;Tc87%Q=X=!PEp%OVFXJ1lLQBlPcu~;EdoZ2@0
|
||||||
|
zbrf!1)vZ@kIk_d3nWIxzuBF>vDGcm0Iqljuv?I^`@(F|Ftu80pEbL7*(~8tn$d2BR
|
||||||
|
zGBIbn44-m+RT`HHoif=1p>T1Hu2V_8BAiaAE4cOUi5^;igmz`Es_IP3&BBKbTguYw
|
||||||
|
z^lTp){;*zlUBQ_%KLrN{E>673t|ahk2PF6J-<ONHSbHQ)gtb~yALLsLr=N8fL__Ru
|
||||||
|
zRZGbr!z+o}>1<Dpt)IG3_jsN%0`64lo;ENZZ|biym25ao^UI=%YnbBwm3z#zT#Fv`
|
||||||
|
zQcGWB3+^Jjy1HWd3vXXF$r-^=^ZiqA`lk%1_F5;dsz}ybzf-B=nSMy`gS*73eX^Y)
|
||||||
|
zD7_1Z`_EC-$ZFz+B9D99qI=_VgC{#5_WQ)CcN?@!x1Q?g==g$2Bo-9+{@mkhT7%F`
|
||||||
|
zW2KSd#(r5NRi;iG99)2)Onr;Ojl0|{O*;j;mm;8`a-P-EHhQeR?RzdacV7JT_R*!a
|
||||||
|
zllLi(Un_b}I=Wt855qw!hh=w47UNYK{IAv3%}H8Y$u{-hcTsjfq&KLZA5))FRD}rC
|
||||||
|
zK2rJ1T&J(juHHR*Iy#n$6$t7~ObIThsParcWO<}K@MgxUZ@f)5Aac9oE;FCZ9HB9G
|
||||||
|
z7Ev1^Iu`7<w(m2UjSZTfQ9XM5DFahF_l4{Ii0ZAUT@RI%?RDCA62I;o9Y`1*9j%C-
|
||||||
|
z7?|A&ykHmlFdE#h-~i{NpKN{t`ekie__n8~C(ay&x|gn%Vr&w$B`mJ@$5R>!j|T?_
|
||||||
|
z_1rx?mTpN-0sN;e$<|mqYkP_6`PJ~GilBxV3!_^tEiHXOO<_$sZBuj2{LJK%@ms%d
|
||||||
|
z*b;&~?DI)!3bY3<Jq(PVymE1I@t|X9s!GV>KrNr11#XI??cAxXzI#ypD=(8bhnuLT
|
||||||
|
zngw}ye%R{4W{<0t<-tvj^))rW-a|SUQFrY+;K7BeC*QERb>!96Y_q^8%IHmA^iwAd
|
||||||
|
zJ@(gJzb>4Y&nZS6PBEU8e>~Ejsg)@2l%b24tN7A)=Ozu{>LrhYclKGM&riC|#=c_}
|
||||||
|
zwKW8cNt{dV=$>OQUd%%Z)9*i)TTsx1x3IXO)%<zAb9g+I{KooQaGSh_t4&SucOji+
|
||||||
|
zPZS4zaV9zHZ4jyVxPDhp&%4IUmtRc(fa|P!ZRnA|u)DX~A+Rqyt!>!9cF$vBAkz87
|
||||||
|
zkI$wLbXS=w0}Q{c0DpgK#z@leD-l#+TSF`RHNCyXCp#Dix1F3dP)mtYYFru~9u6j0
|
||||||
|
zT4pAWD85lWjDfmy;fuM8^BE|&>9aR<ux)ojA>PN-MRrjP24m^F@4jQrjEbYXJ4Sgk
|
||||||
|
z-?q2gkkq@)v7Lo7BJ_MoP%UrNY5v!j^C@LzHqHiWXCtt62;EQGZ$G_OX5?z6vBtQ$
|
||||||
|
zv%@%J#J7f(4M1JEy~?zKTKZEBOQ)Dw{&U?s-`?tE1=TIF{PF(ErbLKVt)-Ep7>)Y3
|
||||||
|
zmB;;;C`Ss;J@85~Rzb>^s&u0=Z1)0xudnCjUkeLb#35AXG~LEX`tQ!g!JS-gACmYR
|
||||||
|
D=8d64
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked_darkmode.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked_darkmode.png
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..fe51e11921ecb35c5535e7c446769af7f66be893
|
||||||
|
GIT binary patch
|
||||||
|
literal 2810
|
||||||
|
zcmcIm3se(V8jh_}EK8-jfcRpFisopZKuAUc4GBuXuz*;Bl4?jMA>=V}5=f#b5>wH&
|
||||||
|
zNOz?^0L5da^%X&CG(sC#P&iP~WhtQrr3fM-rHFt=DYz3}$L@Bwk8?Wb+_`t|{qFa_
|
||||||
|
z|1$?7BQ`j{x#&#{2II^LWk;j4-aZ^1(Dz?ocNs&cxysNu6$az9z&>VSa`P8rFmskj
|
||||||
|
zVq(>?+>M|BmJ|3wI1wUf<w_Kd!2|?pm3)B|QUi&QSfXHH2g=H^fJDf^Zt>%ixJnk3
|
||||||
|
zBnjPtK$~_%#0Yjs1#}@cC=dwHf+&F;Qu6_=T&7TgS_XE47ev?gZ6X$!fT*PmEYmI!
|
||||||
|
zh~-8CEEs_RKLQmmAp24Pe>#CoCDAFqYXJ(0>`x^56Ujb!5*Z{>K_5CW^<YtHh)@JZ
|
||||||
|
zv)50_LcbW;B(+)z5{Vj(hM@5wz=)Vgrqk&}5`{>i;86r#rBkT+TD(HFe42p`sRW2b
|
||||||
|
zsg}SBz|P1|gj3WEEUM|G33BBOtwJ^BCe&d>Eni6_6G(QGCV)c03{IJX$R>mf1w=>&
|
||||||
|
z$svVWg<{DwSY;BdhE+-M|Dc{Z{)qt8wOsCujGxs-E}s#hQir6XW=uKcXVIz{of0BO
|
||||||
|
zLn=505kMiSsG7^|)+j+10`b)_5(C4s=|DwJs|>JM_Q249)mtPAA*@m1UbzFY`D%!P
|
||||||
|
zrI08jJjoYNrpHhypr0Q|_FY4wfh5u-lnV<bBHe#OeLyk=B>VgXie`<Fujc<ESSSER
|
||||||
|
zFe2xpHcRAuF+@}<#8_a)lOPM0!3ZiC)z0VDeGZEiiNGR>3_VaqZwLlBAuKAHPNm{0
|
||||||
|
z1oDKsTrS8_sMLIg0OGJ2SkylRi9`sBXk?nNfF{5T{i$TU(AO8j(?nD{o=Q)INCJ^R
|
||||||
|
z**8%%eV+{rQtVkUeP8$+@BamnpjF71{caw6ZQ9cZ43((R!0M)|XA`u2Y9*5Z6Bz^Y
|
||||||
|
z1@=l{U<LLRfP~noZOQNUz$C3E2|`K#PhL#IRIo^`;Uf@JjC$+Wq#hB~pJ*@JNmGdb
|
||||||
|
zY30P(D<wV+NBf3-In%JvkC~PSDbPNLpbgCy>ah>)lLii(8Kcebzsuc!V$0GuI>awl
|
||||||
|
zKKQ(mz4v(ayJf{4l_4t~-GU<TTtDl?GrKVT^|zvu@hjKN-ORof>8>}smVR9r8}m<W
|
||||||
|
zh&#{G^<3);?tT+Dw<xTy#!Ty>z@Ih*BLgSu?>&<}_;O%Z&v;M!^X~kild63eWir`*
|
||||||
|
zGgOwo$4p=0m@(U{bhg(=0Q)E~d%oe}e8W3>7oOfF)a7)z%WHFk)pLUZ=6(XxafM^!
|
||||||
|
z%0C9IY)gHK87eL*K^nT^`^L1GfodMj!1yM6m)W$nbg^c*tL1TW(75}hj*rJjmfY$r
|
||||||
|
zvTeq7XE*Iw{$tOoHLNcVEHlLSeQEOwyj+1Sws}~h!|369Wm9ZiT$Ge|b6~rc0~J(V
|
||||||
|
zj;?$Dc3_oP>AoM<wJ+4W4~FMgI+^!eFyARCH@qC~YAe3xInY#^b&c=(EXi0uUMv0X
|
||||||
|
z;D*60o#jA3g?+HtVzHbbD-rMgz&T*wg2J3FMWb0SGvoVarMYj-&9~_HN~O}GhEJ+f
|
||||||
|
z7ZrxsK5B5O=qk+F&=Yqm2bs0?lF71k-qWU?O3#zW#m0V8U4K_&?cnCLof)R94ziRC
|
||||||
|
z(-F}PAb=O9(?xv{hD)zJUVBc1KX0XE%{Me1?i!UEHH7n#<sl3TeWderGQMdwljcWn
|
||||||
|
z&)nb^E0tbTz2FwL^4EK;4K&`x)jNDRuQ{H0Z)agnOHb4(Yw3Gs3!dM(KO8jpeZc$a
|
||||||
|
zWzO42zgd-YvO;_<AjP4)Vra~Ey5aiXHLWpE>fi78tTx79DA|(dPy6s$XBVxwd&HAi
|
||||||
|
zm?k&eR_3_PT4voHm+9SesKd$W{If4^wx3wryjn23Fz2w1bTU5pdO=r4bX|D(S<|1Z
|
||||||
|
z)Xtks*6h}VT?sdt#&h3g@y1Gc+OO`n5jxAqY$aFc>o(^d3Ct{)8Y|#%-0h8h&VwF@
|
||||||
|
z9(#9IJ2&~=$nr=mwt4fa-ncSYc~|=x^-0jS&!xwVl=jY6*PFc$a^hN)9z@B7qpJq<
|
||||||
|
zqU(x28(E*UIrHHn@5P(m9TcP`|6^rArF%Fo-J5Ba4C@SgTdQ-*j>bIov~9z6-*+sy
|
||||||
|
z=fY!Y?kr|0nQh0OxXbUSM@b)v4~M<HdYv;z(Q@Pnx*j!M-(NP!X}LsR@~@|>Hi{Q%
|
||||||
|
zE_%fqMn*<>@j>I(+Fs9&zeU$I>%Kl~YR|~L!a39HaBQd5YK^!x8F%w-lb7~%&XZ=H
|
||||||
|
z+e4|_s$}En<A&Wk=G0ta-akY|gU)+zndjDR#+oaapa%~}2zNN^=T@%st`UdfZsX5K
|
||||||
|
z;<{ab<Ri&aN6nciy)qR^J7axe32}Y2(=D4DaiX-{w61nFQ_KIVYk||nl!UxvxgJ=@
|
||||||
|
zPyXaq(EQZ>``&ENi>7hMdC%_F_+PY^hPRo)r3OWZW=K2MPrcDED2RL!Xt8vkJE)zX
|
||||||
|
z-V~oT)Oux5R;-E33*V;tVNb)yb+5NR>W-2ZRjJp$7KAHI+dUEV4C~Ug_)(`b$H#2-
|
||||||
|
z`bQ_KuDK1jhWpnoWa7F50`&#S+^1N^Ir+wKLF%`c_w_FNG}$;%Q}cLP|G-;sNxL%F
|
||||||
|
zjkdIn7B)5DillcP<S(B8-D*l`w7N#LCG5&?4-_@xs>vH$T>QQN$hPt;8`hqev)+b-
|
||||||
|
VfHkC3x%R(PPDlj%Qt&qYzX3LdVM71_
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home.png
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..20f1d887aedebaadec7f31184bdfe3e662401522
|
||||||
|
GIT binary patch
|
||||||
|
literal 1362
|
||||||
|
zcma)5dsvcZ6eq3COPOfdW%DV^ZrZSmmu5@DVMeK8>Y7WZW@(O;T+M9eB{VT<`aG7k
|
||||||
|
zn)f@oE<`v`G!hdlR3b#c8xe|l8>DE0=1%!ff9^cb_kQR6zW4o|-#O>~uHt;XmYJ+I
|
||||||
|
zK_C#zum>?m;Z6Mb7#YIa&@1aeAQowH-T|Hv{vWHXtnBFM=<e<w92^`Q8&j**TCH|w
|
||||||
|
zW=5ye&3!WP0UQ|_Q79BrskFVly|A!wfjKuf7x4M{d8JaBnwknAkw}F7z<|f&A$<GE
|
||||||
|
z#9}dz$7^nGX0cc_8jVh;L(;OcvZ|`8#>Pg#+uGV-5Af^tdQj5Y*@;G@7g7WV2lw^$
|
||||||
|
z&Cbrcy1D|=)YK%ANCpN5N=ix~<n#IPDIy{wJ3E`nWcKv*3=a<jJ~cJf+S&>ZaQ652
|
||||||
|
zkB^VPe*JoAXb4sSfdMK7NivzNx3?D%jYb1`<#IVVU0q$En!#X*L?S?ds;;h1AP_)}
|
||||||
|
zAPmlOI2^#?IGhE}g|<Kzp-{LW0Lq7!LM=f-K_n8XzP_H#W&;}}s;H>Q%*+JYC=?2V
|
||||||
|
z!GL%y77OKo5-yhu+n_ns)zwrgwWXy6T1_UCp`W0EKp^Dh<v}6PaFC%=sbDCRlamt@
|
||||||
|
z6CeiW0^~4=G>fQ@x1sX<QD1+=qAyI$kd`a0R;^yM1V^rBzv>>;Oz3t0N?$cpk-RL7
|
||||||
|
z-Curq>S*LLrm$bkV3lSj#D<6Y;{swYW|gxi%Zs*{e(6A+T4!*U^3;3jAJaPzMpw75
|
||||||
|
z7$ut5KkB^M^5?QL0f}~RdGFoYzGCL-{5n-sF6Va91!l$rZes=YHif6k(V{Rhzm^#u
|
||||||
|
zalK`;ZDwOVJvHuRU~uxaZ`Dc^TF`p)x#X>!QNDJ?g&SrFgh3=0gAPcLj)}XDS)x}j
|
||||||
|
zQJ<v!mA=U?%l=1~tj%`B)z`KbFE+KKzBz$GdPW=@wWdy+ogj$E`&FZwuZ!Zp<C4}~
|
||||||
|
zVm#p%keE^NFI+55ke}Hcsp&xT<5FtE)tFl*wILQcp5N@wHNu;kTknn!mb^C}u(Xb{
|
||||||
|
zz`fa%H*memyTCaq1Ap2W>D!)vB`lDpEI*IgAvkB_L`bG*pdVVjPYM(XQGXx5K?%)o
|
||||||
|
zLs2>$w}*(t!qJq_*t<Eng8LR58%v)#oqHZo6K-pf@#;>Nf;aRca6{9uQ_PEv<)W-?
|
||||||
|
z(KCaVz2Og5`HT(EW0DOY#`%Z2w?rbt$vWfcc*OArS@cn<@fq^g9Guwf{7Pas%bMNJ
|
||||||
|
zdS?{t^03BBAX+^7!xLN9zWoH>T^@;-lRUM^DZ}5M%WCC|WMSxw>0+B=^sbRM4jZXO
|
||||||
|
z$_Lnf*!02(cHH5lbT?VLt;YvjoU;yD7jgjM%PiY#eFT3yJ0;{s)Z^`kQt+<!k~_Qu
|
||||||
|
zviuCA6KQS^l4A0z$7lHCo-;d7g&3e}+$(1}x<hC;kGbLH_zAlm>$e4s;^kW?4ngm_
|
||||||
|
zE`Q~cX8O<Z(zEsV8qXf?Mb7nT$Cn62o198j$sS3_dA5Umo!g_|H>CWM;Mc75nWk1-
|
||||||
|
zsTCC62DdZ&CLU}r=+K8QH9PflBu(;$$CuS~(S5S#8@}fRZa&GnX#a%YkXXbwx5=MX
|
||||||
|
z``wiJ|MZgXydqYc;eH`$&5TsFXJu)BBv++(-ld-NA|wj=+9rOa!u0;M{>s}ZN=&zg
|
||||||
|
jp|o;zi!=ZHCR`6amaD0~y#7)m{38ggr!VHdM;P%x23q9L
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home_darkmode.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home_darkmode.png
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..96dc83e4a42d70c1b11ac5a55ea5eb8cd75e1e20
|
||||||
|
GIT binary patch
|
||||||
|
literal 980
|
||||||
|
zcmeAS@N?(olHy`uVBq!ia0vp^O(4v{3?%p7eQ=(EfiWY%C&U%V?H>iS4*_MFJ{MqE
|
||||||
|
zmzM<j1v8iwPFQ>B+}+pje*SoQ_Tb9?Tpg9&|JF;%JijfpWO-*ypo^KYc~ESA_nHsA
|
||||||
|
ztz3e$KC_1!6n_!c@R_*xN!py_HCyTq=gggUaniy|?MuCzA69H^h|Zp|b=B<p2PGc`
|
||||||
|
z0>b30*|@*0n4jWq;gIy|zKGh99kpj}USHgEp;$&A80||uT^vIyZoR$k8h+S8g!O?F
|
||||||
|
zcj^bHLXDPyjKZ$qJ6m_`-hKM-Z=Y)^yB^s@+{vH0dq%aAaitu;AQIT=<@xp3rAvP$
|
||||||
|
zy;7MXy;6S{7k&Q3%$mf?)m#uB5~Fl^!4@93r=m)tT64E<TJ6;MO6v5gt#7SPb6q!g
|
||||||
|
zS=4*(tJ=ib0ZZOj6rVo7V5@I<#(RMk0++cf?<&vlvtrdMVZ3YmE^z(23+e$2<s}SK
|
||||||
|
z3ljnsIEfmhoN8+nY~)&eV1{Nl6Oi%vK#S&VmSrqjKFn8_<*>~VU17l9;(OC(gF?VT
|
||||||
|
zew|sHRA+K^s)$ZwynjDjB9%2Z@o9hj@z9yqKg!oksmhKrP8D1bl-3+)o+@o5{UvQu
|
||||||
|
za+deA^S<)eZhOAF(C5HfE5hn~GjCG+m+o&3f0++AEUdr7$EqdsvefBVI!p9|LmNK}
|
||||||
|
z*BAXVwz%BS@myD^`ADnrrX%|0>yoZt>&?Br{aWc8JyVg;b6@KwX1@Ay&*p-y%_*L#
|
||||||
|
z{^ysm=`T&%{PpeY3#V^a$E?)Zo3}Wqvw!=8=ht19w|5|cm|EtWFQ%k?JmTvKOfn3f
|
||||||
|
Lu6{1-oD!M<_NCyP
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent.png
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..4f0d314e2621d018c3cd2e4267cf4cf82a78943f
|
||||||
|
GIT binary patch
|
||||||
|
literal 278
|
||||||
|
zcmeAS@N?(olHy`uVBq!ia0vp^O(4v{3?%p7eQ+K~IR*HHxB_W3aOlvXS731D$dNyP
|
||||||
|
z{`~&^8>ry@`}c3(z6CO@t*tk0+O&D|W?NfZAou_O|I!nsR|8q1B|(0{3``sX!dw~0
|
||||||
|
z&!m6(D0J#1t5jH`B>TrxD!+gV@;qG}Ln>~)y?T=OumO*&<LOWDj(nQ-FWQ&&(?pJ@
|
||||||
|
znOy%Gk7P>$)d4|WP*!pH)Y~Ek3+0ck%$oDNf%ERC$_@LN)Si65+@j0wqw%{iOg5Zz
|
||||||
|
u=kcQOsZZh^l}((KO_)H0lQP7Be}}|<Jmh~yiM-bb33$5txvX<aXaWF$9A~fq
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..f53ec649e615e8491fb6abb63d169ab7e0faa1ce
|
||||||
|
GIT binary patch
|
||||||
|
literal 205
|
||||||
|
zcmeAS@N?(olHy`uVBq!ia0vp^O(4v{3?%p7eQ+K~DF*n2xB}^ZynuIaZ52=vS4ogx
|
||||||
|
zFoXa0-5=lXWwUX~o_?MiC>rSL;uunK>+RLuyayBnTpaC=HT>3}!PR$SSH`j?-mt2r
|
||||||
|
zKs7+%uwa{9mTBst&#^sIIN#?w`Oh@C&bRjEiUzlg7B>c|g@RIyV08!V`R32zx~(4j
|
||||||
|
Q*9XM+boFyt=akR{0CQqV3jhEB
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From b2dee98e6f08035160ae2e9b792774cea1903106 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hikari-no-Tenshi <kyryljan.serhij@gmail.com>
|
||||||
|
Date: Thu, 30 Jan 2020 22:20:54 +0200
|
||||||
|
Subject: [PATCH 03/21] Disable Bluetooth by default
|
||||||
|
|
||||||
|
Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c
|
||||||
|
---
|
||||||
|
packages/SettingsProvider/res/values/defaults.xml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
|
||||||
|
index a93cd62e6301..b63896f09710 100644
|
||||||
|
--- a/packages/SettingsProvider/res/values/defaults.xml
|
||||||
|
+++ b/packages/SettingsProvider/res/values/defaults.xml
|
||||||
|
@@ -38,7 +38,7 @@
|
||||||
|
<fraction name="def_window_transition_scale">100%</fraction>
|
||||||
|
<bool name="def_haptic_feedback">true</bool>
|
||||||
|
|
||||||
|
- <bool name="def_bluetooth_on">true</bool>
|
||||||
|
+ <bool name="def_bluetooth_on">false</bool>
|
||||||
|
<bool name="def_wifi_display_on">false</bool>
|
||||||
|
<bool name="def_install_non_market_apps">false</bool>
|
||||||
|
<!-- 0 == off, 3 == on -->
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 0f053cd66bac314b38669190d4a2386428314838 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 27 Sep 2021 16:30:00 +0000
|
||||||
|
Subject: [PATCH 04/21] Disable cursor drag by default for editable TextViews
|
||||||
|
|
||||||
|
Requested by @TadiT7
|
||||||
|
|
||||||
|
Change-Id: Id54e38ee418174af8cde4113c849bc292f5fc96d
|
||||||
|
---
|
||||||
|
core/java/android/widget/WidgetFlags.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/widget/WidgetFlags.java b/core/java/android/widget/WidgetFlags.java
|
||||||
|
index fb40ee5ec843..c0c6fb6e9431 100644
|
||||||
|
--- a/core/java/android/widget/WidgetFlags.java
|
||||||
|
+++ b/core/java/android/widget/WidgetFlags.java
|
||||||
|
@@ -38,7 +38,7 @@ public final class WidgetFlags {
|
||||||
|
/**
|
||||||
|
* Default value for the flag {@link #ENABLE_CURSOR_DRAG_FROM_ANYWHERE}.
|
||||||
|
*/
|
||||||
|
- public static final boolean ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT = true;
|
||||||
|
+ public static final boolean ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
From 999e9b865755a14a241e3dae2be11ced1e7c587e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 3 Jul 2022 00:08:42 +0000
|
||||||
|
Subject: [PATCH 05/21] Disable "RESTRICTED bucket" toast
|
||||||
|
|
||||||
|
Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8
|
||||||
|
---
|
||||||
|
.../server/usage/AppStandbyController.java | 20 +------------------
|
||||||
|
1 file changed, 1 insertion(+), 19 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
||||||
|
index 7d3837786be9..d12210f704fa 100644
|
||||||
|
--- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
||||||
|
+++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
||||||
|
@@ -1846,25 +1846,7 @@ public class AppStandbyController
|
||||||
|
.noteRestrictionAttempt(packageName, userId, elapsedRealtime, reason);
|
||||||
|
|
||||||
|
if (isForcedByUser) {
|
||||||
|
- // Only user force can bypass the delay restriction. If the user forced the
|
||||||
|
- // app into the RESTRICTED bucket, then a toast confirming the action
|
||||||
|
- // shouldn't be surprising.
|
||||||
|
- // Exclude REASON_SUB_FORCED_USER_FLAG_INTERACTION since the RESTRICTED bucket
|
||||||
|
- // isn't directly visible in that flow.
|
||||||
|
- if (Build.IS_DEBUGGABLE
|
||||||
|
- && (reason & REASON_SUB_MASK)
|
||||||
|
- != REASON_SUB_FORCED_USER_FLAG_INTERACTION) {
|
||||||
|
- Toast.makeText(mContext,
|
||||||
|
- // Since AppStandbyController sits low in the lock hierarchy,
|
||||||
|
- // make sure not to call out with the lock held.
|
||||||
|
- mHandler.getLooper(),
|
||||||
|
- mContext.getResources().getString(
|
||||||
|
- R.string.as_app_forced_to_restricted_bucket, packageName),
|
||||||
|
- Toast.LENGTH_SHORT)
|
||||||
|
- .show();
|
||||||
|
- } else {
|
||||||
|
- Slog.i(TAG, packageName + " restricted by user");
|
||||||
|
- }
|
||||||
|
+ Slog.i(TAG, packageName + " restricted by user");
|
||||||
|
} else {
|
||||||
|
final long timeUntilRestrictPossibleMs = app.lastUsedByUserElapsedTime
|
||||||
|
+ mInjector.getAutoRestrictedBucketDelayMs() - elapsedRealtime;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,178 @@
|
|||||||
|
From 47391e102c2ab15bdf913a9856e20dba82668472 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 2 Sep 2021 16:15:19 +0000
|
||||||
|
Subject: [PATCH 06/21] Keyguard: Adjust clock style
|
||||||
|
|
||||||
|
Thinner font, less padding and unintrusive colors
|
||||||
|
|
||||||
|
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
|
||||||
|
---
|
||||||
|
.../customization/res/layout/clock_default_large.xml | 1 +
|
||||||
|
.../customization/res/layout/clock_default_small.xml | 2 +-
|
||||||
|
packages/SystemUI/customization/res/values/colors.xml | 5 +++++
|
||||||
|
packages/SystemUI/customization/res/values/dimens.xml | 4 ++--
|
||||||
|
.../android/systemui/shared/clocks/DefaultClockController.kt | 4 ++--
|
||||||
|
.../SystemUI/res-keyguard/layout/keyguard_clock_switch.xml | 2 +-
|
||||||
|
.../SystemUI/res-keyguard/layout/keyguard_slice_view.xml | 2 +-
|
||||||
|
packages/SystemUI/res-keyguard/values/dimens.xml | 2 +-
|
||||||
|
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
||||||
|
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
|
||||||
|
packages/SystemUI/res/values/styles.xml | 4 ++--
|
||||||
|
11 files changed, 17 insertions(+), 13 deletions(-)
|
||||||
|
create mode 100644 packages/SystemUI/customization/res/values/colors.xml
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/customization/res/layout/clock_default_large.xml b/packages/SystemUI/customization/res/layout/clock_default_large.xml
|
||||||
|
index 0139d50dcfba..9f5ca7b89213 100644
|
||||||
|
--- a/packages/SystemUI/customization/res/layout/clock_default_large.xml
|
||||||
|
+++ b/packages/SystemUI/customization/res/layout/clock_default_large.xml
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
android:fontFamily="@*android:string/config_clockFontFamily"
|
||||||
|
android:typeface="monospace"
|
||||||
|
android:elegantTextHeight="false"
|
||||||
|
+ android:fontFeatureSettings="tnum"
|
||||||
|
chargeAnimationDelay="200"
|
||||||
|
dozeWeight="200"
|
||||||
|
lockScreenWeight="400" />
|
||||||
|
diff --git a/packages/SystemUI/customization/res/layout/clock_default_small.xml b/packages/SystemUI/customization/res/layout/clock_default_small.xml
|
||||||
|
index ff6d7f9e2240..b63ffce20671 100644
|
||||||
|
--- a/packages/SystemUI/customization/res/layout/clock_default_small.xml
|
||||||
|
+++ b/packages/SystemUI/customization/res/layout/clock_default_small.xml
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
android:elegantTextHeight="false"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:singleLine="true"
|
||||||
|
- android:fontFeatureSettings="pnum"
|
||||||
|
+ android:fontFeatureSettings="tnum"
|
||||||
|
chargeAnimationDelay="350"
|
||||||
|
dozeWeight="200"
|
||||||
|
lockScreenWeight="400" />
|
||||||
|
diff --git a/packages/SystemUI/customization/res/values/colors.xml b/packages/SystemUI/customization/res/values/colors.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..f80af4376ff1
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/packages/SystemUI/customization/res/values/colors.xml
|
||||||
|
@@ -0,0 +1,5 @@
|
||||||
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
+<resources>
|
||||||
|
+ <color name="clock_default_color_dark">@*android:color/primary_text_material_dark</color>
|
||||||
|
+ <color name="clock_default_color_light">@*android:color/primary_text_material_light</color>
|
||||||
|
+</resources>
|
||||||
|
diff --git a/packages/SystemUI/customization/res/values/dimens.xml b/packages/SystemUI/customization/res/values/dimens.xml
|
||||||
|
index 8eb8132b07b9..02688e5b1329 100644
|
||||||
|
--- a/packages/SystemUI/customization/res/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/customization/res/values/dimens.xml
|
||||||
|
@@ -31,5 +31,5 @@
|
||||||
|
<!-- additional offset for clock switch area items -->
|
||||||
|
<dimen name="small_clock_height">114dp</dimen>
|
||||||
|
<dimen name="small_clock_padding_top">28dp</dimen>
|
||||||
|
- <dimen name="clock_padding_start">28dp</dimen>
|
||||||
|
-</resources>
|
||||||
|
\ No newline at end of file
|
||||||
|
+ <dimen name="clock_padding_start">22dp</dimen>
|
||||||
|
+</resources>
|
||||||
|
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
index b28920c590c5..a786adad32e5 100644
|
||||||
|
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
@@ -157,9 +157,9 @@ class DefaultClockController(
|
||||||
|
if (seedColor != null) {
|
||||||
|
seedColor!!
|
||||||
|
} else if (isRegionDark) {
|
||||||
|
- resources.getColor(android.R.color.system_accent1_100)
|
||||||
|
+ resources.getColor(R.color.clock_default_color_dark)
|
||||||
|
} else {
|
||||||
|
- resources.getColor(android.R.color.system_accent2_600)
|
||||||
|
+ resources.getColor(R.color.clock_default_color_light)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentColor == color) {
|
||||||
|
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
||||||
|
index fc9c917c152b..6a5ed0daef4a 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
android:layout_gravity="center_horizontal|top">
|
||||||
|
<com.android.keyguard.KeyguardClockFrame
|
||||||
|
android:id="@+id/lockscreen_clock_view"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
+ android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/small_clock_height"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
|
||||||
|
index 7c5dbc247428..64657547621f 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
|
||||||
|
@@ -38,7 +38,7 @@
|
||||||
|
android:id="@+id/row"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:orientation="horizontal"
|
||||||
|
+ android:orientation="vertical"
|
||||||
|
android:gravity="start"
|
||||||
|
/>
|
||||||
|
</com.android.keyguard.KeyguardSliceView>
|
||||||
|
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||||
|
index 8c817330953c..cfbc3b96da7c 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||||
|
@@ -97,7 +97,7 @@
|
||||||
|
<!-- additional offset for clock switch area items -->
|
||||||
|
<dimen name="below_clock_padding_start">32dp</dimen>
|
||||||
|
<dimen name="below_clock_padding_end">16dp</dimen>
|
||||||
|
- <dimen name="below_clock_padding_start_icons">28dp</dimen>
|
||||||
|
+ <dimen name="below_clock_padding_start_icons">22dp</dimen>
|
||||||
|
|
||||||
|
<!-- Proportion of the screen height to use to set the maximum height of the bouncer to when
|
||||||
|
the device is in the DEVICE_POSTURE_HALF_OPENED posture, for the PIN/pattern entry. 0 will
|
||||||
|
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
|
index 88f7bcd5d907..f0cff767b74d 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
|
@@ -138,8 +138,6 @@
|
||||||
|
<item name="android:ellipsize">end</item>
|
||||||
|
<item name="android:maxLines">2</item>
|
||||||
|
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||||
|
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
|
||||||
|
- <item name="android:shadowRadius">?attr/shadowRadius</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextAppearance.Keyguard.Secondary">
|
||||||
|
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
index fc0bf242dc1e..388ab51a6245 100644
|
||||||
|
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
@@ -77,7 +77,7 @@
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:textDirection="locale"
|
||||||
|
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
|
||||||
|
+ android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="?attr/wallpaperTextColorSecondary"
|
||||||
|
android:singleLine="true"
|
||||||
|
systemui:showMissingSim="true"
|
||||||
|
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||||
|
index af92c021ec62..847b8a961322 100644
|
||||||
|
--- a/packages/SystemUI/res/values/styles.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/styles.xml
|
||||||
|
@@ -311,7 +311,7 @@
|
||||||
|
<item name="darkIconTheme">@style/DualToneDarkTheme</item>
|
||||||
|
<item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
|
||||||
|
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
|
||||||
|
- <item name="wallpaperTextColorAccent">@color/material_dynamic_primary90</item>
|
||||||
|
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_dark</item>
|
||||||
|
<item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||||
|
<item name="*android:lockPatternStyle">@style/LockPatternViewStyle</item>
|
||||||
|
<item name="lockPatternStyle">@style/LockPatternContainerStyle</item>
|
||||||
|
@@ -329,7 +329,7 @@
|
||||||
|
<style name="Theme.SystemUI.LightWallpaper">
|
||||||
|
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
|
||||||
|
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
|
||||||
|
- <item name="wallpaperTextColorAccent">@color/material_dynamic_secondary40</item>
|
||||||
|
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_light</item>
|
||||||
|
<item name="android:colorError">@*android:color/error_color_material_light</item>
|
||||||
|
<item name="shadowRadius">0</item>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,48 @@
|
|||||||
|
From 3bf2d7ef087a2f458ba67ab2adfdfea5ae58f8da Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 2 Nov 2019 06:41:03 +0000
|
||||||
|
Subject: [PATCH 07/21] Keyguard: Hide padlock unless UDFPS is in use
|
||||||
|
|
||||||
|
Fair enough Google, but don't give me that otherwise
|
||||||
|
|
||||||
|
Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
|
||||||
|
---
|
||||||
|
.../keyguard/LockIconViewController.java | 17 +++--------------
|
||||||
|
1 file changed, 3 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||||
|
index 951a6aeef11b..269c72d75e8f 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||||
|
@@ -310,25 +310,14 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon
|
||||||
|
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon
|
||||||
|
&& !mShowAodUnlockedIcon && !mShowAodLockIcon;
|
||||||
|
- mShowLockIcon = !mCanDismissLockScreen && isLockScreen()
|
||||||
|
- && (!mUdfpsEnrolled || !mRunningFPS);
|
||||||
|
- mShowUnlockIcon = mCanDismissLockScreen && isLockScreen();
|
||||||
|
+ mShowUnlockIcon = mCanDismissLockScreen && isLockScreen() && mUdfpsEnrolled;
|
||||||
|
mShowAodUnlockedIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && mCanDismissLockScreen;
|
||||||
|
mShowAodLockIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && !mCanDismissLockScreen;
|
||||||
|
|
||||||
|
final CharSequence prevContentDescription = mView.getContentDescription();
|
||||||
|
- if (mShowLockIcon) {
|
||||||
|
- if (wasShowingFpIcon) {
|
||||||
|
- // fp icon was shown by UdfpsView, and now we still want to animate the transition
|
||||||
|
- // in this drawable
|
||||||
|
- mView.updateIcon(ICON_FINGERPRINT, false);
|
||||||
|
- }
|
||||||
|
- mView.updateIcon(ICON_LOCK, false);
|
||||||
|
- mView.setContentDescription(mLockedLabel);
|
||||||
|
- mView.setVisibility(View.VISIBLE);
|
||||||
|
- } else if (mShowUnlockIcon) {
|
||||||
|
+ if (mShowUnlockIcon) {
|
||||||
|
if (wasShowingFpIcon) {
|
||||||
|
// fp icon was shown by UdfpsView, and now we still want to animate the transition
|
||||||
|
// in this drawable
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 4748bf4af0e391f772c498976d3fed372d688de7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 1 Sep 2021 14:41:53 +0000
|
||||||
|
Subject: [PATCH 08/21] Keyguard: Default to small clock (1/3)
|
||||||
|
|
||||||
|
It looks alright actually, but as always breaks under landscape
|
||||||
|
|
||||||
|
Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
|
||||||
|
---
|
||||||
|
.../src/com/android/keyguard/KeyguardClockSwitchController.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
||||||
|
index 94f6dba792e8..7a72d10975fa 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
||||||
|
@@ -543,7 +543,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
||||||
|
|
||||||
|
private void updateDoubleLineClock() {
|
||||||
|
mCanShowDoubleLineClock = mSecureSettings.getIntForUser(
|
||||||
|
- Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 1,
|
||||||
|
+ Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 0,
|
||||||
|
UserHandle.USER_CURRENT) != 0;
|
||||||
|
|
||||||
|
if (!mCanShowDoubleLineClock) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,128 @@
|
|||||||
|
From 654cfde395c0a1704fee02d3b9bbb27246e488ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 2 Nov 2019 08:31:36 +0000
|
||||||
|
Subject: [PATCH 09/21] Keyguard: Refine indication text
|
||||||
|
|
||||||
|
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
|
||||||
|
---
|
||||||
|
.../SystemUI/res-keyguard/values/styles.xml | 2 --
|
||||||
|
.../res/layout/keyguard_bottom_area.xml | 1 +
|
||||||
|
packages/SystemUI/res/values/dimens.xml | 2 +-
|
||||||
|
.../KeyguardIndicationController.java | 35 ++++---------------
|
||||||
|
.../phone/KeyguardIndicationTextView.java | 2 +-
|
||||||
|
5 files changed, 10 insertions(+), 32 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
|
index f0cff767b74d..9edd294a8981 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
|
@@ -153,8 +153,6 @@
|
||||||
|
<item name="android:maxLines">1</item>
|
||||||
|
<item name="android:gravity">center</item>
|
||||||
|
<item name="android:textColor">?attr/wallpaperTextColor</item>
|
||||||
|
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
|
||||||
|
- <item name="android:shadowRadius">?attr/shadowRadius</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextAppearance.Keyguard.BottomArea.Button">
|
||||||
|
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
|
index 66c57fc2a9ac..dde97f679c9a 100644
|
||||||
|
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
|
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
|
@@ -35,6 +35,7 @@
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
+ android:minHeight="48dp"
|
||||||
|
android:paddingStart="@dimen/keyguard_indication_text_padding"
|
||||||
|
android:paddingEnd="@dimen/keyguard_indication_text_padding"
|
||||||
|
android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
|
||||||
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
index 0fdbf89d760a..ca2455548c2d 100644
|
||||||
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
@@ -857,7 +857,7 @@
|
||||||
|
|
||||||
|
<dimen name="keyguard_security_container_padding_top">20dp</dimen>
|
||||||
|
|
||||||
|
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
|
||||||
|
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
|
||||||
|
<dimen name="lock_icon_margin_bottom">74dp</dimen>
|
||||||
|
<dimen name="ambient_indication_margin_bottom">71dp</dimen>
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
|
index feb02586a820..eaca85f8d55d 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
|
@@ -445,7 +445,6 @@ public class KeyguardIndicationController {
|
||||||
|
updateLockScreenDisclosureMsg();
|
||||||
|
updateLockScreenOwnerInfo();
|
||||||
|
updateLockScreenBatteryMsg(animate);
|
||||||
|
- updateLockScreenUserLockedMsg(userId);
|
||||||
|
updateLockScreenTrustMsg(userId, getTrustGrantedIndication(), getTrustManagedIndication());
|
||||||
|
updateLockScreenAlignmentMsg();
|
||||||
|
updateLockScreenLogoutView();
|
||||||
|
@@ -571,22 +570,6 @@ public class KeyguardIndicationController {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- private void updateLockScreenUserLockedMsg(int userId) {
|
||||||
|
- if (!mKeyguardUpdateMonitor.isUserUnlocked(userId)
|
||||||
|
- || mKeyguardUpdateMonitor.isEncryptedOrLockdown(userId)) {
|
||||||
|
- mRotateTextViewController.updateIndication(
|
||||||
|
- INDICATION_TYPE_USER_LOCKED,
|
||||||
|
- new KeyguardIndication.Builder()
|
||||||
|
- .setMessage(mContext.getResources().getText(
|
||||||
|
- com.android.internal.R.string.lockscreen_storage_locked))
|
||||||
|
- .setTextColor(mInitialTextColorState)
|
||||||
|
- .build(),
|
||||||
|
- false);
|
||||||
|
- } else {
|
||||||
|
- mRotateTextViewController.hideIndication(INDICATION_TYPE_USER_LOCKED);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
private void updateBiometricMessage() {
|
||||||
|
if (mDozing) {
|
||||||
|
updateDeviceEntryIndication(false);
|
||||||
|
@@ -679,17 +662,13 @@ public class KeyguardIndicationController {
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateLockScreenPersistentUnlockMsg() {
|
||||||
|
- if (!TextUtils.isEmpty(mPersistentUnlockMessage)) {
|
||||||
|
- mRotateTextViewController.updateIndication(
|
||||||
|
- INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE,
|
||||||
|
- new KeyguardIndication.Builder()
|
||||||
|
- .setMessage(mPersistentUnlockMessage)
|
||||||
|
- .setTextColor(mInitialTextColorState)
|
||||||
|
- .build(),
|
||||||
|
- true);
|
||||||
|
- } else {
|
||||||
|
- mRotateTextViewController.hideIndication(INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE);
|
||||||
|
- }
|
||||||
|
+ mRotateTextViewController.updateIndication(
|
||||||
|
+ INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE,
|
||||||
|
+ new KeyguardIndication.Builder()
|
||||||
|
+ .setMessage(mContext.getResources().getString(R.string.keyguard_unlock))
|
||||||
|
+ .setTextColor(mInitialTextColorState)
|
||||||
|
+ .build(),
|
||||||
|
+ false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateLockScreenLogoutView() {
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||||
|
index 29a249fcaa41..67f5201bbf2e 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||||
|
@@ -46,7 +46,7 @@ public class KeyguardIndicationTextView extends TextView {
|
||||||
|
@StyleRes
|
||||||
|
private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button;
|
||||||
|
|
||||||
|
- private boolean mAnimationsEnabled = true;
|
||||||
|
+ private boolean mAnimationsEnabled = false;
|
||||||
|
private CharSequence mMessage;
|
||||||
|
private KeyguardIndication mKeyguardIndicationInfo;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,189 @@
|
|||||||
|
From 6961fc087e920eac71bca4673b49d7ac193ee5a1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 20 Mar 2021 10:35:14 +0000
|
||||||
|
Subject: [PATCH 10/21] Keyguard/UI: Fix status bar / quick settings margins
|
||||||
|
and paddings
|
||||||
|
|
||||||
|
Last revised on 2024/01/21, targeting U
|
||||||
|
|
||||||
|
The way I think SB/QS margins/paddings should work:
|
||||||
|
- Devices with left notch: [notch_definition][status_bar_padding_start][content]...[content][status_bar_padding_end][rounded_corner_content_padding]
|
||||||
|
- Devices with center or no notch: [rounded_corner_content_padding][status_bar_padding_start][content]...[content][status_bar_padding_end][rounded_corner_content_padding]
|
||||||
|
Key point being:
|
||||||
|
- SB (including keyguard) and QS should always act uniformly
|
||||||
|
- Notch definition should only be the notch itself, without additional padding
|
||||||
|
- Instead, these paddings should be covered by status_bar_padding_{start|end}
|
||||||
|
As a result, below changes have been made:
|
||||||
|
- Change keyguard_carrier_text_margin into a padding and link to status_bar_padding_start
|
||||||
|
- Add status_bar_padding_{start|end} to quick settings header
|
||||||
|
- Remove unnecessary margins and paddings if any
|
||||||
|
|
||||||
|
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
|
||||||
|
packages/SystemUI/res/values-sw600dp/dimens.xml | 7 ++-----
|
||||||
|
packages/SystemUI/res/values/dimens.xml | 6 +++---
|
||||||
|
packages/SystemUI/res/xml/qqs_header.xml | 4 ++--
|
||||||
|
.../android/systemui/shade/ShadeHeaderController.kt | 10 +++++++---
|
||||||
|
.../statusbar/phone/KeyguardStatusBarView.java | 7 -------
|
||||||
|
6 files changed, 15 insertions(+), 21 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
index 388ab51a6245..0c4b898055fe 100644
|
||||||
|
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
@@ -72,7 +72,7 @@
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="@dimen/status_bar_padding_top"
|
||||||
|
- android:layout_marginStart="@dimen/keyguard_carrier_text_margin"
|
||||||
|
+ android:paddingStart="@dimen/keyguard_carrier_text_margin"
|
||||||
|
android:layout_toStartOf="@id/system_icons_container"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||||
|
index 915dcdb9755f..4a727ad6ce3d 100644
|
||||||
|
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
<dimen name="status_bar_header_height_keyguard">@dimen/status_bar_height</dimen>
|
||||||
|
|
||||||
|
<!-- padding for container with status icons and battery -->
|
||||||
|
- <dimen name="status_bar_icons_padding_end">4dp</dimen>
|
||||||
|
+ <dimen name="status_bar_icons_padding_end">0dp</dimen>
|
||||||
|
<!-- start padding is smaller to account for status icon margins coming from drawable itself -->
|
||||||
|
<dimen name="status_bar_icons_padding_start">3dp</dimen>
|
||||||
|
<dimen name="status_bar_icons_padding_bottom">2dp</dimen>
|
||||||
|
@@ -37,9 +37,6 @@
|
||||||
|
<!-- The width of user avatar when on Keyguard -->
|
||||||
|
<dimen name="multi_user_avatar_keyguard_size">30dp</dimen>
|
||||||
|
|
||||||
|
- <!-- Margin on the left side of the carrier text on Keyguard -->
|
||||||
|
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
|
||||||
|
-
|
||||||
|
<!-- Screen pinning request width -->
|
||||||
|
<dimen name="screen_pinning_request_width">400dp</dimen>
|
||||||
|
<!-- Screen pinning request bottom button circle widths -->
|
||||||
|
@@ -81,7 +78,7 @@
|
||||||
|
<dimen name="large_screen_shade_header_height">42dp</dimen>
|
||||||
|
<!-- start padding is smaller to account for status icon margins coming from drawable itself -->
|
||||||
|
<dimen name="shade_header_system_icons_padding_start">3dp</dimen>
|
||||||
|
- <dimen name="shade_header_system_icons_padding_end">4dp</dimen>
|
||||||
|
+ <dimen name="shade_header_system_icons_padding_end">0dp</dimen>
|
||||||
|
<dimen name="shade_header_system_icons_padding_top">2dp</dimen>
|
||||||
|
<dimen name="shade_header_system_icons_padding_bottom">2dp</dimen>
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
index ca2455548c2d..3320f98d1620 100644
|
||||||
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
@@ -149,7 +149,7 @@
|
||||||
|
<dimen name="status_bar_clock_size">14sp</dimen>
|
||||||
|
|
||||||
|
<!-- The starting padding for the clock in the status bar. -->
|
||||||
|
- <dimen name="status_bar_clock_starting_padding">7dp</dimen>
|
||||||
|
+ <dimen name="status_bar_clock_starting_padding">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- The end padding for the clock in the status bar. -->
|
||||||
|
<dimen name="status_bar_clock_end_padding">0dp</dimen>
|
||||||
|
@@ -353,7 +353,7 @@
|
||||||
|
<!-- padding start is a bit smaller than end to account for status icon margin-->
|
||||||
|
<dimen name="status_bar_icons_padding_start">3dp</dimen>
|
||||||
|
|
||||||
|
- <dimen name="status_bar_icons_padding_end">4dp</dimen>
|
||||||
|
+ <dimen name="status_bar_icons_padding_end">0dp</dimen>
|
||||||
|
<dimen name="status_bar_icons_padding_bottom">0dp</dimen>
|
||||||
|
<dimen name="status_bar_icons_padding_top">0dp</dimen>
|
||||||
|
|
||||||
|
@@ -823,7 +823,7 @@
|
||||||
|
<dimen name="kg_framed_avatar_size">32dp</dimen>
|
||||||
|
|
||||||
|
<!-- Margin on the left side of the carrier text on Keyguard -->
|
||||||
|
- <dimen name="keyguard_carrier_text_margin">16dp</dimen>
|
||||||
|
+ <dimen name="keyguard_carrier_text_margin">@dimen/status_bar_padding_start</dimen>
|
||||||
|
|
||||||
|
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
|
||||||
|
from Keyguard. -->
|
||||||
|
diff --git a/packages/SystemUI/res/xml/qqs_header.xml b/packages/SystemUI/res/xml/qqs_header.xml
|
||||||
|
index 50a388d0fa64..81d30c210770 100644
|
||||||
|
--- a/packages/SystemUI/res/xml/qqs_header.xml
|
||||||
|
+++ b/packages/SystemUI/res/xml/qqs_header.xml
|
||||||
|
@@ -44,7 +44,7 @@
|
||||||
|
<Layout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
|
||||||
|
- android:layout_marginStart="8dp"
|
||||||
|
+ android:layout_marginStart="2dp"
|
||||||
|
app:layout_constrainedWidth="true"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/clock"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/barrier"
|
||||||
|
@@ -94,4 +94,4 @@
|
||||||
|
app:layout_constraintHorizontal_bias="1"
|
||||||
|
/>
|
||||||
|
</Constraint>
|
||||||
|
-</ConstraintSet>
|
||||||
|
\ No newline at end of file
|
||||||
|
+</ConstraintSet>
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
index 5cdd6f44d4a0..098eb27995d8 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
@@ -143,6 +143,8 @@ constructor(
|
||||||
|
|
||||||
|
private var roundedCorners = 0
|
||||||
|
private var cutout: DisplayCutout? = null
|
||||||
|
+ private var statusBarPaddingStart = 0
|
||||||
|
+ private var statusBarPaddingEnd = 0
|
||||||
|
private var lastInsets: WindowInsets? = null
|
||||||
|
private var nextAlarmIntent: PendingIntent? = null
|
||||||
|
private var textColorPrimary = Color.TRANSPARENT
|
||||||
|
@@ -415,14 +417,17 @@ constructor(
|
||||||
|
val cutoutLeft = sbInsets.first
|
||||||
|
val cutoutRight = sbInsets.second
|
||||||
|
val hasCornerCutout: Boolean = insetsProvider.currentRotationHasCornerCutout()
|
||||||
|
+ roundedCorners = resources.getDimensionPixelSize(R.dimen.rounded_corner_content_padding)
|
||||||
|
+ statusBarPaddingStart = resources.getDimensionPixelSize(R.dimen.status_bar_padding_start)
|
||||||
|
+ statusBarPaddingEnd = resources.getDimensionPixelSize(R.dimen.status_bar_padding_end)
|
||||||
|
updateQQSPaddings()
|
||||||
|
// Set these guides as the left/right limits for content that lives in the top row, using
|
||||||
|
// cutoutLeft and cutoutRight
|
||||||
|
var changes =
|
||||||
|
combinedShadeHeadersConstraintManager.edgesGuidelinesConstraints(
|
||||||
|
- if (view.isLayoutRtl) cutoutRight else cutoutLeft,
|
||||||
|
+ (if (view.isLayoutRtl) cutoutRight else cutoutLeft) + statusBarPaddingStart,
|
||||||
|
header.paddingStart,
|
||||||
|
- if (view.isLayoutRtl) cutoutLeft else cutoutRight,
|
||||||
|
+ (if (view.isLayoutRtl) cutoutLeft else cutoutRight) + statusBarPaddingEnd,
|
||||||
|
header.paddingEnd
|
||||||
|
)
|
||||||
|
|
||||||
|
@@ -543,7 +548,6 @@ constructor(
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updateResources() {
|
||||||
|
- roundedCorners = resources.getDimensionPixelSize(R.dimen.rounded_corner_content_padding)
|
||||||
|
val padding = resources.getDimensionPixelSize(R.dimen.qs_panel_padding)
|
||||||
|
header.setPadding(padding, header.paddingTop, padding, header.paddingBottom)
|
||||||
|
updateQQSPaddings()
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||||
|
index 5eb3f587a023..be9b32bde0f1 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||||
|
@@ -179,14 +179,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
|
||||||
|
mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
||||||
|
getResources().getDimensionPixelSize(
|
||||||
|
com.android.internal.R.dimen.text_size_small_material));
|
||||||
|
- lp = (MarginLayoutParams) mCarrierLabel.getLayoutParams();
|
||||||
|
|
||||||
|
- int marginStart = calculateMargin(
|
||||||
|
- getResources().getDimensionPixelSize(R.dimen.keyguard_carrier_text_margin),
|
||||||
|
- mPadding.first);
|
||||||
|
- lp.setMarginStart(marginStart);
|
||||||
|
-
|
||||||
|
- mCarrierLabel.setLayoutParams(lp);
|
||||||
|
updateKeyguardStatusBarHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
From 2ea9b12d2f9d2d49ddcc99a7971af35dc15f221c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 31 May 2022 00:00:08 +0000
|
||||||
|
Subject: [PATCH 11/21] Revert "SystemUI: Add left padding for keyguard slices"
|
||||||
|
|
||||||
|
This reverts commit 4a7a4426944e28e70a3eca6a696ff6c7599fb896.
|
||||||
|
---
|
||||||
|
.../src/com/android/keyguard/KeyguardSliceView.java | 9 +++------
|
||||||
|
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
||||||
|
index abb22f526f85..b4f124aa598a 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
|
||||||
|
@@ -49,7 +49,6 @@ import com.android.internal.annotations.VisibleForTesting;
|
||||||
|
import com.android.internal.graphics.ColorUtils;
|
||||||
|
import com.android.settingslib.Utils;
|
||||||
|
import com.android.systemui.R;
|
||||||
|
-import com.android.systemui.keyguard.KeyguardSliceProvider;
|
||||||
|
import com.android.systemui.util.wakelock.KeepAwakeAnimationListener;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
@@ -446,15 +445,13 @@ public class KeyguardSliceView extends LinearLayout {
|
||||||
|
|
||||||
|
private void updatePadding() {
|
||||||
|
boolean hasText = !TextUtils.isEmpty(getText());
|
||||||
|
- boolean isDate = Uri.parse(KeyguardSliceProvider.KEYGUARD_DATE_URI).equals(getTag());
|
||||||
|
int padding = (int) getContext().getResources()
|
||||||
|
.getDimension(R.dimen.widget_horizontal_padding) / 2;
|
||||||
|
- int iconPadding = (int) mContext.getResources()
|
||||||
|
- .getDimension(R.dimen.widget_icon_padding);
|
||||||
|
// orientation is vertical, so add padding to top & bottom
|
||||||
|
- setPadding(!isDate ? iconPadding : 0, padding, 0, hasText ? padding : 0);
|
||||||
|
+ setPadding(0, padding, 0, hasText ? padding : 0);
|
||||||
|
|
||||||
|
- setCompoundDrawablePadding(iconPadding);
|
||||||
|
+ setCompoundDrawablePadding((int) mContext.getResources()
|
||||||
|
+ .getDimension(R.dimen.widget_icon_padding));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,191 @@
|
|||||||
|
From e18664e9b380b7b96cc506f8e106903478b4b214 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 5 Sep 2021 01:20:12 +0000
|
||||||
|
Subject: [PATCH 12/21] Revert "Update RAT icons to match Silk design"
|
||||||
|
|
||||||
|
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
|
||||||
|
---
|
||||||
|
.../res/drawable/ic_3g_mobiledata.xml | 19 ++++++++-------
|
||||||
|
.../res/drawable/ic_4g_mobiledata.xml | 19 ++++++++-------
|
||||||
|
.../res/drawable/ic_5g_mobiledata.xml | 20 ++++++++--------
|
||||||
|
.../res/drawable/ic_carrier_wifi.xml | 15 +++++++-----
|
||||||
|
.../res/drawable/ic_lte_mobiledata.xml | 23 +++++++++++--------
|
||||||
|
.../res/drawable/stat_sys_roaming_large.xml | 10 ++++----
|
||||||
|
6 files changed, 59 insertions(+), 47 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
|
||||||
|
index 413a3873f438..0c942bdf993c 100644
|
||||||
|
--- a/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
|
||||||
|
+++ b/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
|
||||||
|
@@ -14,14 +14,17 @@
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
- android:width="21dp"
|
||||||
|
- android:height="16dp"
|
||||||
|
- android:viewportWidth="21.0"
|
||||||
|
- android:viewportHeight="16.0">
|
||||||
|
+ android:width="12.35dp"
|
||||||
|
+ android:height="15dp"
|
||||||
|
+ android:viewportWidth="14"
|
||||||
|
+ android:viewportHeight="17">
|
||||||
|
+
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="#FFFFFFFF"
|
||||||
|
+ android:pathData="M1.9,7.88h0.77c0.5,0,0.88-0.15,1.15-0.46s0.4-0.72,0.4-1.25c0-1.17-0.45-1.75-1.35-1.75c-0.43,0-0.77,0.16-1.02,0.47 S1.49,5.62,1.49,6.13h-1.2c0-0.8,0.24-1.46,0.73-1.97s1.11-0.78,1.86-0.78c0.78,0,1.41,0.25,1.87,0.73S5.43,5.31,5.43,6.2 c0,0.46-0.12,0.89-0.36,1.29S4.52,8.18,4.14,8.37c0.94,0.35,1.41,1.12,1.41,2.33c0,0.89-0.25,1.6-0.74,2.12 c-0.49,0.53-1.14,0.79-1.94,0.79c-0.79,0-1.43-0.25-1.91-0.75c-0.49-0.5-0.73-1.17-0.73-2.01h1.21c0,0.53,0.13,0.95,0.38,1.26 c0.26,0.31,0.6,0.47,1.05,0.47c0.45,0,0.81-0.15,1.08-0.46s0.4-0.77,0.4-1.39c0-1.21-0.57-1.81-1.72-1.81H1.9V7.88z" />
|
||||||
|
<path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M5.29,13.22c-0.57,0 -1.09,-0.11 -1.57,-0.34c-0.47,-0.22 -0.85,-0.54 -1.16,-0.95C2.25,11.52 2.07,11.01 2,10.42l1.47,-0.34c0.07,0.51 0.27,0.92 0.59,1.23c0.32,0.31 0.73,0.46 1.23,0.46c0.52,0 0.94,-0.15 1.26,-0.46c0.33,-0.31 0.49,-0.71 0.49,-1.22c0,-0.51 -0.18,-0.92 -0.53,-1.22c-0.35,-0.31 -0.8,-0.46 -1.36,-0.46H4.37V7.06h0.73c0.47,0 0.86,-0.13 1.18,-0.38c0.32,-0.26 0.48,-0.63 0.48,-1.11c0,-0.42 -0.14,-0.77 -0.41,-1.04C6.08,4.27 5.7,4.14 5.21,4.14c-0.43,0 -0.79,0.13 -1.08,0.38C3.85,4.76 3.67,5.08 3.6,5.48L2.17,5.3C2.23,4.81 2.4,4.38 2.67,4c0.27,-0.38 0.62,-0.69 1.05,-0.91c0.44,-0.22 0.94,-0.34 1.5,-0.34c0.62,0 1.15,0.12 1.6,0.35c0.45,0.23 0.79,0.55 1.04,0.95C8.1,4.46 8.23,4.9 8.23,5.4C8.23,6 8.1,6.48 7.84,6.81C7.58,7.14 7.29,7.4 6.97,7.6v0.08c0.46,0.2 0.84,0.5 1.13,0.91c0.3,0.4 0.45,0.93 0.45,1.58c0,0.58 -0.14,1.1 -0.42,1.55c-0.27,0.46 -0.65,0.82 -1.15,1.09C6.5,13.09 5.93,13.22 5.29,13.22z"/>
|
||||||
|
+ android:fillColor="#FFFFFFFF"
|
||||||
|
+ android:pathData="M13.77,12.24l-0.22,0.27c-0.63,0.73-1.55,1.1-2.76,1.1c-1.08,0-1.92-0.36-2.53-1.07c-0.61-0.71-0.93-1.72-0.94-3.02V7.56 c0-1.39,0.28-2.44,0.84-3.13s1.39-1.04,2.51-1.04c0.95,0,1.69,0.26,2.23,0.79s0.83,1.28,0.89,2.26h-1.25 C12.47,5.82,12.3,5.33,12,4.98s-0.74-0.52-1.34-0.52c-0.72,0-1.24,0.23-1.57,0.7S8.59,6.37,8.58,7.4v2.03c0,1,0.19,1.77,0.57,2.31 c0.38,0.54,0.93,0.8,1.65,0.8c0.67,0,1.19-0.16,1.54-0.49l0.18-0.17V9.59H10.7V8.52h3.07V12.24z" />
|
||||||
|
<path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M14.44,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83c-0.38,-0.79 -0.57,-1.71 -0.57,-2.76c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11L17.3,6.01c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6h-1.41v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.78,13.07 15.17,13.22 14.44,13.22z"/>
|
||||||
|
+ android:pathData="M 0 0 H 14 V 17 H 0 V 0 Z" />
|
||||||
|
</vector>
|
||||||
|
diff --git a/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
|
||||||
|
index 1de7d78ff5f2..535f3589ea6b 100644
|
||||||
|
--- a/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
|
||||||
|
+++ b/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
|
||||||
|
@@ -14,14 +14,17 @@
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
- android:width="22dp"
|
||||||
|
- android:height="16dp"
|
||||||
|
- android:viewportWidth="22.0"
|
||||||
|
- android:viewportHeight="16.0">
|
||||||
|
+ android:width="12.35dp"
|
||||||
|
+ android:height="15dp"
|
||||||
|
+ android:viewportWidth="14"
|
||||||
|
+ android:viewportHeight="17">
|
||||||
|
+
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="#FFFFFFFF"
|
||||||
|
+ android:pathData="M5.07,10.13h1.11v1.03H5.07v2.31H3.86v-2.31H0.1v-0.75l3.7-6.9h1.27V10.13z M1.44,10.13h2.42V5.4L1.44,10.13z" />
|
||||||
|
<path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M2,10.98V9.81l4.28,-6.83h1.6v6.59h1.19v1.41H7.88V13H6.4v-2.02H2zM3.68,9.57H6.4V5.33H6.31L3.68,9.57z"/>
|
||||||
|
+ android:fillColor="#FFFFFFFF"
|
||||||
|
+ android:pathData="M13.9,12.24l-0.22,0.27c-0.63,0.73-1.55,1.1-2.76,1.1c-1.08,0-1.92-0.36-2.53-1.07c-0.61-0.71-0.93-1.72-0.94-3.02V7.56 c0-1.39,0.28-2.44,0.84-3.13s1.39-1.04,2.51-1.04c0.95,0,1.69,0.26,2.23,0.79s0.83,1.28,0.89,2.26h-1.25 c-0.05-0.62-0.22-1.1-0.52-1.45s-0.74-0.52-1.34-0.52c-0.72,0-1.24,0.23-1.57,0.7S8.72,6.37,8.71,7.4v2.03 c0,1,0.19,1.77,0.57,2.31c0.38,0.54,0.93,0.8,1.65,0.8c0.67,0,1.19-0.16,1.54-0.49l0.18-0.17V9.59h-1.82V8.52h3.07V12.24z" />
|
||||||
|
<path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M15,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83c-0.38,-0.79 -0.57,-1.71 -0.57,-2.76c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27c-0.28,0.56 -0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6h-1.41v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C16.34,13.07 15.73,13.22 15,13.22z"/>
|
||||||
|
+ android:pathData="M 0 0 H 14 V 17 H 0 V 0 Z" />
|
||||||
|
</vector>
|
||||||
|
diff --git a/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
|
||||||
|
index d961c6c2266f..2aa6e57f6f82 100644
|
||||||
|
--- a/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
|
||||||
|
+++ b/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
|
||||||
|
@@ -14,14 +14,14 @@
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
- android:width="21dp"
|
||||||
|
- android:height="16dp"
|
||||||
|
- android:viewportWidth="21.0"
|
||||||
|
- android:viewportHeight="16.0">
|
||||||
|
- <path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M5.3,13.22c-0.57,0 -1.1,-0.11 -1.58,-0.34c-0.48,-0.22 -0.87,-0.55 -1.18,-0.98C2.24,11.47 2.06,10.93 2,10.3l1.48,-0.2c0.07,0.5 0.25,0.92 0.56,1.25c0.32,0.32 0.74,0.48 1.26,0.48c0.57,0 1.02,-0.18 1.34,-0.55c0.33,-0.37 0.49,-0.87 0.49,-1.48c0,-0.61 -0.16,-1.09 -0.49,-1.46C6.32,7.96 5.88,7.78 5.32,7.78C5,7.78 4.7,7.85 4.42,8C4.15,8.14 3.93,8.33 3.76,8.56L2.28,7.92l0.6,-4.94h5.26v1.36H4.1L3.72,7.02l0.08,0.03C4,6.87 4.25,6.73 4.55,6.62c0.3,-0.12 0.63,-0.18 1.01,-0.18c0.6,0 1.13,0.14 1.6,0.41C7.62,7.11 7.98,7.5 8.24,8c0.27,0.5 0.41,1.1 0.41,1.79c0,0.66 -0.14,1.26 -0.43,1.78c-0.28,0.51 -0.67,0.92 -1.18,1.22C6.55,13.08 5.97,13.22 5.3,13.22z"/>
|
||||||
|
- <path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M14.51,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83C10.19,9.95 10,9.03 10,7.99c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6H17.6v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.85,13.07 15.24,13.22 14.51,13.22z"/>
|
||||||
|
+ android:width="14dp"
|
||||||
|
+ android:height="17dp"
|
||||||
|
+ android:viewportWidth="14"
|
||||||
|
+ android:viewportHeight="17">
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="#FF000000"
|
||||||
|
+ android:pathData="M13.9,12.24l-0.22,0.27c-0.63,0.73 -1.55,1.1 -2.76,1.1c-1.08,0 -1.92,-0.36 -2.53,-1.07s-0.93,-1.72 -0.94,-3.02V7.56c0,-1.39 0.28,-2.44 0.84,-3.13s1.39,-1.04 2.51,-1.04c0.95,0 1.69,0.26 2.23,0.79s0.83,1.28 0.89,2.26h-1.25c-0.05,-0.62 -0.22,-1.1 -0.52,-1.45s-0.74,-0.52 -1.34,-0.52c-0.72,0 -1.24,0.23 -1.57,0.7S8.72,6.37 8.71,7.4v2.03c0,1 0.19,1.77 0.57,2.31c0.38,0.54 0.93,0.8 1.65,0.8c0.67,0 1.19,-0.16 1.54,-0.49l0.18,-0.17V9.59h-1.82V8.52h3.07V12.24z"/>
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="#FF000000"
|
||||||
|
+ android:pathData="M1.15,8.47l0.43,-4.96h4.33v1.17H2.6L2.37,7.39C2.78,7.1 3.22,6.96 3.69,6.96c0.77,0 1.38,0.3 1.83,0.9s0.66,1.41 0.66,2.43c0,1.03 -0.24,1.84 -0.72,2.43S4.32,13.6 3.48,13.6c-0.75,0 -1.36,-0.24 -1.83,-0.73s-0.74,-1.16 -0.81,-2.02h1.13c0.07,0.57 0.23,1 0.49,1.29c0.26,0.29 0.59,0.43 1.01,0.43c0.47,0 0.84,-0.2 1.1,-0.61c0.26,-0.41 0.4,-0.96 0.4,-1.65c0,-0.65 -0.14,-1.18 -0.43,-1.59S3.88,8.09 3.4,8.09c-0.4,0 -0.72,0.1 -0.96,0.31L2.11,8.73L1.15,8.47z"/>
|
||||||
|
</vector>
|
||||||
|
diff --git a/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml b/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
|
||||||
|
index 22bcf7b8c8a3..ed9d85e3cbe4 100644
|
||||||
|
--- a/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
|
||||||
|
+++ b/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
|
||||||
|
@@ -14,14 +14,17 @@
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
- android:width="24dp"
|
||||||
|
- android:height="16dp"
|
||||||
|
- android:viewportWidth="24.0"
|
||||||
|
- android:viewportHeight="16.0">
|
||||||
|
+ android:width="38dp"
|
||||||
|
+ android:height="24dp"
|
||||||
|
+ android:viewportWidth="38.0"
|
||||||
|
+ android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M4.59,13L2,2.98h1.69l1.5,6.48l0.17,0.88h0.08l0.21,-0.88l1.89,-6.48h1.54l1.83,6.48l0.21,0.87h0.08l0.15,-0.87l1.51,-6.48h1.68L12.01,13H10.4L8.58,6.36L8.36,5.4H8.27L8.05,6.36L6.16,13H4.59z"/>
|
||||||
|
+ android:pathData="M9.45,14.48h1.8c-0.05,0.98 -0.24,1.82 -0.6,2.53c-0.35,0.7 -0.85,1.24 -1.51,1.62c-0.66,0.38 -1.48,0.57 -2.47,0.57c-0.71,0 -1.35,-0.14 -1.92,-0.42c-0.57,-0.28 -1.06,-0.68 -1.47,-1.2c-0.4,-0.53 -0.71,-1.16 -0.93,-1.89c-0.21,-0.74 -0.32,-1.56 -0.32,-2.48v-2.63c0,-0.91 0.11,-1.74 0.32,-2.47c0.22,-0.74 0.54,-1.36 0.95,-1.88C3.71,5.69 4.21,5.29 4.8,5.01c0.6,-0.28 1.28,-0.42 2.03,-0.42c0.92,0 1.71,0.19 2.34,0.56c0.64,0.36 1.14,0.9 1.48,1.61c0.35,0.7 0.55,1.57 0.59,2.59h-1.8C9.41,8.59 9.29,7.98 9.1,7.52C8.91,7.04 8.63,6.69 8.26,6.47C7.9,6.24 7.42,6.13 6.84,6.13c-0.52,0 -0.97,0.1 -1.36,0.31C5.1,6.65 4.79,6.95 4.54,7.34C4.3,7.72 4.12,8.19 3.99,8.74c-0.12,0.54 -0.18,1.15 -0.18,1.82v2.65c0,0.62 0.05,1.21 0.15,1.75c0.1,0.54 0.27,1.02 0.49,1.43c0.23,0.4 0.52,0.72 0.89,0.95c0.36,0.23 0.81,0.34 1.33,0.34c0.66,0 1.18,-0.11 1.56,-0.32c0.38,-0.21 0.67,-0.56 0.85,-1.03C9.27,15.85 9.39,15.23 9.45,14.48z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M15.77,9.85V8.56h2.46V6.1h1.3v2.46H22v1.29h-2.46v2.46h-1.3V9.85H15.77z"/>
|
||||||
|
+ android:pathData="M24.87,4.78l-1.74,9.72l-0.2,1.64l-0.29,-1.44l-2.21,-9.92l-0.2,0l-1.06,0l-0.22,0l-2.28,9.92l-0.28,1.4l-0.18,-1.59l-1.78,-9.73l-1.79,0l2.83,14.22l0.34,0l0.92,0l0.35,0l2.48,-10.36l0.14,-0.84l0.15,0.84l2.36,10.36l0.36,0l0.92,0l0.34,0l2.82,-14.22z"/>
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="#FF000000"
|
||||||
|
+ android:pathData="M35.72,6.32l0,-1.54l-5.61,0l-0.34,0l-1.45,0l0,14.22l1.79,0l0,-6.28l4.8,0l0,-1.54l-4.8,0l0,-4.86z"/>
|
||||||
|
</vector>
|
||||||
|
diff --git a/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
|
||||||
|
index 739e29d886c2..e6b4fb698242 100644
|
||||||
|
--- a/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
|
||||||
|
+++ b/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
|
||||||
|
@@ -14,17 +14,20 @@
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
- android:width="26dp"
|
||||||
|
- android:height="16dp"
|
||||||
|
- android:viewportWidth="26.0"
|
||||||
|
- android:viewportHeight="16.0">
|
||||||
|
+ android:width="15.88dp"
|
||||||
|
+ android:height="15dp"
|
||||||
|
+ android:viewportWidth="18"
|
||||||
|
+ android:viewportHeight="17">
|
||||||
|
+
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="#FFFFFFFF"
|
||||||
|
+ android:pathData="M1.34,12.4h3.9v1.07H0.08V3.52h1.26V12.4z" />
|
||||||
|
<path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M2,13V2.98h1.53v8.57H8.3V13H2z"/>
|
||||||
|
+ android:fillColor="#FFFFFFFF"
|
||||||
|
+ android:pathData="M11.1,4.6H8.48v8.88H7.23V4.6H4.62V3.52h6.48V4.6z" />
|
||||||
|
<path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M11.24,13V4.43H8.19V2.98h7.63v1.46h-3.05V13H11.24z"/>
|
||||||
|
+ android:fillColor="#FFFFFFFF"
|
||||||
|
+ android:pathData="M17.34,8.88h-3.52v3.53h4.1v1.07h-5.35V3.52h5.28V4.6h-4.03V7.8h3.52V8.88z" />
|
||||||
|
<path
|
||||||
|
- android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M17.41,13V2.98h6.36v1.46h-4.83v2.65h4.4v1.46h-4.4v3.01h4.83V13H17.41z"/>
|
||||||
|
+ android:pathData="M 0 0 H 18 V 17 H 0 V 0 Z" />
|
||||||
|
</vector>
|
||||||
|
diff --git a/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml b/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
|
||||||
|
index 48faeb22416f..1511659ea42f 100644
|
||||||
|
--- a/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
|
||||||
|
+++ b/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
|
||||||
|
@@ -14,11 +14,11 @@
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
- android:width="16dp"
|
||||||
|
- android:height="16dp"
|
||||||
|
- android:viewportWidth="16.0"
|
||||||
|
- android:viewportHeight="16.0">
|
||||||
|
+ android:width="@dimen/signal_icon_size"
|
||||||
|
+ android:height="@dimen/signal_icon_size"
|
||||||
|
+ android:viewportWidth="24.0"
|
||||||
|
+ android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
- android:pathData="M4.5,13.02V3h3.93c0.97,0 1.75,0.27 2.34,0.81c0.6,0.53 0.9,1.28 0.9,2.25c0,0.63 -0.19,1.2 -0.56,1.74c-0.37,0.53 -0.95,0.91 -1.74,1.12l2.45,4.02v0.08h-1.69L7.75,9.09H6.03v3.93H4.5zM8.46,4.44H6.03v3.23h2.44c0.49,0 0.9,-0.14 1.2,-0.41c0.31,-0.28 0.46,-0.69 0.46,-1.22s-0.15,-0.93 -0.45,-1.2C9.38,4.58 8.98,4.44 8.46,4.44z"/>
|
||||||
|
+ android:pathData="M14.21,12.81c0.36,-0.16 0.69,-0.36 0.97,-0.61c0.41,-0.38 0.72,-0.83 0.94,-1.37c0.21,-0.54 0.32,-1.14 0.32,-1.79c0,-0.92 -0.16,-1.7 -0.49,-2.33c-0.32,-0.64 -0.79,-1.12 -1.43,-1.45c-0.62,-0.33 -1.4,-0.49 -2.32,-0.49H8.23V19h1.8v-5.76h2.5L15.06,19h1.92v-0.12L14.21,12.81zM10.03,11.71V6.32h2.18c0.59,0 1.06,0.11 1.42,0.34c0.36,0.22 0.62,0.54 0.78,0.95c0.16,0.41 0.24,0.89 0.24,1.44c0,0.49 -0.09,0.93 -0.27,1.34c-0.18,0.4 -0.46,0.73 -0.82,0.97c-0.36,0.23 -0.82,0.35 -1.37,0.35H10.03z"/>
|
||||||
|
</vector>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 916d532636decc77b67fd22e96507b2c9aaa4267 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 29 Sep 2022 11:27:57 +0000
|
||||||
|
Subject: [PATCH 13/21] Revert "Use the default top clock margin on h800
|
||||||
|
devices"
|
||||||
|
|
||||||
|
This reverts commits 50ba380f4d8d1c2523e0f76295ca556038796bfd
|
||||||
|
and 2a254b4d479029aec46f79a0ed14ffab6d0424bc.
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values-h800dp/dimens.xml | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values-h800dp/dimens.xml b/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
index 829ef98956c5..8ee3cc1944f2 100644
|
||||||
|
--- a/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
@@ -15,6 +15,9 @@
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
+ <!-- Minimum margin between clock and top of screen or ambient indication -->
|
||||||
|
+ <dimen name="keyguard_clock_top_margin">38dp</dimen>
|
||||||
|
+
|
||||||
|
<!-- Margin above the ambient indication container -->
|
||||||
|
<dimen name="ambient_indication_container_margin_top">20dp</dimen>
|
||||||
|
</resources>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,102 @@
|
|||||||
|
From 560702e79e667348a4487f4d34dd6ee2dba5d828 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 7 Oct 2020 14:00:35 +0000
|
||||||
|
Subject: [PATCH 14/21] UI: Always render into cutouts
|
||||||
|
|
||||||
|
Eliminates black/white letterboxing in apps, keyguard and QS
|
||||||
|
|
||||||
|
Change-Id: I4661c7979bfa7de453329fcddbaeefc2009e2da3
|
||||||
|
---
|
||||||
|
core/java/android/view/InsetsState.java | 19 +------------------
|
||||||
|
.../shade/QuickSettingsController.java | 11 +++++++----
|
||||||
|
.../com/android/server/wm/DisplayPolicy.java | 1 +
|
||||||
|
3 files changed, 9 insertions(+), 22 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/view/InsetsState.java b/core/java/android/view/InsetsState.java
|
||||||
|
index 59e0932ecd80..a090a59a1357 100644
|
||||||
|
--- a/core/java/android/view/InsetsState.java
|
||||||
|
+++ b/core/java/android/view/InsetsState.java
|
||||||
|
@@ -501,24 +501,7 @@ public class InsetsState implements Parcelable {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getDisplayCutoutSafe(Rect outBounds) {
|
||||||
|
- outBounds.set(
|
||||||
|
- WindowLayout.MIN_X, WindowLayout.MIN_Y, WindowLayout.MAX_X, WindowLayout.MAX_Y);
|
||||||
|
- final DisplayCutout cutout = mDisplayCutout.get();
|
||||||
|
- final Rect displayFrame = mDisplayFrame;
|
||||||
|
- if (!cutout.isEmpty()) {
|
||||||
|
- if (cutout.getSafeInsetLeft() > 0) {
|
||||||
|
- outBounds.left = displayFrame.left + cutout.getSafeInsetLeft();
|
||||||
|
- }
|
||||||
|
- if (cutout.getSafeInsetTop() > 0) {
|
||||||
|
- outBounds.top = displayFrame.top + cutout.getSafeInsetTop();
|
||||||
|
- }
|
||||||
|
- if (cutout.getSafeInsetRight() > 0) {
|
||||||
|
- outBounds.right = displayFrame.right - cutout.getSafeInsetRight();
|
||||||
|
- }
|
||||||
|
- if (cutout.getSafeInsetBottom() > 0) {
|
||||||
|
- outBounds.bottom = displayFrame.bottom - cutout.getSafeInsetBottom();
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ outBounds.set(mDisplayFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoundedCorners(RoundedCorners roundedCorners) {
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
|
||||||
|
index 1842dd110d6d..e14bcc232823 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
|
||||||
|
@@ -296,6 +296,8 @@ public class QuickSettingsController implements Dumpable {
|
||||||
|
private int mOneFingerQuickSettingsIntercept;
|
||||||
|
private final ContentObserver mOneFingerQuickSettingsInterceptObserver;
|
||||||
|
|
||||||
|
+ private WindowManager mWindowManager;
|
||||||
|
+
|
||||||
|
private final Region mInterceptRegion = new Region();
|
||||||
|
/** The end bounds of a clipping animation. */
|
||||||
|
private final Rect mClippingAnimationEndBounds = new Rect();
|
||||||
|
@@ -413,6 +415,8 @@ public class QuickSettingsController implements Dumpable {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
+ mWindowManager = mPanelView.getContext().getSystemService(WindowManager.class);
|
||||||
|
+
|
||||||
|
dumpManager.registerDumpable(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -556,8 +560,7 @@ public class QuickSettingsController implements Dumpable {
|
||||||
|
* on ACTION_DOWN, and safely queried repeatedly thereafter during ACTION_MOVE events.
|
||||||
|
*/
|
||||||
|
public void updateGestureInsetsCache() {
|
||||||
|
- WindowManager wm = this.mPanelView.getContext().getSystemService(WindowManager.class);
|
||||||
|
- WindowMetrics windowMetrics = wm.getCurrentWindowMetrics();
|
||||||
|
+ WindowMetrics windowMetrics = mWindowManager.getCurrentWindowMetrics();
|
||||||
|
mCachedGestureInsets = windowMetrics.getWindowInsets().getInsets(
|
||||||
|
WindowInsets.Type.systemGestures());
|
||||||
|
}
|
||||||
|
@@ -1534,8 +1537,8 @@ public class QuickSettingsController implements Dumpable {
|
||||||
|
|
||||||
|
private int calculateRightClippingBound() {
|
||||||
|
if (mIsFullWidth) {
|
||||||
|
- return mPanelView.getRight()
|
||||||
|
- + mDisplayRightInset;
|
||||||
|
+ // right bounds should also always reach the edge of the screen - getCurrentWindowMetrics ignores insets
|
||||||
|
+ return mWindowManager.getCurrentWindowMetrics().getBounds().right;
|
||||||
|
} else {
|
||||||
|
return mNotificationStackScrollLayoutController.getRight()
|
||||||
|
+ mDisplayLeftInset;
|
||||||
|
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
|
index 8b3e4d38d736..99d905deae72 100644
|
||||||
|
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
|
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
|
@@ -1396,6 +1396,7 @@ public class DisplayPolicy {
|
||||||
|
displayFrames = win.getDisplayFrames(displayFrames);
|
||||||
|
|
||||||
|
final WindowManager.LayoutParams attrs = win.mAttrs.forRotation(displayFrames.mRotation);
|
||||||
|
+ attrs.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
|
||||||
|
sTmpClientFrames.attachedFrame = attached != null ? attached.getFrame() : null;
|
||||||
|
|
||||||
|
// If this window has different LayoutParams for rotations, we cannot trust its requested
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 6b596089d52d5e95ff75605a97269770a5d3a061 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 1 Sep 2021 14:10:50 +0000
|
||||||
|
Subject: [PATCH 15/21] UI: Kill rounded corners in notification scrim
|
||||||
|
|
||||||
|
Rounded corners in S is nicely implemented, but this is one occasion where it looks out of place
|
||||||
|
|
||||||
|
Change-Id: I09ed59e0e658ebd512a9d02a8ef3edfe2c9888da
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values/dimens.xml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
index 3320f98d1620..be08d662ed14 100644
|
||||||
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
@@ -759,7 +759,7 @@
|
||||||
|
<!-- When large clock is showing, offset the smartspace by this amount -->
|
||||||
|
<dimen name="keyguard_smartspace_top_offset">12dp</dimen>
|
||||||
|
|
||||||
|
- <dimen name="notification_scrim_corner_radius">32dp</dimen>
|
||||||
|
+ <dimen name="notification_scrim_corner_radius">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
|
||||||
|
<dimen name="keyguard_min_swipe_amount">110dp</dimen>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 7ed48ed3b7a097290de3695da736da668bfc5b88 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 26 Oct 2020 14:06:56 +0000
|
||||||
|
Subject: [PATCH 16/21] UI: Reconfigure power menu items
|
||||||
|
|
||||||
|
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
|
||||||
|
---
|
||||||
|
core/res/res/values/config.xml | 5 +----
|
||||||
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||||
|
index 2ae5f1f43335..82668de63c28 100644
|
||||||
|
--- a/core/res/res/values/config.xml
|
||||||
|
+++ b/core/res/res/values/config.xml
|
||||||
|
@@ -3489,13 +3489,10 @@
|
||||||
|
"logout" = Logout the current user
|
||||||
|
-->
|
||||||
|
<string-array translatable="false" name="config_globalActionsList">
|
||||||
|
- <item>emergency</item>
|
||||||
|
- <item>lockdown</item>
|
||||||
|
<item>power</item>
|
||||||
|
<item>restart</item>
|
||||||
|
- <item>logout</item>
|
||||||
|
<item>screenshot</item>
|
||||||
|
- <item>bugreport</item>
|
||||||
|
+ <item>airplane</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From e1cd8d1cdc216ba64b34a3bae83a07b7003b1218 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 5 Mar 2022 01:43:37 +0000
|
||||||
|
Subject: [PATCH 17/21] UI: Reconfigure quick settings tiles
|
||||||
|
|
||||||
|
Change-Id: I743f52ef3a95db0ca2c02ae973faa4629e41885d
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values/config.xml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||||
|
index 9cd22313e0a1..03135f215e05 100644
|
||||||
|
--- a/packages/SystemUI/res/values/config.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/config.xml
|
||||||
|
@@ -78,7 +78,7 @@
|
||||||
|
|
||||||
|
<!-- The default tiles to display in QuickSettings -->
|
||||||
|
<string name="quick_settings_tiles_default" translatable="false">
|
||||||
|
- internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,custom(com.android.permissioncontroller/.permission.service.SafetyCenterQsTileService)
|
||||||
|
+ wifi,cell,hotspot,location,rotation,flashlight
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<!-- The class path of the Safety Quick Settings Tile -->
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 55c864cf004f63aa0475a76be4537bb26589ae4f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 29 Jun 2021 22:57:01 +0000
|
||||||
|
Subject: [PATCH 18/21] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
|
||||||
|
|
||||||
|
I decide what's good enough for a wallpaper!
|
||||||
|
|
||||||
|
Change-Id: I5ccd85b3df12e53746a4ac6cbc37ba8d11f6c336
|
||||||
|
---
|
||||||
|
core/java/android/app/WallpaperColors.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
||||||
|
index 5f5a7dfe24c6..1adce321012b 100644
|
||||||
|
--- a/core/java/android/app/WallpaperColors.java
|
||||||
|
+++ b/core/java/android/app/WallpaperColors.java
|
||||||
|
@@ -593,7 +593,7 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
|
||||||
|
int hints = 0;
|
||||||
|
double meanLuminance = totalLuminance / pixels.length;
|
||||||
|
- if (meanLuminance > BRIGHT_IMAGE_MEAN_LUMINANCE && darkPixels <= maxDarkPixels) {
|
||||||
|
+ if (meanLuminance > BRIGHT_IMAGE_MEAN_LUMINANCE) {
|
||||||
|
hints |= HINT_SUPPORTS_DARK_TEXT;
|
||||||
|
}
|
||||||
|
if (meanLuminance < DARK_THEME_MEAN_LUMINANCE) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 1c65cb4d1b36523bdc993a56e7183c8b736c9382 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 19 Oct 2021 12:09:34 +0000
|
||||||
|
Subject: [PATCH 19/21] UI: Remove privacy dot
|
||||||
|
|
||||||
|
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values/dimens.xml | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
index be08d662ed14..ea4a1db20819 100644
|
||||||
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
@@ -1102,12 +1102,12 @@
|
||||||
|
<dimen name="ongoing_appops_chip_min_width">56dp</dimen>
|
||||||
|
<!-- Three privacy items. This value must not be exceeded -->
|
||||||
|
<dimen name="ongoing_appops_chip_max_width">76dp</dimen>
|
||||||
|
- <dimen name="ongoing_appops_dot_diameter">6dp</dimen>
|
||||||
|
+ <dimen name="ongoing_appops_dot_diameter">0dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_min_animation_width">10dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_animation_in_status_bar_translation_x">15dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_animation_out_status_bar_translation_x">7dp</dimen>
|
||||||
|
<!-- Total minimum padding to enforce to ensure that the dot can always show -->
|
||||||
|
- <dimen name="ongoing_appops_dot_min_padding">20dp</dimen>
|
||||||
|
+ <dimen name="ongoing_appops_dot_min_padding">0dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
From bdedcba0f39eb17bcf93d954eede85f5c079d067 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 22 Mar 2023 00:29:13 +0000
|
||||||
|
Subject: [PATCH 20/21] UI: Restore quick settings fonts to pre-T-QPR2
|
||||||
|
|
||||||
|
TODO: Large header clock looks better in Regular - perhaps figure out how to transition smoothly?
|
||||||
|
Change-Id: If2e57fee61b6bd4b6b7fedc7e3011164cd2cb56f
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values/styles.xml | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||||
|
index 847b8a961322..09d7888ce552 100644
|
||||||
|
--- a/packages/SystemUI/res/values/styles.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/styles.xml
|
||||||
|
@@ -143,7 +143,7 @@
|
||||||
|
<!-- This is hard coded to be sans-serif-condensed to match the icons -->
|
||||||
|
|
||||||
|
<style name="TextAppearance.QS.Status">
|
||||||
|
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||||
|
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
|
||||||
|
<item name="android:textColor">?attr/onSurface</item>
|
||||||
|
<item name="android:textSize">14sp</item>
|
||||||
|
<item name="android:letterSpacing">0.01</item>
|
||||||
|
@@ -161,6 +161,7 @@
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextAppearance.QS.Status.Build">
|
||||||
|
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||||
|
<item name="android:textColor">?attr/onSurfaceVariant</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,47 @@
|
|||||||
|
From a1bee1d208afbf20b3db1cd03ae393d6e7d93a05 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 30 Sep 2022 16:02:16 +0000
|
||||||
|
Subject: [PATCH 21/21] UI: Revert to HSL luminance for wallpaper dark hints
|
||||||
|
|
||||||
|
Y U no test for consistency, Google?
|
||||||
|
|
||||||
|
Change-Id: Ie5663bdf518b4ef93d6deb634e707a32d052ac55
|
||||||
|
---
|
||||||
|
core/java/android/app/WallpaperColors.java | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
||||||
|
index 1adce321012b..477dbc827672 100644
|
||||||
|
--- a/core/java/android/app/WallpaperColors.java
|
||||||
|
+++ b/core/java/android/app/WallpaperColors.java
|
||||||
|
@@ -568,15 +568,15 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
float[] tmpHsl = new float[3];
|
||||||
|
for (int i = 0; i < pixels.length; i++) {
|
||||||
|
int pixelColor = pixels[i];
|
||||||
|
- ColorUtils.colorToHSL(pixelColor, tmpHsl);
|
||||||
|
final int alpha = Color.alpha(pixelColor);
|
||||||
|
|
||||||
|
// Apply composite colors where the foreground is a black layer with an alpha value of
|
||||||
|
// the dim amount and the background is the wallpaper pixel color.
|
||||||
|
int compositeColors = ColorUtils.compositeColors(blackTransparent, pixelColor);
|
||||||
|
|
||||||
|
- // Calculate the adjusted luminance of the dimmed wallpaper pixel color.
|
||||||
|
- double adjustedLuminance = ColorUtils.calculateLuminance(compositeColors);
|
||||||
|
+ // Calculate the luminance of the dimmed wallpaper pixel color.
|
||||||
|
+ ColorUtils.colorToHSL(compositeColors, tmpHsl);
|
||||||
|
+ double luminance = tmpHsl[2];
|
||||||
|
|
||||||
|
// Make sure we don't have a dark pixel mass that will
|
||||||
|
// make text illegible.
|
||||||
|
@@ -588,7 +588,7 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
pixels[i] = Color.RED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- totalLuminance += adjustedLuminance;
|
||||||
|
+ totalLuminance += luminance;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hints = 0;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
From f6baebedc09b503e477f7f4f1d83ac494d5028d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 8 Jun 2021 12:00:26 +0000
|
||||||
|
Subject: [PATCH] Telephony: Disable SPN retrieval
|
||||||
|
|
||||||
|
Kills "double carrier name" on lock screen
|
||||||
|
Not ideal, but not worth wasting more time on
|
||||||
|
|
||||||
|
Change-Id: I06dd17989194590972e526de85dbacf74eff805e
|
||||||
|
---
|
||||||
|
.../internal/telephony/uicc/IccRecords.java | 25 +++++--------------
|
||||||
|
1 file changed, 6 insertions(+), 19 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/java/com/android/internal/telephony/uicc/IccRecords.java b/src/java/com/android/internal/telephony/uicc/IccRecords.java
|
||||||
|
index b33e899b9..220ed875d 100644
|
||||||
|
--- a/src/java/com/android/internal/telephony/uicc/IccRecords.java
|
||||||
|
+++ b/src/java/com/android/internal/telephony/uicc/IccRecords.java
|
||||||
|
@@ -717,35 +717,22 @@ public abstract class IccRecords extends Handler implements IccConstants {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
- * Return Service Provider Name stored in SIM (EF_SPN=0x6F46) or in RUIM (EF_RUIM_SPN=0x6F41).
|
||||||
|
+ * Return null, disabling Service Provider Name.
|
||||||
|
*
|
||||||
|
- * @return null if SIM is not yet ready or no RUIM entry
|
||||||
|
+ * @return null
|
||||||
|
*/
|
||||||
|
public String getServiceProviderName() {
|
||||||
|
- if (mCarrierTestOverride.isInTestMode()) {
|
||||||
|
- String fakeSpn = mCarrierTestOverride.getFakeSpn();
|
||||||
|
- if (fakeSpn != null) {
|
||||||
|
- return fakeSpn;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- return mSpn;
|
||||||
|
+ return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
- * Return Service Provider Name stored in SIM (EF_SPN=0x6F46) or in RUIM (EF_RUIM_SPN=0x6F41) or
|
||||||
|
- * the brand override. The brand override has higher priority than the SPN from SIM.
|
||||||
|
+ * Return null, disabling Service Provider Name.
|
||||||
|
*
|
||||||
|
- * @return service provider name.
|
||||||
|
+ * @return null
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public String getServiceProviderNameWithBrandOverride() {
|
||||||
|
- if (mParentApp != null && mParentApp.getUiccProfile() != null) {
|
||||||
|
- String brandOverride = mParentApp.getUiccProfile().getOperatorBrandOverride();
|
||||||
|
- if (!TextUtils.isEmpty(brandOverride)) {
|
||||||
|
- return brandOverride;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- return mSpn;
|
||||||
|
+ return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setServiceProviderName(String spn) {
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
From d8a13aada0c4951deeda873543b8d6f33c402889 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 23 Nov 2023 22:31:47 +0800
|
||||||
|
Subject: [PATCH] sdk: I have Trust issues
|
||||||
|
|
||||||
|
Spare me the onboard and warnings
|
||||||
|
|
||||||
|
Change-Id: Id36104c8a9c386145e6d99a9d741947bddaa37be
|
||||||
|
---
|
||||||
|
.../internal/TrustInterfaceService.java | 29 -------------------
|
||||||
|
1 file changed, 29 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java b/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
|
||||||
|
index 473bfe08..281c70ef 100644
|
||||||
|
--- a/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
|
||||||
|
+++ b/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
|
||||||
|
@@ -99,15 +99,6 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||||
|
} catch (NoSuchElementException | RemoteException e) {
|
||||||
|
// ignore, the hal is not available
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- // Onboard
|
||||||
|
- if (!hasOnboardedUser()) {
|
||||||
|
- postOnBoardingNotification();
|
||||||
|
- registerLocaleChangedReceiver();
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- runTestInternal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -351,26 +342,6 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||||
|
LineageSettings.System.TRUST_INTERFACE_HINTED, 0) == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- private void registerLocaleChangedReceiver() {
|
||||||
|
- IntentFilter filter = new IntentFilter(Intent.ACTION_LOCALE_CHANGED);
|
||||||
|
- mContext.registerReceiver(mReceiver, filter);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||||
|
- @Override
|
||||||
|
- public void onReceive(Context context, Intent intent) {
|
||||||
|
- if (intent.getAction() == Intent.ACTION_LOCALE_CHANGED) {
|
||||||
|
- if (!hasOnboardedUser()) {
|
||||||
|
- // When are not onboarded, we want to change the language of the notification
|
||||||
|
- postOnBoardingNotification();
|
||||||
|
- } else {
|
||||||
|
- // We don't care anymore about language changes
|
||||||
|
- context.unregisterReceiver(this);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
/* Service */
|
||||||
|
|
||||||
|
private final IBinder mService = new ITrustInterface.Stub() {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,60 @@
|
|||||||
|
From 1b76c4a2eb60baceab9cd169cbded8f58b06b89e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 5 Sep 2021 00:30:33 +0000
|
||||||
|
Subject: [PATCH 2/4] DeskClock: Remove night mode
|
||||||
|
|
||||||
|
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
|
||||||
|
---
|
||||||
|
res/xml/screensaver_settings.xml | 7 -------
|
||||||
|
src/com/android/deskclock/Screensaver.java | 5 ++---
|
||||||
|
src/com/android/deskclock/ScreensaverActivity.java | 2 +-
|
||||||
|
3 files changed, 3 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/res/xml/screensaver_settings.xml b/res/xml/screensaver_settings.xml
|
||||||
|
index 7b8c9764a..908f76fef 100644
|
||||||
|
--- a/res/xml/screensaver_settings.xml
|
||||||
|
+++ b/res/xml/screensaver_settings.xml
|
||||||
|
@@ -26,11 +26,4 @@
|
||||||
|
android:title="@string/clock_style"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
- <CheckBoxPreference
|
||||||
|
- android:defaultValue="true"
|
||||||
|
- android:key="screensaver_night_mode"
|
||||||
|
- android:summary="@string/night_mode_summary"
|
||||||
|
- android:title="@string/night_mode_title"
|
||||||
|
- app:iconSpaceReserved="false" />
|
||||||
|
-
|
||||||
|
</PreferenceScreen>
|
||||||
|
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
|
||||||
|
index ad92b1149..f6c03ed0a 100644
|
||||||
|
--- a/src/com/android/deskclock/Screensaver.java
|
||||||
|
+++ b/src/com/android/deskclock/Screensaver.java
|
||||||
|
@@ -136,9 +136,8 @@ public final class Screensaver extends DreamService {
|
||||||
|
|
||||||
|
private void setClockStyle() {
|
||||||
|
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
|
||||||
|
- final boolean dimNightMode = DataModel.getDataModel().getScreensaverNightModeOn();
|
||||||
|
- Utils.dimClockView(dimNightMode, mMainClockView);
|
||||||
|
- setScreenBright(!dimNightMode);
|
||||||
|
+ Utils.dimClockView(false, mMainClockView);
|
||||||
|
+ setScreenBright(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
|
index b30f82ee7..90235351f 100644
|
||||||
|
--- a/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
|
+++ b/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
|
@@ -101,7 +101,7 @@ public class ScreensaverActivity extends BaseActivity {
|
||||||
|
Utils.setClockIconTypeface(mMainClockView);
|
||||||
|
Utils.setTimeFormat((TextClock) digitalClock, false);
|
||||||
|
Utils.setClockStyle(digitalClock, analogClock);
|
||||||
|
- Utils.dimClockView(true, mMainClockView);
|
||||||
|
+ Utils.dimClockView(false, mMainClockView);
|
||||||
|
analogClock.enableSeconds(false);
|
||||||
|
|
||||||
|
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,610 @@
|
|||||||
|
From 57684772d748887b4eca93d6fb5c35ee1dff72eb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 19 Jan 2022 18:04:36 +0000
|
||||||
|
Subject: [PATCH 3/4] DeskClock: Adapt digital clocks to S style
|
||||||
|
|
||||||
|
Lollipop is so yesterday...
|
||||||
|
Bring the layouts of various digital clocks (app, widget, daydream)
|
||||||
|
in-line, and adjust their styles to match the custom keyguard on S
|
||||||
|
|
||||||
|
Caveats/TODO:
|
||||||
|
- Widget swallows all touch events, even when touching an empty area
|
||||||
|
- World clocks in widgets are left untouched
|
||||||
|
|
||||||
|
Change-Id: I10c6fa213c89ac2f6e342be13fdd6390f7f787b0
|
||||||
|
---
|
||||||
|
res/layout/date_and_next_alarm_time.xml | 53 +++++++------
|
||||||
|
res/layout/desk_clock_saver.xml | 10 +--
|
||||||
|
res/layout/digital_widget.xml | 69 ++++++++---------
|
||||||
|
res/layout/digital_widget_sizer.xml | 77 ++++++++-----------
|
||||||
|
res/layout/main_clock_frame.xml | 36 +++------
|
||||||
|
res/values/dimens.xml | 12 ++-
|
||||||
|
res/values/styles.xml | 18 +++++
|
||||||
|
.../alarmclock/DigitalAppWidgetProvider.java | 31 ++++----
|
||||||
|
src/com/android/deskclock/AlarmUtils.java | 2 +-
|
||||||
|
src/com/android/deskclock/ClockFragment.java | 3 -
|
||||||
|
src/com/android/deskclock/Utils.java | 19 -----
|
||||||
|
11 files changed, 155 insertions(+), 175 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
|
||||||
|
index 9a0cb9103..b29ffedcf 100644
|
||||||
|
--- a/res/layout/date_and_next_alarm_time.xml
|
||||||
|
+++ b/res/layout/date_and_next_alarm_time.xml
|
||||||
|
@@ -18,36 +18,41 @@
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
- android:layout_gravity="center_vertical"
|
||||||
|
- android:gravity="center">
|
||||||
|
+ android:gravity="center_vertical|start"
|
||||||
|
+ android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
- style="@style/body"
|
||||||
|
+ style="@style/sc_keyguard_row"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:textAllCaps="true"
|
||||||
|
+ android:paddingTop="@dimen/sc_keyguard_status_area_top_padding"
|
||||||
|
+ android:paddingStart="@dimen/sc_keyguard_row_date_start_padding"
|
||||||
|
tools:text="Sa., 01.01."/>
|
||||||
|
|
||||||
|
- <TextView
|
||||||
|
- android:id="@+id/nextAlarmIcon"
|
||||||
|
- style="@style/body"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center"
|
||||||
|
- android:layout_marginEnd="@dimen/alarm_icon_padding"
|
||||||
|
- android:layout_marginStart="@dimen/alarm_icon_padding"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
- android:maxLines="1"
|
||||||
|
- android:text="@string/clock_emoji" />
|
||||||
|
-
|
||||||
|
- <TextView
|
||||||
|
- android:id="@+id/nextAlarm"
|
||||||
|
- style="@style/body"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
- android:textAllCaps="true"
|
||||||
|
- tools:text="Mo., 07:00"/>
|
||||||
|
+ <LinearLayout
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
+ android:layout_height="wrap_content"
|
||||||
|
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
|
||||||
|
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
|
||||||
|
+
|
||||||
|
+ <TextView
|
||||||
|
+ android:id="@+id/nextAlarmIcon"
|
||||||
|
+ style="@style/sc_keyguard_row"
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
+ android:layout_height="wrap_content"
|
||||||
|
+ android:layout_gravity="center"
|
||||||
|
+ android:layout_marginEnd="@dimen/alarm_icon_padding"
|
||||||
|
+ android:text="@string/clock_emoji"
|
||||||
|
+ android:textSize="@dimen/sc_keyguard_alarm_icon_size" />
|
||||||
|
+
|
||||||
|
+ <TextView
|
||||||
|
+ android:id="@+id/nextAlarm"
|
||||||
|
+ style="@style/sc_keyguard_row"
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
+ android:layout_height="wrap_content"
|
||||||
|
+ tools:text="Mo., 07:00"/>
|
||||||
|
+
|
||||||
|
+ </LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
diff --git a/res/layout/desk_clock_saver.xml b/res/layout/desk_clock_saver.xml
|
||||||
|
index c147bf7cd..d24219dbb 100644
|
||||||
|
--- a/res/layout/desk_clock_saver.xml
|
||||||
|
+++ b/res/layout/desk_clock_saver.xml
|
||||||
|
@@ -42,16 +42,10 @@
|
||||||
|
|
||||||
|
<TextClock
|
||||||
|
android:id="@+id/digital_clock"
|
||||||
|
- style="@style/big_thin"
|
||||||
|
+ style="@style/sc_keyguard_clock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center"
|
||||||
|
- android:layout_marginBottom="@dimen/bottom_text_spacing_digital"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:gravity="center"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:textColor="@color/white"
|
||||||
|
- android:textSize="@dimen/main_clock_font_size" />
|
||||||
|
+ android:fontFamily="sans-serif-thin" />
|
||||||
|
|
||||||
|
<include layout="@layout/date_and_next_alarm_time" />
|
||||||
|
|
||||||
|
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
|
||||||
|
index 5cf896a84..e376a5a7a 100644
|
||||||
|
--- a/res/layout/digital_widget.xml
|
||||||
|
+++ b/res/layout/digital_widget.xml
|
||||||
|
@@ -19,58 +19,53 @@
|
||||||
|
android:id="@+id/digital_widget"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
- android:gravity="top|center_horizontal"
|
||||||
|
+ android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
- <TextClock
|
||||||
|
- android:id="@+id/clock"
|
||||||
|
- style="@style/widget_big_thin"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center_horizontal|top"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:format12Hour="@string/lock_screen_12_hour_format"
|
||||||
|
- android:format24Hour="@string/lock_screen_24_hour_format"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:textColor="@color/white" />
|
||||||
|
-
|
||||||
|
<LinearLayout
|
||||||
|
+ android:id="@+id/digital_widget_actual"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center_horizontal|top">
|
||||||
|
+ android:gravity="center_vertical|start"
|
||||||
|
+ android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextClock
|
||||||
|
- android:id="@+id/date"
|
||||||
|
- style="@style/widget_label"
|
||||||
|
+ android:id="@+id/clock"
|
||||||
|
+ style="@style/sc_keyguard_clock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:textAllCaps="true"
|
||||||
|
- android:textColor="@color/white" />
|
||||||
|
+ android:format12Hour="@string/lock_screen_12_hour_format"
|
||||||
|
+ android:format24Hour="@string/lock_screen_24_hour_format" />
|
||||||
|
|
||||||
|
- <ImageView
|
||||||
|
- android:id="@+id/nextAlarmIcon"
|
||||||
|
+ <TextClock
|
||||||
|
+ android:id="@+id/date"
|
||||||
|
+ style="@style/sc_keyguard_row"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center"
|
||||||
|
- android:contentDescription="@null"
|
||||||
|
- android:scaleType="center" />
|
||||||
|
+ android:paddingTop="@dimen/sc_keyguard_status_area_top_padding"
|
||||||
|
+ android:paddingStart="@dimen/sc_keyguard_row_date_start_padding" />
|
||||||
|
|
||||||
|
- <TextView
|
||||||
|
- android:id="@+id/nextAlarm"
|
||||||
|
- style="@style/widget_label"
|
||||||
|
+ <LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:textAllCaps="true"
|
||||||
|
- android:textColor="@color/white" />
|
||||||
|
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
|
||||||
|
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
|
||||||
|
+
|
||||||
|
+ <ImageView
|
||||||
|
+ android:id="@+id/nextAlarmIcon"
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
+ android:layout_height="wrap_content"
|
||||||
|
+ android:layout_gravity="center"
|
||||||
|
+ android:contentDescription="@null"
|
||||||
|
+ android:scaleType="center" />
|
||||||
|
+
|
||||||
|
+ <TextView
|
||||||
|
+ android:id="@+id/nextAlarm"
|
||||||
|
+ style="@style/sc_keyguard_row"
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
+ android:layout_height="wrap_content" />
|
||||||
|
+
|
||||||
|
+ </LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
|
||||||
|
index f524cf536..b9a28c79f 100644
|
||||||
|
--- a/res/layout/digital_widget_sizer.xml
|
||||||
|
+++ b/res/layout/digital_widget_sizer.xml
|
||||||
|
@@ -15,64 +15,55 @@
|
||||||
|
-->
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
+ android:layout_width="match_parent"
|
||||||
|
+ android:layout_height="match_parent"
|
||||||
|
+ android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
- <TextClock
|
||||||
|
- android:id="@+id/clock"
|
||||||
|
- style="@style/widget_big_thin"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center_horizontal|top"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:format12Hour="@string/lock_screen_12_hour_format"
|
||||||
|
- android:format24Hour="@string/lock_screen_24_hour_format"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:textColor="@color/white" />
|
||||||
|
-
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center_horizontal|top">
|
||||||
|
+ android:gravity="center_vertical|start"
|
||||||
|
+ android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextClock
|
||||||
|
- android:id="@+id/date"
|
||||||
|
- style="@style/widget_label"
|
||||||
|
+ android:id="@+id/clock"
|
||||||
|
+ style="@style/sc_keyguard_clock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:textAllCaps="true"
|
||||||
|
- android:textColor="@color/white" />
|
||||||
|
+ android:format12Hour="@string/lock_screen_12_hour_format"
|
||||||
|
+ android:format24Hour="@string/lock_screen_24_hour_format" />
|
||||||
|
|
||||||
|
- <!-- This view is drawn to a Bitmap and sent to the widget as an icon. -->
|
||||||
|
- <TextView
|
||||||
|
- android:id="@+id/nextAlarmIcon"
|
||||||
|
- style="@style/widget_label"
|
||||||
|
+ <TextClock
|
||||||
|
+ android:id="@+id/date"
|
||||||
|
+ style="@style/sc_keyguard_row"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:text="@string/clock_emoji"
|
||||||
|
- android:textColor="@color/white" />
|
||||||
|
+ android:paddingTop="@dimen/sc_keyguard_status_area_top_padding"
|
||||||
|
+ android:paddingStart="@dimen/sc_keyguard_row_date_start_padding" />
|
||||||
|
|
||||||
|
- <TextView
|
||||||
|
- android:id="@+id/nextAlarm"
|
||||||
|
- style="@style/widget_label"
|
||||||
|
+ <LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="center"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:textAllCaps="true"
|
||||||
|
- android:textColor="@color/white" />
|
||||||
|
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
|
||||||
|
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
|
||||||
|
+
|
||||||
|
+ <!-- This view is drawn to a Bitmap and sent to the widget as an icon. -->
|
||||||
|
+ <TextView
|
||||||
|
+ android:id="@+id/nextAlarmIcon"
|
||||||
|
+ style="@style/sc_keyguard_row"
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
+ android:layout_height="wrap_content"
|
||||||
|
+ android:layout_gravity="center"
|
||||||
|
+ android:text="@string/clock_emoji" />
|
||||||
|
+
|
||||||
|
+ <TextView
|
||||||
|
+ android:id="@+id/nextAlarm"
|
||||||
|
+ style="@style/sc_keyguard_row"
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
+ android:layout_height="wrap_content" />
|
||||||
|
+
|
||||||
|
+ </LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
|
||||||
|
index c26f61dbd..c2e84eaa3 100644
|
||||||
|
--- a/res/layout/main_clock_frame.xml
|
||||||
|
+++ b/res/layout/main_clock_frame.xml
|
||||||
|
@@ -26,44 +26,28 @@
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
- <androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
- android:layout_width="match_parent"
|
||||||
|
+ <LinearLayout
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="start">
|
||||||
|
+ android:gravity="center_vertical|start"
|
||||||
|
+ android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.android.deskclock.AnalogClock
|
||||||
|
android:id="@+id/analog_clock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_marginTop="@dimen/circle_margin_top"
|
||||||
|
- app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
- app:layout_constraintDimensionRatio="1:1"
|
||||||
|
- app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
- app:layout_constraintStart_toStartOf="parent"
|
||||||
|
- app:layout_constraintTop_toTopOf="parent"
|
||||||
|
- app:layout_constraintWidth_percent="@dimen/analog_clock_width_percent"/>
|
||||||
|
+ android:layout_marginTop="@dimen/circle_margin_top"/>
|
||||||
|
|
||||||
|
<com.android.deskclock.widget.AutoSizingTextClock
|
||||||
|
android:id="@+id/digital_clock"
|
||||||
|
- style="@style/display_time"
|
||||||
|
- android:layout_width="match_parent"
|
||||||
|
+ style="@style/sc_keyguard_clock"
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:ellipsize="none"
|
||||||
|
- android:includeFontPadding="false"
|
||||||
|
android:paddingTop="@dimen/main_clock_digital_padding"
|
||||||
|
- android:singleLine="true"
|
||||||
|
- android:textSize="@dimen/main_clock_digital_font_size"
|
||||||
|
- app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
- app:layout_constraintStart_toStartOf="parent"
|
||||||
|
- app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="01:23"/>
|
||||||
|
|
||||||
|
- </androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
+ <include layout="@layout/date_and_next_alarm_time" />
|
||||||
|
+
|
||||||
|
+ </LinearLayout>
|
||||||
|
|
||||||
|
- <include
|
||||||
|
- layout="@layout/date_and_next_alarm_time"
|
||||||
|
- android:id="@+id/date_and_next_alarm_time"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="start"/>
|
||||||
|
</LinearLayout>
|
||||||
|
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
|
||||||
|
index c136fe25a..58a9fedc0 100644
|
||||||
|
--- a/res/values/dimens.xml
|
||||||
|
+++ b/res/values/dimens.xml
|
||||||
|
@@ -62,7 +62,7 @@
|
||||||
|
<dimen name="body_font_padding">4dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="alarm_label_size">14sp</dimen>
|
||||||
|
- <dimen name="alarm_icon_padding">6dp</dimen>
|
||||||
|
+ <dimen name="alarm_icon_padding">7dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="backspace_icon_size">24dp</dimen>
|
||||||
|
<dimen name="no_alarms_size">90dp</dimen>
|
||||||
|
@@ -144,4 +144,14 @@
|
||||||
|
<dimen name="settings_padding">4dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="analog_clock_width_percent">0.5</dimen>
|
||||||
|
+
|
||||||
|
+ <!-- Keyguard dimens, taken from S fwb -->
|
||||||
|
+ <dimen name="sc_keyguard_clock_text_size">86dp</dimen>
|
||||||
|
+ <dimen name="sc_keyguard_row_text_size">16dp</dimen>
|
||||||
|
+ <dimen name="sc_keyguard_alarm_icon_size">21dp</dimen>
|
||||||
|
+ <!-- Padding correction values, measured from S fwb -->
|
||||||
|
+ <dimen name="sc_keyguard_status_area_top_padding">9dp</dimen>
|
||||||
|
+ <dimen name="sc_keyguard_row_top_padding">11dp</dimen>
|
||||||
|
+ <dimen name="sc_keyguard_row_date_start_padding">6dp</dimen>
|
||||||
|
+ <dimen name="sc_keyguard_row_alarm_start_padding">5.5dp</dimen>
|
||||||
|
</resources>
|
||||||
|
diff --git a/res/values/styles.xml b/res/values/styles.xml
|
||||||
|
index 8c6364344..159f24766 100644
|
||||||
|
--- a/res/values/styles.xml
|
||||||
|
+++ b/res/values/styles.xml
|
||||||
|
@@ -209,4 +209,22 @@
|
||||||
|
<item name="layout_constraintStart_toStartOf">parent</item>
|
||||||
|
<item name="layout_constraintTop_toBottomOf">@id/timer_setup_time</item>
|
||||||
|
</style>
|
||||||
|
+
|
||||||
|
+ <style name="sc_keyguard_clock">
|
||||||
|
+ <item name="android:fontFamily">sans-serif-light</item>
|
||||||
|
+ <item name="android:fontFeatureSettings">tnum</item>
|
||||||
|
+ <item name="android:textSize">@dimen/sc_keyguard_clock_text_size</item>
|
||||||
|
+ <item name="android:textColor">@color/white</item>
|
||||||
|
+ <item name="android:ellipsize">none</item>
|
||||||
|
+ <item name="android:includeFontPadding">false</item>
|
||||||
|
+ <item name="android:maxLines">1</item>
|
||||||
|
+ </style>
|
||||||
|
+
|
||||||
|
+ <style name="sc_keyguard_row">
|
||||||
|
+ <item name="android:textSize">@dimen/sc_keyguard_row_text_size</item>
|
||||||
|
+ <item name="android:textColor">@color/white</item>
|
||||||
|
+ <item name="android:ellipsize">none</item>
|
||||||
|
+ <item name="android:includeFontPadding">false</item>
|
||||||
|
+ <item name="android:maxLines">1</item>
|
||||||
|
+ </style>
|
||||||
|
</resources>
|
||||||
|
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
|
index b54a500c5..fb1b30aa7 100644
|
||||||
|
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
|
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
|
@@ -223,7 +223,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
if (Utils.isWidgetClickable(wm, widgetId)) {
|
||||||
|
final Intent openApp = new Intent(context, DeskClock.class);
|
||||||
|
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, FLAG_IMMUTABLE);
|
||||||
|
- rv.setOnClickPendingIntent(R.id.digital_widget, pi);
|
||||||
|
+ rv.setOnClickPendingIntent(R.id.digital_widget_actual, pi);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configure child views of the remote view.
|
||||||
|
@@ -255,7 +255,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
final int targetWidthPx = portrait ? minWidthPx : maxWidthPx;
|
||||||
|
final int targetHeightPx = portrait ? maxHeightPx : minHeightPx;
|
||||||
|
final int largestClockFontSizePx =
|
||||||
|
- resources.getDimensionPixelSize(R.dimen.widget_max_clock_font_size);
|
||||||
|
+ resources.getDimensionPixelSize(R.dimen.sc_keyguard_clock_text_size);
|
||||||
|
|
||||||
|
// Create a size template that describes the widget bounds.
|
||||||
|
final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx);
|
||||||
|
@@ -327,13 +327,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Measure the widget at the largest possible size.
|
||||||
|
- Sizes high = measure(template, template.getLargestClockFontSizePx(), sizer);
|
||||||
|
+ Sizes high = measure(context, template, template.getLargestClockFontSizePx(), sizer);
|
||||||
|
if (!high.hasViolations()) {
|
||||||
|
return high;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Measure the widget at the smallest possible size.
|
||||||
|
- Sizes low = measure(template, template.getSmallestClockFontSizePx(), sizer);
|
||||||
|
+ Sizes low = measure(context, template, template.getSmallestClockFontSizePx(), sizer);
|
||||||
|
if (low.hasViolations()) {
|
||||||
|
return low;
|
||||||
|
}
|
||||||
|
@@ -345,7 +345,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
return low;
|
||||||
|
}
|
||||||
|
|
||||||
|
- final Sizes midSize = measure(template, midFontSize, sizer);
|
||||||
|
+ final Sizes midSize = measure(context, template, midFontSize, sizer);
|
||||||
|
if (midSize.hasViolations()) {
|
||||||
|
high = midSize;
|
||||||
|
} else {
|
||||||
|
@@ -411,7 +411,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
* the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting
|
||||||
|
* size measurements.
|
||||||
|
*/
|
||||||
|
- private static Sizes measure(Sizes template, int clockFontSize, View sizer) {
|
||||||
|
+ private static Sizes measure(Context context, Sizes template, int clockFontSize, View sizer) {
|
||||||
|
// Create a copy of the given template sizes.
|
||||||
|
final Sizes measuredSizes = template.newSize();
|
||||||
|
|
||||||
|
@@ -422,13 +422,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
final TextView nextAlarmIcon = sizer.findViewById(R.id.nextAlarmIcon);
|
||||||
|
|
||||||
|
// Adjust the font sizes.
|
||||||
|
- measuredSizes.setClockFontSizePx(clockFontSize);
|
||||||
|
+ measuredSizes.setClockFontSizePx(context, clockFontSize);
|
||||||
|
clock.setText(getLongestTimeString(clock));
|
||||||
|
clock.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mClockFontSizePx);
|
||||||
|
date.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mFontSizePx);
|
||||||
|
nextAlarm.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mFontSizePx);
|
||||||
|
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
|
||||||
|
- nextAlarmIcon.setPadding(measuredSizes.mIconPaddingPx, 0, measuredSizes.mIconPaddingPx, 0);
|
||||||
|
+ nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
|
||||||
|
|
||||||
|
// Measure and layout the sizer.
|
||||||
|
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
||||||
|
@@ -509,12 +509,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; }
|
||||||
|
private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; }
|
||||||
|
private int getClockFontSizePx() { return mClockFontSizePx; }
|
||||||
|
- private void setClockFontSizePx(int clockFontSizePx) {
|
||||||
|
+ private void setClockFontSizePx(Context context, int clockFontSizePx) {
|
||||||
|
+ final Resources resources = context.getResources();
|
||||||
|
+ int keyguardClockTextSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_clock_text_size);
|
||||||
|
+ int keyguardRowTextSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_row_text_size);
|
||||||
|
+ int keyguardAlarmIconSizePx = resources.getDimensionPixelSize(R.dimen.sc_keyguard_alarm_icon_size);
|
||||||
|
+ int alarmIconPaddingPx = resources.getDimensionPixelSize(R.dimen.alarm_icon_padding);
|
||||||
|
mClockFontSizePx = clockFontSizePx;
|
||||||
|
- mFontSizePx = max(1, round(clockFontSizePx / 7.5f));
|
||||||
|
- mIconFontSizePx = (int) (mFontSizePx * 1.4f);
|
||||||
|
- mIconPaddingPx = mFontSizePx / 3;
|
||||||
|
- }
|
||||||
|
+ mFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardRowTextSizePx));
|
||||||
|
+ mIconFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardAlarmIconSizePx));
|
||||||
|
+ mIconPaddingPx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) alarmIconPaddingPx));
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the amount of widget height available to the world cities list
|
||||||
|
diff --git a/src/com/android/deskclock/AlarmUtils.java b/src/com/android/deskclock/AlarmUtils.java
|
||||||
|
index c3739bac8..5b931a46d 100644
|
||||||
|
--- a/src/com/android/deskclock/AlarmUtils.java
|
||||||
|
+++ b/src/com/android/deskclock/AlarmUtils.java
|
||||||
|
@@ -38,7 +38,7 @@ import java.util.Locale;
|
||||||
|
public class AlarmUtils {
|
||||||
|
|
||||||
|
public static String getFormattedTime(Context context, Calendar time) {
|
||||||
|
- final String skeleton = DateFormat.is24HourFormat(context) ? "EHm" : "Ehma";
|
||||||
|
+ final String skeleton = DateFormat.is24HourFormat(context) ? "Hm" : "hma";
|
||||||
|
final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
|
||||||
|
return (String) DateFormat.format(pattern, time);
|
||||||
|
}
|
||||||
|
diff --git a/src/com/android/deskclock/ClockFragment.java b/src/com/android/deskclock/ClockFragment.java
|
||||||
|
index bf53584e4..7a0e3ae0b 100644
|
||||||
|
--- a/src/com/android/deskclock/ClockFragment.java
|
||||||
|
+++ b/src/com/android/deskclock/ClockFragment.java
|
||||||
|
@@ -123,7 +123,6 @@ public final class ClockFragment extends DeskClockFragment {
|
||||||
|
Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mClockFrame);
|
||||||
|
Utils.setClockStyle(mDigitalClock, mAnalogClock);
|
||||||
|
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
|
||||||
|
- Utils.updateDateGravity(mClockFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Schedule a runnable to update the date every quarter hour.
|
||||||
|
@@ -151,7 +150,6 @@ public final class ClockFragment extends DeskClockFragment {
|
||||||
|
if (mDigitalClock != null && mAnalogClock != null) {
|
||||||
|
Utils.setClockStyle(mDigitalClock, mAnalogClock);
|
||||||
|
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
|
||||||
|
- Utils.updateDateGravity(mClockFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
final View view = getView();
|
||||||
|
@@ -493,7 +491,6 @@ public final class ClockFragment extends DeskClockFragment {
|
||||||
|
Utils.updateDate(dateFormat, dateFormatForAccessibility, itemView);
|
||||||
|
Utils.setClockStyle(mDigitalClock, mAnalogClock);
|
||||||
|
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
|
||||||
|
- Utils.updateDateGravity(itemView);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/com/android/deskclock/Utils.java b/src/com/android/deskclock/Utils.java
|
||||||
|
index 4eea6beba..4a5ad5a0a 100644
|
||||||
|
--- a/src/com/android/deskclock/Utils.java
|
||||||
|
+++ b/src/com/android/deskclock/Utils.java
|
||||||
|
@@ -52,9 +52,7 @@ import android.text.style.RelativeSizeSpan;
|
||||||
|
import android.text.style.StyleSpan;
|
||||||
|
import android.text.style.TypefaceSpan;
|
||||||
|
import android.util.ArraySet;
|
||||||
|
-import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
-import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextClock;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@@ -302,23 +300,6 @@ public class Utils {
|
||||||
|
dateDisplay.setContentDescription(new SimpleDateFormat(descriptionPattern, l).format(now));
|
||||||
|
}
|
||||||
|
|
||||||
|
- public static void updateDateGravity(View clockFrame) {
|
||||||
|
- View dateAndNextAlarm = clockFrame.findViewById(R.id.date_and_next_alarm_time);
|
||||||
|
- LinearLayout.LayoutParams lp =
|
||||||
|
- (LinearLayout.LayoutParams)dateAndNextAlarm.getLayoutParams();
|
||||||
|
-
|
||||||
|
- final DataModel.ClockStyle clockStyle = DataModel.getDataModel().getClockStyle();
|
||||||
|
- switch (clockStyle) {
|
||||||
|
- case ANALOG:
|
||||||
|
- lp.gravity = Gravity.CENTER;
|
||||||
|
- break;
|
||||||
|
- case DIGITAL:
|
||||||
|
- lp.gravity = Gravity.START;
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- dateAndNextAlarm.setLayoutParams(lp);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/***
|
||||||
|
* Formats the time in the TextClock according to the Locale with a special
|
||||||
|
* formatting treatment for the am/pm label.
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,118 @@
|
|||||||
|
From 13cd5543d2d0a253c86fa84030bb3dfb636ceea1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 20 Jan 2022 04:42:03 +0000
|
||||||
|
Subject: [PATCH 4/4] DeskClock: Wallpaper-based text coloring for digital
|
||||||
|
clock widget
|
||||||
|
|
||||||
|
RemoteViews is such a restrictive PITA
|
||||||
|
|
||||||
|
Change-Id: Ie22c4980526575f73ebb4e56780d4c2193cc45d3
|
||||||
|
---
|
||||||
|
.../alarmclock/DigitalAppWidgetProvider.java | 57 +++++++++++++++++++
|
||||||
|
1 file changed, 57 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
|
index fb1b30aa7..c04528240 100644
|
||||||
|
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
|
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
|
@@ -38,6 +38,8 @@ import static java.lang.Math.round;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.AlarmManager;
|
||||||
|
import android.app.PendingIntent;
|
||||||
|
+import android.app.WallpaperColors;
|
||||||
|
+import android.app.WallpaperManager;
|
||||||
|
import android.appwidget.AppWidgetManager;
|
||||||
|
import android.appwidget.AppWidgetProvider;
|
||||||
|
import android.content.BroadcastReceiver;
|
||||||
|
@@ -111,12 +113,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
|
||||||
|
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
|
||||||
|
|
||||||
|
+ private static WallpaperManager mWallpaperManager;
|
||||||
|
+ private static boolean mDarkText;
|
||||||
|
+
|
||||||
|
+ private static void relayoutAllWidgets(Context context) {
|
||||||
|
+ final AppWidgetManager wm = AppWidgetManager.getInstance(context);
|
||||||
|
+ final ComponentName provider = new ComponentName(context, DigitalAppWidgetProvider.class);
|
||||||
|
+ final int[] widgetIds = wm.getAppWidgetIds(provider);
|
||||||
|
+ for (int widgetId : widgetIds) {
|
||||||
|
+ relayoutWidget(context, wm, widgetId, wm.getAppWidgetOptions(widgetId));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private static void addOnColorsChangedListener(Context context) {
|
||||||
|
+ mWallpaperManager.addOnColorsChangedListener(new WallpaperManager.OnColorsChangedListener() {
|
||||||
|
+ @Override
|
||||||
|
+ public void onColorsChanged(WallpaperColors colors, int which) {
|
||||||
|
+ relayoutAllWidgets(context);
|
||||||
|
+ }
|
||||||
|
+ }, null);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public void onEnabled(Context context) {
|
||||||
|
super.onEnabled(context);
|
||||||
|
|
||||||
|
// Schedule the day-change callback if necessary.
|
||||||
|
updateDayChangeCallback(context);
|
||||||
|
+
|
||||||
|
+ // Listen for wallpaper color changes
|
||||||
|
+ mWallpaperManager = WallpaperManager.getInstance(context);
|
||||||
|
+ addOnColorsChangedListener(context);
|
||||||
|
+
|
||||||
|
+ // Force a relayout to pick up initial colors
|
||||||
|
+ relayoutAllWidgets(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -215,6 +245,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
*/
|
||||||
|
private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId,
|
||||||
|
Bundle options, boolean portrait) {
|
||||||
|
+ // Determine text colors.
|
||||||
|
+ if (mWallpaperManager == null) {
|
||||||
|
+ mWallpaperManager = WallpaperManager.getInstance(context);
|
||||||
|
+ addOnColorsChangedListener(context);
|
||||||
|
+ }
|
||||||
|
+ WallpaperColors wallpaperColors = mWallpaperManager.getWallpaperColors(WallpaperManager.FLAG_SYSTEM);
|
||||||
|
+ // Live wallpapers might not implement the WallpaperColors API.
|
||||||
|
+ if (wallpaperColors == null) {
|
||||||
|
+ mDarkText = false;
|
||||||
|
+ } else {
|
||||||
|
+ mDarkText = (wallpaperColors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) != 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
// Create a remote view for the digital clock.
|
||||||
|
final String packageName = context.getPackageName();
|
||||||
|
final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget);
|
||||||
|
@@ -272,6 +315,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
|
||||||
|
rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
|
||||||
|
|
||||||
|
+ // Apply the text color to the remote views.
|
||||||
|
+ if (mDarkText) {
|
||||||
|
+ rv.setTextColor(R.id.clock, resources.getColor(R.color.black));
|
||||||
|
+ rv.setTextColor(R.id.date, resources.getColor(R.color.black));
|
||||||
|
+ rv.setTextColor(R.id.nextAlarm, resources.getColor(R.color.black));
|
||||||
|
+ } else {
|
||||||
|
+ rv.setTextColor(R.id.clock, resources.getColor(R.color.white));
|
||||||
|
+ rv.setTextColor(R.id.date, resources.getColor(R.color.white));
|
||||||
|
+ rv.setTextColor(R.id.nextAlarm, resources.getColor(R.color.white));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
final int smallestWorldCityListSizePx =
|
||||||
|
resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size);
|
||||||
|
if (sizes.getListHeight() <= smallestWorldCityListSizePx) {
|
||||||
|
@@ -430,6 +484,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
|
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
|
||||||
|
nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
|
||||||
|
|
||||||
|
+ // Adjust the alarm icon text color before generating its bitmap.
|
||||||
|
+ nextAlarmIcon.setTextColor(context.getResources().getColor(mDarkText ? R.color.black : R.color.white));
|
||||||
|
+
|
||||||
|
// Measure and layout the sizer.
|
||||||
|
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
||||||
|
final int heightSize = View.MeasureSpec.getSize(measuredSizes.mTargetHeightPx);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 61630e83287a097f512b03203722f7385100bd5f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Micay <danielmicay@gmail.com>
|
||||||
|
Date: Sat, 6 Jun 2015 10:40:51 -0400
|
||||||
|
Subject: [PATCH] NfcService: Disable NFC by default
|
||||||
|
|
||||||
|
Change-Id: Ibe6abec7fa84c6fde476b8a083f57a3f61b50909
|
||||||
|
---
|
||||||
|
src/com/android/nfc/NfcService.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
|
||||||
|
index f22dc9da..28aedc59 100644
|
||||||
|
--- a/src/com/android/nfc/NfcService.java
|
||||||
|
+++ b/src/com/android/nfc/NfcService.java
|
||||||
|
@@ -141,7 +141,7 @@ public class NfcService implements DeviceHostListener, ForegroundUtils.Callback
|
||||||
|
public static final String PREF_TAG_APP_LIST = "TagIntentAppPreferenceListPrefs";
|
||||||
|
|
||||||
|
static final String PREF_NFC_ON = "nfc_on";
|
||||||
|
- static final boolean NFC_ON_DEFAULT = true;
|
||||||
|
+ static final boolean NFC_ON_DEFAULT = false;
|
||||||
|
static final String PREF_SECURE_NFC_ON = "secure_nfc_on";
|
||||||
|
static final boolean SECURE_NFC_ON_DEFAULT = false;
|
||||||
|
static final String PREF_FIRST_BOOT = "first_boot";
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 4dad46e31da483f2b0818e81791cac4a4a674385 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 20 Nov 2023 10:42:58 +0800
|
||||||
|
Subject: [PATCH] Keyguard: Default to small clock (2/3)
|
||||||
|
|
||||||
|
Change-Id: Ieb39c323e99fd2795f683a8a2930bb3a27212a6d
|
||||||
|
---
|
||||||
|
.../settings/display/LockscreenClockPreferenceController.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/com/android/settings/display/LockscreenClockPreferenceController.java b/src/com/android/settings/display/LockscreenClockPreferenceController.java
|
||||||
|
index 70ae55eaf9..fd6e0fe248 100644
|
||||||
|
--- a/src/com/android/settings/display/LockscreenClockPreferenceController.java
|
||||||
|
+++ b/src/com/android/settings/display/LockscreenClockPreferenceController.java
|
||||||
|
@@ -37,7 +37,7 @@ public class LockscreenClockPreferenceController extends TogglePreferenceControl
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isChecked() {
|
||||||
|
- return Settings.Secure.getInt(mContext.getContentResolver(), SETTING_KEY, 1) != 0;
|
||||||
|
+ return Settings.Secure.getInt(mContext.getContentResolver(), SETTING_KEY, 0) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,163 @@
|
|||||||
|
From 7f78c8c7ea3b7aad4c234338263ed88eef8485e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 23 Nov 2023 23:21:58 +0800
|
||||||
|
Subject: [PATCH] SetupWizard: Least Action(s) Principle
|
||||||
|
|
||||||
|
Change-Id: I892634b8ffc7beafa5a223de0afdc64276efd2f5
|
||||||
|
---
|
||||||
|
res/raw/lineage_wizard_script.xml | 43 +------------------
|
||||||
|
.../lineage_wizard_script_managed_profile.xml | 15 +------
|
||||||
|
res/raw/lineage_wizard_script_user.xml | 27 +-----------
|
||||||
|
3 files changed, 5 insertions(+), 80 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/res/raw/lineage_wizard_script.xml b/res/raw/lineage_wizard_script.xml
|
||||||
|
index 616f6ed..e7c9b7f 100644
|
||||||
|
--- a/res/raw/lineage_wizard_script.xml
|
||||||
|
+++ b/res/raw/lineage_wizard_script.xml
|
||||||
|
@@ -18,21 +18,13 @@
|
||||||
|
-->
|
||||||
|
|
||||||
|
<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
|
||||||
|
- wizard:firstAction="bluetooth_setup">
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_BLUETOOTH_SETUP;end" id="bluetooth_setup">
|
||||||
|
- <result wizard:action="welcome" />
|
||||||
|
- </WizardAction>
|
||||||
|
+ wizard:firstAction="welcome">
|
||||||
|
|
||||||
|
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_WELCOME;end" id="welcome">
|
||||||
|
<result wizard:action="locale" />
|
||||||
|
</WizardAction>
|
||||||
|
|
||||||
|
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCALE;end" id="locale">
|
||||||
|
- <result wizard:action="sim_missing" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SIM_MISSING;end" id="sim_missing">
|
||||||
|
<result wizard:action="network_setup" />
|
||||||
|
</WizardAction>
|
||||||
|
|
||||||
|
@@ -41,44 +33,13 @@
|
||||||
|
</WizardAction>
|
||||||
|
|
||||||
|
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_DATETIME;end" id="datetime">
|
||||||
|
- <result wizard:action="location_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCATION_SETTINGS;end" id="location_settings">
|
||||||
|
- <result wizard:action="device_specific" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.DEVICE_SPECIFIC;end" id="device_specific">
|
||||||
|
- <result wizard:action="recovery_update" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_RECOVERY_UPDATE;end" id="recovery_update">
|
||||||
|
- <result wizard:action="lineage_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SETTINGS;end" id="lineage_settings">
|
||||||
|
- <result wizard:action="lockscreen_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCKSCREEN_SETTINGS;end" id="lockscreen_settings">
|
||||||
|
- <result wizard:action="biometric_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_BIOMETRIC_SETTINGS;end" id="biometric_settings">
|
||||||
|
- <result wizard:action="restore" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_RESTORE_BACKUP;end" id="restore">
|
||||||
|
- <result wizard:action="navigation_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.NAVIGATION_SETTINGS;end" id="navigation_settings">
|
||||||
|
<result wizard:action="finish" />
|
||||||
|
</WizardAction>
|
||||||
|
|
||||||
|
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SETUP_COMPLETE;end" id="finish">
|
||||||
|
<result wizard:action="exit" />
|
||||||
|
</WizardAction>
|
||||||
|
+
|
||||||
|
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.EXIT;end" id="exit" />
|
||||||
|
|
||||||
|
</WizardScript>
|
||||||
|
diff --git a/res/raw/lineage_wizard_script_managed_profile.xml b/res/raw/lineage_wizard_script_managed_profile.xml
|
||||||
|
index 00a66e3..4f8b867 100644
|
||||||
|
--- a/res/raw/lineage_wizard_script_managed_profile.xml
|
||||||
|
+++ b/res/raw/lineage_wizard_script_managed_profile.xml
|
||||||
|
@@ -2,7 +2,6 @@
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2016 The CyanogenMod Project
|
||||||
|
- Copyright (C) 2021 The Calyx Institute
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
@@ -18,19 +17,7 @@
|
||||||
|
-->
|
||||||
|
|
||||||
|
<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
|
||||||
|
- wizard:firstAction="welcome">
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_WELCOME;end" id="welcome">
|
||||||
|
- <result wizard:action="location_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCATION_SETTINGS;end" id="location_settings">
|
||||||
|
- <result wizard:action="restore" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_RESTORE_BACKUP;end" id="restore">
|
||||||
|
- <result wizard:action="finish" />
|
||||||
|
- </WizardAction>
|
||||||
|
+ wizard:firstAction="finish">
|
||||||
|
|
||||||
|
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SETUP_COMPLETE;end" id="finish">
|
||||||
|
<result wizard:action="exit" />
|
||||||
|
diff --git a/res/raw/lineage_wizard_script_user.xml b/res/raw/lineage_wizard_script_user.xml
|
||||||
|
index d480901..4f8b867 100644
|
||||||
|
--- a/res/raw/lineage_wizard_script_user.xml
|
||||||
|
+++ b/res/raw/lineage_wizard_script_user.xml
|
||||||
|
@@ -17,35 +17,12 @@
|
||||||
|
-->
|
||||||
|
|
||||||
|
<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
|
||||||
|
- wizard:firstAction="welcome">
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_WELCOME;end" id="welcome">
|
||||||
|
- <result wizard:action="location_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCATION_SETTINGS;end" id="location_settings">
|
||||||
|
- <result wizard:action="lockscreen_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCKSCREEN_SETTINGS;end" id="lockscreen_settings">
|
||||||
|
- <result wizard:action="biometric_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_BIOMETRIC_SETTINGS;end" id="biometric_settings">
|
||||||
|
- <result wizard:action="restore" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_RESTORE_BACKUP;end" id="restore">
|
||||||
|
- <result wizard:action="navigation_settings" />
|
||||||
|
- </WizardAction>
|
||||||
|
-
|
||||||
|
- <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.NAVIGATION_SETTINGS;end" id="navigation_settings">
|
||||||
|
- <result wizard:action="finish" />
|
||||||
|
- </WizardAction>
|
||||||
|
+ wizard:firstAction="finish">
|
||||||
|
|
||||||
|
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SETUP_COMPLETE;end" id="finish">
|
||||||
|
<result wizard:action="exit" />
|
||||||
|
</WizardAction>
|
||||||
|
+
|
||||||
|
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.EXIT;end" id="exit" />
|
||||||
|
|
||||||
|
</WizardScript>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From f80b0972ed320771192feddfe0b0da27041e19f5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 20 Nov 2023 10:43:38 +0800
|
||||||
|
Subject: [PATCH] Keyguard: Default to small clock (3/3)
|
||||||
|
|
||||||
|
Change-Id: I7c11ec93df2135d19afbe30cd0c1c017c3901d4f
|
||||||
|
---
|
||||||
|
.../picker/clock/data/repository/ClockPickerRepositoryImpl.kt | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/com/android/customization/picker/clock/data/repository/ClockPickerRepositoryImpl.kt b/src/com/android/customization/picker/clock/data/repository/ClockPickerRepositoryImpl.kt
|
||||||
|
index 370668ef..ea7a5582 100644
|
||||||
|
--- a/src/com/android/customization/picker/clock/data/repository/ClockPickerRepositoryImpl.kt
|
||||||
|
+++ b/src/com/android/customization/picker/clock/data/repository/ClockPickerRepositoryImpl.kt
|
||||||
|
@@ -194,7 +194,7 @@ class ClockPickerRepositoryImpl(
|
||||||
|
// The color tone to apply to the selected color
|
||||||
|
private const val KEY_METADATA_COLOR_TONE_PROGRESS = "metadataColorToneProgress"
|
||||||
|
|
||||||
|
- // The default clock size is 1, which means dynamic
|
||||||
|
- private const val DEFAULT_CLOCK_SIZE = 1
|
||||||
|
+ // The default clock size is 0, which means small
|
||||||
|
+ private const val DEFAULT_CLOCK_SIZE = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,194 @@
|
|||||||
|
From 13b848a8b08c6e99086ab3af9e526c698920ebaa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 28 Oct 2021 02:30:59 +0000
|
||||||
|
Subject: [PATCH 1/3] Trebuchet: Make overview scrim transparent again
|
||||||
|
|
||||||
|
Also revert texts/buttons to workspace color
|
||||||
|
|
||||||
|
Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
|
||||||
|
---
|
||||||
|
quickstep/res/values/styles.xml | 2 +-
|
||||||
|
.../android/quickstep/views/RecentsView.java | 2 +-
|
||||||
|
res/color-v31/overview_scrim.xml | 18 -----------------
|
||||||
|
res/color-v31/overview_scrim_dark.xml | 18 -----------------
|
||||||
|
res/color-v33/overview_scrim.xml | 20 -------------------
|
||||||
|
res/color-v33/overview_scrim_dark.xml | 20 -------------------
|
||||||
|
res/color/overview_button.xml | 6 +++---
|
||||||
|
res/color/overview_scrim.xml | 2 +-
|
||||||
|
res/color/overview_scrim_dark.xml | 2 +-
|
||||||
|
9 files changed, 7 insertions(+), 83 deletions(-)
|
||||||
|
delete mode 100644 res/color-v31/overview_scrim.xml
|
||||||
|
delete mode 100644 res/color-v31/overview_scrim_dark.xml
|
||||||
|
delete mode 100644 res/color-v33/overview_scrim.xml
|
||||||
|
delete mode 100644 res/color-v33/overview_scrim_dark.xml
|
||||||
|
|
||||||
|
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
|
||||||
|
index fc0370421d..61ca1e05d6 100644
|
||||||
|
--- a/quickstep/res/values/styles.xml
|
||||||
|
+++ b/quickstep/res/values/styles.xml
|
||||||
|
@@ -227,7 +227,7 @@
|
||||||
|
<item name="android:paddingBottom">4dp</item>
|
||||||
|
<item name="android:textColor">@color/overview_button</item>
|
||||||
|
<item name="android:drawableTint">@color/overview_button</item>
|
||||||
|
- <item name="android:tint">?android:attr/textColorPrimary</item>
|
||||||
|
+ <item name="android:tint">?attr/workspaceTextColor</item>
|
||||||
|
<item name="android:drawablePadding">8dp</item>
|
||||||
|
<item name="android:textAllCaps">false</item>
|
||||||
|
</style>
|
||||||
|
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
index 23fcbea42f..9b151394fa 100644
|
||||||
|
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
@@ -793,7 +793,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
|
mEmptyIcon.setCallback(this);
|
||||||
|
mEmptyMessage = context.getText(R.string.recents_empty_message);
|
||||||
|
mEmptyMessagePaint = new TextPaint();
|
||||||
|
- mEmptyMessagePaint.setColor(Themes.getAttrColor(context, android.R.attr.textColorPrimary));
|
||||||
|
+ mEmptyMessagePaint.setColor(Themes.getAttrColor(context, R.attr.workspaceTextColor));
|
||||||
|
mEmptyMessagePaint.setTextSize(getResources()
|
||||||
|
.getDimension(R.dimen.recents_empty_message_text_size));
|
||||||
|
mEmptyMessagePaint.setTypeface(Typeface.create(Themes.getDefaultBodyFont(context),
|
||||||
|
diff --git a/res/color-v31/overview_scrim.xml b/res/color-v31/overview_scrim.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index 212518ff65..0000000000
|
||||||
|
--- a/res/color-v31/overview_scrim.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,18 +0,0 @@
|
||||||
|
-<?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="@android:color/system_neutral2_200" />
|
||||||
|
-</selector>
|
||||||
|
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index 2ab8ecdec9..0000000000
|
||||||
|
--- a/res/color-v31/overview_scrim_dark.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,18 +0,0 @@
|
||||||
|
-<?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="@android:color/system_neutral1_500" android:lStar="35" />
|
||||||
|
-</selector>
|
||||||
|
diff --git a/res/color-v33/overview_scrim.xml b/res/color-v33/overview_scrim.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index b9cda980b7..0000000000
|
||||||
|
--- a/res/color-v33/overview_scrim.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,20 +0,0 @@
|
||||||
|
-<?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_500"
|
||||||
|
- android:lStar="80"/>
|
||||||
|
-</selector>
|
||||||
|
diff --git a/res/color-v33/overview_scrim_dark.xml b/res/color-v33/overview_scrim_dark.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index 84d22e6515..0000000000
|
||||||
|
--- a/res/color-v33/overview_scrim_dark.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,20 +0,0 @@
|
||||||
|
-<?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_500"
|
||||||
|
- android:lStar="35"/>
|
||||||
|
-</selector>
|
||||||
|
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml
|
||||||
|
index 1dd8da60c7..8868ad7349 100644
|
||||||
|
--- a/res/color/overview_button.xml
|
||||||
|
+++ b/res/color/overview_button.xml
|
||||||
|
@@ -3,10 +3,10 @@
|
||||||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||||
|
<item
|
||||||
|
android:alpha="1"
|
||||||
|
- android:color="?androidprv:attr/materialColorOnSurface"
|
||||||
|
+ android:color="?attr/workspaceTextColor"
|
||||||
|
android:state_enabled="true" />
|
||||||
|
<item
|
||||||
|
android:alpha="?android:disabledAlpha"
|
||||||
|
- android:color="?androidprv:attr/materialColorOnSurface"
|
||||||
|
+ android:color="?attr/workspaceTextColor"
|
||||||
|
android:state_enabled="false" />
|
||||||
|
-</selector>
|
||||||
|
\ No newline at end of file
|
||||||
|
+</selector>
|
||||||
|
diff --git a/res/color/overview_scrim.xml b/res/color/overview_scrim.xml
|
||||||
|
index 48cf5763a1..894997c59a 100644
|
||||||
|
--- a/res/color/overview_scrim.xml
|
||||||
|
+++ b/res/color/overview_scrim.xml
|
||||||
|
@@ -14,5 +14,5 @@
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
- <item android:color="#30000000" />
|
||||||
|
+ <item android:color="@android:color/transparent" />
|
||||||
|
</selector>
|
||||||
|
diff --git a/res/color/overview_scrim_dark.xml b/res/color/overview_scrim_dark.xml
|
||||||
|
index 48cf5763a1..894997c59a 100644
|
||||||
|
--- a/res/color/overview_scrim_dark.xml
|
||||||
|
+++ b/res/color/overview_scrim_dark.xml
|
||||||
|
@@ -14,5 +14,5 @@
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
- <item android:color="#30000000" />
|
||||||
|
+ <item android:color="@android:color/transparent" />
|
||||||
|
</selector>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,83 @@
|
|||||||
|
From 471be03743d96834bea2007e1beccd858149b8f6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 18 Mar 2022 08:42:18 +0000
|
||||||
|
Subject: [PATCH 2/3] Trebuchet: Kill haptics in recents
|
||||||
|
|
||||||
|
This partially reverts commit cc5c8843dfebfa92057b6ce8904ac58cd05ffaef.
|
||||||
|
|
||||||
|
Change-Id: Ie3b0eabe8cc0421e696720740edc492cae2f5153
|
||||||
|
---
|
||||||
|
.../NoButtonQuickSwitchTouchController.java | 9 +--------
|
||||||
|
.../TaskViewTouchController.java | 5 -----
|
||||||
|
.../android/quickstep/views/RecentsView.java | 19 -------------------
|
||||||
|
3 files changed, 1 insertion(+), 32 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
|
||||||
|
index 6f421eb14a..655797da62 100644
|
||||||
|
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
|
||||||
|
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
|
||||||
|
@@ -438,14 +438,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
|
||||||
|
nonOverviewAnim.setFloatValues(startProgress, endProgress);
|
||||||
|
mNonOverviewAnim.dispatchOnStart();
|
||||||
|
}
|
||||||
|
- if (targetState == QUICK_SWITCH_FROM_HOME) {
|
||||||
|
- // Navigating to quick switch, add scroll feedback since the first time is not
|
||||||
|
- // considered a scroll by the RecentsView.
|
||||||
|
- VibratorWrapper.INSTANCE.get(mLauncher).vibrate(
|
||||||
|
- RecentsView.SCROLL_VIBRATION_PRIMITIVE,
|
||||||
|
- RecentsView.SCROLL_VIBRATION_PRIMITIVE_SCALE,
|
||||||
|
- RecentsView.SCROLL_VIBRATION_FALLBACK);
|
||||||
|
- } else {
|
||||||
|
+ if (targetState != QUICK_SWITCH_FROM_HOME) {
|
||||||
|
InteractionJankMonitorWrapper.cancel(InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
|
||||||
|
index 3d94857848..849b9fd2d1 100644
|
||||||
|
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
|
||||||
|
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
|
||||||
|
@@ -369,11 +369,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
||||||
|
mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
|
||||||
|
velocity * orientationHandler.getSecondaryTranslationDirectionFactor(),
|
||||||
|
mEndDisplacement, animationDuration);
|
||||||
|
- if (goingUp && goingToEnd && !mIsDismissHapticRunning) {
|
||||||
|
- VibratorWrapper.INSTANCE.get(mActivity).vibrate(TASK_DISMISS_VIBRATION_PRIMITIVE,
|
||||||
|
- TASK_DISMISS_VIBRATION_PRIMITIVE_SCALE, TASK_DISMISS_VIBRATION_FALLBACK);
|
||||||
|
- mIsDismissHapticRunning = true;
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void clearState() {
|
||||||
|
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
index 9b151394fa..0ce5537d2e 100644
|
||||||
|
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
@@ -1558,25 +1558,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- @Override
|
||||||
|
- protected void onEdgeAbsorbingScroll() {
|
||||||
|
- vibrateForScroll();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- protected void onScrollOverPageChanged() {
|
||||||
|
- vibrateForScroll();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private void vibrateForScroll() {
|
||||||
|
- long now = SystemClock.uptimeMillis();
|
||||||
|
- if (now - mScrollLastHapticTimestamp > mScrollHapticMinGapMillis) {
|
||||||
|
- mScrollLastHapticTimestamp = now;
|
||||||
|
- VibratorWrapper.INSTANCE.get(mContext).vibrate(SCROLL_VIBRATION_PRIMITIVE,
|
||||||
|
- SCROLL_VIBRATION_PRIMITIVE_SCALE, SCROLL_VIBRATION_FALLBACK);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
@Override
|
||||||
|
protected void determineScrollingStart(MotionEvent ev, float touchSlopScale) {
|
||||||
|
// Enables swiping to the left or right only if the task overlay is not modal.
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,34 @@
|
|||||||
|
From 1d5fe3cd174200d7ec1e34b1363b4b7aa34154e1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 20 Nov 2023 14:09:32 +0800
|
||||||
|
Subject: [PATCH 3/3] Trebuchet: Kill inverted rounded corners above the
|
||||||
|
taskbar
|
||||||
|
|
||||||
|
Again, where rectangles collide should be perfectly straight
|
||||||
|
|
||||||
|
Change-Id: Ibf03a84cb8f3866b5151b02fe8a0e74167cf90ce
|
||||||
|
---
|
||||||
|
.../android/launcher3/taskbar/TaskbarBackgroundRenderer.kt | 7 -------
|
||||||
|
1 file changed, 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt
|
||||||
|
index d237c1f997..d7142eef59 100644
|
||||||
|
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt
|
||||||
|
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt
|
||||||
|
@@ -131,13 +131,6 @@ class TaskbarBackgroundRenderer(context: TaskbarActivityContext) {
|
||||||
|
canvas.translate(0f, canvas.height - backgroundHeight - bottomMargin)
|
||||||
|
// Draw the background behind taskbar content.
|
||||||
|
canvas.drawRect(0f, 0f, canvas.width.toFloat(), backgroundHeight, paint)
|
||||||
|
-
|
||||||
|
- // Draw the inverted rounded corners above the taskbar.
|
||||||
|
- canvas.translate(0f, -leftCornerRadius)
|
||||||
|
- canvas.drawPath(invertedLeftCornerPath, paint)
|
||||||
|
- canvas.translate(0f, leftCornerRadius)
|
||||||
|
- canvas.translate(canvas.width - rightCornerRadius, -rightCornerRadius)
|
||||||
|
- canvas.drawPath(invertedRightCornerPath, paint)
|
||||||
|
} else if (!isInSetup) {
|
||||||
|
// backgroundHeight is a value from [0...maxBackgroundHeight], so we can use it as a
|
||||||
|
// proxy to figure out the animation progress of the stash/unstash animation.
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,87 @@
|
|||||||
|
From b09034c7e5f9bbc2d29c3f10452259956fcb9f46 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 16 Oct 2021 00:33:15 +0000
|
||||||
|
Subject: [PATCH] Replace captive portal URLs globally
|
||||||
|
|
||||||
|
...so that it works even without a SIM inserted, which is a typical usecase of mine
|
||||||
|
URLs from Chinese OEM UIs are faster and more reliable than g.cn and other int'l ones
|
||||||
|
|
||||||
|
Change-Id: Ic3e124b2b62838a2bcf1dad0d670515f3d056964
|
||||||
|
---
|
||||||
|
res/values-mcc460/config.xml | 31 -------------------------------
|
||||||
|
res/values/config.xml | 7 +++----
|
||||||
|
2 files changed, 3 insertions(+), 35 deletions(-)
|
||||||
|
delete mode 100644 res/values-mcc460/config.xml
|
||||||
|
|
||||||
|
diff --git a/res/values-mcc460/config.xml b/res/values-mcc460/config.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index 3c4b4933..00000000
|
||||||
|
--- a/res/values-mcc460/config.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,31 +0,0 @@
|
||||||
|
-<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
-<resources>
|
||||||
|
- <!-- Network validation URL configuration for devices using a Chinese SIM (MCC 460).
|
||||||
|
- The below URLs are often whitelisted by captive portals, so they should not be used in the
|
||||||
|
- general case as this could degrade the user experience (portals not detected properly).
|
||||||
|
- However in China the default URLs are not accessible in general. The below alternatives
|
||||||
|
- should allow users to connect to local networks normally. -->
|
||||||
|
- <!-- default_captive_portal_http_url is not configured as overlayable so
|
||||||
|
- OEMs that wish to change captive_portal_http_url configuration must
|
||||||
|
- do so via configuring runtime resource overlay to
|
||||||
|
- config_captive_portal_http_url and *NOT* by changing or overlaying
|
||||||
|
- this resource. It will break if the enforcement of overlayable starts.
|
||||||
|
- -->
|
||||||
|
- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.cn/generate_204</string>
|
||||||
|
- <!-- default_captive_portal_https_url is not configured as overlayable so
|
||||||
|
- OEMs that wish to change captive_portal_https_url configuration must
|
||||||
|
- do so via configuring runtime resource overlay to
|
||||||
|
- config_captive_portal_https_url and *NOT* by changing or overlaying
|
||||||
|
- this resource. It will break if the enforcement of overlayable starts.
|
||||||
|
- -->
|
||||||
|
- <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.cn/generate_204</string>
|
||||||
|
- <!-- default_captive_portal_fallback_urls is not configured as overlayable
|
||||||
|
- so OEMs that wish to change captive_portal_fallback_urls configuration
|
||||||
|
- must do so via configuring runtime resource overlay to
|
||||||
|
- config_captive_portal_fallback_urls and *NOT* by changing or overlaying
|
||||||
|
- this resource. It will break if the enforcement of overlayable starts.
|
||||||
|
- -->
|
||||||
|
- <string-array name="default_captive_portal_fallback_urls" translatable="false">
|
||||||
|
- <item>http://www.googleapis.cn/generate_204</item>
|
||||||
|
- </string-array>
|
||||||
|
-</resources>
|
||||||
|
diff --git a/res/values/config.xml b/res/values/config.xml
|
||||||
|
index 805ca041..61297dda 100644
|
||||||
|
--- a/res/values/config.xml
|
||||||
|
+++ b/res/values/config.xml
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
config_captive_portal_http_url and *NOT* by changing or overlaying
|
||||||
|
this resource. It will break if the enforcement of overlayable starts.
|
||||||
|
-->
|
||||||
|
- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string>
|
||||||
|
+ <string name="default_captive_portal_http_url" translatable="false">http://conn4.coloros.com/generate204</string>
|
||||||
|
<!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
|
||||||
|
<!-- default_captive_portal_https_url is not configured as overlayable so
|
||||||
|
OEMs that wish to change captive_portal_https_url configuration must
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
config_captive_portal_https_url and *NOT* by changing or overlaying
|
||||||
|
this resource. It will break if the enforcement of overlayable starts.
|
||||||
|
-->
|
||||||
|
- <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string>
|
||||||
|
+ <string name="default_captive_portal_https_url" translatable="false">https://conn4.coloros.com/generate204</string>
|
||||||
|
|
||||||
|
<!-- List of fallback URLs to use for detecting captive portals. -->
|
||||||
|
<!-- default_captive_portal_fallback_urls is not configured as overlayable
|
||||||
|
@@ -31,8 +31,7 @@
|
||||||
|
this resource. It will break if the enforcement of overlayable starts.
|
||||||
|
-->
|
||||||
|
<string-array name="default_captive_portal_fallback_urls" translatable="false">
|
||||||
|
- <item>http://www.google.com/gen_204</item>
|
||||||
|
- <item>http://play.googleapis.com/generate_204</item>
|
||||||
|
+ <item>http://connect.rom.miui.com/generate_204</item>
|
||||||
|
</string-array>
|
||||||
|
<!-- Configuration hooks for the above settings.
|
||||||
|
Empty by default but may be overridden by RROs. -->
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
From 0b0220f3ae8d67817ea1a602d73f5349bbff365d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 20 Nov 2023 17:53:44 +0800
|
||||||
|
Subject: [PATCH] Disable Safety Center Tile
|
||||||
|
|
||||||
|
Change-Id: I0f642f486d1c53ee38195eb10aee3fec5992a323
|
||||||
|
---
|
||||||
|
PermissionController/AndroidManifest.xml | 12 ------------
|
||||||
|
1 file changed, 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/PermissionController/AndroidManifest.xml b/PermissionController/AndroidManifest.xml
|
||||||
|
index 817dd0881..9c2a67f78 100644
|
||||||
|
--- a/PermissionController/AndroidManifest.xml
|
||||||
|
+++ b/PermissionController/AndroidManifest.xml
|
||||||
|
@@ -528,18 +528,6 @@
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
- <service
|
||||||
|
- android:name="com.android.permissioncontroller.permission.service.v33.SafetyCenterQsTileService"
|
||||||
|
- android:enabled="@bool/is_at_least_t"
|
||||||
|
- android:exported="true"
|
||||||
|
- android:label="@string/safety_privacy_qs_tile_title"
|
||||||
|
- android:icon ="@drawable/ic_safety_center_shield"
|
||||||
|
- android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
|
||||||
|
- <intent-filter>
|
||||||
|
- <action android:name="android.service.quicksettings.action.QS_TILE" />
|
||||||
|
- </intent-filter>
|
||||||
|
- </service>
|
||||||
|
-
|
||||||
|
<service android:name="com.android.permissioncontroller.auto.DrivingDecisionReminderService" />
|
||||||
|
|
||||||
|
<receiver android:name="com.android.permissioncontroller.role.service.ClearUserDeniedReceiver"
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
From 863e8f70e3a4f987938ff4ad01c22822bc38e409 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 20 Jun 2021 09:09:15 +0000
|
||||||
|
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)
|
||||||
|
|
||||||
|
Change-Id: I076973f902ab20011964e50955e4326c18d5b34e
|
||||||
|
---
|
||||||
|
build/core/main_version.mk | 7 +------
|
||||||
|
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/build/core/main_version.mk b/build/core/main_version.mk
|
||||||
|
index 28044e2c..c5aa9617 100644
|
||||||
|
--- a/build/core/main_version.mk
|
||||||
|
+++ b/build/core/main_version.mk
|
||||||
|
@@ -5,17 +5,12 @@ ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||||
|
endif
|
||||||
|
|
||||||
|
# LineageOS System Version
|
||||||
|
+# Do not set Display Versions here, due to Makefile not playing nice with spaces
|
||||||
|
ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||||
|
- ro.lineage.version=$(LINEAGE_VERSION) \
|
||||||
|
ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) \
|
||||||
|
ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \
|
||||||
|
- ro.modversion=$(LINEAGE_VERSION) \
|
||||||
|
ro.lineagelegal.url=https://lineageos.org/legal
|
||||||
|
|
||||||
|
-# LineageOS Platform Display Version
|
||||||
|
-ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||||
|
- ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION)
|
||||||
|
-
|
||||||
|
# LineageOS Platform SDK Version
|
||||||
|
ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||||
|
ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION)
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
From 34f8aa093286970f82014f1dae0e86e4cbeba896 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 16 Oct 2021 00:41:07 +0000
|
||||||
|
Subject: [PATCH 2/4] build: Remove Stk (2/2)
|
||||||
|
|
||||||
|
Change-Id: I4e1cfacd296e47ef1731f3c32555089a5fca6f0c
|
||||||
|
---
|
||||||
|
config/data_only.mk | 4 ----
|
||||||
|
config/telephony.mk | 3 +--
|
||||||
|
2 files changed, 1 insertion(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config/data_only.mk b/config/data_only.mk
|
||||||
|
index 5ff877c9..ab70301b 100644
|
||||||
|
--- a/config/data_only.mk
|
||||||
|
+++ b/config/data_only.mk
|
||||||
|
@@ -1,7 +1,3 @@
|
||||||
|
# World APN list
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
apns-conf.xml
|
||||||
|
-
|
||||||
|
-# Telephony packages
|
||||||
|
-PRODUCT_PACKAGES += \
|
||||||
|
- Stk
|
||||||
|
diff --git a/config/telephony.mk b/config/telephony.mk
|
||||||
|
index 6adf48d9..e63b320d 100644
|
||||||
|
--- a/config/telephony.mk
|
||||||
|
+++ b/config/telephony.mk
|
||||||
|
@@ -8,8 +8,7 @@ PRODUCT_PACKAGES += \
|
||||||
|
|
||||||
|
# Telephony packages
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
- messaging \
|
||||||
|
- Stk
|
||||||
|
+ messaging
|
||||||
|
|
||||||
|
# Default ringtone
|
||||||
|
PRODUCT_PRODUCT_PROPERTIES += \
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From 84b5b23519166701423a324cac955e9110e36eae Mon Sep 17 00:00:00 2001
|
||||||
|
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 1 Jul 2019 07:03:04 +0000
|
||||||
|
Subject: [PATCH 3/4] vendor_lineage: Ignore neverallows... again
|
||||||
|
|
||||||
|
Because unofficial builds are better than no builds!
|
||||||
|
|
||||||
|
Change-Id: I4b19d09b28f79c6f5020bf03fdf8931145bca03a
|
||||||
|
---
|
||||||
|
build/core/config.mk | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/build/core/config.mk b/build/core/config.mk
|
||||||
|
index f2e595ff..d6d036a9 100644
|
||||||
|
--- a/build/core/config.mk
|
||||||
|
+++ b/build/core/config.mk
|
||||||
|
@@ -20,5 +20,10 @@ FRAMEWORK_LINEAGE_PLATFORM_API_FILE := $(TOPDIR)lineage-sdk/api/lineage_current.
|
||||||
|
FRAMEWORK_LINEAGE_PLATFORM_REMOVED_API_FILE := $(TOPDIR)lineage-sdk/api/lineage_removed.txt
|
||||||
|
FRAMEWORK_LINEAGE_API_NEEDS_UPDATE_TEXT := $(TOPDIR)vendor/lineage/build/core/apicheck_msg_current.txt
|
||||||
|
|
||||||
|
+# We modify several neverallows, so let the build proceed
|
||||||
|
+ifneq ($(TARGET_BUILD_VARIANT),user)
|
||||||
|
+SELINUX_IGNORE_NEVERALLOWS := true
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
# Rules for QCOM targets
|
||||||
|
include $(TOPDIR)vendor/lineage/build/core/qcom_target.mk
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,78 @@
|
|||||||
|
From 1a8eee6d2a1d79412902331b74283eec77414c6b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Sat, 19 Feb 2022 08:20:25 -0500
|
||||||
|
Subject: [PATCH 1/2] Add new mechanism to fake vendor props on a per-process
|
||||||
|
basis
|
||||||
|
|
||||||
|
This reads debug.phh.props.<process name>. If its value is "vendor",
|
||||||
|
then ro.product.device/ro.product.manufacturer is read from vendor
|
||||||
|
---
|
||||||
|
libc/system_properties/system_properties.cpp | 38 ++++++++++++++++++++
|
||||||
|
1 file changed, 38 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
|
||||||
|
index 1cb15c3df..d6e7e3e68 100644
|
||||||
|
--- a/libc/system_properties/system_properties.cpp
|
||||||
|
+++ b/libc/system_properties/system_properties.cpp
|
||||||
|
@@ -35,6 +35,7 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
+#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <new>
|
||||||
|
|
||||||
|
@@ -50,6 +51,32 @@
|
||||||
|
#define SERIAL_DIRTY(serial) ((serial)&1)
|
||||||
|
#define SERIAL_VALUE_LEN(serial) ((serial) >> 24)
|
||||||
|
|
||||||
|
+static char comm[128];
|
||||||
|
+static bool self_ok = false;
|
||||||
|
+static char comm_override[PROP_VALUE_MAX];
|
||||||
|
+
|
||||||
|
+static void read_self() {
|
||||||
|
+ //NB: Not atomic, but should be good enough, there is no possible corruption from concurrency
|
||||||
|
+ if(self_ok) return;
|
||||||
|
+ self_ok = true;
|
||||||
|
+
|
||||||
|
+ int fd = open("/proc/self/comm", O_RDONLY);
|
||||||
|
+ if(fd<0) return;
|
||||||
|
+ read(fd, comm, sizeof(comm)-1);
|
||||||
|
+ for(unsigned i=0; i<sizeof(comm); i++)
|
||||||
|
+ if(comm[i] == '\n')
|
||||||
|
+ comm[i] = 0;
|
||||||
|
+ close(fd);
|
||||||
|
+
|
||||||
|
+ //That's calling ourselves but that's fine because we already have self_ok = true
|
||||||
|
+ char propName[PROP_NAME_MAX];
|
||||||
|
+ memset(propName, 0, PROP_NAME_MAX);
|
||||||
|
+ strncpy(propName, "debug.phh.props.", PROP_NAME_MAX - 1);
|
||||||
|
+ strncat(propName, comm, PROP_NAME_MAX - 1);
|
||||||
|
+
|
||||||
|
+ __system_property_get(propName, comm_override);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static bool is_dir(const char* pathname) {
|
||||||
|
struct stat info;
|
||||||
|
if (stat(pathname, &info) == -1) {
|
||||||
|
@@ -216,6 +243,17 @@ void SystemProperties::ReadCallback(const prop_info* pi,
|
||||||
|
}
|
||||||
|
|
||||||
|
int SystemProperties::Get(const char* name, char* value) {
|
||||||
|
+ read_self();
|
||||||
|
+ if(strcmp(comm_override, "vendor") == 0) {
|
||||||
|
+ if(strcmp(name, "ro.product.device") == 0) {
|
||||||
|
+ int r = Get("ro.product.vendor.device", value);
|
||||||
|
+ if(r>0) return r;
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.product.manufacturer") == 0) {
|
||||||
|
+ int r = Get("ro.product.vendor.manufacturer", value);
|
||||||
|
+ if(r>0) return r;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
const prop_info* pi = Find(name);
|
||||||
|
|
||||||
|
if (pi != nullptr) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
145
patches_treble/bionic/0002-Rework-property-overriding.patch
Normal file
145
patches_treble/bionic/0002-Rework-property-overriding.patch
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
From ad25fd64270b2c3dc9fbce5e97c2eb75d63f015b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Thu, 19 Jan 2023 16:44:01 -0500
|
||||||
|
Subject: [PATCH 2/2] Rework property overriding
|
||||||
|
|
||||||
|
- Support property read with callback in addition to previous
|
||||||
|
constant-size property_get
|
||||||
|
- Add another class of redirect "keymaster", to redirect to AOSP/GSI
|
||||||
|
props + SPL based on boot.img
|
||||||
|
---
|
||||||
|
libc/system_properties/system_properties.cpp | 77 +++++++++++++++-----
|
||||||
|
1 file changed, 58 insertions(+), 19 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
|
||||||
|
index d6e7e3e68..40ff48bad 100644
|
||||||
|
--- a/libc/system_properties/system_properties.cpp
|
||||||
|
+++ b/libc/system_properties/system_properties.cpp
|
||||||
|
@@ -35,6 +35,7 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <new>
|
||||||
|
@@ -60,23 +61,70 @@ static void read_self() {
|
||||||
|
if(self_ok) return;
|
||||||
|
self_ok = true;
|
||||||
|
|
||||||
|
- int fd = open("/proc/self/comm", O_RDONLY);
|
||||||
|
+ char cmdline[128];
|
||||||
|
+ int fd = open("/proc/self/cmdline", O_RDONLY);
|
||||||
|
if(fd<0) return;
|
||||||
|
- read(fd, comm, sizeof(comm)-1);
|
||||||
|
- for(unsigned i=0; i<sizeof(comm); i++)
|
||||||
|
- if(comm[i] == '\n')
|
||||||
|
- comm[i] = 0;
|
||||||
|
+ read(fd, cmdline, sizeof(cmdline)-1);
|
||||||
|
+ for(unsigned i=0; i<sizeof(cmdline); i++)
|
||||||
|
+ if(cmdline[i] == '\n')
|
||||||
|
+ cmdline[i] = 0;
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
+ // Truncate to last /, we don't want `/` in the prop
|
||||||
|
+ const char *c = strrchr(cmdline, '/');
|
||||||
|
+ if (c != nullptr) {
|
||||||
|
+ c = c+1;
|
||||||
|
+ } else {
|
||||||
|
+ c = cmdline;
|
||||||
|
+ }
|
||||||
|
+ // Take only the last 16 bytes (prop names max is 32)
|
||||||
|
+ if(strlen(c) < 15) {
|
||||||
|
+ strcpy(comm, c);
|
||||||
|
+ } else {
|
||||||
|
+ strcpy(comm, c + strlen(c) - 15);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
//That's calling ourselves but that's fine because we already have self_ok = true
|
||||||
|
char propName[PROP_NAME_MAX];
|
||||||
|
memset(propName, 0, PROP_NAME_MAX);
|
||||||
|
strncpy(propName, "debug.phh.props.", PROP_NAME_MAX - 1);
|
||||||
|
- strncat(propName, comm, PROP_NAME_MAX - 1);
|
||||||
|
+ strncat(propName, comm, PROP_NAME_MAX - strlen(propName) - 1);
|
||||||
|
|
||||||
|
+ //async_safe_format_log(ANDROID_LOG_WARN, "libc", "Reading debug prop %s", propName);
|
||||||
|
__system_property_get(propName, comm_override);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static const char* redirectToProp(const char *name) {
|
||||||
|
+ read_self();
|
||||||
|
+ /*if(strstr(name, "ro.keymaster") != nullptr || strstr(name, "security_patch") != nullptr || strstr(name, "release") != nullptr) {
|
||||||
|
+ async_safe_format_log(ANDROID_LOG_WARN, "libc", "Process/comm %s/%s is reading %s", comm, comm_override, name);
|
||||||
|
+ }*/
|
||||||
|
+ if(strcmp(comm_override, "vendor") == 0) {
|
||||||
|
+ if(strcmp(name, "ro.product.device") == 0) {
|
||||||
|
+ return "ro.product.vendor.device";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.product.manufacturer") == 0) {
|
||||||
|
+ return "ro.product.vendor.manufacturer";
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(comm_override, "keymaster") == 0) {
|
||||||
|
+ if(strcmp(name, "ro.product.model") == 0) {
|
||||||
|
+ return "ro.keymaster.mod";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.product.brand") == 0) {
|
||||||
|
+ return "ro.keymaster.brn";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.build.version.release") == 0) {
|
||||||
|
+ return "ro.keymaster.xxx.release";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.build.version.security_patch") == 0) {
|
||||||
|
+ return "ro.keymaster.xxx.security_patch";
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return name;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static bool is_dir(const char* pathname) {
|
||||||
|
struct stat info;
|
||||||
|
if (stat(pathname, &info) == -1) {
|
||||||
|
@@ -150,17 +198,19 @@ uint32_t SystemProperties::AreaSerial() {
|
||||||
|
}
|
||||||
|
|
||||||
|
const prop_info* SystemProperties::Find(const char* name) {
|
||||||
|
+ const char* newName = redirectToProp(name);
|
||||||
|
+
|
||||||
|
if (!initialized_) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- prop_area* pa = contexts_->GetPropAreaForName(name);
|
||||||
|
+ prop_area* pa = contexts_->GetPropAreaForName(newName);
|
||||||
|
if (!pa) {
|
||||||
|
async_safe_format_log(ANDROID_LOG_WARN, "libc", "Access denied finding property \"%s\"", name);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- return pa->find(name);
|
||||||
|
+ return pa->find(newName);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool is_read_only(const char* name) {
|
||||||
|
@@ -243,17 +293,6 @@ void SystemProperties::ReadCallback(const prop_info* pi,
|
||||||
|
}
|
||||||
|
|
||||||
|
int SystemProperties::Get(const char* name, char* value) {
|
||||||
|
- read_self();
|
||||||
|
- if(strcmp(comm_override, "vendor") == 0) {
|
||||||
|
- if(strcmp(name, "ro.product.device") == 0) {
|
||||||
|
- int r = Get("ro.product.vendor.device", value);
|
||||||
|
- if(r>0) return r;
|
||||||
|
- }
|
||||||
|
- if(strcmp(name, "ro.product.manufacturer") == 0) {
|
||||||
|
- int r = Get("ro.product.vendor.manufacturer", value);
|
||||||
|
- if(r>0) return r;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
const prop_info* pi = Find(name);
|
||||||
|
|
||||||
|
if (pi != nullptr) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,75 @@
|
|||||||
|
From 32c4d23814d4b387226dd4b4abae04663f89afbe Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 8 Dec 2021 07:04:53 +0000
|
||||||
|
Subject: [PATCH] Remove init.vndk-nodef.rc
|
||||||
|
|
||||||
|
This partially reverts "Deprecate VNDK-lite support from Legacy GSI".
|
||||||
|
|
||||||
|
Paired with https://github.com/LineageOS/android_system_core/commit/0b265e35ddf42638fa807f5349a10c40e3d46446, it kicks permissive devices into bootloader.
|
||||||
|
Given that GSI+permissive won't ever be a Lineage official scenario, revert this only on our side.
|
||||||
|
Thanks @Kethen for the insight!
|
||||||
|
|
||||||
|
Change-Id: I7c14fe5229e953f620bb225fa5c981752d0ac5f9
|
||||||
|
---
|
||||||
|
target/product/gsi/Android.mk | 13 -------------
|
||||||
|
target/product/gsi/init.gsi.rc | 2 --
|
||||||
|
target/product/gsi/init.vndk-nodef.rc | 3 ---
|
||||||
|
target/product/gsi_release.mk | 1 -
|
||||||
|
4 files changed, 19 deletions(-)
|
||||||
|
delete mode 100644 target/product/gsi/init.vndk-nodef.rc
|
||||||
|
|
||||||
|
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
|
||||||
|
index 107c94f685..0ad39c3610 100644
|
||||||
|
--- a/target/product/gsi/Android.mk
|
||||||
|
+++ b/target/product/gsi/Android.mk
|
||||||
|
@@ -256,16 +256,3 @@ LOCAL_SYSTEM_EXT_MODULE := true
|
||||||
|
LOCAL_MODULE_RELATIVE_PATH := init
|
||||||
|
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-include $(CLEAR_VARS)
|
||||||
|
-LOCAL_MODULE := init.vndk-nodef.rc
|
||||||
|
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||||
|
-LOCAL_LICENSE_CONDITIONS := notice
|
||||||
|
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
||||||
|
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
||||||
|
-LOCAL_MODULE_CLASS := ETC
|
||||||
|
-LOCAL_SYSTEM_EXT_MODULE := true
|
||||||
|
-LOCAL_MODULE_RELATIVE_PATH := gsi
|
||||||
|
-
|
||||||
|
-include $(BUILD_PREBUILT)
|
||||||
|
diff --git a/target/product/gsi/init.gsi.rc b/target/product/gsi/init.gsi.rc
|
||||||
|
index 69c8e467be..c6faba78d9 100644
|
||||||
|
--- a/target/product/gsi/init.gsi.rc
|
||||||
|
+++ b/target/product/gsi/init.gsi.rc
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
#
|
||||||
|
# Android init script for GSI required initialization
|
||||||
|
#
|
||||||
|
-
|
||||||
|
-import /system/system_ext/etc/gsi/init.vndk-${ro.vndk.version:-nodef}.rc
|
||||||
|
diff --git a/target/product/gsi/init.vndk-nodef.rc b/target/product/gsi/init.vndk-nodef.rc
|
||||||
|
deleted file mode 100644
|
||||||
|
index 1b141a05e7..0000000000
|
||||||
|
--- a/target/product/gsi/init.vndk-nodef.rc
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,3 +0,0 @@
|
||||||
|
-on early-init
|
||||||
|
- # Reboot if BOARD_VNDK_VERSION is not defined
|
||||||
|
- exec - root -- /system/bin/reboot bootloader
|
||||||
|
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
|
||||||
|
index 3b977927d1..7bade98ca1 100644
|
||||||
|
--- a/target/product/gsi_release.mk
|
||||||
|
+++ b/target/product/gsi_release.mk
|
||||||
|
@@ -62,7 +62,6 @@ PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_with_prebuilts.flattened
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
gsi_skip_mount.cfg \
|
||||||
|
init.gsi.rc \
|
||||||
|
- init.vndk-nodef.rc \
|
||||||
|
|
||||||
|
# Overlay the GSI specific SystemUI setting
|
||||||
|
PRODUCT_PACKAGES += gsi_overlay_systemui
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,326 @@
|
|||||||
|
From b5b0fd54c77d0c5feb3eb20395fa6e2400c41172 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Cai <peter@typeblog.net>
|
||||||
|
Date: Thu, 18 Aug 2022 15:44:46 -0400
|
||||||
|
Subject: [PATCH 1/3] APM: Restore S, R and Q behavior respectively for
|
||||||
|
telephony audio
|
||||||
|
|
||||||
|
This conditionally reverts part of b2e5cb (T), 51c9cc (S) and afd4ce (R)
|
||||||
|
when the VNDK version is equal to or before S, R and Q respectively.
|
||||||
|
|
||||||
|
On R, commit afd4ce made it so that both HW and SW bridging go through
|
||||||
|
`createAudioPatch()`, which is broken on some devices such as on MTK Q
|
||||||
|
vendor, because their HAL do not support HW patching via the newer
|
||||||
|
`createAudioPatch()` method. Instead, the patching on Q was done through
|
||||||
|
`setOutputDevices()`.
|
||||||
|
|
||||||
|
On S, commit 51c9cc refactored the related code again such that HW
|
||||||
|
bridging for the Rx direction is essentially removed, replaced with SW
|
||||||
|
bridging through `startAudioSource()`. This is, again, broken on MTK R
|
||||||
|
vendor devices.
|
||||||
|
|
||||||
|
On T, commit b2e5cb applied the same SW bridging to the Tx direction.
|
||||||
|
|
||||||
|
All of these commits rely on assumptions that are not tested through
|
||||||
|
VTS and just presumed to be true. Although we can blame MTK for not
|
||||||
|
supporting all the possible cases in their HAL, it will not fix
|
||||||
|
anything, and really frameworks code should not depend on such untested
|
||||||
|
assumptions.
|
||||||
|
|
||||||
|
To work around said issues, we restore old behavior from S, R and Q
|
||||||
|
relying on the value of `ro.vndk.version`.
|
||||||
|
|
||||||
|
Change-Id: I56d36d2aef4319935cb88a3e4771b23c6d5b2145
|
||||||
|
---
|
||||||
|
.../managerdefault/AudioPolicyManager.cpp | 206 ++++++++++++------
|
||||||
|
.../managerdefault/AudioPolicyManager.h | 3 +
|
||||||
|
2 files changed, 147 insertions(+), 62 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||||
|
index f093e685ba..9a90009f9e 100644
|
||||||
|
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||||
|
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||||
|
@@ -689,6 +689,17 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
disconnectTelephonyAudioSource(mCallRxSourceClient);
|
||||||
|
disconnectTelephonyAudioSource(mCallTxSourceClient);
|
||||||
|
|
||||||
|
+ // release existing RX patch if any
|
||||||
|
+ if (mCallRxPatch != 0) {
|
||||||
|
+ releaseAudioPatchInternal(mCallRxPatch->getHandle());
|
||||||
|
+ mCallRxPatch.clear();
|
||||||
|
+ }
|
||||||
|
+ // release TX patch if any
|
||||||
|
+ if (mCallTxPatch != 0) {
|
||||||
|
+ releaseAudioPatchInternal(mCallTxPatch->getHandle());
|
||||||
|
+ mCallTxPatch.clear();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
auto telephonyRxModule =
|
||||||
|
mHwModules.getModuleForDeviceType(AUDIO_DEVICE_IN_TELEPHONY_RX, AUDIO_FORMAT_DEFAULT);
|
||||||
|
auto telephonyTxModule =
|
||||||
|
@@ -711,9 +722,20 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
ALOGE("%s() no telephony Tx and/or RX device", __func__);
|
||||||
|
return INVALID_OPERATION;
|
||||||
|
}
|
||||||
|
- // createAudioPatchInternal now supports both HW / SW bridging
|
||||||
|
- createRxPatch = true;
|
||||||
|
- createTxPatch = true;
|
||||||
|
+ if (property_get_int32("ro.vndk.version", 31) >= 30) {
|
||||||
|
+ // createAudioPatchInternal now supports both HW / SW bridging
|
||||||
|
+ createRxPatch = true;
|
||||||
|
+ createTxPatch = true;
|
||||||
|
+ } else {
|
||||||
|
+ // pre-R behavior: some devices before VNDK 30 do not support createAudioPatch correctly
|
||||||
|
+ // for HW bridging even though they declare support for it
|
||||||
|
+ // do not create a patch (aka Sw Bridging) if Primary HW module has declared supporting a
|
||||||
|
+ // route between telephony RX to Sink device and Source device to telephony TX
|
||||||
|
+ ALOGI("%s() Using pre-R behavior for createRxPatch and createTxPatch", __func__);
|
||||||
|
+ const auto &primaryModule = telephonyRxModule;
|
||||||
|
+ createRxPatch = !primaryModule->supportsPatch(rxSourceDevice, rxDevices.itemAt(0));
|
||||||
|
+ createTxPatch = !primaryModule->supportsPatch(txSourceDevice, txSinkDevice);
|
||||||
|
+ }
|
||||||
|
} else {
|
||||||
|
// If the RX device is on the primary HW module, then use legacy routing method for
|
||||||
|
// voice calls via setOutputDevice() on primary output.
|
||||||
|
@@ -730,7 +752,14 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
if (!createRxPatch) {
|
||||||
|
muteWaitMs = setOutputDevices(mPrimaryOutput, rxDevices, true, delayMs);
|
||||||
|
} else { // create RX path audio patch
|
||||||
|
- connectTelephonyRxAudioSource();
|
||||||
|
+ if (property_get_int32("ro.vndk.version", 31) >= 31) {
|
||||||
|
+ connectTelephonyRxAudioSource();
|
||||||
|
+ } else {
|
||||||
|
+ // pre-S behavior: some devices do not support SW bridging correctly when HW bridge is
|
||||||
|
+ // available through createAudioPatch(); startAudioSource() forces SW bridging.
|
||||||
|
+ ALOGI("%s() Using pre-S behavior to create HW Rx patch", __func__);
|
||||||
|
+ mCallRxPatch = createTelephonyPatch(true /*isRx*/, rxDevices.itemAt(0), delayMs);
|
||||||
|
+ }
|
||||||
|
// If the TX device is on the primary HW module but RX device is
|
||||||
|
// on other HW module, SinkMetaData of telephony input should handle it
|
||||||
|
// assuming the device uses audio HAL V5.0 and above
|
||||||
|
@@ -745,7 +774,12 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
closeActiveClients(activeDesc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- connectTelephonyTxAudioSource(txSourceDevice, txSinkDevice, delayMs);
|
||||||
|
+ if (property_get_int32("ro.vndk.version", 33) >= 33) {
|
||||||
|
+ connectTelephonyTxAudioSource(txSourceDevice, txSinkDevice, delayMs);
|
||||||
|
+ } else {
|
||||||
|
+ // pre-T behavior: hw bridging for tx too; skip the SwOutput
|
||||||
|
+ mCallTxPatch = createTelephonyPatch(false /*isRx*/, txSourceDevice, delayMs);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
if (waitMs != nullptr) {
|
||||||
|
*waitMs = muteWaitMs;
|
||||||
|
@@ -753,6 +787,36 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||||
|
return NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
+sp<AudioPatch> AudioPolicyManager::createTelephonyPatch(
|
||||||
|
+ bool isRx, const sp<DeviceDescriptor> &device, uint32_t delayMs) {
|
||||||
|
+ PatchBuilder patchBuilder;
|
||||||
|
+
|
||||||
|
+ if (device == nullptr) {
|
||||||
|
+ return nullptr;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // @TODO: still ignoring the address, or not dealing platform with multiple telephony devices
|
||||||
|
+ if (isRx) {
|
||||||
|
+ patchBuilder.addSink(device).
|
||||||
|
+ addSource(mAvailableInputDevices.getDevice(
|
||||||
|
+ AUDIO_DEVICE_IN_TELEPHONY_RX, String8(), AUDIO_FORMAT_DEFAULT));
|
||||||
|
+ } else {
|
||||||
|
+ patchBuilder.addSource(device).
|
||||||
|
+ addSink(mAvailableOutputDevices.getDevice(
|
||||||
|
+ AUDIO_DEVICE_OUT_TELEPHONY_TX, String8(), AUDIO_FORMAT_DEFAULT));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ audio_patch_handle_t patchHandle = AUDIO_PATCH_HANDLE_NONE;
|
||||||
|
+ status_t status =
|
||||||
|
+ createAudioPatchInternal(patchBuilder.patch(), &patchHandle, mUidCached, delayMs, nullptr);
|
||||||
|
+ ssize_t index = mAudioPatches.indexOfKey(patchHandle);
|
||||||
|
+ if (status != NO_ERROR || index < 0) {
|
||||||
|
+ ALOGW("%s() error %d creating %s audio patch", __func__, status, isRx ? "RX" : "TX");
|
||||||
|
+ return nullptr;
|
||||||
|
+ }
|
||||||
|
+ return mAudioPatches.valueAt(index);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool AudioPolicyManager::isDeviceOfModule(
|
||||||
|
const sp<DeviceDescriptor>& devDesc, const char *moduleId) const {
|
||||||
|
sp<HwModule> module = mHwModules.getModuleFromName(moduleId);
|
||||||
|
@@ -4958,83 +5022,101 @@ status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch *
|
||||||
|
// in config XML to reach the sink so that is can be declared as available.
|
||||||
|
audio_io_handle_t output = AUDIO_IO_HANDLE_NONE;
|
||||||
|
sp<SwAudioOutputDescriptor> outputDesc;
|
||||||
|
- if (!sourceDesc->isInternal()) {
|
||||||
|
- // take care of dynamic routing for SwOutput selection,
|
||||||
|
- audio_attributes_t attributes = sourceDesc->attributes();
|
||||||
|
- audio_stream_type_t stream = sourceDesc->stream();
|
||||||
|
- audio_attributes_t resultAttr;
|
||||||
|
- audio_config_t config = AUDIO_CONFIG_INITIALIZER;
|
||||||
|
- config.sample_rate = sourceDesc->config().sample_rate;
|
||||||
|
- audio_channel_mask_t sourceMask = sourceDesc->config().channel_mask;
|
||||||
|
- config.channel_mask =
|
||||||
|
- (audio_channel_mask_get_representation(sourceMask)
|
||||||
|
- == AUDIO_CHANNEL_REPRESENTATION_INDEX) ? sourceMask
|
||||||
|
- : audio_channel_mask_in_to_out(sourceMask);
|
||||||
|
- config.format = sourceDesc->config().format;
|
||||||
|
- audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE;
|
||||||
|
- audio_port_handle_t selectedDeviceId = AUDIO_PORT_HANDLE_NONE;
|
||||||
|
- bool isRequestedDeviceForExclusiveUse = false;
|
||||||
|
- output_type_t outputType;
|
||||||
|
- bool isSpatialized;
|
||||||
|
- bool isBitPerfect;
|
||||||
|
- getOutputForAttrInt(&resultAttr, &output, AUDIO_SESSION_NONE, &attributes,
|
||||||
|
- &stream, sourceDesc->uid(), &config, &flags,
|
||||||
|
- &selectedDeviceId, &isRequestedDeviceForExclusiveUse,
|
||||||
|
- nullptr, &outputType, &isSpatialized, &isBitPerfect);
|
||||||
|
- if (output == AUDIO_IO_HANDLE_NONE) {
|
||||||
|
- ALOGV("%s no output for device %s",
|
||||||
|
- __FUNCTION__, sinkDevice->toString().c_str());
|
||||||
|
- return INVALID_OPERATION;
|
||||||
|
- }
|
||||||
|
- outputDesc = mOutputs.valueFor(output);
|
||||||
|
- if (outputDesc->isDuplicated()) {
|
||||||
|
- ALOGE("%s output is duplicated", __func__);
|
||||||
|
- return INVALID_OPERATION;
|
||||||
|
- }
|
||||||
|
- bool closeOutput = outputDesc->mDirectOpenCount != 0;
|
||||||
|
- sourceDesc->setSwOutput(outputDesc, closeOutput);
|
||||||
|
- } else {
|
||||||
|
- // Same for "raw patches" aka created from createAudioPatch API
|
||||||
|
- SortedVector<audio_io_handle_t> outputs =
|
||||||
|
- getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
|
||||||
|
- // if the sink device is reachable via an opened output stream, request to
|
||||||
|
- // go via this output stream by adding a second source to the patch
|
||||||
|
- // description
|
||||||
|
- output = selectOutput(outputs);
|
||||||
|
- if (output == AUDIO_IO_HANDLE_NONE) {
|
||||||
|
- ALOGE("%s no output available for internal patch sink", __func__);
|
||||||
|
- return INVALID_OPERATION;
|
||||||
|
- }
|
||||||
|
- outputDesc = mOutputs.valueFor(output);
|
||||||
|
- if (outputDesc->isDuplicated()) {
|
||||||
|
- ALOGV("%s output for device %s is duplicated",
|
||||||
|
- __func__, sinkDevice->toString().c_str());
|
||||||
|
- return INVALID_OPERATION;
|
||||||
|
+ if (sourceDesc != nullptr) {
|
||||||
|
+ if (!sourceDesc->isInternal()) {
|
||||||
|
+ // take care of dynamic routing for SwOutput selection,
|
||||||
|
+ audio_attributes_t attributes = sourceDesc->attributes();
|
||||||
|
+ audio_stream_type_t stream = sourceDesc->stream();
|
||||||
|
+ audio_attributes_t resultAttr;
|
||||||
|
+ audio_config_t config = AUDIO_CONFIG_INITIALIZER;
|
||||||
|
+ config.sample_rate = sourceDesc->config().sample_rate;
|
||||||
|
+ audio_channel_mask_t sourceMask = sourceDesc->config().channel_mask;
|
||||||
|
+ config.channel_mask =
|
||||||
|
+ (audio_channel_mask_get_representation(sourceMask)
|
||||||
|
+ == AUDIO_CHANNEL_REPRESENTATION_INDEX) ? sourceMask
|
||||||
|
+ : audio_channel_mask_in_to_out(sourceMask);
|
||||||
|
+ config.format = sourceDesc->config().format;
|
||||||
|
+ audio_output_flags_t flags = AUDIO_OUTPUT_FLAG_NONE;
|
||||||
|
+ audio_port_handle_t selectedDeviceId = AUDIO_PORT_HANDLE_NONE;
|
||||||
|
+ bool isRequestedDeviceForExclusiveUse = false;
|
||||||
|
+ output_type_t outputType;
|
||||||
|
+ bool isSpatialized;
|
||||||
|
+ bool isBitPerfect;
|
||||||
|
+ getOutputForAttrInt(&resultAttr, &output, AUDIO_SESSION_NONE, &attributes,
|
||||||
|
+ &stream, sourceDesc->uid(), &config, &flags,
|
||||||
|
+ &selectedDeviceId, &isRequestedDeviceForExclusiveUse,
|
||||||
|
+ nullptr, &outputType, &isSpatialized, &isBitPerfect);
|
||||||
|
+ if (output == AUDIO_IO_HANDLE_NONE) {
|
||||||
|
+ ALOGV("%s no output for device %s",
|
||||||
|
+ __FUNCTION__, sinkDevice->toString().c_str());
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ outputDesc = mOutputs.valueFor(output);
|
||||||
|
+ if (outputDesc->isDuplicated()) {
|
||||||
|
+ ALOGE("%s output is duplicated", __func__);
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ bool closeOutput = outputDesc->mDirectOpenCount != 0;
|
||||||
|
+ sourceDesc->setSwOutput(outputDesc, closeOutput);
|
||||||
|
+ } else {
|
||||||
|
+ // Same for "raw patches" aka created from createAudioPatch API
|
||||||
|
+ SortedVector<audio_io_handle_t> outputs =
|
||||||
|
+ getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
|
||||||
|
+ // if the sink device is reachable via an opened output stream, request to
|
||||||
|
+ // go via this output stream by adding a second source to the patch
|
||||||
|
+ // description
|
||||||
|
+ output = selectOutput(outputs);
|
||||||
|
+ if (output == AUDIO_IO_HANDLE_NONE) {
|
||||||
|
+ ALOGE("%s no output available for internal patch sink", __func__);
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ outputDesc = mOutputs.valueFor(output);
|
||||||
|
+ if (outputDesc->isDuplicated()) {
|
||||||
|
+ ALOGV("%s output for device %s is duplicated",
|
||||||
|
+ __func__, sinkDevice->toString().c_str());
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
- sourceDesc->setSwOutput(outputDesc, /* closeOutput= */ false);
|
||||||
|
}
|
||||||
|
// create a software bridge in PatchPanel if:
|
||||||
|
// - source and sink devices are on different HW modules OR
|
||||||
|
// - audio HAL version is < 3.0
|
||||||
|
// - audio HAL version is >= 3.0 but no route has been declared between devices
|
||||||
|
- // - called from startAudioSource (aka sourceDesc is not internal) and source device
|
||||||
|
+ // - called from startAudioSource (aka sourceDesc is neither null nor internal) and source device
|
||||||
|
// does not have a gain controller
|
||||||
|
if (!srcDevice->hasSameHwModuleAs(sinkDevice) ||
|
||||||
|
(srcDevice->getModuleVersionMajor() < 3) ||
|
||||||
|
!srcDevice->getModule()->supportsPatch(srcDevice, sinkDevice) ||
|
||||||
|
- (!sourceDesc->isInternal() &&
|
||||||
|
+ ((sourceDesc != nullptr && !sourceDesc->isInternal()) &&
|
||||||
|
srcDevice->getAudioPort()->getGains().size() == 0)) {
|
||||||
|
// support only one sink device for now to simplify output selection logic
|
||||||
|
if (patch->num_sinks > 1) {
|
||||||
|
return INVALID_OPERATION;
|
||||||
|
}
|
||||||
|
- sourceDesc->setUseSwBridge();
|
||||||
|
+ if (sourceDesc == nullptr) {
|
||||||
|
+ SortedVector<audio_io_handle_t> outputs =
|
||||||
|
+ getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
|
||||||
|
+ // if the sink device is reachable via an opened output stream, request to
|
||||||
|
+ // go via this output stream by adding a second source to the patch
|
||||||
|
+ // description
|
||||||
|
+ output = selectOutput(outputs);
|
||||||
|
+ if (output != AUDIO_IO_HANDLE_NONE) {
|
||||||
|
+ outputDesc = mOutputs.valueFor(output);
|
||||||
|
+ if (outputDesc->isDuplicated()) {
|
||||||
|
+ ALOGV("%s output for device %s is duplicated",
|
||||||
|
+ __FUNCTION__, sinkDevice->toString().c_str());
|
||||||
|
+ return INVALID_OPERATION;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ sourceDesc->setUseSwBridge();
|
||||||
|
+ }
|
||||||
|
if (outputDesc != nullptr) {
|
||||||
|
audio_port_config srcMixPortConfig = {};
|
||||||
|
outputDesc->toAudioPortConfig(&srcMixPortConfig, nullptr);
|
||||||
|
// for volume control, we may need a valid stream
|
||||||
|
srcMixPortConfig.ext.mix.usecase.stream =
|
||||||
|
- (!sourceDesc->isInternal() || isCallTxAudioSource(sourceDesc)) ?
|
||||||
|
+ (sourceDesc != nullptr && (!sourceDesc->isInternal() || isCallTxAudioSource(sourceDesc))) ?
|
||||||
|
mEngine->getStreamTypeForAttributes(sourceDesc->attributes()) :
|
||||||
|
AUDIO_STREAM_PATCH;
|
||||||
|
patchBuilder.addSource(srcMixPortConfig);
|
||||||
|
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
|
||||||
|
index 88bafefdb1..188b5732b3 100644
|
||||||
|
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
|
||||||
|
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
|
||||||
|
@@ -953,6 +953,9 @@ protected:
|
||||||
|
|
||||||
|
SoundTriggerSessionCollection mSoundTriggerSessions;
|
||||||
|
|
||||||
|
+ sp<AudioPatch> mCallTxPatch;
|
||||||
|
+ sp<AudioPatch> mCallRxPatch;
|
||||||
|
+
|
||||||
|
HwAudioOutputCollection mHwOutputs;
|
||||||
|
SourceClientCollection mAudioSources;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
From cf178b74640512639620ed5f99122407225053f8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Cai <peter@typeblog.net>
|
||||||
|
Date: Wed, 24 Aug 2022 15:42:39 -0400
|
||||||
|
Subject: [PATCH 2/3] APM: Optionally force-load audio policy for system-side
|
||||||
|
bt audio HAL
|
||||||
|
|
||||||
|
Required to support our system-side bt audio implementation, i.e.
|
||||||
|
`sysbta`.
|
||||||
|
|
||||||
|
Co-authored-by: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Change-Id: I279fff541a531f922f3fa55b8f14d00237db59ff
|
||||||
|
---
|
||||||
|
.../managerdefinitions/src/Serializer.cpp | 25 +++++++++++++++++++
|
||||||
|
1 file changed, 25 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
index 3d5c1d2e42..881c188e4c 100644
|
||||||
|
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
@@ -25,6 +25,7 @@
|
||||||
|
#include <libxml/parser.h>
|
||||||
|
#include <libxml/xinclude.h>
|
||||||
|
#include <media/convert.h>
|
||||||
|
+#include <cutils/properties.h>
|
||||||
|
#include <utils/Log.h>
|
||||||
|
#include <utils/StrongPointer.h>
|
||||||
|
#include <utils/Errors.h>
|
||||||
|
@@ -885,6 +886,30 @@ status_t PolicySerializer::deserialize(const char *configFile, AudioPolicyConfig
|
||||||
|
if (status != NO_ERROR) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Remove modules called bluetooth, bluetooth_qti or a2dp, and inject our own
|
||||||
|
+ if (property_get_bool("persist.bluetooth.system_audio_hal.enabled", false)) {
|
||||||
|
+ for (auto it = modules.begin(); it != modules.end(); it++) {
|
||||||
|
+ const char *name = (*it)->getName();
|
||||||
|
+ if (strcmp(name, "a2dp") == 0 ||
|
||||||
|
+ strcmp(name, "a2dpsink") == 0 ||
|
||||||
|
+ strcmp(name, "bluetooth") == 0 ||
|
||||||
|
+ strcmp(name, "bluetooth_qti") == 0) {
|
||||||
|
+
|
||||||
|
+ ALOGE("Removed module %s\n", name);
|
||||||
|
+ it = modules.erase(it);
|
||||||
|
+ }
|
||||||
|
+ if (it == modules.end()) break;
|
||||||
|
+ }
|
||||||
|
+ const char* a2dpFileName = "/system/etc/sysbta_audio_policy_configuration.xml";
|
||||||
|
+ if (version == "7.0")
|
||||||
|
+ a2dpFileName = "/system/etc/sysbta_audio_policy_configuration_7_0.xml";
|
||||||
|
+ auto doc = make_xmlUnique(xmlParseFile(a2dpFileName));
|
||||||
|
+ xmlNodePtr root = xmlDocGetRootElement(doc.get());
|
||||||
|
+ auto maybeA2dpModule = deserialize<ModuleTraits>(root, config);
|
||||||
|
+ modules.add(std::get<1>(maybeA2dpModule));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
config->setHwModules(modules);
|
||||||
|
|
||||||
|
// Global Configuration
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,79 @@
|
|||||||
|
From f792286920c7c2c43758a8e1053bab89948bf305 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Cai <peter@typeblog.net>
|
||||||
|
Date: Thu, 25 Aug 2022 13:30:29 -0400
|
||||||
|
Subject: [PATCH 3/3] APM: Remove A2DP audio ports from the primary HAL
|
||||||
|
|
||||||
|
These ports defined in the primary HAL are intended for A2DP offloading,
|
||||||
|
however they do not work in general on GSIs, and will interfere with
|
||||||
|
sysbta, the system-side generic bluetooth audio implementation.
|
||||||
|
|
||||||
|
Remove them as we parse the policy XML.
|
||||||
|
|
||||||
|
Co-authored-by: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Change-Id: I3305594a17285da113167b419543543f0ef71122
|
||||||
|
---
|
||||||
|
.../managerdefinitions/src/Serializer.cpp | 26 ++++++++++++++++---
|
||||||
|
1 file changed, 22 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
index 881c188e4c..8519cfdc04 100644
|
||||||
|
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
#include <libxml/xinclude.h>
|
||||||
|
#include <media/convert.h>
|
||||||
|
#include <cutils/properties.h>
|
||||||
|
+#include <system/audio.h>
|
||||||
|
#include <utils/Log.h>
|
||||||
|
#include <utils/StrongPointer.h>
|
||||||
|
#include <utils/Errors.h>
|
||||||
|
@@ -334,11 +335,8 @@ status_t PolicySerializer::deserializeCollection(const xmlNode *cur,
|
||||||
|
Trait::collectionTag);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
- } else if (mIgnoreVendorExtensions && std::get<status_t>(maybeElement) == NO_INIT) {
|
||||||
|
- // Skip a vendor extension element.
|
||||||
|
- } else {
|
||||||
|
- return BAD_VALUE;
|
||||||
|
}
|
||||||
|
+ // Ignore elements that failed to parse, e.g. routes with invalid sinks
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!xmlStrcmp(cur->name, reinterpret_cast<const xmlChar*>(Trait::tag))) {
|
||||||
|
@@ -679,6 +677,7 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||||
|
ALOGE("%s: No %s found", __func__, Attributes::name);
|
||||||
|
return BAD_VALUE;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
uint32_t versionMajor = 0, versionMinor = 0;
|
||||||
|
std::string versionLiteral = getXmlAttribute(cur, Attributes::version);
|
||||||
|
if (!versionLiteral.empty()) {
|
||||||
|
@@ -704,6 +703,25 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||||
|
if (status != NO_ERROR) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
+ bool shouldEraseA2DP = name == "primary" && property_get_bool("persist.bluetooth.system_audio_hal.enabled", false);
|
||||||
|
+ if (shouldEraseA2DP) {
|
||||||
|
+ // Having A2DP ports in the primary audio HAL module will interfere with sysbta
|
||||||
|
+ // so remove them here. Note that we do not need to explicitly remove the
|
||||||
|
+ // corresponding routes below, because routes with invalid sinks will be ignored
|
||||||
|
+ auto iter = devicePorts.begin();
|
||||||
|
+ while (iter != devicePorts.end()) {
|
||||||
|
+ auto port = *iter;
|
||||||
|
+ auto type = port->type();
|
||||||
|
+ if (type == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP
|
||||||
|
+ || type == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES
|
||||||
|
+ || type == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER) {
|
||||||
|
+ ALOGE("Erasing A2DP device port %s", port->getTagName().c_str());
|
||||||
|
+ iter = devicePorts.erase(iter);
|
||||||
|
+ } else {
|
||||||
|
+ iter++;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
module->setDeclaredDevices(devicePorts);
|
||||||
|
|
||||||
|
RouteTraits::Collection routes;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 36920a508f5c97585652116c356451ae759bf946 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Sun, 25 Oct 2020 23:57:26 +0100
|
||||||
|
Subject: [PATCH 1/5] Re-implement fnmatch-like behaviour for RRO java-side
|
||||||
|
|
||||||
|
T: Also apply to FrameworkParsingPackageUtils (@PeterCxy)
|
||||||
|
|
||||||
|
Change-Id: Id38292a9a1453aa87b8401c1fdb390fa4e63c7d1
|
||||||
|
---
|
||||||
|
.../pm/parsing/FrameworkParsingPackageUtils.java | 13 +++++++++++--
|
||||||
|
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||||
|
index b75ba82ad091..b344f7232190 100644
|
||||||
|
--- a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||||
|
+++ b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||||
|
@@ -223,8 +223,17 @@ public class FrameworkParsingPackageUtils {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 3. Check if prop is equal to expected value.
|
||||||
|
- if (!currValue.equals(propValues[i])) {
|
||||||
|
- return false;
|
||||||
|
+ final String value = propValues[i];
|
||||||
|
+ if(value.startsWith("+")) {
|
||||||
|
+ final java.util.regex.Pattern regex = java.util.regex.Pattern.compile(value.substring(1, value.length()).replace("*", ".*"));
|
||||||
|
+ java.util.regex.Matcher matcher = regex.matcher(currValue);
|
||||||
|
+ if (!matcher.find()) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ if(!value.equals(currValue)) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,46 @@
|
|||||||
|
From 69fbb22f3d265d9baf7ba87c2e0d42671a898037 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Sat, 24 Mar 2018 08:01:48 +0100
|
||||||
|
Subject: [PATCH 2/5] LightsService: Alternative backlight scale
|
||||||
|
|
||||||
|
Reserved a manual override just in case
|
||||||
|
|
||||||
|
Change-Id: I46ae69c758d1a4609d89cf1c293488ea5fc76787
|
||||||
|
---
|
||||||
|
.../com/android/server/lights/LightsService.java | 13 +++++++++++++
|
||||||
|
1 file changed, 13 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/services/core/java/com/android/server/lights/LightsService.java b/services/core/java/com/android/server/lights/LightsService.java
|
||||||
|
index fea6b29d9260..2a9a3b63ea2e 100644
|
||||||
|
--- a/services/core/java/com/android/server/lights/LightsService.java
|
||||||
|
+++ b/services/core/java/com/android/server/lights/LightsService.java
|
||||||
|
@@ -32,6 +32,7 @@ import android.os.IBinder;
|
||||||
|
import android.os.Looper;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.os.ServiceManager;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
import android.os.Trace;
|
||||||
|
import android.provider.Settings;
|
||||||
|
import android.util.Slog;
|
||||||
|
@@ -295,6 +296,18 @@ public class LightsService extends SystemService {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int brightnessInt = BrightnessSynchronizer.brightnessFloatToInt(brightness);
|
||||||
|
+ if (mHwLight.id == 0) {
|
||||||
|
+ int scaleOverrideValue = SystemProperties.getInt("persist.sys.treble.backlight_scale.override_value", -1);
|
||||||
|
+ if (scaleOverrideValue != -1) {
|
||||||
|
+ setLightLocked(brightnessInt * scaleOverrideValue / 255, LIGHT_FLASH_NONE, 0, 0, brightnessMode);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ int scaleValue = SystemProperties.getInt("persist.sys.treble.backlight_scale.value", -1);
|
||||||
|
+ if (scaleValue != -1) {
|
||||||
|
+ setLightLocked(brightnessInt * scaleValue / 255, LIGHT_FLASH_NONE, 0, 0, brightnessMode);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
int color = brightnessInt & 0x000000ff;
|
||||||
|
color = 0xff000000 | (color << 16) | (color << 8) | color;
|
||||||
|
setLightLocked(color, LIGHT_FLASH_NONE, 0, 0, brightnessMode);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,110 @@
|
|||||||
|
From f5e64bb671b92afc7e9d897c950f3c51aebfe882 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 15 Oct 2022 09:33:56 +0000
|
||||||
|
Subject: [PATCH 3/5] Revert "Remove more FDE methods from StorageManager"
|
||||||
|
|
||||||
|
This reverts commit bd13f84152449a3ead6fa8604fd31f48c0224676.
|
||||||
|
|
||||||
|
Change-Id: Ic394934ec27b1a486c60123130825d44dad73412
|
||||||
|
---
|
||||||
|
.../android/os/storage/StorageManager.java | 57 +++++++++++++++++++
|
||||||
|
.../internal/os/RoSystemProperties.java | 4 ++
|
||||||
|
2 files changed, 61 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
|
||||||
|
index 80dd48825ba7..cb4769ff4ec3 100644
|
||||||
|
--- a/core/java/android/os/storage/StorageManager.java
|
||||||
|
+++ b/core/java/android/os/storage/StorageManager.java
|
||||||
|
@@ -1660,6 +1660,15 @@ public class StorageManager {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device encryptable or already encrypted?
|
||||||
|
+ * @return true for encryptable or encrypted
|
||||||
|
+ * false not encrypted and not encryptable
|
||||||
|
+ */
|
||||||
|
+ public static boolean isEncryptable() {
|
||||||
|
+ return RoSystemProperties.CRYPTO_ENCRYPTABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/** {@hide}
|
||||||
|
* Is this device encrypted?
|
||||||
|
* <p>
|
||||||
|
@@ -1693,6 +1702,54 @@ public class StorageManager {
|
||||||
|
return isFileEncrypted();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device block encrypted?
|
||||||
|
+ * @return true for block encrypted. (Implies isEncrypted() == true)
|
||||||
|
+ * false not encrypted or file encrypted
|
||||||
|
+ */
|
||||||
|
+ public static boolean isBlockEncrypted() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device block encrypted with credentials?
|
||||||
|
+ * @return true for crediential block encrypted.
|
||||||
|
+ * (Implies isBlockEncrypted() == true)
|
||||||
|
+ * false not encrypted, file encrypted or default block encrypted
|
||||||
|
+ */
|
||||||
|
+ public static boolean isNonDefaultBlockEncrypted() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device in the process of being block encrypted?
|
||||||
|
+ * @return true for encrypting.
|
||||||
|
+ * false otherwise
|
||||||
|
+ * Whether device isEncrypted at this point is undefined
|
||||||
|
+ * Note that only system services and CryptKeeper will ever see this return
|
||||||
|
+ * true - no app will ever be launched in this state.
|
||||||
|
+ * Also note that this state will not change without a teardown of the
|
||||||
|
+ * framework, so no service needs to check for changes during their lifespan
|
||||||
|
+ */
|
||||||
|
+ public static boolean isBlockEncrypting() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /** {@hide}
|
||||||
|
+ * Is this device non default block encrypted and in the process of
|
||||||
|
+ * prompting for credentials?
|
||||||
|
+ * @return true for prompting for credentials.
|
||||||
|
+ * (Implies isNonDefaultBlockEncrypted() == true)
|
||||||
|
+ * false otherwise
|
||||||
|
+ * Note that only system services and CryptKeeper will ever see this return
|
||||||
|
+ * true - no app will ever be launched in this state.
|
||||||
|
+ * Also note that this state will not change without a teardown of the
|
||||||
|
+ * framework, so no service needs to check for changes during their lifespan
|
||||||
|
+ */
|
||||||
|
+ public static boolean inCryptKeeperBounce() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/** {@hide}
|
||||||
|
* @deprecated Use {@link #isFileEncrypted} instead, since emulated FBE is no longer supported.
|
||||||
|
*/
|
||||||
|
diff --git a/core/java/com/android/internal/os/RoSystemProperties.java b/core/java/com/android/internal/os/RoSystemProperties.java
|
||||||
|
index 40d5c4761dff..66288706b0f1 100644
|
||||||
|
--- a/core/java/com/android/internal/os/RoSystemProperties.java
|
||||||
|
+++ b/core/java/com/android/internal/os/RoSystemProperties.java
|
||||||
|
@@ -68,10 +68,14 @@ public class RoSystemProperties {
|
||||||
|
public static final CryptoProperties.type_values CRYPTO_TYPE =
|
||||||
|
CryptoProperties.type().orElse(CryptoProperties.type_values.NONE);
|
||||||
|
// These are pseudo-properties
|
||||||
|
+ public static final boolean CRYPTO_ENCRYPTABLE =
|
||||||
|
+ CRYPTO_STATE != CryptoProperties.state_values.UNSUPPORTED;
|
||||||
|
public static final boolean CRYPTO_ENCRYPTED =
|
||||||
|
CRYPTO_STATE == CryptoProperties.state_values.ENCRYPTED;
|
||||||
|
public static final boolean CRYPTO_FILE_ENCRYPTED =
|
||||||
|
CRYPTO_TYPE == CryptoProperties.type_values.FILE;
|
||||||
|
+ public static final boolean CRYPTO_BLOCK_ENCRYPTED =
|
||||||
|
+ CRYPTO_TYPE == CryptoProperties.type_values.BLOCK;
|
||||||
|
|
||||||
|
public static final boolean CONTROL_PRIVAPP_PERMISSIONS_LOG =
|
||||||
|
"log".equalsIgnoreCase(CONTROL_PRIVAPP_PERMISSIONS);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
From aaf44460fbf5dcdbb844e4c5bba99b48576e59ef Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 2 Aug 2023 20:59:53 +0800
|
||||||
|
Subject: [PATCH 4/5] Restore getSimStateForSlotIndex in SubscriptionManager
|
||||||
|
|
||||||
|
MTK IMS still needs it here
|
||||||
|
|
||||||
|
Change-Id: I41bac57c68055f369232359a464642daab94403b
|
||||||
|
---
|
||||||
|
.../android/telephony/SubscriptionManager.java | 14 ++++++++++++++
|
||||||
|
1 file changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
|
||||||
|
index 64e43568e4d6..cfb4f12815a2 100644
|
||||||
|
--- a/telephony/java/android/telephony/SubscriptionManager.java
|
||||||
|
+++ b/telephony/java/android/telephony/SubscriptionManager.java
|
||||||
|
@@ -2549,6 +2549,20 @@ public class SubscriptionManager {
|
||||||
|
return TelephonyManager.getDefault().isNetworkRoaming(subId);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * Returns a constant indicating the state of sim for the slot index.
|
||||||
|
+ *
|
||||||
|
+ * @param slotIndex Logical SIM slot index.
|
||||||
|
+ *
|
||||||
|
+ * @see TelephonyManager.SimState
|
||||||
|
+ *
|
||||||
|
+ * @hide
|
||||||
|
+ */
|
||||||
|
+ @TelephonyManager.SimState
|
||||||
|
+ public static int getSimStateForSlotIndex(int slotIndex) {
|
||||||
|
+ return TelephonyManager.getSimStateForSlotIndex(slotIndex);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Set a field in the subscription database. Note not all fields are supported.
|
||||||
|
*
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,88 @@
|
|||||||
|
From d9dd8793634f892d905e46d45e190f72f8761def Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 19 Nov 2023 23:07:03 +0800
|
||||||
|
Subject: [PATCH 5/5] Restore getPhysicalDisplayIds in SurfaceControl
|
||||||
|
|
||||||
|
For convenience of accessing DynamicDisplayInfo from Settings
|
||||||
|
Copy over the updated implementation from DisplayControl while we're at it
|
||||||
|
|
||||||
|
This partially reverts commit e2f333728788ad88a65208a6119aed90e13e7040.
|
||||||
|
|
||||||
|
Change-Id: Ie056ecaf76acbc70d73e1c26cc4542088fcda18d
|
||||||
|
---
|
||||||
|
core/java/android/view/SurfaceControl.java | 8 ++++++++
|
||||||
|
core/jni/android_view_SurfaceControl.cpp | 18 ++++++++++++++++++
|
||||||
|
2 files changed, 26 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
|
||||||
|
index c11f4975149d..cf9262aafb03 100644
|
||||||
|
--- a/core/java/android/view/SurfaceControl.java
|
||||||
|
+++ b/core/java/android/view/SurfaceControl.java
|
||||||
|
@@ -179,6 +179,7 @@ public final class SurfaceControl implements Parcelable {
|
||||||
|
private static native boolean nativeClearAnimationFrameStats();
|
||||||
|
private static native boolean nativeGetAnimationFrameStats(WindowAnimationFrameStats outStats);
|
||||||
|
|
||||||
|
+ private static native long[] nativeGetPhysicalDisplayIds();
|
||||||
|
private static native void nativeSetDisplaySurface(long transactionObj,
|
||||||
|
IBinder displayToken, long nativeSurfaceObject);
|
||||||
|
private static native void nativeSetDisplayLayerStack(long transactionObj,
|
||||||
|
@@ -2402,6 +2403,13 @@ public final class SurfaceControl implements Parcelable {
|
||||||
|
IVirtualDisplayCallback.Stub.asInterface(displayToken));
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * @hide
|
||||||
|
+ */
|
||||||
|
+ public static long[] getPhysicalDisplayIds() {
|
||||||
|
+ return nativeGetPhysicalDisplayIds();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Returns whether protected content is supported in GPU composition.
|
||||||
|
* @hide
|
||||||
|
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
|
||||||
|
index 424925328dfd..2ebd6bec0b18 100644
|
||||||
|
--- a/core/jni/android_view_SurfaceControl.cpp
|
||||||
|
+++ b/core/jni/android_view_SurfaceControl.cpp
|
||||||
|
@@ -36,6 +36,7 @@
|
||||||
|
#include <gui/SurfaceComposerClient.h>
|
||||||
|
#include <jni.h>
|
||||||
|
#include <nativehelper/JNIHelp.h>
|
||||||
|
+#include <nativehelper/ScopedPrimitiveArray.h>
|
||||||
|
#include <nativehelper/ScopedUtfChars.h>
|
||||||
|
#include <private/gui/ComposerService.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
@@ -985,6 +986,21 @@ static void nativeSetDestinationFrame(JNIEnv* env, jclass clazz, jlong transacti
|
||||||
|
transaction->setDestinationFrame(ctrl, crop);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) {
|
||||||
|
+ const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds();
|
||||||
|
+ ScopedLongArrayRW values(env, env->NewLongArray(displayIds.size()));
|
||||||
|
+ if (values.get() == nullptr) {
|
||||||
|
+ jniThrowException(env, "java/lang/OutOfMemoryError", nullptr);
|
||||||
|
+ return nullptr;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ for (size_t i = 0; i < displayIds.size(); ++i) {
|
||||||
|
+ values[i] = static_cast<jlong>(displayIds[i].value);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return values.getJavaArray();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static jobject nativeGetDisplayedContentSamplingAttributes(JNIEnv* env, jclass clazz,
|
||||||
|
jobject tokenObj) {
|
||||||
|
sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
|
||||||
|
@@ -2133,6 +2149,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
|
||||||
|
(void*)nativeSetFrameRate },
|
||||||
|
{"nativeSetDefaultFrameRateCompatibility", "(JJI)V",
|
||||||
|
(void*)nativeSetDefaultFrameRateCompatibility},
|
||||||
|
+ {"nativeGetPhysicalDisplayIds", "()[J",
|
||||||
|
+ (void*)nativeGetPhysicalDisplayIds },
|
||||||
|
{"nativeSetDisplaySurface", "(JLandroid/os/IBinder;J)V",
|
||||||
|
(void*)nativeSetDisplaySurface },
|
||||||
|
{"nativeSetDisplayLayerStack", "(JLandroid/os/IBinder;I)V",
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From d817f1b8271e51853040685214aebc378dafd1aa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Fri, 25 Mar 2022 05:37:56 -0400
|
||||||
|
Subject: [PATCH] MIUI13 devices hide their vibrator HAL behind non-default
|
||||||
|
name: "vibratorfeature"
|
||||||
|
|
||||||
|
---
|
||||||
|
services/vibratorservice/VibratorHalController.cpp | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/services/vibratorservice/VibratorHalController.cpp b/services/vibratorservice/VibratorHalController.cpp
|
||||||
|
index c1795f5c32..345016efd6 100644
|
||||||
|
--- a/services/vibratorservice/VibratorHalController.cpp
|
||||||
|
+++ b/services/vibratorservice/VibratorHalController.cpp
|
||||||
|
@@ -59,6 +59,12 @@ std::shared_ptr<HalWrapper> connectHal(std::shared_ptr<CallbackScheduler> schedu
|
||||||
|
return std::make_shared<AidlHalWrapper>(std::move(scheduler), aidlHal);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ aidlHal = waitForVintfService<Aidl::IVibrator>(String16("vibratorfeature"));
|
||||||
|
+ if (aidlHal) {
|
||||||
|
+ ALOGV("Successfully connected to Xiaomi Vibrator HAL AIDL service.");
|
||||||
|
+ return std::make_shared<AidlHalWrapper>(std::move(scheduler), aidlHal);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
sp<V1_0::IVibrator> halV1_0 = V1_0::IVibrator::getService();
|
||||||
|
if (halV1_0 == nullptr) {
|
||||||
|
ALOGV("Vibrator HAL service not available.");
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From 2bb0d801335970b8f0e9b8b7ffdf86128ae19468 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Sun, 14 Nov 2021 13:47:29 -0500
|
||||||
|
Subject: [PATCH] Pie MTK IMS calls static
|
||||||
|
ImsManager.updateImsServiceConfig(Context,int,boolean). Bring it back
|
||||||
|
|
||||||
|
Change-Id: I3dd66d436629d37c8ec795df6569736195ae570e
|
||||||
|
---
|
||||||
|
src/java/com/android/ims/ImsManager.java | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/java/com/android/ims/ImsManager.java b/src/java/com/android/ims/ImsManager.java
|
||||||
|
index c41426d..2c6d656 100644
|
||||||
|
--- a/src/java/com/android/ims/ImsManager.java
|
||||||
|
+++ b/src/java/com/android/ims/ImsManager.java
|
||||||
|
@@ -1667,6 +1667,14 @@ public class ImsManager implements FeatureUpdates {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public static void updateImsServiceConfig(Context context, int phoneId, boolean force) {
|
||||||
|
+ ImsManager mgr = ImsManager.getInstance(context, phoneId);
|
||||||
|
+ if (mgr != null) {
|
||||||
|
+ mgr.updateImsServiceConfig();
|
||||||
|
+ }
|
||||||
|
+ Rlog.e(TAG, "updateImsServiceConfig: ImsManager null, returning without update.");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Push configuration updates to the ImsService implementation.
|
||||||
|
*/
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,47 @@
|
|||||||
|
From fc4ecc73093f88934a65a9371ae7af274c2b143d Mon Sep 17 00:00:00 2001
|
||||||
|
From: ironydelerium <42721860+ironydelerium@users.noreply.github.com>
|
||||||
|
Date: Fri, 31 Dec 2021 02:20:28 -0800
|
||||||
|
Subject: [PATCH] Reintroduce 'public void
|
||||||
|
TelephonyMetrics.writeRilSendSms(int, int, int, int)'. (#8)
|
||||||
|
|
||||||
|
The MediaTek IMS package for Android Q, at the very least (likely for the rest, too)
|
||||||
|
invoke this method in their `sendSms` method; Google, in their infinite wisdom,
|
||||||
|
decided that this method needed a message ID passed in as well, changing the signature
|
||||||
|
to 'public void TelephonyMetrics.writeRilSendSms(int, int, int, int, long)' and resulting
|
||||||
|
in a MethodNotFoundException being raised in com.mediatek.ims, crashing it.
|
||||||
|
|
||||||
|
Fixes https://github.com/phhusson/treble_experimentations/issues/2125.
|
||||||
|
|
||||||
|
Co-authored-by: Sarah Vandomelen <sarah@sightworks.com>
|
||||||
|
Change-Id: I789f470fb38d86dd37e8408536e208a7a49e7e26
|
||||||
|
---
|
||||||
|
.../telephony/metrics/TelephonyMetrics.java | 13 +++++++++++++
|
||||||
|
1 file changed, 13 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
||||||
|
index 5b47ae5b7a..f3e7717aca 100644
|
||||||
|
--- a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
||||||
|
+++ b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
|
||||||
|
@@ -2324,6 +2324,19 @@ public class TelephonyMetrics {
|
||||||
|
smsSession.increaseExpectedResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * Write Send SMS event (backwards-compatible method for R and earlier IMS implementations)
|
||||||
|
+ *
|
||||||
|
+ * @param phoneId Phone id
|
||||||
|
+ * @param rilSerial RIL request serial number
|
||||||
|
+ * @param tech SMS RAT
|
||||||
|
+ * @param format SMS format. Either {@link SmsMessage#FORMAT_3GPP} or
|
||||||
|
+ * {@link SmsMessage#FORMAT_3GPP2}.
|
||||||
|
+ */
|
||||||
|
+ public void writeRilSendSms(int phoneId, int rilSerial, int tech, int format) {
|
||||||
|
+ writeRilSendSms(phoneId, rilSerial, tech, format, 0);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Write Send SMS event using ImsService. Expecting response from
|
||||||
|
* {@link #writeOnSmsSolicitedResponse}.
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From 31b4f85f4d8d4e3aad6cab62d88ec7c065b62607 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 30 Sep 2022 11:32:24 +0000
|
||||||
|
Subject: [PATCH] Add an enum for Treble settings
|
||||||
|
|
||||||
|
Change-Id: I8dc25afa27e938ee82594a8343e73c7c494003e2
|
||||||
|
---
|
||||||
|
stats/enums/app/settings_enums.proto | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/stats/enums/app/settings_enums.proto b/stats/enums/app/settings_enums.proto
|
||||||
|
index 50a68098..7392b1ce 100644
|
||||||
|
--- a/stats/enums/app/settings_enums.proto
|
||||||
|
+++ b/stats/enums/app/settings_enums.proto
|
||||||
|
@@ -2217,6 +2217,9 @@ enum PageId {
|
||||||
|
// OPEN: Settings > System > Input & Gesture > Double twist gesture
|
||||||
|
SETTINGS_GESTURE_DOUBLE_TWIST = 755;
|
||||||
|
|
||||||
|
+ // OPEN: Settings > Treble Settings
|
||||||
|
+ SETTINGS_TREBLE_CATEGORY = 777;
|
||||||
|
+
|
||||||
|
// OPEN: Settings > Apps > Default Apps > Default browser
|
||||||
|
DEFAULT_BROWSER_PICKER = 785;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
From 89f823e7f42d3fb3677a9dc0384363f7ba540e64 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 18 Apr 2023 23:48:15 +0000
|
||||||
|
Subject: [PATCH] Fix light sensor crash on Xiaomi 13
|
||||||
|
|
||||||
|
SensorService expects a scalar, but Xiaomi HAL returns a pose6DOF vector encapsulation
|
||||||
|
Thanks @phhusson for the analysis
|
||||||
|
|
||||||
|
Change-Id: Ie358321d5328d01541f455d6af86944ff413c9c9
|
||||||
|
---
|
||||||
|
sensors/aidl/convert/convert.cpp | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sensors/aidl/convert/convert.cpp b/sensors/aidl/convert/convert.cpp
|
||||||
|
index 2dc7a177a..be3833dfa 100644
|
||||||
|
--- a/sensors/aidl/convert/convert.cpp
|
||||||
|
+++ b/sensors/aidl/convert/convert.cpp
|
||||||
|
@@ -162,7 +162,14 @@ void convertToSensorEvent(const Event& src, sensors_event_t* dst) {
|
||||||
|
case SensorType::MOTION_DETECT:
|
||||||
|
case SensorType::HEART_BEAT:
|
||||||
|
case SensorType::LOW_LATENCY_OFFBODY_DETECT: {
|
||||||
|
- dst->data[0] = src.payload.get<Event::EventPayload::scalar>();
|
||||||
|
+ if (src.payload.getTag() == Event::EventPayload::pose6DOF) {
|
||||||
|
+ auto d = src.payload.get<Event::EventPayload::pose6DOF>();
|
||||||
|
+ auto dstr = ::android::internal::ToString(d);
|
||||||
|
+ // ALOGE("Received 6DOF for expected scalar %s", dstr.c_str());
|
||||||
|
+ dst->data[0] = d.values[0];
|
||||||
|
+ } else {
|
||||||
|
+ dst->data[0] = src.payload.get<Event::EventPayload::scalar>();
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,363 @@
|
|||||||
|
From 5310d801b343b76a82247193b092e7944681e3c0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 22 Sep 2022 12:37:50 +0000
|
||||||
|
Subject: [PATCH 1/8] TrebleSettings: Screen resolution & refresh rate
|
||||||
|
|
||||||
|
Change-Id: I4a4679cdb6d4ede55479e9ab2f014342025b0fec
|
||||||
|
---
|
||||||
|
AndroidManifest.xml | 8 +
|
||||||
|
res/drawable/ic_settings_treble.xml | 10 +
|
||||||
|
res/values/menu_keys.xml | 1 +
|
||||||
|
res/values/strings.xml | 10 +
|
||||||
|
res/xml/top_level_settings.xml | 9 +
|
||||||
|
res/xml/treble_settings.xml | 18 ++
|
||||||
|
...lutionRefreshRatePreferenceController.java | 176 ++++++++++++++++++
|
||||||
|
.../settings/treble/TrebleSettings.java | 39 ++++
|
||||||
|
8 files changed, 271 insertions(+)
|
||||||
|
create mode 100644 res/drawable/ic_settings_treble.xml
|
||||||
|
create mode 100644 res/xml/treble_settings.xml
|
||||||
|
create mode 100644 src/com/android/settings/treble/ScreenResolutionRefreshRatePreferenceController.java
|
||||||
|
create mode 100644 src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
|
||||||
|
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||||
|
index f05f3d2381..9cf3b4fd2d 100644
|
||||||
|
--- a/AndroidManifest.xml
|
||||||
|
+++ b/AndroidManifest.xml
|
||||||
|
@@ -241,6 +241,14 @@
|
||||||
|
android:value="com.android.settings.shortcut.CreateShortcut" />
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
+ <receiver
|
||||||
|
+ android:name=".treble.ScreenResolutionRefreshRatePreferenceController$BootReceiver"
|
||||||
|
+ android:exported="true">
|
||||||
|
+ <intent-filter>
|
||||||
|
+ <action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||||
|
+ </intent-filter>
|
||||||
|
+ </receiver>
|
||||||
|
+
|
||||||
|
<!-- Wireless Controls -->
|
||||||
|
<activity
|
||||||
|
android:name=".Settings$NetworkDashboardActivity"
|
||||||
|
diff --git a/res/drawable/ic_settings_treble.xml b/res/drawable/ic_settings_treble.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..3c56ed7032
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/res/drawable/ic_settings_treble.xml
|
||||||
|
@@ -0,0 +1,10 @@
|
||||||
|
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
+ android:width="24dp"
|
||||||
|
+ android:height="24dp"
|
||||||
|
+ android:viewportWidth="24.0"
|
||||||
|
+ android:viewportHeight="24.0"
|
||||||
|
+ android:tint="?attr/colorControlNormal">
|
||||||
|
+ <path
|
||||||
|
+ android:fillColor="@android:color/white"
|
||||||
|
+ android:pathData="M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"/>
|
||||||
|
+</vector>
|
||||||
|
diff --git a/res/values/menu_keys.xml b/res/values/menu_keys.xml
|
||||||
|
index 27e9639122..ef25f9971c 100755
|
||||||
|
--- a/res/values/menu_keys.xml
|
||||||
|
+++ b/res/values/menu_keys.xml
|
||||||
|
@@ -16,6 +16,7 @@
|
||||||
|
|
||||||
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
|
|
||||||
|
+ <string name="menu_key_treble" translatable="false">top_level_treble</string>
|
||||||
|
<string name="menu_key_network" translatable="false">top_level_network</string>
|
||||||
|
<string name="menu_key_communal" translatable="false">top_level_communal</string>
|
||||||
|
<string name="menu_key_connected_devices" translatable="false">top_level_connected_devices</string>
|
||||||
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
|
index 32cb7803a6..dcb08f0731 100644
|
||||||
|
--- a/res/values/strings.xml
|
||||||
|
+++ b/res/values/strings.xml
|
||||||
|
@@ -6875,6 +6875,16 @@
|
||||||
|
<!-- Text to describe the dashboard fragment title [CHAR LIMIT=16] -->
|
||||||
|
<string name="dashboard_title">Settings</string>
|
||||||
|
|
||||||
|
+ <!-- Title for setting tile leading to Treble settings [CHAR LIMIT=40]-->
|
||||||
|
+ <string name="treble_settings">Treble settings</string>
|
||||||
|
+ <!-- Summary for Treble settings [CHAR LIMIT=NONE]-->
|
||||||
|
+ <string name="treble_settings_summary">Fixes & tweaks for GSIs</string>
|
||||||
|
+ <!-- Display category name [CHAR LIMIT=none] -->
|
||||||
|
+ <string name="treble_settings_category_name_display">Display</string>
|
||||||
|
+
|
||||||
|
+ <!-- Treble settings screen, screen resolution and refresh rate settings title -->
|
||||||
|
+ <string name="screen_resolution_refresh_rate_title">Screen resolution & refresh rate</string>
|
||||||
|
+
|
||||||
|
<!-- Title for setting tile leading to network and Internet settings [CHAR LIMIT=40]-->
|
||||||
|
<string name="network_dashboard_title">Network & internet</string>
|
||||||
|
<!-- Summary for Network and Internet settings, explaining it contains mobile, wifi setting and data usage settings [CHAR LIMIT=NONE]-->
|
||||||
|
diff --git a/res/xml/top_level_settings.xml b/res/xml/top_level_settings.xml
|
||||||
|
index d050a1f274..258a567f56 100644
|
||||||
|
--- a/res/xml/top_level_settings.xml
|
||||||
|
+++ b/res/xml/top_level_settings.xml
|
||||||
|
@@ -20,6 +20,15 @@
|
||||||
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:key="top_level_settings">
|
||||||
|
|
||||||
|
+ <com.android.settings.widget.HomepagePreference
|
||||||
|
+ android:fragment="com.android.settings.treble.TrebleSettings"
|
||||||
|
+ android:icon="@drawable/ic_settings_treble"
|
||||||
|
+ android:key="top_level_treble"
|
||||||
|
+ android:order="-160"
|
||||||
|
+ android:title="@string/treble_settings"
|
||||||
|
+ android:summary="@string/treble_settings_summary"
|
||||||
|
+ settings:highlightableMenuKey="@string/menu_key_treble"/>
|
||||||
|
+
|
||||||
|
<com.android.settings.widget.HomepagePreference
|
||||||
|
android:fragment="com.android.settings.network.NetworkDashboardFragment"
|
||||||
|
android:icon="@drawable/ic_settings_wireless"
|
||||||
|
diff --git a/res/xml/treble_settings.xml b/res/xml/treble_settings.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..1a82c468a2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/res/xml/treble_settings.xml
|
||||||
|
@@ -0,0 +1,18 @@
|
||||||
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
+
|
||||||
|
+<PreferenceScreen
|
||||||
|
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
+ xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
|
+ android:key="treble_settings_screen"
|
||||||
|
+ android:title="@string/treble_settings">
|
||||||
|
+
|
||||||
|
+ <PreferenceCategory
|
||||||
|
+ android:title="@string/treble_settings_category_name_display">
|
||||||
|
+
|
||||||
|
+ <ListPreference
|
||||||
|
+ android:key="screen_resolution_refresh_rate"
|
||||||
|
+ android:title="@string/screen_resolution_refresh_rate_title" />
|
||||||
|
+
|
||||||
|
+ </PreferenceCategory>
|
||||||
|
+
|
||||||
|
+</PreferenceScreen>
|
||||||
|
diff --git a/src/com/android/settings/treble/ScreenResolutionRefreshRatePreferenceController.java b/src/com/android/settings/treble/ScreenResolutionRefreshRatePreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..d8d7b4faf6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/ScreenResolutionRefreshRatePreferenceController.java
|
||||||
|
@@ -0,0 +1,176 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import static android.content.Intent.ACTION_BOOT_COMPLETED;
|
||||||
|
+
|
||||||
|
+import android.app.ActivityManager;
|
||||||
|
+import android.content.BroadcastReceiver;
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.content.Intent;
|
||||||
|
+import android.os.IBinder;
|
||||||
|
+import android.os.Parcel;
|
||||||
|
+import android.os.RemoteException;
|
||||||
|
+import android.os.ServiceManager;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+import android.view.SurfaceControl;
|
||||||
|
+import android.view.SurfaceControl.DisplayMode;
|
||||||
|
+
|
||||||
|
+import androidx.preference.ListPreference;
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+import java.util.ArrayList;
|
||||||
|
+import java.util.Collections;
|
||||||
|
+import java.util.Comparator;
|
||||||
|
+import java.util.HashSet;
|
||||||
|
+import java.util.List;
|
||||||
|
+import java.util.Set;
|
||||||
|
+
|
||||||
|
+public class ScreenResolutionRefreshRatePreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String SCREEN_RESOLUTION_REFRESH_RATE_KEY = "screen_resolution_refresh_rate";
|
||||||
|
+ private static final String SURFACE_FLINGER_SERVICE_KEY = "SurfaceFlinger";
|
||||||
|
+ private static final String SURFACE_COMPOSER_INTERFACE_KEY = "android.ui.ISurfaceComposer";
|
||||||
|
+ private static final int SURFACE_FLINGER_CODE = 1035;
|
||||||
|
+ private static final String TREBLE_DISPLAY_MODE_PROPERTY = "persist.sys.treble.display_mode";
|
||||||
|
+ private static final String SYSTEMUI_PACKAGE_NAME = "com.android.systemui";
|
||||||
|
+
|
||||||
|
+ private ActivityManager mAm;
|
||||||
|
+ private ListPreference mListPreference;
|
||||||
|
+ private List<DisplayMode> mModes = new ArrayList<>();
|
||||||
|
+ private List<String> mEntries = new ArrayList<>();
|
||||||
|
+ private List<String> mValues = new ArrayList<>();
|
||||||
|
+
|
||||||
|
+ public ScreenResolutionRefreshRatePreferenceController(Context context) {
|
||||||
|
+ super(context, SCREEN_RESOLUTION_REFRESH_RATE_KEY);
|
||||||
|
+
|
||||||
|
+ mAm = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||||
|
+
|
||||||
|
+ long[] physicalDisplayIds = SurfaceControl.getPhysicalDisplayIds();
|
||||||
|
+ DisplayMode[] supportedDisplayModes =
|
||||||
|
+ SurfaceControl.getDynamicDisplayInfo(physicalDisplayIds[0]).supportedDisplayModes;
|
||||||
|
+ Set<String> summarySet = new HashSet<>();
|
||||||
|
+ for (DisplayMode m : supportedDisplayModes) {
|
||||||
|
+ String summary = String.format("%dx%d @ %dHz", m.width, m.height, Math.round(m.refreshRate));
|
||||||
|
+ if (!summarySet.contains(summary)) {
|
||||||
|
+ summarySet.add(summary);
|
||||||
|
+ mModes.add(m);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ Collections.sort(mModes, Comparator.comparing((DisplayMode m)->m.width)
|
||||||
|
+ .thenComparing(m->m.height)
|
||||||
|
+ .thenComparing(m->m.refreshRate)
|
||||||
|
+ .thenComparing(m->m.id));
|
||||||
|
+ for (DisplayMode m : mModes) {
|
||||||
|
+ String summary = String.format("%dx%d @ %dHz", m.width, m.height, Math.round(m.refreshRate));
|
||||||
|
+ mEntries.add(summary);
|
||||||
|
+ mValues.add(String.valueOf(m.id));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return SCREEN_RESOLUTION_REFRESH_RATE_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mListPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+ mListPreference.setEntries(mEntries.toArray(new String[mEntries.size()]));
|
||||||
|
+ mListPreference.setEntryValues(mValues.toArray(new String[mValues.size()]));
|
||||||
|
+
|
||||||
|
+ if (mEntries.size() <= 1) {
|
||||||
|
+ mListPreference.setEnabled(false);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ long[] physicalDisplayIds = SurfaceControl.getPhysicalDisplayIds();
|
||||||
|
+ int id = SurfaceControl.getDynamicDisplayInfo(physicalDisplayIds[0]).activeDisplayModeId;
|
||||||
|
+ int index = mListPreference.findIndexOfValue(String.valueOf(id));
|
||||||
|
+ try {
|
||||||
|
+ mListPreference.setValueIndex(index);
|
||||||
|
+ mListPreference.setSummary(mListPreference.getEntries()[index]);
|
||||||
|
+ } catch (ArrayIndexOutOfBoundsException e) {
|
||||||
|
+ e.printStackTrace();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ DisplayMode currentMode = getCurrentMode();
|
||||||
|
+ int id = Integer.valueOf((String) newValue);
|
||||||
|
+ DisplayMode newMode = getModeById(id);
|
||||||
|
+ setModeFromBackdoor(id);
|
||||||
|
+ SystemProperties.set(TREBLE_DISPLAY_MODE_PROPERTY, (String) newValue);
|
||||||
|
+ int index = mListPreference.findIndexOfValue((String) newValue);
|
||||||
|
+ mListPreference.setValueIndex(index);
|
||||||
|
+ mListPreference.setSummary(mListPreference.getEntries()[index]);
|
||||||
|
+ if ((newMode.width != currentMode.width) || (newMode.height != currentMode.height)) {
|
||||||
|
+ try {
|
||||||
|
+ for (ActivityManager.RunningAppProcessInfo app: mAm.getRunningAppProcesses()) {
|
||||||
|
+ if (app.processName.equals(SYSTEMUI_PACKAGE_NAME)) {
|
||||||
|
+ ActivityManager.getService().killApplicationProcess(app.processName, app.uid);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ } catch (Exception e) {
|
||||||
|
+ e.printStackTrace();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private DisplayMode getCurrentMode() {
|
||||||
|
+ long[] physicalDisplayIds = SurfaceControl.getPhysicalDisplayIds();
|
||||||
|
+ int id = SurfaceControl.getDynamicDisplayInfo(physicalDisplayIds[0]).activeDisplayModeId;
|
||||||
|
+ return getModeById(id);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private DisplayMode getModeById(int id) {
|
||||||
|
+ for (DisplayMode m : mModes) {
|
||||||
|
+ if (m.id == id) {
|
||||||
|
+ return m;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return null;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public static void setModeFromBackdoor(int id) {
|
||||||
|
+ IBinder surfaceFlinger = ServiceManager.getService(SURFACE_FLINGER_SERVICE_KEY);
|
||||||
|
+ try {
|
||||||
|
+ if (surfaceFlinger != null) {
|
||||||
|
+ Parcel data = Parcel.obtain();
|
||||||
|
+ data.writeInterfaceToken(SURFACE_COMPOSER_INTERFACE_KEY);
|
||||||
|
+ data.writeInt(id);
|
||||||
|
+ surfaceFlinger.transact(SURFACE_FLINGER_CODE, data, null, 0);
|
||||||
|
+ data.recycle();
|
||||||
|
+ }
|
||||||
|
+ } catch (RemoteException ex) {}
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public static class BootReceiver extends BroadcastReceiver {
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void onReceive(Context context, Intent intent) {
|
||||||
|
+ if (ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
||||||
|
+ int id = SystemProperties.getInt(TREBLE_DISPLAY_MODE_PROPERTY, -1);
|
||||||
|
+ if (id != -1) {
|
||||||
|
+ setModeFromBackdoor(id);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/settings/treble/TrebleSettings.java b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..e581539229
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
@@ -0,0 +1,39 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.app.settings.SettingsEnums;
|
||||||
|
+import android.content.Context;
|
||||||
|
+
|
||||||
|
+import com.android.settings.R;
|
||||||
|
+import com.android.settings.dashboard.DashboardFragment;
|
||||||
|
+import com.android.settingslib.core.AbstractPreferenceController;
|
||||||
|
+
|
||||||
|
+import java.util.ArrayList;
|
||||||
|
+import java.util.List;
|
||||||
|
+
|
||||||
|
+public class TrebleSettings extends DashboardFragment {
|
||||||
|
+
|
||||||
|
+ private static final String TAG = "TrebleSettings";
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ protected int getPreferenceScreenResId() {
|
||||||
|
+ return R.xml.treble_settings;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ protected String getLogTag() {
|
||||||
|
+ return TAG;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getMetricsCategory() {
|
||||||
|
+ return SettingsEnums.SETTINGS_TREBLE_CATEGORY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||||
|
+ final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||||
|
+ controllers.add(new ScreenResolutionRefreshRatePreferenceController(context));
|
||||||
|
+ return controllers;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,288 @@
|
|||||||
|
From 01ce7e73cb79e56484594b0ce03eb2ebfa193e90 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 24 Sep 2022 03:38:41 +0000
|
||||||
|
Subject: [PATCH 2/8] TrebleSettings: Basic audio and display fixes
|
||||||
|
|
||||||
|
- Alternative audio policy
|
||||||
|
- Disable soundvolume effect
|
||||||
|
- Alternative backlight scale
|
||||||
|
|
||||||
|
Change-Id: I4f22dcd9c59c40b3fd70ba642db35b9466467b7d
|
||||||
|
---
|
||||||
|
res/values/strings.xml | 8 +++
|
||||||
|
res/xml/treble_settings.xml | 17 ++++++
|
||||||
|
...SoundvolumeEffectPreferenceController.java | 59 +++++++++++++++++++
|
||||||
|
.../settings/treble/TrebleSettings.java | 3 +
|
||||||
|
...nativeAudioPolicyPreferenceController.java | 59 +++++++++++++++++++
|
||||||
|
...iveBacklightScalePreferenceController.java | 53 +++++++++++++++++
|
||||||
|
6 files changed, 199 insertions(+)
|
||||||
|
create mode 100644 src/com/android/settings/treble/DisableSoundvolumeEffectPreferenceController.java
|
||||||
|
create mode 100644 src/com/android/settings/treble/UseAlternativeAudioPolicyPreferenceController.java
|
||||||
|
create mode 100644 src/com/android/settings/treble/UseAlternativeBacklightScalePreferenceController.java
|
||||||
|
|
||||||
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
|
index dcb08f0731..f799b4d0c7 100644
|
||||||
|
--- a/res/values/strings.xml
|
||||||
|
+++ b/res/values/strings.xml
|
||||||
|
@@ -6879,11 +6879,19 @@
|
||||||
|
<string name="treble_settings">Treble settings</string>
|
||||||
|
<!-- Summary for Treble settings [CHAR LIMIT=NONE]-->
|
||||||
|
<string name="treble_settings_summary">Fixes & tweaks for GSIs</string>
|
||||||
|
+ <!-- Audio category name [CHAR LIMIT=none] -->
|
||||||
|
+ <string name="treble_settings_category_name_audio">Audio</string>
|
||||||
|
<!-- Display category name [CHAR LIMIT=none] -->
|
||||||
|
<string name="treble_settings_category_name_display">Display</string>
|
||||||
|
|
||||||
|
+ <!-- Treble settings screen, use alternative audio policy title -->
|
||||||
|
+ <string name="use_alternative_audio_policy_title">Use alternative audio policy</string>
|
||||||
|
+ <!-- Treble settings screen, disable soundvolume effect title -->
|
||||||
|
+ <string name="disable_soundvolume_effect_title">Disable soundvolume effect</string>
|
||||||
|
<!-- Treble settings screen, screen resolution and refresh rate settings title -->
|
||||||
|
<string name="screen_resolution_refresh_rate_title">Screen resolution & refresh rate</string>
|
||||||
|
+ <!-- Treble settings screen, use alternative backlight scale title -->
|
||||||
|
+ <string name="use_alternative_backlight_scale_title">Use alternative backlight scale</string>
|
||||||
|
|
||||||
|
<!-- Title for setting tile leading to network and Internet settings [CHAR LIMIT=40]-->
|
||||||
|
<string name="network_dashboard_title">Network & internet</string>
|
||||||
|
diff --git a/res/xml/treble_settings.xml b/res/xml/treble_settings.xml
|
||||||
|
index 1a82c468a2..336137c95f 100644
|
||||||
|
--- a/res/xml/treble_settings.xml
|
||||||
|
+++ b/res/xml/treble_settings.xml
|
||||||
|
@@ -6,6 +6,19 @@
|
||||||
|
android:key="treble_settings_screen"
|
||||||
|
android:title="@string/treble_settings">
|
||||||
|
|
||||||
|
+ <PreferenceCategory
|
||||||
|
+ android:title="@string/treble_settings_category_name_audio">
|
||||||
|
+
|
||||||
|
+ <SwitchPreference
|
||||||
|
+ android:key="use_alternative_audio_policy"
|
||||||
|
+ android:title="@string/use_alternative_audio_policy_title" />
|
||||||
|
+
|
||||||
|
+ <SwitchPreference
|
||||||
|
+ android:key="disable_soundvolume_effect"
|
||||||
|
+ android:title="@string/disable_soundvolume_effect_title" />
|
||||||
|
+
|
||||||
|
+ </PreferenceCategory>
|
||||||
|
+
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="@string/treble_settings_category_name_display">
|
||||||
|
|
||||||
|
@@ -13,6 +26,10 @@
|
||||||
|
android:key="screen_resolution_refresh_rate"
|
||||||
|
android:title="@string/screen_resolution_refresh_rate_title" />
|
||||||
|
|
||||||
|
+ <SwitchPreference
|
||||||
|
+ android:key="use_alternative_backlight_scale"
|
||||||
|
+ android:title="@string/use_alternative_backlight_scale_title" />
|
||||||
|
+
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
</PreferenceScreen>
|
||||||
|
diff --git a/src/com/android/settings/treble/DisableSoundvolumeEffectPreferenceController.java b/src/com/android/settings/treble/DisableSoundvolumeEffectPreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..8feb318f55
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/DisableSoundvolumeEffectPreferenceController.java
|
||||||
|
@@ -0,0 +1,59 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+import androidx.preference.SwitchPreference;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+public class DisableSoundvolumeEffectPreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String DISABLE_SOUNDVOLUME_EFFECT_KEY = "disable_soundvolume_effect";
|
||||||
|
+ private static final String RO_HARDWARE_PROPERTY = "ro.hardware";
|
||||||
|
+ private static final String TREBLE_CAF_DISABLE_SOUNDVOLUME_EFFECT_PROPERTY = "persist.sys.treble.caf.disable_soundvolume_effect";
|
||||||
|
+
|
||||||
|
+ private SwitchPreference mSwitchPreference;
|
||||||
|
+
|
||||||
|
+ public DisableSoundvolumeEffectPreferenceController(Context context) {
|
||||||
|
+ super(context, DISABLE_SOUNDVOLUME_EFFECT_KEY);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return DISABLE_SOUNDVOLUME_EFFECT_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mSwitchPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+
|
||||||
|
+ if (!SystemProperties.get(RO_HARDWARE_PROPERTY, "N/A").equals("qcom")) {
|
||||||
|
+ mSwitchPreference.setEnabled(false);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ boolean checked = SystemProperties.getBoolean(TREBLE_CAF_DISABLE_SOUNDVOLUME_EFFECT_PROPERTY, false);
|
||||||
|
+ mSwitchPreference.setChecked(checked);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ SystemProperties.set(TREBLE_CAF_DISABLE_SOUNDVOLUME_EFFECT_PROPERTY, String.valueOf((boolean) newValue));
|
||||||
|
+ mSwitchPreference.setChecked((boolean) newValue);
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/settings/treble/TrebleSettings.java b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
index e581539229..5c1611c053 100644
|
||||||
|
--- a/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
+++ b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
@@ -32,7 +32,10 @@ public class TrebleSettings extends DashboardFragment {
|
||||||
|
@Override
|
||||||
|
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||||
|
final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||||
|
+ controllers.add(new UseAlternativeAudioPolicyPreferenceController(context));
|
||||||
|
+ controllers.add(new DisableSoundvolumeEffectPreferenceController(context));
|
||||||
|
controllers.add(new ScreenResolutionRefreshRatePreferenceController(context));
|
||||||
|
+ controllers.add(new UseAlternativeBacklightScalePreferenceController(context));
|
||||||
|
return controllers;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/com/android/settings/treble/UseAlternativeAudioPolicyPreferenceController.java b/src/com/android/settings/treble/UseAlternativeAudioPolicyPreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..fbc327cba0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/UseAlternativeAudioPolicyPreferenceController.java
|
||||||
|
@@ -0,0 +1,59 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+import androidx.preference.SwitchPreference;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+public class UseAlternativeAudioPolicyPreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String USE_ALTERNATIVE_AUDIO_POLICY_KEY = "use_alternative_audio_policy";
|
||||||
|
+ private static final String RO_HARDWARE_PROPERTY = "ro.hardware";
|
||||||
|
+ private static final String TREBLE_CAF_AUDIO_POLICY_PROPERTY = "persist.sys.treble.caf.audio_policy";
|
||||||
|
+
|
||||||
|
+ private SwitchPreference mSwitchPreference;
|
||||||
|
+
|
||||||
|
+ public UseAlternativeAudioPolicyPreferenceController(Context context) {
|
||||||
|
+ super(context, USE_ALTERNATIVE_AUDIO_POLICY_KEY);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return USE_ALTERNATIVE_AUDIO_POLICY_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mSwitchPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+
|
||||||
|
+ if (!SystemProperties.get(RO_HARDWARE_PROPERTY, "N/A").equals("qcom")) {
|
||||||
|
+ mSwitchPreference.setEnabled(false);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ boolean checked = SystemProperties.getBoolean(TREBLE_CAF_AUDIO_POLICY_PROPERTY, false);
|
||||||
|
+ mSwitchPreference.setChecked(checked);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ SystemProperties.set(TREBLE_CAF_AUDIO_POLICY_PROPERTY, String.valueOf((boolean) newValue));
|
||||||
|
+ mSwitchPreference.setChecked((boolean) newValue);
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/settings/treble/UseAlternativeBacklightScalePreferenceController.java b/src/com/android/settings/treble/UseAlternativeBacklightScalePreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..bd9de82d90
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/UseAlternativeBacklightScalePreferenceController.java
|
||||||
|
@@ -0,0 +1,53 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+import androidx.preference.SwitchPreference;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+public class UseAlternativeBacklightScalePreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String USE_ALTERNATIVE_BACKLIGHT_SCALE_KEY = "use_alternative_backlight_scale";
|
||||||
|
+ private static final String TREBLE_BACKLIGHT_SCALE_PROPERTY = "persist.sys.treble.backlight_scale";
|
||||||
|
+
|
||||||
|
+ private SwitchPreference mSwitchPreference;
|
||||||
|
+
|
||||||
|
+ public UseAlternativeBacklightScalePreferenceController(Context context) {
|
||||||
|
+ super(context, USE_ALTERNATIVE_BACKLIGHT_SCALE_KEY);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return USE_ALTERNATIVE_BACKLIGHT_SCALE_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mSwitchPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ boolean checked = SystemProperties.getBoolean(TREBLE_BACKLIGHT_SCALE_PROPERTY, false);
|
||||||
|
+ mSwitchPreference.setChecked(checked);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ SystemProperties.set(TREBLE_BACKLIGHT_SCALE_PROPERTY, String.valueOf((boolean) newValue));
|
||||||
|
+ mSwitchPreference.setChecked((boolean) newValue);
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -0,0 +1,374 @@
|
|||||||
|
From 9cef4d5c64956f27e73320c6f5cc28201bd2692c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 11 Oct 2022 10:29:36 +0000
|
||||||
|
Subject: [PATCH 3/8] TrebleSettings: IMS
|
||||||
|
|
||||||
|
Change-Id: Id7a12e150d4a3dc988f8ce1a888ad88443fa0ea4
|
||||||
|
---
|
||||||
|
Android.bp | 1 +
|
||||||
|
res/values/strings.xml | 9 +
|
||||||
|
res/xml/treble_settings.xml | 13 ++
|
||||||
|
.../InstallImsApkPreferenceController.java | 209 ++++++++++++++++++
|
||||||
|
...VolteAvailabilityPreferenceController.java | 59 +++++
|
||||||
|
.../settings/treble/TrebleSettings.java | 2 +
|
||||||
|
6 files changed, 293 insertions(+)
|
||||||
|
create mode 100644 src/com/android/settings/treble/InstallImsApkPreferenceController.java
|
||||||
|
create mode 100644 src/com/android/settings/treble/OverrideVolteAvailabilityPreferenceController.java
|
||||||
|
|
||||||
|
diff --git a/Android.bp b/Android.bp
|
||||||
|
index 8cd7aa76aa..20efe42a50 100644
|
||||||
|
--- a/Android.bp
|
||||||
|
+++ b/Android.bp
|
||||||
|
@@ -105,6 +105,7 @@ android_library {
|
||||||
|
"LineagePreferenceLib",
|
||||||
|
"vendor.lineage.fastcharge-V1.0-java",
|
||||||
|
"SystemUISharedLib",
|
||||||
|
+ "android.hidl.manager-V1.0-java",
|
||||||
|
],
|
||||||
|
|
||||||
|
plugins: ["androidx.room_room-compiler-plugin"],
|
||||||
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
|
index f799b4d0c7..1df0fe22f1 100644
|
||||||
|
--- a/res/values/strings.xml
|
||||||
|
+++ b/res/values/strings.xml
|
||||||
|
@@ -6883,6 +6883,8 @@
|
||||||
|
<string name="treble_settings_category_name_audio">Audio</string>
|
||||||
|
<!-- Display category name [CHAR LIMIT=none] -->
|
||||||
|
<string name="treble_settings_category_name_display">Display</string>
|
||||||
|
+ <!-- IMS category name [CHAR LIMIT=none] -->
|
||||||
|
+ <string name="treble_settings_category_name_ims">IMS</string>
|
||||||
|
|
||||||
|
<!-- Treble settings screen, use alternative audio policy title -->
|
||||||
|
<string name="use_alternative_audio_policy_title">Use alternative audio policy</string>
|
||||||
|
@@ -6892,6 +6894,13 @@
|
||||||
|
<string name="screen_resolution_refresh_rate_title">Screen resolution & refresh rate</string>
|
||||||
|
<!-- Treble settings screen, use alternative backlight scale title -->
|
||||||
|
<string name="use_alternative_backlight_scale_title">Use alternative backlight scale</string>
|
||||||
|
+ <!-- Treble settings screen, install IMS APK title -->
|
||||||
|
+ <string name="install_ims_apk_title">Install IMS APK</string>
|
||||||
|
+ <!-- Treble settings screen, install IMS APK toasts -->
|
||||||
|
+ <string name="install_ims_apk_toast_downloading">Downloading IMS APK...</string>
|
||||||
|
+ <string name="install_ims_apk_toast_completed">IMS APK installed. Reboot required.</string>
|
||||||
|
+ <!-- Treble settings screen, override VoLTE availability title -->
|
||||||
|
+ <string name="override_volte_availability_title">Override VoLTE availability</string>
|
||||||
|
|
||||||
|
<!-- Title for setting tile leading to network and Internet settings [CHAR LIMIT=40]-->
|
||||||
|
<string name="network_dashboard_title">Network & internet</string>
|
||||||
|
diff --git a/res/xml/treble_settings.xml b/res/xml/treble_settings.xml
|
||||||
|
index 336137c95f..09e6bc5d00 100644
|
||||||
|
--- a/res/xml/treble_settings.xml
|
||||||
|
+++ b/res/xml/treble_settings.xml
|
||||||
|
@@ -32,4 +32,17 @@
|
||||||
|
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
+ <PreferenceCategory
|
||||||
|
+ android:title="@string/treble_settings_category_name_ims">
|
||||||
|
+
|
||||||
|
+ <Preference
|
||||||
|
+ android:key="install_ims_apk"
|
||||||
|
+ android:title="@string/install_ims_apk_title" />
|
||||||
|
+
|
||||||
|
+ <SwitchPreference
|
||||||
|
+ android:key="override_volte_availability"
|
||||||
|
+ android:title="@string/override_volte_availability_title" />
|
||||||
|
+
|
||||||
|
+ </PreferenceCategory>
|
||||||
|
+
|
||||||
|
</PreferenceScreen>
|
||||||
|
diff --git a/src/com/android/settings/treble/InstallImsApkPreferenceController.java b/src/com/android/settings/treble/InstallImsApkPreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..6a63cbf1bf
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/InstallImsApkPreferenceController.java
|
||||||
|
@@ -0,0 +1,209 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.app.DownloadManager;
|
||||||
|
+import android.app.PendingIntent;
|
||||||
|
+import android.content.BroadcastReceiver;
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.content.Intent;
|
||||||
|
+import android.content.IntentFilter;
|
||||||
|
+import android.content.pm.PackageInstaller;
|
||||||
|
+import android.database.Cursor;
|
||||||
|
+import android.hidl.manager.V1_0.IServiceManager;
|
||||||
|
+import android.net.Uri;
|
||||||
|
+import android.os.Environment;
|
||||||
|
+import android.os.RemoteException;
|
||||||
|
+import android.os.ServiceManager;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+import android.util.Log;
|
||||||
|
+import android.widget.Toast;
|
||||||
|
+
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+
|
||||||
|
+import com.android.settings.R;
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+import java.io.File;
|
||||||
|
+import java.io.FileInputStream;
|
||||||
|
+import java.io.IOException;
|
||||||
|
+import java.io.InputStream;
|
||||||
|
+import java.io.OutputStream;
|
||||||
|
+
|
||||||
|
+public class InstallImsApkPreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceClickListener {
|
||||||
|
+
|
||||||
|
+ private static final String TAG = "TrebleSettings";
|
||||||
|
+ private static final String INSTALL_IMS_APK_KEY = "install_ims_apk";
|
||||||
|
+ private static final String[] IMS_SLOTS = {
|
||||||
|
+ "imsrild1", "imsrild2", "imsrild3",
|
||||||
|
+ "slot1", "slot2", "slot3",
|
||||||
|
+ "imsSlot1", "imsSlot2",
|
||||||
|
+ "mtkSlot1", "mtkSlot2",
|
||||||
|
+ "imsradio0", "imsradio1"
|
||||||
|
+ };
|
||||||
|
+ private static final String RO_PRODUCT_VENDOR_BRAND_PROPERTY = "ro.product.vendor.brand";
|
||||||
|
+
|
||||||
|
+ private Preference mPreference;
|
||||||
|
+ private String mImsType = "none";
|
||||||
|
+ private String mImsApkUrl = "";
|
||||||
|
+
|
||||||
|
+ public InstallImsApkPreferenceController(Context context) {
|
||||||
|
+ super(context, INSTALL_IMS_APK_KEY);
|
||||||
|
+
|
||||||
|
+ mImsType = getImsType();
|
||||||
|
+ Log.d(TAG, "IMS type = " + mImsType);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return INSTALL_IMS_APK_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+
|
||||||
|
+ if (mImsType.equals("none")) {
|
||||||
|
+ mPreference.setEnabled(false);
|
||||||
|
+ } else {
|
||||||
|
+ mPreference.setOnPreferenceClickListener(this);
|
||||||
|
+ String summary = "IMS type: ";
|
||||||
|
+ switch (mImsType) {
|
||||||
|
+ case "qcom":
|
||||||
|
+ summary += "Qualcomm";
|
||||||
|
+ break;
|
||||||
|
+ case "mtk_p":
|
||||||
|
+ summary += "MediaTek P";
|
||||||
|
+ break;
|
||||||
|
+ case "mtk_q":
|
||||||
|
+ summary += "MediaTek Q";
|
||||||
|
+ break;
|
||||||
|
+ case "mtk_r":
|
||||||
|
+ summary += "MediaTek R";
|
||||||
|
+ break;
|
||||||
|
+ case "mtk_s":
|
||||||
|
+ summary += "MediaTek S";
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ mPreference.setSummary(summary);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceClick(Preference preference) {
|
||||||
|
+ switch (mImsType) {
|
||||||
|
+ case "qcom":
|
||||||
|
+ mImsApkUrl = "https://treble.phh.me/ims-caf-u.apk";
|
||||||
|
+ break;
|
||||||
|
+ case "mtk_p":
|
||||||
|
+ mImsApkUrl = "https://treble.phh.me/stable/ims-mtk-p.apk";
|
||||||
|
+ break;
|
||||||
|
+ case "mtk_q":
|
||||||
|
+ mImsApkUrl = "https://treble.phh.me/stable/ims-mtk-q.apk";
|
||||||
|
+ break;
|
||||||
|
+ case "mtk_r":
|
||||||
|
+ mImsApkUrl = "https://treble.phh.me/stable/ims-mtk-r.apk";
|
||||||
|
+ break;
|
||||||
|
+ case "mtk_s":
|
||||||
|
+ mImsApkUrl = "https://treble.phh.me/stable/ims-mtk-s.apk";
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ Context context = preference.getContext();
|
||||||
|
+ DownloadManager dm = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
|
||||||
|
+ DownloadManager.Request request = new DownloadManager.Request(Uri.parse(mImsApkUrl));
|
||||||
|
+ request.setTitle("IMS APK");
|
||||||
|
+ request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||||
|
+ request.setDestinationInExternalFilesDir(context, Environment.DIRECTORY_DOWNLOADS, "ims.apk");
|
||||||
|
+ long id = dm.enqueue(request);
|
||||||
|
+ Toast.makeText(context, context.getString(R.string.install_ims_apk_toast_downloading), Toast.LENGTH_LONG).show();
|
||||||
|
+
|
||||||
|
+ context.registerReceiver(new BroadcastReceiver() {
|
||||||
|
+ @Override
|
||||||
|
+ public void onReceive(Context context, Intent intent) {
|
||||||
|
+ if (intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1L) != id) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ Cursor cursor = dm.query(new DownloadManager.Query().setFilterById(id));
|
||||||
|
+ if (!cursor.moveToFirst()) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ Uri localUri = Uri.parse(cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)));
|
||||||
|
+ String path = localUri.getPath();
|
||||||
|
+ if (path == null) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ long fileSize = 0;
|
||||||
|
+ File file = new File(path);
|
||||||
|
+ if (file.isFile()) {
|
||||||
|
+ fileSize = file.length();
|
||||||
|
+ } else {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ try (InputStream in = new FileInputStream(path)) {
|
||||||
|
+ PackageInstaller pi = context.getPackageManager().getPackageInstaller();
|
||||||
|
+ int sessionId = pi.createSession(new PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL));
|
||||||
|
+ PackageInstaller.Session session = pi.openSession(sessionId);
|
||||||
|
+ try (OutputStream out = session.openWrite(TAG, 0, fileSize)) {
|
||||||
|
+ byte[] buffer = new byte[512 * 1024];
|
||||||
|
+ while (in.available() > 0) {
|
||||||
|
+ int l = in.read(buffer);
|
||||||
|
+ out.write(buffer, 0, l);
|
||||||
|
+ }
|
||||||
|
+ session.fsync(out);
|
||||||
|
+ }
|
||||||
|
+ String action = TAG + "_" + sessionId;
|
||||||
|
+ PendingIntent pendingIntent = PendingIntent.getBroadcast(context, sessionId,
|
||||||
|
+ new Intent(action), PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
+ context.registerReceiver(new BroadcastReceiver() {
|
||||||
|
+ @Override
|
||||||
|
+ public void onReceive(Context context, Intent intent) {
|
||||||
|
+ Toast.makeText(context, context.getString(R.string.install_ims_apk_toast_completed), Toast.LENGTH_LONG).show();
|
||||||
|
+ }
|
||||||
|
+ }, new IntentFilter(action));
|
||||||
|
+ session.commit(pendingIntent.getIntentSender());
|
||||||
|
+ context.unregisterReceiver(this);
|
||||||
|
+ } catch (IOException ex) {
|
||||||
|
+ Log.d(TAG, "IOException while installing IMS APK");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
|
||||||
|
+
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ protected static String getImsType() {
|
||||||
|
+ try {
|
||||||
|
+ IServiceManager hidlManager = IServiceManager.getService();
|
||||||
|
+ for (String slot: IMS_SLOTS) {
|
||||||
|
+ if (hidlManager.get("vendor.qti.hardware.radio.ims@1.0::IImsRadio", slot) != null
|
||||||
|
+ || ServiceManager.getService("vendor.qti.hardware.radio.ims.IImsRadio/" + slot) != null) {
|
||||||
|
+ return "qcom";
|
||||||
|
+ } else if (hidlManager.get("vendor.mediatek.hardware.radio@3.0::IRadio", slot) != null) {
|
||||||
|
+ return "mtk_p";
|
||||||
|
+ } else if (hidlManager.get("vendor.mediatek.hardware.mtkradioex@1.0::IMtkRadioEx", slot) != null) {
|
||||||
|
+ return "mtk_q";
|
||||||
|
+ } else if (hidlManager.get("vendor.mediatek.hardware.mtkradioex@2.0::IMtkRadioEx", slot) != null) {
|
||||||
|
+ return "mtk_r";
|
||||||
|
+ } else if (hidlManager.get("vendor.mediatek.hardware.mtkradioex@3.0::IMtkRadioEx", slot) != null) {
|
||||||
|
+ return "mtk_s";
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ } catch (RemoteException ex) {}
|
||||||
|
+
|
||||||
|
+ return "none";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/settings/treble/OverrideVolteAvailabilityPreferenceController.java b/src/com/android/settings/treble/OverrideVolteAvailabilityPreferenceController.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..1ab12d3ca0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/com/android/settings/treble/OverrideVolteAvailabilityPreferenceController.java
|
||||||
|
@@ -0,0 +1,59 @@
|
||||||
|
+package com.android.settings.treble;
|
||||||
|
+
|
||||||
|
+import android.content.Context;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+
|
||||||
|
+import androidx.preference.Preference;
|
||||||
|
+import androidx.preference.PreferenceScreen;
|
||||||
|
+import androidx.preference.SwitchPreference;
|
||||||
|
+
|
||||||
|
+import com.android.settings.core.BasePreferenceController;
|
||||||
|
+
|
||||||
|
+public class OverrideVolteAvailabilityPreferenceController extends BasePreferenceController
|
||||||
|
+ implements Preference.OnPreferenceChangeListener {
|
||||||
|
+
|
||||||
|
+ private static final String OVERRIDE_VOLTE_AVAILABILITY_KEY = "override_volte_availability";
|
||||||
|
+ private static final String[] IMSMANAGER_DEBUG_OVERRIDE_PROPERTIES = {
|
||||||
|
+ "persist.dbg.volte_avail_ovr",
|
||||||
|
+ "persist.dbg.wfc_avail_ovr",
|
||||||
|
+ "persist.dbg.allow_ims_off"
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ private SwitchPreference mSwitchPreference;
|
||||||
|
+
|
||||||
|
+ public OverrideVolteAvailabilityPreferenceController(Context context) {
|
||||||
|
+ super(context, OVERRIDE_VOLTE_AVAILABILITY_KEY);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public int getAvailabilityStatus() {
|
||||||
|
+ return AVAILABLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public String getPreferenceKey() {
|
||||||
|
+ return OVERRIDE_VOLTE_AVAILABILITY_KEY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void displayPreference(PreferenceScreen screen) {
|
||||||
|
+ mSwitchPreference = screen.findPreference(getPreferenceKey());
|
||||||
|
+ super.displayPreference(screen);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateState(Preference preference) {
|
||||||
|
+ boolean checked = SystemProperties.getBoolean(IMSMANAGER_DEBUG_OVERRIDE_PROPERTIES[0], false);
|
||||||
|
+ mSwitchPreference.setChecked(checked);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
+ for (String prop: IMSMANAGER_DEBUG_OVERRIDE_PROPERTIES) {
|
||||||
|
+ SystemProperties.set(prop, ((boolean) newValue) ? "1" : "0");
|
||||||
|
+ }
|
||||||
|
+ mSwitchPreference.setChecked((boolean) newValue);
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/com/android/settings/treble/TrebleSettings.java b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
index 5c1611c053..50e3eda8c6 100644
|
||||||
|
--- a/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
+++ b/src/com/android/settings/treble/TrebleSettings.java
|
||||||
|
@@ -36,6 +36,8 @@ public class TrebleSettings extends DashboardFragment {
|
||||||
|
controllers.add(new DisableSoundvolumeEffectPreferenceController(context));
|
||||||
|
controllers.add(new ScreenResolutionRefreshRatePreferenceController(context));
|
||||||
|
controllers.add(new UseAlternativeBacklightScalePreferenceController(context));
|
||||||
|
+ controllers.add(new InstallImsApkPreferenceController(context));
|
||||||
|
+ controllers.add(new OverrideVolteAvailabilityPreferenceController(context));
|
||||||
|
return controllers;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user