Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1865fc784b | ||
|
|
5f6d7c9b47 | ||
|
|
0d139427ed | ||
|
|
e5c1b35ec2 | ||
|
|
92556e4408 | ||
|
|
eea6776609 | ||
|
|
40f13096eb | ||
|
|
7c52a16c2e | ||
|
|
4bc5076d1c | ||
|
|
291d57d10a | ||
|
|
b271de008b | ||
|
|
d14628eeee | ||
|
|
65d23014f6 |
@@ -0,0 +1 @@
|
|||||||
|
/patches_treble_personal/vendor_hardware_overlay
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
From 9644e048f2a52b51195003bb90a45c3a0efb67c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Thu, 13 Jan 2022 14:22:24 +0000
|
|
||||||
Subject: [PATCH 01/19] Add SPenPointerOverlay
|
|
||||||
|
|
||||||
Toggle this overlay with property "persist.ui.spen.pointer"
|
|
||||||
|
|
||||||
Change-Id: I21f7e05cf8ebd74c950dfb20cf7eee99bfe22988
|
|
||||||
---
|
|
||||||
packages/overlays/Android.mk | 3 +-
|
|
||||||
.../overlays/SPenPointerOverlay/Android.bp | 28 ++++++++++++++++++
|
|
||||||
.../SPenPointerOverlay/AndroidManifest.xml | 23 ++++++++++++++
|
|
||||||
.../sem_pointer_spot_hovering_spen.png | Bin 0 -> 411 bytes
|
|
||||||
.../res/drawable/pointer_arrow_icon.xml | 5 ++++
|
|
||||||
5 files changed, 58 insertions(+), 1 deletion(-)
|
|
||||||
create mode 100644 packages/overlays/SPenPointerOverlay/Android.bp
|
|
||||||
create mode 100644 packages/overlays/SPenPointerOverlay/AndroidManifest.xml
|
|
||||||
create mode 100644 packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png
|
|
||||||
create mode 100644 packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
|
|
||||||
|
|
||||||
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
|
|
||||||
index 928892c60e47..3a114bc8ec79 100644
|
|
||||||
--- a/packages/overlays/Android.mk
|
|
||||||
+++ b/packages/overlays/Android.mk
|
|
||||||
@@ -31,7 +31,8 @@ LOCAL_REQUIRED_MODULES := \
|
|
||||||
NavigationBarModeGesturalOverlayNarrowBack \
|
|
||||||
NavigationBarModeGesturalOverlayWideBack \
|
|
||||||
NavigationBarModeGesturalOverlayExtraWideBack \
|
|
||||||
- OneHandedModeGesturalOverlay \
|
|
||||||
+ OneHandedModeGesturalOverlay \
|
|
||||||
+ SPenPointerOverlay \
|
|
||||||
preinstalled-packages-platform-overlays.xml
|
|
||||||
|
|
||||||
include $(BUILD_PHONY_PACKAGE)
|
|
||||||
diff --git a/packages/overlays/SPenPointerOverlay/Android.bp b/packages/overlays/SPenPointerOverlay/Android.bp
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..7632ebd43ef6
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/packages/overlays/SPenPointerOverlay/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: "SPenPointerOverlay",
|
|
||||||
+ product_specific: true,
|
|
||||||
+}
|
|
||||||
diff --git a/packages/overlays/SPenPointerOverlay/AndroidManifest.xml b/packages/overlays/SPenPointerOverlay/AndroidManifest.xml
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..b785214f854b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/packages/overlays/SPenPointerOverlay/AndroidManifest.xml
|
|
||||||
@@ -0,0 +1,23 @@
|
|
||||||
+<!--
|
|
||||||
+ ~ 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.samsung.android.spenpointer.overlay"
|
|
||||||
+ android:versionCode="1"
|
|
||||||
+ android:versionName="1.0">
|
|
||||||
+ <overlay android:targetPackage="android" android:priority="5932" android:isStatic="true"
|
|
||||||
+ android:requiredSystemPropertyName="persist.ui.spen.pointer" android:requiredSystemPropertyValue="true"/>
|
|
||||||
+</manifest>
|
|
||||||
diff --git a/packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png b/packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000000000000000000000000000000000..b73246c80a95e0bceeb8c09aacd2653722fca2d2
|
|
||||||
GIT binary patch
|
|
||||||
literal 411
|
|
||||||
zcmeAS@N?(olHy`uVBq!ia0vp^av;pX3?zBp#Z3TG?EyX^u0VPYDww}y>9XB>H{O1*
|
|
||||||
z{q+Z+%%XMcH{QCp_4%7Ek6&zi^&Z52_8N#bKYY6T$G`bYmOylGdHNEl2EyKW`#w-H
|
|
||||||
zMEkav?|=xXa@&iyKv|#(o9;XSGJv*hefA2d9ViRrHpmHroTOV4<QL2kefT?*&XynF
|
|
||||||
zf9jt6d~bTxr(K#H%-fm6)$T^@`96*P!_O$D=#P=#_iokL5u<mvYQ}e<#%Z1|jv*T7
|
|
||||||
z-(HO6Z&DCpO9*-59T;HT8)CHh%)kHdv-@V7U0D0tD*XMooHrlj82&Lg8FU>wkZ<5N
|
|
||||||
zBf!g`Yhiojq)$5MjpwPIIqY#_(VA78COitTt~#=3<I2pBClgEGRn7j@r_s({E14^`
|
|
||||||
zzN)C=(stXhXOBPbPTyLVZ~8%?D9+x@`{Nq(tjK9wr(Jhj*%s6+*nEHflkLxVMFlvw
|
|
||||||
UdB5Fp8R$X=Pgg&ebxsLQ0B%Ow$N&HU
|
|
||||||
|
|
||||||
literal 0
|
|
||||||
HcmV?d00001
|
|
||||||
|
|
||||||
diff --git a/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml b/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..f35255c5f961
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
|
|
||||||
@@ -0,0 +1,5 @@
|
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
+ android:bitmap="@drawable/sem_pointer_spot_hovering_spen"
|
|
||||||
+ android:hotSpotX="5dp"
|
|
||||||
+ android:hotSpotY="5dp" />
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
From fdfbffda2815c0ac2270eae0efd0c31eb19e2dda Mon Sep 17 00:00:00 2001
|
||||||
|
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 22 Mar 2019 00:41:20 +0800
|
||||||
|
Subject: [PATCH 01/22] Disable FP lockouts optionally
|
||||||
|
|
||||||
|
Both timed and permanent lockouts - GET THE FUCK OUT
|
||||||
|
Now targeting LockoutFramework, introduced in Android 12
|
||||||
|
Now controlled by property "persist.sys.fp.lockouts.disable"
|
||||||
|
|
||||||
|
Change-Id: I2d4b091f3546d4d7903bfb4d5585629212dc9915
|
||||||
|
---
|
||||||
|
.../hidl/LockoutFrameworkImpl.java | 28 +++++++++++--------
|
||||||
|
1 file changed, 17 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||||
|
index a0befea8e085..48c4ded9f5ca 100644
|
||||||
|
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||||
|
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||||
|
@@ -25,6 +25,7 @@ import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
|
import android.os.SystemClock;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
import android.util.Slog;
|
||||||
|
import android.util.SparseBooleanArray;
|
||||||
|
import android.util.SparseIntArray;
|
||||||
|
@@ -44,6 +45,7 @@ public class LockoutFrameworkImpl implements LockoutTracker {
|
||||||
|
private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT = 20;
|
||||||
|
private static final long FAIL_LOCKOUT_TIMEOUT_MS = 30 * 1000;
|
||||||
|
private static final String KEY_LOCKOUT_RESET_USER = "lockout_reset_user";
|
||||||
|
+ private static final String DISABLE_FP_LOCKOUTS_PROPERTY = "persist.sys.fp.lockouts.disable";
|
||||||
|
|
||||||
|
private final class LockoutReceiver extends BroadcastReceiver {
|
||||||
|
@Override
|
||||||
|
@@ -101,23 +103,27 @@ public class LockoutFrameworkImpl implements LockoutTracker {
|
||||||
|
}
|
||||||
|
|
||||||
|
void addFailedAttemptForUser(int userId) {
|
||||||
|
- mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
|
||||||
|
- mTimedLockoutCleared.put(userId, false);
|
||||||
|
+ if (!SystemProperties.getBoolean(DISABLE_FP_LOCKOUTS_PROPERTY, false)) {
|
||||||
|
+ mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
|
||||||
|
+ mTimedLockoutCleared.put(userId, false);
|
||||||
|
|
||||||
|
- if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
|
||||||
|
- scheduleLockoutResetForUser(userId);
|
||||||
|
+ if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
|
||||||
|
+ scheduleLockoutResetForUser(userId);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @LockoutMode int getLockoutModeForUser(int userId) {
|
||||||
|
- final int failedAttempts = mFailedAttempts.get(userId, 0);
|
||||||
|
- if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
|
||||||
|
- return LOCKOUT_PERMANENT;
|
||||||
|
- } else if (failedAttempts > 0
|
||||||
|
- && !mTimedLockoutCleared.get(userId, false)
|
||||||
|
- && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
|
||||||
|
- return LOCKOUT_TIMED;
|
||||||
|
+ if (!SystemProperties.getBoolean(DISABLE_FP_LOCKOUTS_PROPERTY, false)) {
|
||||||
|
+ final int failedAttempts = mFailedAttempts.get(userId, 0);
|
||||||
|
+ if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
|
||||||
|
+ return LOCKOUT_PERMANENT;
|
||||||
|
+ } else if (failedAttempts > 0
|
||||||
|
+ && !mTimedLockoutCleared.get(userId, false)
|
||||||
|
+ && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
|
||||||
|
+ return LOCKOUT_TIMED;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
return LOCKOUT_NONE;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
From 160ca5e73a2d075c5514db911180d4523fedf860 Mon Sep 17 00:00:00 2001
|
From f48a8e1bb482cde1c1e0a628aea218796586130a Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 5 Apr 2018 10:01:19 +0800
|
Date: Thu, 5 Apr 2018 10:01:19 +0800
|
||||||
Subject: [PATCH 02/19] Disable vendor mismatch warning
|
Subject: [PATCH 02/22] Disable vendor mismatch warning
|
||||||
|
|
||||||
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
||||||
---
|
---
|
||||||
@@ -9,10 +9,10 @@ Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
|||||||
1 file changed, 2 insertions(+), 14 deletions(-)
|
1 file changed, 2 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||||
index 5d0d182230e1..789968e19ab6 100644
|
index ca45e087b60c..1d1da07f2942 100644
|
||||||
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||||
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||||
@@ -5508,20 +5508,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
@@ -5875,20 +5875,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Build.isBuildConsistent()) {
|
if (!Build.isBuildConsistent()) {
|
||||||
@@ -36,5 +36,5 @@ index 5d0d182230e1..789968e19ab6 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
From d8dea7b3e03976fa4ab292f3d6fdcae84e039196 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 17 Jan 2023 17:19:19 +0000
|
||||||
|
Subject: [PATCH 03/22] Keyguard: Fix colors of slices not updating on doze
|
||||||
|
|
||||||
|
Slices were invisible (black) in doze when using light wallpapers
|
||||||
|
Introduced in https://github.com/LineageOS/android_frameworks_base/commit/a19e59d717ec6d573c11c7e8277bba3c4de189c2
|
||||||
|
|
||||||
|
Change-Id: I06abd8bf2e28655cc9e6d81366fd82a13454ec5a
|
||||||
|
---
|
||||||
|
.../com/android/keyguard/KeyguardStatusViewController.java | 7 +++++++
|
||||||
|
.../systemui/shade/NotificationPanelViewController.java | 1 +
|
||||||
|
2 files changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
|
||||||
|
index f4c581552bc4..c0f983551877 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
|
||||||
|
@@ -97,6 +97,13 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
|
||||||
|
mKeyguardSliceViewController.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * The amount we're in doze.
|
||||||
|
+ */
|
||||||
|
+ public void setDarkAmount(float darkAmount) {
|
||||||
|
+ mView.setDarkAmount(darkAmount);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Set which clock should be displayed on the keyguard. The other one will be automatically
|
||||||
|
* hidden.
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
|
||||||
|
index 1394c68ceeb7..6cb1da129b60 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
|
||||||
|
@@ -4422,6 +4422,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
||||||
|
public void onDozeAmountChanged(float linearAmount, float amount) {
|
||||||
|
mInterpolatedDarkAmount = amount;
|
||||||
|
mLinearDarkAmount = linearAmount;
|
||||||
|
+ mKeyguardStatusViewController.setDarkAmount(mInterpolatedDarkAmount);
|
||||||
|
positionClockAndNotifications();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+6
-6
@@ -1,7 +1,7 @@
|
|||||||
From 79e4311950c147ce85983a7088f4d921050f3f74 Mon Sep 17 00:00:00 2001
|
From b92f1ca708133033601f8f0e70a872c5a30052df Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 16 Oct 2021 02:23:48 +0000
|
Date: Sat, 16 Oct 2021 02:23:48 +0000
|
||||||
Subject: [PATCH 03/19] UI: Adjust default navbar layouts
|
Subject: [PATCH 04/22] UI: Adjust default navbar layouts
|
||||||
|
|
||||||
- Slightly tighten nodpi layout
|
- Slightly tighten nodpi layout
|
||||||
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
|
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
|
||||||
@@ -45,18 +45,18 @@ index 07b797a32428..000000000000
|
|||||||
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
|
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
|
||||||
-</resources>
|
-</resources>
|
||||||
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||||
index ebf7b8407727..557699b35aa8 100644
|
index 99f21ed21d15..4c386f78a27a 100644
|
||||||
--- a/packages/SystemUI/res/values/config.xml
|
--- a/packages/SystemUI/res/values/config.xml
|
||||||
+++ b/packages/SystemUI/res/values/config.xml
|
+++ b/packages/SystemUI/res/values/config.xml
|
||||||
@@ -350,7 +350,7 @@
|
@@ -301,7 +301,7 @@
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Nav bar button default ordering/layout -->
|
<!-- Nav bar button default ordering/layout -->
|
||||||
- <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
|
- <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
|
||||||
+ <string name="config_navBarLayout" translatable="false">left[.6W],back[1WC];home;recent[1WC],right[.6W]</string>
|
+ <string name="config_navBarLayout" translatable="false">left[.6W],back[1WC];home;recent[1WC],right[.6W]</string>
|
||||||
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;contextual[1.7WC]</string>
|
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;menu_ime[1.7WC]</string>
|
||||||
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
|
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
-66
@@ -1,66 +0,0 @@
|
|||||||
From 47b42ba04a71792b6a0d9bcfa6fe515593d4bcc8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Fri, 9 Mar 2018 15:41:26 +0800
|
|
||||||
Subject: [PATCH 04/19] UI: Disable left (seascape) navigation bar optionally
|
|
||||||
|
|
||||||
Toggle this behaviour with property "persist.ui.seascape.disable"
|
|
||||||
|
|
||||||
Change-Id: Ieb58efa4b59feeb0c4ac70e497f4c59aa04210d6
|
|
||||||
---
|
|
||||||
.../navigationbar/buttons/ReverseLinearLayout.java | 8 +++++++-
|
|
||||||
.../core/java/com/android/server/wm/DisplayPolicy.java | 5 +++--
|
|
||||||
2 files changed, 10 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
|
||||||
index f1e1366404a2..f43bef8532b8 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
|
||||||
@@ -16,6 +16,7 @@ package com.android.systemui.navigationbar.buttons;
|
|
||||||
|
|
||||||
import android.annotation.Nullable;
|
|
||||||
import android.content.Context;
|
|
||||||
+import android.os.SystemProperties;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.View;
|
|
||||||
@@ -86,6 +87,11 @@ public class ReverseLinearLayout extends LinearLayout {
|
|
||||||
boolean isLayoutRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
|
||||||
boolean isLayoutReverse = isLayoutRtl ^ mIsAlternativeOrder;
|
|
||||||
|
|
||||||
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
|
|
||||||
+ if (isSeascapeDisabled) {
|
|
||||||
+ isLayoutReverse = isLayoutRtl ^ true;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (mIsLayoutReverse != isLayoutReverse) {
|
|
||||||
// reversity changed, swap the order of all views.
|
|
||||||
int childCount = getChildCount();
|
|
||||||
@@ -154,7 +160,7 @@ public class ReverseLinearLayout extends LinearLayout {
|
|
||||||
if (getGravity() != gravityToApply) setGravity(gravityToApply);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-
|
|
||||||
+
|
|
||||||
private static void reverseGroup(ViewGroup group, boolean isLayoutReverse) {
|
|
||||||
for (int i = 0; i < group.getChildCount(); i++) {
|
|
||||||
final View child = group.getChildAt(i);
|
|
||||||
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
|
||||||
index 21bca6ed6a53..b699c4e4f38d 100644
|
|
||||||
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
|
||||||
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
|
||||||
@@ -2388,9 +2388,10 @@ public class DisplayPolicy {
|
|
||||||
@NavigationBarPosition
|
|
||||||
int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) {
|
|
||||||
if (navigationBarCanMove() && displayWidth > displayHeight) {
|
|
||||||
- if (displayRotation == Surface.ROTATION_270) {
|
|
||||||
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
|
|
||||||
+ if (displayRotation == Surface.ROTATION_270 && !isSeascapeDisabled) {
|
|
||||||
return NAV_BAR_LEFT;
|
|
||||||
- } else if (displayRotation == Surface.ROTATION_90) {
|
|
||||||
+ } else {
|
|
||||||
return NAV_BAR_RIGHT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
From 66956ebbdb5645ff2cfb2a010d4371faa7c41554 Mon Sep 17 00:00:00 2001
|
From 09662a87b7db9b520aa5f996c5b837717fadfdec Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 10 Jan 2021 11:44:29 +0000
|
Date: Sun, 10 Jan 2021 11:44:29 +0000
|
||||||
Subject: [PATCH 05/19] UI: Disable wallpaper zoom
|
Subject: [PATCH 05/22] UI: Disable wallpaper zoom
|
||||||
|
|
||||||
It does little more than inducing motion sickness
|
It does little more than inducing motion sickness
|
||||||
|
|
||||||
@@ -11,18 +11,18 @@ Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||||
index 3ce1886fef6d..d8f280ddbf93 100644
|
index f015b485dfa6..77045ea11775 100644
|
||||||
--- a/core/res/res/values/config.xml
|
--- a/core/res/res/values/config.xml
|
||||||
+++ b/core/res/res/values/config.xml
|
+++ b/core/res/res/values/config.xml
|
||||||
@@ -4770,7 +4770,7 @@
|
@@ -5206,7 +5206,7 @@
|
||||||
<string name="config_customMediaSessionPolicyProvider"></string>
|
<item name="config_wallpaperMinScale" format="float" type="dimen">1</item>
|
||||||
|
|
||||||
<!-- The max scale for the wallpaper when it's zoomed in -->
|
<!-- The max scale for the wallpaper when it's zoomed in -->
|
||||||
- <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
|
- <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
|
||||||
+ <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
|
+ <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
|
||||||
|
|
||||||
<!-- Package name that will receive an explicit manifest broadcast for
|
<!-- If true, the wallpaper will scale regardless of the value of shouldZoomOutWallpaper() -->
|
||||||
android.os.action.POWER_SAVE_MODE_CHANGED. -->
|
<bool name="config_alwaysScaleWallpaper">false</bool>
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
From 6662339ff0a5507899d0f8bca883dbef8f748f1b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 25 Sep 2022 02:20:52 +0000
|
||||||
|
Subject: [PATCH 06/22] UI: Follow Monet and light/dark theme in user 1 icon
|
||||||
|
|
||||||
|
Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8
|
||||||
|
---
|
||||||
|
core/res/res/values-night/colors.xml | 1 +
|
||||||
|
core/res/res/values/colors.xml | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/res/res/values-night/colors.xml b/core/res/res/values-night/colors.xml
|
||||||
|
index ffaccd3ddc57..e2a955b89c77 100644
|
||||||
|
--- a/core/res/res/values-night/colors.xml
|
||||||
|
+++ b/core/res/res/values-night/colors.xml
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
|
||||||
|
<color name="overview_background">@color/overview_background_dark</color>
|
||||||
|
|
||||||
|
+ <color name="user_icon_1">@color/system_accent1_100</color>
|
||||||
|
<color name="user_icon_4">#fff439a0</color><!-- pink -->
|
||||||
|
<color name="user_icon_6">#ff4ecde6</color><!-- cyan -->
|
||||||
|
<color name="user_icon_7">#fffbbc04</color><!-- yellow -->
|
||||||
|
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
|
||||||
|
index b83d3b4ea298..7586684ea936 100644
|
||||||
|
--- a/core/res/res/values/colors.xml
|
||||||
|
+++ b/core/res/res/values/colors.xml
|
||||||
|
@@ -176,7 +176,7 @@
|
||||||
|
<color name="system_notification_accent_color">#00000000</color>
|
||||||
|
|
||||||
|
<!-- Default user icon colors -->
|
||||||
|
- <color name="user_icon_1">#ffe46962</color><!-- red -->
|
||||||
|
+ <color name="user_icon_1">@color/system_accent1_600</color>
|
||||||
|
<color name="user_icon_2">#ffaf5cf7</color><!-- purple -->
|
||||||
|
<color name="user_icon_3">#ff4c8df6</color><!-- blue -->
|
||||||
|
<color name="user_icon_4">#fff439a0</color><!-- pink -->
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
From 04b13419bb9446b5b25fe329be88804e297050b2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Wed, 3 Jun 2020 01:31:34 +0000
|
|
||||||
Subject: [PATCH 06/19] UI: Increase default status bar height
|
|
||||||
|
|
||||||
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
|
||||||
---
|
|
||||||
core/res/res/values/dimens.xml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
|
|
||||||
index a666a5b4b796..b62a785cd69f 100644
|
|
||||||
--- a/core/res/res/values/dimens.xml
|
|
||||||
+++ b/core/res/res/values/dimens.xml
|
|
||||||
@@ -43,7 +43,7 @@
|
|
||||||
<dimen name="status_bar_height">@dimen/status_bar_height_portrait</dimen>
|
|
||||||
<!-- Height of the status bar in portrait. The height should be
|
|
||||||
Max((status bar content height + waterfall top size), top cutout size) -->
|
|
||||||
- <dimen name="status_bar_height_portrait">24dp</dimen>
|
|
||||||
+ <dimen name="status_bar_height_portrait">28dp</dimen>
|
|
||||||
<!-- Height of the status bar in landscape. The height should be
|
|
||||||
Max((status bar content height + waterfall top size), top cutout size) -->
|
|
||||||
<dimen name="status_bar_height_landscape">@dimen/status_bar_height_portrait</dimen>
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
From 2249465d16cea6251df69dd13d331ed2fae270f0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 3 Jun 2020 01:31:34 +0000
|
||||||
|
Subject: [PATCH 07/22] UI: Increase default status bar height
|
||||||
|
|
||||||
|
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
||||||
|
---
|
||||||
|
core/res/res/values/dimens.xml | 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 2542268a153a..099a6badc034 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,25 @@
|
|||||||
|
From 380d8dff252dcde3b490cc3080bd56d2e3d21ec4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 25 Sep 2022 02:20:20 +0000
|
||||||
|
Subject: [PATCH 08/22] UI: Remove QS footer background
|
||||||
|
|
||||||
|
Change-Id: I68e82e0c5e3eddb2d3f767fe792b1436eae506ef
|
||||||
|
---
|
||||||
|
packages/SystemUI/res-keyguard/layout/footer_actions.xml | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res-keyguard/layout/footer_actions.xml b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||||
|
index 544d0299060d..d45744961f59 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
|
||||||
|
@@ -23,7 +23,6 @@
|
||||||
|
android:elevation="@dimen/qs_panel_elevation"
|
||||||
|
android:paddingTop="@dimen/qs_footer_actions_top_padding"
|
||||||
|
android:paddingBottom="@dimen/qs_footer_actions_bottom_padding"
|
||||||
|
- android:background="@drawable/qs_footer_actions_background"
|
||||||
|
android:gravity="center_vertical|end"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
/>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+89
@@ -0,0 +1,89 @@
|
|||||||
|
From 9f047b03021034b2cb21e7b8c2845eb8dfd577d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sat, 19 Mar 2022 09:22:24 +0000
|
||||||
|
Subject: [PATCH 09/22] UI: Restore split-screen divider to pre-Sv2 looks
|
||||||
|
|
||||||
|
- Kill rounded corners - where two rectangles collide should be perfectly straight
|
||||||
|
- Make it black again - taskbar should mind its own business
|
||||||
|
|
||||||
|
Change-Id: I240b627793b615c82bd07ebd77638cde180ef80f
|
||||||
|
---
|
||||||
|
.../Shell/res/values-sw600dp/colors.xml | 21 +++++++++++++++++++
|
||||||
|
.../WindowManager/Shell/res/values/colors.xml | 2 +-
|
||||||
|
.../wm/shell/common/split/SplitLayout.java | 19 ++---------------
|
||||||
|
3 files changed, 24 insertions(+), 18 deletions(-)
|
||||||
|
create mode 100644 libs/WindowManager/Shell/res/values-sw600dp/colors.xml
|
||||||
|
|
||||||
|
diff --git a/libs/WindowManager/Shell/res/values-sw600dp/colors.xml b/libs/WindowManager/Shell/res/values-sw600dp/colors.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..79db59cad3c2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libs/WindowManager/Shell/res/values-sw600dp/colors.xml
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
+<!--
|
||||||
|
+/*
|
||||||
|
+ * Copyright 2020, The Android Open Source Project
|
||||||
|
+ *
|
||||||
|
+ * Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
+ * you may not use this file except in compliance with the License.
|
||||||
|
+ * You may obtain a copy of the License at
|
||||||
|
+ *
|
||||||
|
+ * http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
+ *
|
||||||
|
+ * Unless required by applicable law or agreed to in writing, software
|
||||||
|
+ * distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
+ * See the License for the specific language governing permissions and
|
||||||
|
+ * limitations under the License.
|
||||||
|
+ */
|
||||||
|
+-->
|
||||||
|
+<resources>
|
||||||
|
+ <color name="split_divider_background">@color/taskbar_background</color>
|
||||||
|
+</resources>
|
||||||
|
diff --git a/libs/WindowManager/Shell/res/values/colors.xml b/libs/WindowManager/Shell/res/values/colors.xml
|
||||||
|
index 6fb70006e67f..906dc71d623a 100644
|
||||||
|
--- a/libs/WindowManager/Shell/res/values/colors.xml
|
||||||
|
+++ b/libs/WindowManager/Shell/res/values/colors.xml
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<color name="docked_divider_handle">#000000</color>
|
||||||
|
- <color name="split_divider_background">@color/taskbar_background</color>
|
||||||
|
+ <color name="split_divider_background">@android:color/black</color>
|
||||||
|
<drawable name="forced_resizable_background">#59000000</drawable>
|
||||||
|
<color name="minimize_dock_shadow_start">#60000000</color>
|
||||||
|
<color name="minimize_dock_shadow_end">#00000000</color>
|
||||||
|
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
||||||
|
index ffc56b6f6106..fa7d70e34dd1 100644
|
||||||
|
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
||||||
|
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
|
||||||
|
@@ -154,23 +154,8 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateDividerConfig(Context context) {
|
||||||
|
- final Resources resources = context.getResources();
|
||||||
|
- final Display display = context.getDisplay();
|
||||||
|
- final int dividerInset = resources.getDimensionPixelSize(
|
||||||
|
- com.android.internal.R.dimen.docked_stack_divider_insets);
|
||||||
|
- int radius = 0;
|
||||||
|
- RoundedCorner corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT);
|
||||||
|
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
||||||
|
- corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_RIGHT);
|
||||||
|
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
||||||
|
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
|
||||||
|
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
||||||
|
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
|
||||||
|
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
|
||||||
|
-
|
||||||
|
- mDividerInsets = Math.max(dividerInset, radius);
|
||||||
|
- mDividerSize = resources.getDimensionPixelSize(R.dimen.split_divider_bar_width);
|
||||||
|
- mDividerWindowWidth = mDividerSize + 2 * mDividerInsets;
|
||||||
|
+ mDividerWindowWidth = context.getResources().getDimensionPixelSize(
|
||||||
|
+ R.dimen.split_divider_bar_width);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Gets bounds of the primary split with screen based coordinate. */
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
From 5bfabfbe5d9b44e85f18151fa1f29ed59b505dd5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Thu, 14 Oct 2021 15:45:24 +0000
|
|
||||||
Subject: [PATCH 09/19] UI: Unblock alarm status bar icon
|
|
||||||
|
|
||||||
That's very Zen of you, Google...
|
|
||||||
|
|
||||||
Change-Id: I2c9f91f47bb1e324a20c13d588dcdbbca91dc12e
|
|
||||||
---
|
|
||||||
.../systemui/statusbar/phone/CollapsedStatusBarFragment.java | 1 -
|
|
||||||
.../android/systemui/statusbar/phone/KeyguardStatusBarView.java | 1 -
|
|
||||||
2 files changed, 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
|
|
||||||
index 2e40af4fab2a..f8c79ceabf2e 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
|
|
||||||
@@ -162,7 +162,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
|
|
||||||
}
|
|
||||||
mDarkIconManager = new DarkIconManager(view.findViewById(R.id.statusIcons), mFeatureFlags);
|
|
||||||
mDarkIconManager.setShouldLog(true);
|
|
||||||
- mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_alarm_clock));
|
|
||||||
mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_call_strength));
|
|
||||||
mDarkIconManager.setBlockList(mBlockedIcons);
|
|
||||||
mStatusBarIconController.addIconGroup(mDarkIconManager);
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
|
||||||
index a32e7c4765ef..efc02548763a 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
|
||||||
@@ -203,7 +203,6 @@ public class KeyguardStatusBarView extends RelativeLayout implements
|
|
||||||
// Set hidden status bar items
|
|
||||||
private void loadBlockList() {
|
|
||||||
Resources r = getResources();
|
|
||||||
- mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_alarm_clock));
|
|
||||||
mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_call_strength));
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 65e25646ab0c3cbfdc7199a791cd5e8bcccbaffe Mon Sep 17 00:00:00 2001
|
From 31f4647fa3e8662e372a3dacb08a64765f29915f Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Tue, 6 Oct 2020 01:41:16 +0000
|
Date: Tue, 6 Oct 2020 01:41:16 +0000
|
||||||
Subject: [PATCH 07/19] UI: Revive navbar layout tuning via sysui_nav_bar
|
Subject: [PATCH 10/22] UI: Revive navbar layout tuning via sysui_nav_bar
|
||||||
tunable
|
tunable
|
||||||
|
|
||||||
Google keeps fixing what ain't broken.
|
Google keeps fixing what ain't broken.
|
||||||
@@ -12,7 +12,7 @@ Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352
|
|||||||
1 file changed, 15 insertions(+)
|
1 file changed, 15 insertions(+)
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||||
index c8bc143f0bd8..fab079b91608 100644
|
index 51feed875337..5f0f9a220c31 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||||
@@ -118,6 +118,7 @@ public class NavigationBarInflaterView extends FrameLayout
|
@@ -118,6 +118,7 @@ public class NavigationBarInflaterView extends FrameLayout
|
||||||
@@ -60,5 +60,5 @@ index c8bc143f0bd8..fab079b91608 100644
|
|||||||
final String newValue = getDefaultLayout();
|
final String newValue = getDefaultLayout();
|
||||||
if (!Objects.equals(mCurrentLayout, newValue)) {
|
if (!Objects.equals(mCurrentLayout, newValue)) {
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
-32
@@ -1,32 +0,0 @@
|
|||||||
From 69866119d54b6e5aee80530f4030980ef0ab28c1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
|
||||||
Date: Tue, 5 Oct 2021 21:01:15 -0700
|
|
||||||
Subject: [PATCH 11/19] SystemUI: Always refresh power menu on UI mode change
|
|
||||||
|
|
||||||
This is necessary for reliably theming the global actions dialog with
|
|
||||||
dynamic colors and adapting it to light/dark themes.
|
|
||||||
|
|
||||||
Demo screenshots (with color overlays applied):
|
|
||||||
https://twitter.com/kdrag0n/status/1445960685427433473
|
|
||||||
|
|
||||||
Change-Id: Id6f6623096ed231e841ca3794b47f8a0ab54dae6
|
|
||||||
---
|
|
||||||
.../android/systemui/globalactions/GlobalActionsDialogLite.java | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
|
||||||
index 11da4f5ca39e..afe2629fd53d 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
|
||||||
@@ -762,7 +762,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
|
|
||||||
@Override
|
|
||||||
public void onUiModeChanged() {
|
|
||||||
mContext.getTheme().applyStyle(mContext.getThemeResId(), true);
|
|
||||||
- if (mDialog != null && mDialog.isShowing()) {
|
|
||||||
+ if (mDialog != null) {
|
|
||||||
mDialog.refreshDialog();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From e2774d80fc6cd0de872259c555f21ae2e8f8bf2c Mon Sep 17 00:00:00 2001
|
From d81745ad081c1e8bbabd346deb3fa5cb3b3a1017 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 26 Apr 2020 08:56:13 +0000
|
Date: Sun, 26 Apr 2020 08:56:13 +0000
|
||||||
Subject: [PATCH 08/19] UI: Use SNAP_FIXED_RATIO for multi-window globally
|
Subject: [PATCH 11/22] UI: Use SNAP_FIXED_RATIO for multi-window globally
|
||||||
|
|
||||||
Enables multiple snap targets under landscape for phone UI
|
Enables multiple snap targets under landscape for phone UI
|
||||||
|
|
||||||
@@ -78,10 +78,10 @@ index 34b6a54be493..3921c9edfeac 100644
|
|||||||
Only applies if the device display is not square. -->
|
Only applies if the device display is not square. -->
|
||||||
<bool name="config_navBarCanMove">false</bool>
|
<bool name="config_navBarCanMove">false</bool>
|
||||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||||
index d8f280ddbf93..3a62b51d3cbc 100644
|
index 77045ea11775..5c9cad656654 100644
|
||||||
--- a/core/res/res/values/config.xml
|
--- a/core/res/res/values/config.xml
|
||||||
+++ b/core/res/res/values/config.xml
|
+++ b/core/res/res/values/config.xml
|
||||||
@@ -3531,7 +3531,7 @@
|
@@ -3885,7 +3885,7 @@
|
||||||
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
|
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
|
||||||
2 - 1 snap target: 1:1
|
2 - 1 snap target: 1:1
|
||||||
-->
|
-->
|
||||||
@@ -91,5 +91,5 @@ index d8f280ddbf93..3a62b51d3cbc 100644
|
|||||||
<!-- The maximum aspect ratio (longerSide/shorterSide) that is treated as close-to-square. The
|
<!-- 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. -->
|
orientation requests from apps would be ignored if the display is close-to-square. -->
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
From a08e7b27c44c384da58a118f5a0f3290a37f07da Mon Sep 17 00:00:00 2001
|
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
|
||||||
Date: Sat, 9 Oct 2021 14:39:38 -0700
|
|
||||||
Subject: [PATCH 12/19] SystemUI: Use Monet colors for power menu
|
|
||||||
|
|
||||||
It's odd that the power menu doesn't use Monet colors, unlike most of
|
|
||||||
System UI. This makes it feel more integrated with the rest of the
|
|
||||||
system.
|
|
||||||
|
|
||||||
Change-Id: Iaffb178fe2c09a33925cb40e89d78640fab2b23c
|
|
||||||
---
|
|
||||||
packages/SystemUI/res/values-night/colors.xml | 7 +++++++
|
|
||||||
packages/SystemUI/res/values/colors.xml | 10 +++++-----
|
|
||||||
2 files changed, 12 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml
|
|
||||||
index b98694e2fae7..3a6b62dfe1c8 100644
|
|
||||||
--- a/packages/SystemUI/res/values-night/colors.xml
|
|
||||||
+++ b/packages/SystemUI/res/values-night/colors.xml
|
|
||||||
@@ -99,4 +99,11 @@
|
|
||||||
<color name="accessibility_floating_menu_background">#B3000000</color> <!-- 70% -->
|
|
||||||
|
|
||||||
<color name="people_tile_background">@android:color/system_accent2_800</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>
|
|
||||||
+ <color name="global_actions_lite_emergency_background">@*android:color/surface_dark</color>
|
|
||||||
+ <color name="global_actions_lite_emergency_icon">@*android:color/accent_device_default_dark</color>
|
|
||||||
</resources>
|
|
||||||
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
|
|
||||||
index f539b0cf68a1..9ea915c1cb3f 100644
|
|
||||||
--- a/packages/SystemUI/res/values/colors.xml
|
|
||||||
+++ b/packages/SystemUI/res/values/colors.xml
|
|
||||||
@@ -53,11 +53,11 @@
|
|
||||||
<color name="global_actions_emergency_text">@color/GM2_grey_100</color>
|
|
||||||
|
|
||||||
<!-- 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_text">#F0F0F0</color>
|
|
||||||
- <color name="global_actions_lite_emergency_background">#F85D4D</color>
|
|
||||||
- <color name="global_actions_lite_emergency_icon">@color/GM2_grey_900</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_text">@*android:color/foreground_device_default_light</color>
|
|
||||||
+ <color name="global_actions_lite_emergency_background">@*android:color/surface_light</color>
|
|
||||||
+ <color name="global_actions_lite_emergency_icon">@*android:color/accent_device_default_light</color>
|
|
||||||
|
|
||||||
<color name="global_actions_shutdown_ui_text">@color/control_primary_text</color>
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From 262b65f0ca1c307215c538c378775874c054ef01 Mon Sep 17 00:00:00 2001
|
From a1b87f1cc52bd1d906554b94657634976b9fb776 Mon Sep 17 00:00:00 2001
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
Date: Tue, 3 Nov 2020 22:43:12 -0800
|
Date: Tue, 3 Nov 2020 22:43:12 -0800
|
||||||
Subject: [PATCH 10/19] core: Remove old app target SDK dialog
|
Subject: [PATCH 12/22] core: Remove old app target SDK dialog
|
||||||
|
|
||||||
If an app is old, users should already know that, and there's usually no
|
If an app is old, users should already know that, and there's usually no
|
||||||
point in warning them about it because they would already be using a
|
point in warning them about it because they would already be using a
|
||||||
@@ -27,5 +27,5 @@ index 994f07959f3b..6749ae78c09c 100644
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From 3606dbe992a728d9e348d1d1802c189cc6a393f7 Mon Sep 17 00:00:00 2001
|
From 8b17b1dc3b1f373a0ae8a44d16a8adec599915b3 Mon Sep 17 00:00:00 2001
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
Date: Tue, 5 Oct 2021 21:01:50 -0700
|
Date: Tue, 5 Oct 2021 21:01:50 -0700
|
||||||
Subject: [PATCH 18/19] Paint: Enable subpixel text positioning by default
|
Subject: [PATCH 13/22] Paint: Enable subpixel text positioning by default
|
||||||
|
|
||||||
On desktop Linux, subpixel text positioning is necessary to avoid
|
On desktop Linux, subpixel text positioning is necessary to avoid
|
||||||
kerning issues, and Android is no different. Even though most phone
|
kerning issues, and Android is no different. Even though most phone
|
||||||
@@ -24,10 +24,10 @@ Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
|
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
|
||||||
index 42e470b7f660..9c0036e5d716 100644
|
index f438a03b1434..6621d1f23166 100644
|
||||||
--- a/graphics/java/android/graphics/Paint.java
|
--- a/graphics/java/android/graphics/Paint.java
|
||||||
+++ b/graphics/java/android/graphics/Paint.java
|
+++ b/graphics/java/android/graphics/Paint.java
|
||||||
@@ -252,7 +252,7 @@ public class Paint {
|
@@ -260,7 +260,7 @@ public class Paint {
|
||||||
|
|
||||||
// These flags are always set on a new/reset paint, even if flags 0 is passed.
|
// These flags are always set on a new/reset paint, even if flags 0 is passed.
|
||||||
static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
|
static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
|
||||||
@@ -37,5 +37,5 @@ index 42e470b7f660..9c0036e5d716 100644
|
|||||||
/**
|
/**
|
||||||
* Font hinter option that disables font hinting.
|
* Font hinter option that disables font hinting.
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
-54
@@ -1,54 +0,0 @@
|
|||||||
From 09ea8e6106959f6c8a6399227ee029d1feace6b2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
|
||||||
Date: Wed, 6 Oct 2021 18:40:30 -0700
|
|
||||||
Subject: [PATCH 13/19] Revert "Make QS always use dark theme colors"
|
|
||||||
|
|
||||||
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/layout/quick_qs_status_icons.xml | 2 +-
|
|
||||||
packages/SystemUI/res/values/styles.xml | 4 ++--
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
|
||||||
index 42a7c895ff84..27514617fb23 100644
|
|
||||||
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
|
||||||
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
|
||||||
@@ -24,7 +24,7 @@
|
|
||||||
android:minHeight="48dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:focusable="true"
|
|
||||||
- android:theme="@style/Theme.SystemUI.QuickSettings.Header">
|
|
||||||
+ android:theme="@style/QSHeaderTheme">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/clock_container"
|
|
||||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
|
||||||
index 93d60cce2915..e592fe2dd630 100644
|
|
||||||
--- a/packages/SystemUI/res/values/styles.xml
|
|
||||||
+++ b/packages/SystemUI/res/values/styles.xml
|
|
||||||
@@ -395,7 +395,7 @@
|
|
||||||
<item name="*android:dotColor">?android:attr/textColorSecondary</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="lightIconTheme">@style/QSIconTheme</item>
|
|
||||||
<item name="darkIconTheme">@style/QSIconTheme</item>
|
|
||||||
<item name="android:colorError">@*android:color/error_color_material_dark</item>
|
|
||||||
@@ -486,7 +486,7 @@
|
|
||||||
<item name="singleToneColor">@color/dark_mode_qs_icon_color_single_tone</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
- <style name="Theme.SystemUI.QuickSettings.Header">
|
|
||||||
+ <style name="QSHeaderTheme" parent="@style/Theme.SystemUI">
|
|
||||||
<item name="lightIconTheme">@style/DualToneLightTheme</item>
|
|
||||||
<item name="darkIconTheme">@style/QSHeaderDarkTheme</item>
|
|
||||||
</style>
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+30
-28
@@ -1,7 +1,7 @@
|
|||||||
From 3c7d6c5106eea744e08250998ce3d60af7c9b306 Mon Sep 17 00:00:00 2001
|
From 482d15491c36aeb11a0e8b5c9a5205d389507034 Mon Sep 17 00:00:00 2001
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
Date: Sat, 16 Oct 2021 05:27:57 -0700
|
Date: Sat, 16 Oct 2021 05:27:57 -0700
|
||||||
Subject: [PATCH 23/28] Add support for app signature spoofing
|
Subject: [PATCH 14/22] Add support for app signature spoofing
|
||||||
|
|
||||||
This is needed by microG GmsCore to pretend to be the official Google
|
This is needed by microG GmsCore to pretend to be the official Google
|
||||||
Play Services package, because client apps check the package signature
|
Play Services package, because client apps check the package signature
|
||||||
@@ -26,20 +26,22 @@ Changes made for Android 12:
|
|||||||
check doesn't work properly)
|
check doesn't work properly)
|
||||||
- Optimize mayFakeSignature check order to improve performance
|
- Optimize mayFakeSignature check order to improve performance
|
||||||
|
|
||||||
Link: https://github.com/microg/GmsCore/pull/1586
|
Changes made for Android 13:
|
||||||
|
- Computer subclass is now an independent class.
|
||||||
|
|
||||||
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
|
Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
|
||||||
---
|
---
|
||||||
core/api/current.txt | 2 ++
|
core/api/current.txt | 2 ++
|
||||||
core/res/AndroidManifest.xml | 15 +++++++++
|
core/res/AndroidManifest.xml | 15 ++++++++++
|
||||||
core/res/res/values/strings.xml | 12 +++++++
|
core/res/res/values/strings.xml | 12 ++++++++
|
||||||
.../server/pm/PackageManagerService.java | 31 +++++++++++++++++--
|
.../com/android/server/pm/ComputerEngine.java | 30 +++++++++++++++++--
|
||||||
4 files changed, 57 insertions(+), 3 deletions(-)
|
4 files changed, 56 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/core/api/current.txt b/core/api/current.txt
|
diff --git a/core/api/current.txt b/core/api/current.txt
|
||||||
index 1de47b548a5c..52c7ea2e1321 100644
|
index 487e57d114c9..04e69741b9fd 100644
|
||||||
--- a/core/api/current.txt
|
--- a/core/api/current.txt
|
||||||
+++ b/core/api/current.txt
|
+++ b/core/api/current.txt
|
||||||
@@ -84,6 +84,7 @@ package android {
|
@@ -87,6 +87,7 @@ package android {
|
||||||
field public static final String DUMP = "android.permission.DUMP";
|
field public static final String DUMP = "android.permission.DUMP";
|
||||||
field public static final String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR";
|
field public static final String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR";
|
||||||
field public static final String FACTORY_TEST = "android.permission.FACTORY_TEST";
|
field public static final String FACTORY_TEST = "android.permission.FACTORY_TEST";
|
||||||
@@ -47,7 +49,7 @@ index 1de47b548a5c..52c7ea2e1321 100644
|
|||||||
field public static final String FOREGROUND_SERVICE = "android.permission.FOREGROUND_SERVICE";
|
field public static final String FOREGROUND_SERVICE = "android.permission.FOREGROUND_SERVICE";
|
||||||
field public static final String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
|
field public static final String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
|
||||||
field public static final String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
|
field public static final String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
|
||||||
@@ -199,6 +200,7 @@ package android {
|
@@ -222,6 +223,7 @@ package android {
|
||||||
field public static final String CALL_LOG = "android.permission-group.CALL_LOG";
|
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 CAMERA = "android.permission-group.CAMERA";
|
||||||
field public static final String CONTACTS = "android.permission-group.CONTACTS";
|
field public static final String CONTACTS = "android.permission-group.CONTACTS";
|
||||||
@@ -56,10 +58,10 @@ index 1de47b548a5c..52c7ea2e1321 100644
|
|||||||
field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
|
field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
|
||||||
field public static final String NEARBY_DEVICES = "android.permission-group.NEARBY_DEVICES";
|
field public static final String NEARBY_DEVICES = "android.permission-group.NEARBY_DEVICES";
|
||||||
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
||||||
index a006db9d8373..8c88f2d3dcba 100644
|
index bbc3a7369423..af04d9d18fbd 100644
|
||||||
--- a/core/res/AndroidManifest.xml
|
--- a/core/res/AndroidManifest.xml
|
||||||
+++ b/core/res/AndroidManifest.xml
|
+++ b/core/res/AndroidManifest.xml
|
||||||
@@ -3202,6 +3202,21 @@
|
@@ -3577,6 +3577,21 @@
|
||||||
android:description="@string/permdesc_getPackageSize"
|
android:description="@string/permdesc_getPackageSize"
|
||||||
android:protectionLevel="normal" />
|
android:protectionLevel="normal" />
|
||||||
|
|
||||||
@@ -82,10 +84,10 @@ index a006db9d8373..8c88f2d3dcba 100644
|
|||||||
{@link android.content.pm.PackageManager#addPackageToPreferred}
|
{@link android.content.pm.PackageManager#addPackageToPreferred}
|
||||||
for details. -->
|
for details. -->
|
||||||
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
|
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
|
||||||
index b58638cc3ade..8cf98fa56bf6 100644
|
index 2091c0502b6f..6888edcf7d3c 100644
|
||||||
--- a/core/res/res/values/strings.xml
|
--- a/core/res/res/values/strings.xml
|
||||||
+++ b/core/res/res/values/strings.xml
|
+++ b/core/res/res/values/strings.xml
|
||||||
@@ -880,6 +880,18 @@
|
@@ -982,6 +982,18 @@
|
||||||
|
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
|
|
||||||
@@ -104,11 +106,11 @@ index b58638cc3ade..8cf98fa56bf6 100644
|
|||||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
<!-- 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>
|
<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. -->
|
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
|
diff --git a/services/core/java/com/android/server/pm/ComputerEngine.java b/services/core/java/com/android/server/pm/ComputerEngine.java
|
||||||
index f69922f64787..7d0ba265ff7e 100644
|
index 46b7460dff1b..40549962436f 100644
|
||||||
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
|
--- a/services/core/java/com/android/server/pm/ComputerEngine.java
|
||||||
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
|
+++ b/services/core/java/com/android/server/pm/ComputerEngine.java
|
||||||
@@ -3325,6 +3325,29 @@ public class PackageManagerService extends IPackageManager.Stub
|
@@ -1603,6 +1603,29 @@ public class ComputerEngine implements Computer {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,27 +137,27 @@ index f69922f64787..7d0ba265ff7e 100644
|
|||||||
+ return pi;
|
+ return pi;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public final PackageInfo generatePackageInfo(PackageSetting ps, int flags, int userId) {
|
public final PackageInfo generatePackageInfo(PackageStateInternal ps,
|
||||||
|
@PackageManager.PackageInfoFlagsBits long flags, int userId) {
|
||||||
if (!mUserManager.exists(userId)) return null;
|
if (!mUserManager.exists(userId)) return null;
|
||||||
if (ps == null) {
|
@@ -1632,13 +1655,14 @@ public class ComputerEngine implements Computer {
|
||||||
@@ -3353,12 +3376,14 @@ public class PackageManagerService extends IPackageManager.Stub
|
|
||||||
final int[] gids = (flags & PackageManager.GET_GIDS) == 0 ? EMPTY_INT_ARRAY
|
final int[] gids = (flags & PackageManager.GET_GIDS) == 0 ? EMPTY_INT_ARRAY
|
||||||
: mPermissionManager.getGidsForUid(UserHandle.getUid(userId, ps.appId));
|
: mPermissionManager.getGidsForUid(UserHandle.getUid(userId, ps.getAppId()));
|
||||||
// Compute granted permissions only if package has requested permissions
|
// Compute granted permissions only if package has requested permissions
|
||||||
- final Set<String> permissions = ((flags & PackageManager.GET_PERMISSIONS) == 0
|
- final Set<String> permissions = ((flags & PackageManager.GET_PERMISSIONS) == 0
|
||||||
+ final Set<String> permissions = (((flags & PackageManager.GET_PERMISSIONS) == 0
|
+ final Set<String> permissions = (((flags & PackageManager.GET_PERMISSIONS) == 0
|
||||||
+ && !requestsFakeSignature(p))
|
+ && !requestsFakeSignature(p))
|
||||||
|| ArrayUtils.isEmpty(p.getRequestedPermissions())) ? Collections.emptySet()
|
|| ArrayUtils.isEmpty(p.getRequestedPermissions())) ? Collections.emptySet()
|
||||||
: mPermissionManager.getGrantedPermissions(ps.name, userId);
|
: mPermissionManager.getGrantedPermissions(ps.getPackageName(), userId);
|
||||||
|
|
||||||
- PackageInfo packageInfo = PackageInfoUtils.generate(p, gids, flags,
|
- PackageInfo packageInfo = PackageInfoUtils.generate(p, gids, flags,
|
||||||
- ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId, ps);
|
|
||||||
+ PackageInfo packageInfo = mayFakeSignature(p, PackageInfoUtils.generate(p, gids, flags,
|
+ PackageInfo packageInfo = mayFakeSignature(p, PackageInfoUtils.generate(p, gids, flags,
|
||||||
+ ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId, ps),
|
state.getFirstInstallTime(), ps.getLastUpdateTime(), permissions, state, userId,
|
||||||
+ permissions);
|
- ps);
|
||||||
|
+ ps), permissions);
|
||||||
|
|
||||||
if (packageInfo == null) {
|
if (packageInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
-33
@@ -1,33 +0,0 @@
|
|||||||
From 9bce4fe471a1d7c107fad69b9285525041feed72 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
|
||||||
Date: Wed, 6 Oct 2021 18:41:11 -0700
|
|
||||||
Subject: [PATCH 14/19] Revert "Do not re-inflate QS and SB when
|
|
||||||
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 b45dc52585ad..87d90adceba5 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
|
||||||
@@ -54,7 +54,8 @@ public class FragmentHostManager {
|
|
||||||
private final View mRootView;
|
|
||||||
private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
|
|
||||||
ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE
|
|
||||||
- | ActivityInfo.CONFIG_SCREEN_LAYOUT | 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.25.1
|
|
||||||
|
|
||||||
+113
@@ -0,0 +1,113 @@
|
|||||||
|
From db27d27f48658841c6a74e55f543f417ddb16e76 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Date: Mon, 11 Oct 2021 19:59:51 -0700
|
||||||
|
Subject: [PATCH 15/22] Spoof product name for Google Play Services
|
||||||
|
|
||||||
|
NB: This code is under the gmscompat package, but it does not depend on
|
||||||
|
any code from gmscompat.
|
||||||
|
|
||||||
|
Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a
|
||||||
|
---
|
||||||
|
core/java/android/app/Instrumentation.java | 4 ++
|
||||||
|
.../internal/gmscompat/AttestationHooks.java | 60 +++++++++++++++++++
|
||||||
|
2 files changed, 64 insertions(+)
|
||||||
|
create mode 100644 core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
|
||||||
|
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
|
||||||
|
index 556058b567f9..44449588bbab 100644
|
||||||
|
--- a/core/java/android/app/Instrumentation.java
|
||||||
|
+++ b/core/java/android/app/Instrumentation.java
|
||||||
|
@@ -57,6 +57,8 @@ import android.view.WindowManagerGlobal;
|
||||||
|
|
||||||
|
import com.android.internal.content.ReferrerIntent;
|
||||||
|
|
||||||
|
+import com.android.internal.gmscompat.AttestationHooks;
|
||||||
|
+
|
||||||
|
import java.io.File;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
@@ -1242,6 +1244,7 @@ public class Instrumentation {
|
||||||
|
Application app = getFactory(context.getPackageName())
|
||||||
|
.instantiateApplication(cl, className);
|
||||||
|
app.attach(context);
|
||||||
|
+ AttestationHooks.initApplicationBeforeOnCreate(app);
|
||||||
|
return app;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1259,6 +1262,7 @@ public class Instrumentation {
|
||||||
|
ClassNotFoundException {
|
||||||
|
Application app = (Application)clazz.newInstance();
|
||||||
|
app.attach(context);
|
||||||
|
+ AttestationHooks.initApplicationBeforeOnCreate(app);
|
||||||
|
return app;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..55db97dc28a1
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -0,0 +1,60 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2021 The Android Open Source Project
|
||||||
|
+ *
|
||||||
|
+ * Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
+ * you may not use this file except in compliance with the License.
|
||||||
|
+ * You may obtain a copy of the License at
|
||||||
|
+ *
|
||||||
|
+ * http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
+ *
|
||||||
|
+ * Unless required by applicable law or agreed to in writing, software
|
||||||
|
+ * distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
+ * See the License for the specific language governing permissions and
|
||||||
|
+ * limitations under the License.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+package com.android.internal.gmscompat;
|
||||||
|
+
|
||||||
|
+import android.app.Application;
|
||||||
|
+import android.os.Build;
|
||||||
|
+import android.os.SystemProperties;
|
||||||
|
+import android.util.Log;
|
||||||
|
+
|
||||||
|
+import java.lang.reflect.Field;
|
||||||
|
+
|
||||||
|
+/** @hide */
|
||||||
|
+public final class AttestationHooks {
|
||||||
|
+ private static final String TAG = "GmsCompat/Attestation";
|
||||||
|
+
|
||||||
|
+ private static final String PACKAGE_GMS = "com.google.android.gms";
|
||||||
|
+
|
||||||
|
+ private AttestationHooks() { }
|
||||||
|
+
|
||||||
|
+ private static void setBuildField(String key, String value) {
|
||||||
|
+ try {
|
||||||
|
+ // Unlock
|
||||||
|
+ Field field = Build.class.getDeclaredField(key);
|
||||||
|
+ field.setAccessible(true);
|
||||||
|
+
|
||||||
|
+ // Edit
|
||||||
|
+ field.set(null, value);
|
||||||
|
+
|
||||||
|
+ // Lock
|
||||||
|
+ field.setAccessible(false);
|
||||||
|
+ } catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
+ Log.e(TAG, "Failed to spoof Build." + key, e);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private static void spoofBuildGms() {
|
||||||
|
+ // Alter model name to avoid hardware attestation enforcement
|
||||||
|
+ setBuildField("MODEL", "Pixel 5a");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
+ if (PACKAGE_GMS.equals(app.getPackageName())) {
|
||||||
|
+ spoofBuildGms();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
-295
@@ -1,295 +0,0 @@
|
|||||||
From c87db4a6ea8c4c399dd92923dd28f2533246c293 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
|
||||||
Date: Mon, 11 Oct 2021 19:24:58 -0700
|
|
||||||
Subject: [PATCH 15/19] SystemUI: Follow light/dark theme in quick settings
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
Change-Id: I3d45b72f0f119e100505409d178ab8f698993881
|
|
||||||
---
|
|
||||||
.../brightness_progress_full_drawable.xml | 2 +-
|
|
||||||
.../qs_footer_action_chip_background.xml | 8 +----
|
|
||||||
.../qs_security_footer_background.xml | 3 +-
|
|
||||||
packages/SystemUI/res/values-night/styles.xml | 12 ++++++++
|
|
||||||
packages/SystemUI/res/values/styles.xml | 10 +++----
|
|
||||||
.../systemui/privacy/OngoingPrivacyChip.kt | 4 +--
|
|
||||||
.../systemui/qs/tileimpl/QSTileViewImpl.kt | 2 +-
|
|
||||||
.../statusbar/phone/ScrimController.java | 2 +-
|
|
||||||
.../systemui/statusbar/phone/ScrimState.java | 30 +++++++++----------
|
|
||||||
9 files changed, 39 insertions(+), 34 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml
|
|
||||||
index 4d9188c40822..1eae667c6e79 100644
|
|
||||||
--- a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml
|
|
||||||
+++ b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml
|
|
||||||
@@ -22,7 +22,7 @@
|
|
||||||
android:height="@dimen/rounded_slider_height">
|
|
||||||
<shape>
|
|
||||||
<size android:height="@dimen/rounded_slider_height" />
|
|
||||||
- <solid android:color="?priv-android:attr/colorAccentPrimary" />
|
|
||||||
+ <solid android:color="?android:attr/colorAccent" />
|
|
||||||
<corners android:radius="@dimen/rounded_slider_corner_radius"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
diff --git a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
|
||||||
index 9076da795e71..3aefc95a98b5 100644
|
|
||||||
--- a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
|
||||||
+++ b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
|
||||||
@@ -28,13 +28,7 @@
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<shape android:shape="rectangle">
|
|
||||||
- <solid android:color="?attr/underSurfaceColor"/>
|
|
||||||
- <corners android:radius="@dimen/qs_footer_action_corner_radius"/>
|
|
||||||
- </shape>
|
|
||||||
- </item>
|
|
||||||
- <item>
|
|
||||||
- <shape android:shape="rectangle">
|
|
||||||
- <stroke android:width="1dp" android:color="?android:attr/colorBackground"/>
|
|
||||||
+ <solid android:color="?attr/offStateColor"/>
|
|
||||||
<corners android:radius="@dimen/qs_footer_action_corner_radius"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
diff --git a/packages/SystemUI/res/drawable/qs_security_footer_background.xml b/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
|
||||||
index 860d23b11439..8f12b95ed4f6 100644
|
|
||||||
--- a/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
|
||||||
+++ b/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
|
||||||
@@ -28,8 +28,7 @@
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<shape android:shape="rectangle">
|
|
||||||
- <stroke android:width="1dp"
|
|
||||||
- android:color="?android:attr/colorBackground"/>
|
|
||||||
+ <solid android:color="?attr/offStateColor"/>
|
|
||||||
<corners android:radius="@dimen/qs_security_footer_corner_radius"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml
|
|
||||||
index dd999837a1ba..3fd6f9cc5454 100644
|
|
||||||
--- a/packages/SystemUI/res/values-night/styles.xml
|
|
||||||
+++ b/packages/SystemUI/res/values-night/styles.xml
|
|
||||||
@@ -24,6 +24,18 @@
|
|
||||||
<item name="android:windowIsFloating">true</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
+ <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
|
||||||
+ <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="offStateColor">@android:color/system_neutral1_800</item>
|
|
||||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_900</item>
|
|
||||||
+ <item name="android:colorBackground">@android:color/system_neutral1_900</item>
|
|
||||||
+ <item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
|
||||||
+ </style>
|
|
||||||
+
|
|
||||||
<style name="TextAppearance.QS.Status" parent="TextAppearance.QS.TileLabel.Secondary">
|
|
||||||
<item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item>
|
|
||||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
|
||||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
|
||||||
index e592fe2dd630..a5ed039bd3fd 100644
|
|
||||||
--- a/packages/SystemUI/res/values/styles.xml
|
|
||||||
+++ b/packages/SystemUI/res/values/styles.xml
|
|
||||||
@@ -398,12 +398,12 @@
|
|
||||||
<style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
|
||||||
<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>
|
|
||||||
- <item name="offStateColor">@android:color/system_neutral1_800</item>
|
|
||||||
- <item name="underSurfaceColor">@android:color/system_neutral1_1000</item>
|
|
||||||
- <item name="android:colorBackground">@android:color/system_neutral1_900</item>
|
|
||||||
+ <item name="offStateColor">@*android:color/surface_light</item>
|
|
||||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_50</item>
|
|
||||||
+ <item name="android:colorBackground">@android:color/system_neutral1_50</item>
|
|
||||||
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@
|
|
||||||
|
|
||||||
<style name="QSCustomizeToolbar" parent="@*android:style/Widget.DeviceDefault.Toolbar">
|
|
||||||
<item name="android:textColor">?android:attr/textColorPrimary</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/privacy/OngoingPrivacyChip.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
|
||||||
index 9cd97ff8e343..461f67935a11 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
|
||||||
@@ -90,8 +90,8 @@ class OngoingPrivacyChip @JvmOverloads constructor(
|
|
||||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_margin)
|
|
||||||
iconSize = context.resources
|
|
||||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_size)
|
|
||||||
- iconColor =
|
|
||||||
- Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.colorPrimary)
|
|
||||||
+ iconColor = context.resources
|
|
||||||
+ .getColor(android.R.color.system_neutral1_900)
|
|
||||||
|
|
||||||
val padding = context.resources
|
|
||||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_side_padding)
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
|
||||||
index 222539d49526..da7c63ff15a3 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
|
||||||
@@ -70,7 +70,7 @@ open class QSTileViewImpl @JvmOverloads constructor(
|
|
||||||
override var heightOverride: Int = HeightOverrideable.NO_OVERRIDE
|
|
||||||
|
|
||||||
private val colorActive = Utils.getColorAttrDefaultColor(context,
|
|
||||||
- com.android.internal.R.attr.colorAccentPrimary)
|
|
||||||
+ android.R.attr.colorAccent)
|
|
||||||
private val colorInactive = Utils.getColorAttrDefaultColor(context, R.attr.offStateColor)
|
|
||||||
private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
|
||||||
index 27c129ad34c5..6bdf82a60e40 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
|
||||||
@@ -692,7 +692,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
|
||||||
mNotificationsAlpha = behindAlpha;
|
|
||||||
mNotificationsTint = behindTint;
|
|
||||||
mBehindAlpha = 1;
|
|
||||||
- mBehindTint = Color.BLACK;
|
|
||||||
+ mBehindTint = Color.TRANSPARENT;
|
|
||||||
} else {
|
|
||||||
mBehindAlpha = behindAlpha;
|
|
||||||
if (mState == ScrimState.SHADE_LOCKED) {
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
|
||||||
index 15b8c67fd4ba..e81642f7d491 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
|
||||||
@@ -88,7 +88,7 @@ public enum ScrimState {
|
|
||||||
mNotifAlpha = mClipQsScrim ? mScrimBehindAlphaKeyguard : 0;
|
|
||||||
mBubbleAlpha = 0;
|
|
||||||
if (mClipQsScrim) {
|
|
||||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
|
||||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
@@ -114,7 +114,7 @@ public enum ScrimState {
|
|
||||||
@Override
|
|
||||||
public void prepare(ScrimState previousState) {
|
|
||||||
mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha;
|
|
||||||
- mBehindTint = mClipQsScrim ? Color.BLACK : Color.TRANSPARENT;
|
|
||||||
+ mBehindTint = Color.TRANSPARENT;
|
|
||||||
mNotifAlpha = mClipQsScrim ? mDefaultScrimAlpha : 0;
|
|
||||||
mNotifTint = Color.TRANSPARENT;
|
|
||||||
mFrontAlpha = 0f;
|
|
||||||
@@ -141,17 +141,17 @@ public enum ScrimState {
|
|
||||||
mNotifAlpha = 1f;
|
|
||||||
mBubbleAlpha = 0f;
|
|
||||||
mFrontAlpha = 0f;
|
|
||||||
- mBehindTint = Color.BLACK;
|
|
||||||
+ mBehindTint = Color.TRANSPARENT;
|
|
||||||
|
|
||||||
if (mClipQsScrim) {
|
|
||||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
|
||||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// to make sure correct color is returned before "prepare" is called
|
|
||||||
@Override
|
|
||||||
public int getBehindTint() {
|
|
||||||
- return Color.BLACK;
|
|
||||||
+ return Color.TRANSPARENT;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
@@ -248,27 +248,27 @@ public enum ScrimState {
|
|
||||||
mAnimateChange = !mLaunchingAffordanceWithPreview && !fromAod;
|
|
||||||
|
|
||||||
mFrontTint = Color.TRANSPARENT;
|
|
||||||
- mBehindTint = Color.BLACK;
|
|
||||||
+ mBehindTint = Color.TRANSPARENT;
|
|
||||||
mBubbleTint = Color.TRANSPARENT;
|
|
||||||
mBlankScreen = false;
|
|
||||||
|
|
||||||
if (previousState == ScrimState.AOD) {
|
|
||||||
// Set all scrims black, before they fade transparent.
|
|
||||||
updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */);
|
|
||||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */);
|
|
||||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT /* tint */);
|
|
||||||
if (mScrimForBubble != null) {
|
|
||||||
updateScrimColor(mScrimForBubble, 1f /* alpha */, Color.BLACK /* tint */);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scrims should still be black at the end of the transition.
|
|
||||||
mFrontTint = Color.BLACK;
|
|
||||||
- mBehindTint = Color.BLACK;
|
|
||||||
+ mBehindTint = Color.TRANSPARENT;
|
|
||||||
mBubbleTint = Color.BLACK;
|
|
||||||
mBlankScreen = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mClipQsScrim) {
|
|
||||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
|
||||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
@@ -290,27 +290,27 @@ public enum ScrimState {
|
|
||||||
mAnimateChange = !mLaunchingAffordanceWithPreview;
|
|
||||||
|
|
||||||
mFrontTint = Color.TRANSPARENT;
|
|
||||||
- mBehindTint = Color.BLACK;
|
|
||||||
- mBubbleTint = Color.BLACK;
|
|
||||||
+ mBehindTint = Color.TRANSPARENT;
|
|
||||||
+ mBubbleTint = Color.TRANSPARENT;
|
|
||||||
mBlankScreen = false;
|
|
||||||
|
|
||||||
if (previousState == ScrimState.AOD) {
|
|
||||||
// Set all scrims black, before they fade transparent.
|
|
||||||
updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */);
|
|
||||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */);
|
|
||||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT /* tint */);
|
|
||||||
if (mScrimForBubble != null) {
|
|
||||||
updateScrimColor(mScrimForBubble, 1f /* alpha */, Color.BLACK /* tint */);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scrims should still be black at the end of the transition.
|
|
||||||
mFrontTint = Color.BLACK;
|
|
||||||
- mBehindTint = Color.BLACK;
|
|
||||||
+ mBehindTint = Color.TRANSPARENT;
|
|
||||||
mBubbleTint = Color.BLACK;
|
|
||||||
mBlankScreen = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mClipQsScrim) {
|
|
||||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
|
||||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
mAnimationDuration = ScrimController.ANIMATION_DURATION;
|
|
||||||
@@ -468,4 +468,4 @@ public enum ScrimState {
|
|
||||||
public void setClipQsScrim(boolean clipsQsScrim) {
|
|
||||||
mClipQsScrim = clipsQsScrim;
|
|
||||||
}
|
|
||||||
-}
|
|
||||||
\ No newline at end of file
|
|
||||||
+}
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
From 57277759d1f5aa1d81f2121bc4d69edfed807cea Mon Sep 17 00:00:00 2001
|
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
|
||||||
Date: Mon, 11 Oct 2021 19:25:02 -0700
|
|
||||||
Subject: [PATCH 16/19] SystemUI: Initialize QS tiles in inactive state
|
|
||||||
|
|
||||||
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 77018d736163..9e02b140175b 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
|
|
||||||
@@ -148,7 +148,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.25.1
|
|
||||||
|
|
||||||
+93
@@ -0,0 +1,93 @@
|
|||||||
|
From dc4bd0f140c6946e01e0a3c31bfc71c884138981 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Date: Mon, 11 Oct 2021 20:00:44 -0700
|
||||||
|
Subject: [PATCH 16/22] keystore: Block key attestation for SafetyNet
|
||||||
|
|
||||||
|
SafetyNet (part of Google Play Services) opportunistically uses
|
||||||
|
hardware-backed key attestation via KeyStore as a strong integrity
|
||||||
|
check. This causes SafetyNet to fail on custom ROMs because the verified
|
||||||
|
boot key and bootloader unlock state can be detected from attestation
|
||||||
|
certificates.
|
||||||
|
|
||||||
|
As a workaround, we can take advantage of the fact that SafetyNet's
|
||||||
|
usage of key attestation is opportunistic (i.e. falls back to basic
|
||||||
|
integrity checks if it fails) and prevent it from getting the
|
||||||
|
attestation certificate chain from KeyStore. This is done by checking
|
||||||
|
the stack for DroidGuard, which is the codename for SafetyNet, and
|
||||||
|
pretending that the device doesn't support key attestation.
|
||||||
|
|
||||||
|
Key attestation has only been blocked for SafetyNet specifically, as
|
||||||
|
Google Play Services and other apps have many valid reasons to use it.
|
||||||
|
For example, it appears to be involved in Google's mobile security key
|
||||||
|
ferature.
|
||||||
|
|
||||||
|
Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
|
||||||
|
---
|
||||||
|
.../internal/gmscompat/AttestationHooks.java | 15 +++++++++++++++
|
||||||
|
.../security/keystore2/AndroidKeyStoreSpi.java | 3 +++
|
||||||
|
2 files changed, 18 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 55db97dc28a1..f2c85c82821f 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -22,12 +22,14 @@ import android.os.SystemProperties;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
+import java.util.Arrays;
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public final class AttestationHooks {
|
||||||
|
private static final String TAG = "GmsCompat/Attestation";
|
||||||
|
|
||||||
|
private static final String PACKAGE_GMS = "com.google.android.gms";
|
||||||
|
+ private static volatile boolean sIsGms = false;
|
||||||
|
|
||||||
|
private AttestationHooks() { }
|
||||||
|
|
||||||
|
@@ -54,7 +56,20 @@ public final class AttestationHooks {
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
if (PACKAGE_GMS.equals(app.getPackageName())) {
|
||||||
|
+ sIsGms = true;
|
||||||
|
spoofBuildGms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ private static boolean isCallerSafetyNet() {
|
||||||
|
+ return Arrays.stream(Thread.currentThread().getStackTrace())
|
||||||
|
+ .anyMatch(elem -> elem.getClassName().contains("DroidGuard"));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public static void onEngineGetCertificateChain() {
|
||||||
|
+ // Check stack for SafetyNet
|
||||||
|
+ if (sIsGms && isCallerSafetyNet()) {
|
||||||
|
+ throw new UnsupportedOperationException();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
|
||||||
|
index 33411e1ec5b9..133a4094d434 100644
|
||||||
|
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
|
||||||
|
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
|
||||||
|
@@ -42,6 +42,7 @@ import android.system.keystore2.ResponseCode;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
|
+import com.android.internal.gmscompat.AttestationHooks;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
@@ -164,6 +165,8 @@ public class AndroidKeyStoreSpi extends KeyStoreSpi {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Certificate[] engineGetCertificateChain(String alias) {
|
||||||
|
+ AttestationHooks.onEngineGetCertificateChain();
|
||||||
|
+
|
||||||
|
KeyEntryResponse response = getKeyMetadata(alias);
|
||||||
|
|
||||||
|
if (response == null || response.metadata.certificate == null) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
From 05bc5fa10b4e2ebc539c32db04abbc995906ff05 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Date: Mon, 1 Nov 2021 20:06:48 -0700
|
||||||
|
Subject: [PATCH 17/22] Limit SafetyNet workarounds to unstable GMS process
|
||||||
|
|
||||||
|
The unstable process is where SafetyNet attestation actually runs, so
|
||||||
|
we only need to spoof the model in that process. Leaving other processes
|
||||||
|
fixes various issues caused by model detection and flag provisioning,
|
||||||
|
including screen-off Voice Match in Google Assistant, broken At a Glance
|
||||||
|
weather and settings on Android 12, and more.
|
||||||
|
|
||||||
|
Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
|
||||||
|
---
|
||||||
|
.../com/android/internal/gmscompat/AttestationHooks.java | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index f2c85c82821f..37ce8c946de6 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -29,6 +29,8 @@ public final class AttestationHooks {
|
||||||
|
private static final String TAG = "GmsCompat/Attestation";
|
||||||
|
|
||||||
|
private static final String PACKAGE_GMS = "com.google.android.gms";
|
||||||
|
+ private static final String PROCESS_UNSTABLE = "com.google.android.gms.unstable";
|
||||||
|
+
|
||||||
|
private static volatile boolean sIsGms = false;
|
||||||
|
|
||||||
|
private AttestationHooks() { }
|
||||||
|
@@ -55,7 +57,8 @@ public final class AttestationHooks {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
- if (PACKAGE_GMS.equals(app.getPackageName())) {
|
||||||
|
+ if (PACKAGE_GMS.equals(app.getPackageName()) &&
|
||||||
|
+ PROCESS_UNSTABLE.equals(Application.getProcessName())) {
|
||||||
|
sIsGms = true;
|
||||||
|
spoofBuildGms();
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
-147
@@ -1,147 +0,0 @@
|
|||||||
From d8e58fc80da5875d4a909d349413a4308a35a272 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Danny Lin <danny@kdrag0n.dev>
|
|
||||||
Date: Mon, 11 Oct 2021 19:25:08 -0700
|
|
||||||
Subject: [PATCH 17/19] SystemUI: Add dual-tone light and dark themes for QS
|
|
||||||
|
|
||||||
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
|
|
||||||
---
|
|
||||||
.../res/color/surface_header_dark_sysui.xml | 18 ++++++++++++++++++
|
|
||||||
core/res/res/values-night/values.xml | 1 +
|
|
||||||
packages/SystemUI/res/values/styles.xml | 2 +-
|
|
||||||
.../statusbar/phone/ScrimController.java | 13 ++++++++++++-
|
|
||||||
4 files changed, 32 insertions(+), 2 deletions(-)
|
|
||||||
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/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
|
||||||
index a5ed039bd3fd..bb258ab18f82 100644
|
|
||||||
--- a/packages/SystemUI/res/values/styles.xml
|
|
||||||
+++ b/packages/SystemUI/res/values/styles.xml
|
|
||||||
@@ -402,7 +402,7 @@
|
|
||||||
<item name="android:windowIsFloating">true</item>
|
|
||||||
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
|
||||||
<item name="offStateColor">@*android:color/surface_light</item>
|
|
||||||
- <item name="underSurfaceColor">@android:color/system_neutral1_50</item>
|
|
||||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_100</item>
|
|
||||||
<item name="android:colorBackground">@android:color/system_neutral1_50</item>
|
|
||||||
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
|
||||||
</style>
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
|
||||||
index 6bdf82a60e40..cc1c8e6255b8 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
|
||||||
@@ -186,6 +186,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
|
||||||
private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
|
||||||
|
|
||||||
private GradientColors mColors;
|
|
||||||
+ private GradientColors mBehindColors;
|
|
||||||
private boolean mNeedsDrawableColorUpdate;
|
|
||||||
|
|
||||||
private float mScrimBehindAlphaKeyguard = KEYGUARD_SCRIM_ALPHA;
|
|
||||||
@@ -284,6 +285,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
|
||||||
});
|
|
||||||
|
|
||||||
mColors = new GradientColors();
|
|
||||||
+ mBehindColors = new GradientColors();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -851,7 +853,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
|
||||||
&& !mBlankScreen;
|
|
||||||
|
|
||||||
mScrimInFront.setColors(mColors, animateScrimInFront);
|
|
||||||
- mScrimBehind.setColors(mColors, animateBehindScrim);
|
|
||||||
+ mScrimBehind.setColors(mBehindColors, animateBehindScrim);
|
|
||||||
mNotificationsScrim.setColors(mColors, animateScrimNotifications);
|
|
||||||
|
|
||||||
dispatchBackScrimState(mScrimBehind.getViewAlpha());
|
|
||||||
@@ -1207,11 +1209,20 @@ 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);
|
|
||||||
mColors.setSupportsDarkText(
|
|
||||||
ColorUtils.calculateContrast(mColors.getMainColor(), Color.WHITE) > 4.5);
|
|
||||||
+
|
|
||||||
+ mBehindColors.setMainColor(surfaceBackground);
|
|
||||||
+ mBehindColors.setSecondaryColor(accent);
|
|
||||||
+ mBehindColors.setSupportsDarkText(
|
|
||||||
+ ColorUtils.calculateContrast(mBehindColors.getMainColor(), Color.WHITE) > 4.5);
|
|
||||||
+
|
|
||||||
mNeedsDrawableColorUpdate = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
From ace6036332743c6f1a5614b2fd573464ddbffef7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Date: Tue, 23 Aug 2022 18:57:05 +0200
|
||||||
|
Subject: [PATCH 18/22] gmscompat: Apply the SafetyNet workaround to Play Store
|
||||||
|
aswell
|
||||||
|
|
||||||
|
Play Store is used for the new Play Integrity API, extend the hack
|
||||||
|
to it aswell
|
||||||
|
|
||||||
|
Test: Device Integrity and Basic Integrity passes.
|
||||||
|
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
|
||||||
|
---
|
||||||
|
.../android/internal/gmscompat/AttestationHooks.java | 12 ++++++++++++
|
||||||
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 37ce8c946de6..65469239a0c6 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -29,9 +29,11 @@ public final class AttestationHooks {
|
||||||
|
private static final String TAG = "GmsCompat/Attestation";
|
||||||
|
|
||||||
|
private static final String PACKAGE_GMS = "com.google.android.gms";
|
||||||
|
+ private static final String PACKAGE_FINSKY = "com.android.vending";
|
||||||
|
private static final String PROCESS_UNSTABLE = "com.google.android.gms.unstable";
|
||||||
|
|
||||||
|
private static volatile boolean sIsGms = false;
|
||||||
|
+ private static volatile boolean sIsFinsky = false;
|
||||||
|
|
||||||
|
private AttestationHooks() { }
|
||||||
|
|
||||||
|
@@ -62,6 +64,11 @@ public final class AttestationHooks {
|
||||||
|
sIsGms = true;
|
||||||
|
spoofBuildGms();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if (PACKAGE_FINSKY.equals(app.getPackageName())) {
|
||||||
|
+ sIsFinsky = true;
|
||||||
|
+ spoofBuildGms();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isCallerSafetyNet() {
|
||||||
|
@@ -74,5 +81,10 @@ public final class AttestationHooks {
|
||||||
|
if (sIsGms && isCallerSafetyNet()) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Check stack for PlayIntegrity
|
||||||
|
+ if (sIsFinsky) {
|
||||||
|
+ throw new UnsupportedOperationException();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
From e6bb7fa0f413c0f68bd021bca26fac6a060e52b1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: SagarMakhar <sagarmakhar@gmail.com>
|
|
||||||
Date: Sat, 6 Nov 2021 13:16:24 +0000
|
|
||||||
Subject: [PATCH 19/19] Fix QS clock being white on light theme
|
|
||||||
|
|
||||||
Steps to reproduce without this commit:
|
|
||||||
- Turn off dark theme
|
|
||||||
- Play a song and wait for media player to show in QS
|
|
||||||
- Confirm clock text color is white
|
|
||||||
|
|
||||||
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
|
|
||||||
Change-Id: I62aeba57e1ce458c73752faa1c9d80d26a63f625
|
|
||||||
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
|
|
||||||
---
|
|
||||||
.../systemui/qs/QuickStatusBarHeaderController.java | 13 -------------
|
|
||||||
1 file changed, 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java
|
|
||||||
index 18d6e646b007..7aa668440b4b 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java
|
|
||||||
@@ -22,10 +22,8 @@ import android.view.View.OnClickListener;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
-import com.android.internal.colorextraction.ColorExtractor;
|
|
||||||
import com.android.internal.logging.UiEventLogger;
|
|
||||||
import com.android.systemui.R;
|
|
||||||
-import com.android.systemui.colorextraction.SysuiColorExtractor;
|
|
||||||
import com.android.systemui.demomode.DemoMode;
|
|
||||||
import com.android.systemui.demomode.DemoModeController;
|
|
||||||
import com.android.systemui.plugins.ActivityStarter;
|
|
||||||
@@ -83,9 +81,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
|
|
||||||
private final String mMicSlot;
|
|
||||||
private final String mLocationSlot;
|
|
||||||
|
|
||||||
- private SysuiColorExtractor mColorExtractor;
|
|
||||||
- private ColorExtractor.OnColorsChangedListener mOnColorsChangedListener;
|
|
||||||
-
|
|
||||||
private PrivacyItemController.Callback mPICCallback = new PrivacyItemController.Callback() {
|
|
||||||
@Override
|
|
||||||
public void onPrivacyItemsChanged(@NonNull List<PrivacyItem> privacyItems) {
|
|
||||||
@@ -135,7 +130,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
|
|
||||||
QuickQSPanelController quickQSPanelController,
|
|
||||||
QSCarrierGroupController.Builder qsCarrierGroupControllerBuilder,
|
|
||||||
PrivacyLogger privacyLogger,
|
|
||||||
- SysuiColorExtractor colorExtractor,
|
|
||||||
PrivacyDialogController privacyDialogController,
|
|
||||||
QSExpansionPathInterpolator qsExpansionPathInterpolator,
|
|
||||||
FeatureFlags featureFlags,
|
|
||||||
@@ -168,12 +162,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
|
|
||||||
|
|
||||||
mIconManager = new StatusBarIconController.TintedIconManager(mIconContainer, featureFlags);
|
|
||||||
mDemoModeReceiver = new ClockDemoModeReceiver(mClockView);
|
|
||||||
- mColorExtractor = colorExtractor;
|
|
||||||
- mOnColorsChangedListener = (extractor, which) -> {
|
|
||||||
- final boolean lightTheme = mColorExtractor.getNeutralColors().supportsDarkText();
|
|
||||||
- mClockView.onColorsChanged(lightTheme);
|
|
||||||
- };
|
|
||||||
- mColorExtractor.addOnColorsChangedListener(mOnColorsChangedListener);
|
|
||||||
|
|
||||||
mCameraSlot = getResources().getString(com.android.internal.R.string.status_bar_camera);
|
|
||||||
mMicSlot = getResources().getString(com.android.internal.R.string.status_bar_microphone);
|
|
||||||
@@ -223,7 +211,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onViewDetached() {
|
|
||||||
- mColorExtractor.removeOnColorsChangedListener(mOnColorsChangedListener);
|
|
||||||
mPrivacyChip.setOnClickListener(null);
|
|
||||||
mStatusBarIconController.removeIconGroup(mIconManager);
|
|
||||||
mQSCarrierGroupController.setOnSingleCarrierChangedListener(null);
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
From d67897a23c6e182294d6a6d137d7ccc430a1abe0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Date: Thu, 8 Sep 2022 14:39:52 +0200
|
||||||
|
Subject: [PATCH 19/22] gmscompat: Use Nexus 6P fingerprint for CTS/Integrity
|
||||||
|
|
||||||
|
Google seems to have patched the KM block to Play Store in record time,
|
||||||
|
but is still not enforced for anything under android N.
|
||||||
|
|
||||||
|
Since we moved to angler FP we don't need to spoof model to Play Store
|
||||||
|
anymore, however the KM block is still needed.
|
||||||
|
|
||||||
|
Test: Run Play Intregrity Attestation
|
||||||
|
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1
|
||||||
|
---
|
||||||
|
.../com/android/internal/gmscompat/AttestationHooks.java | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 65469239a0c6..328d9777b2a2 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -54,8 +54,9 @@ public final class AttestationHooks {
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void spoofBuildGms() {
|
||||||
|
- // Alter model name to avoid hardware attestation enforcement
|
||||||
|
- setBuildField("MODEL", "Pixel 5a");
|
||||||
|
+ // Alter model name and fingerprint to avoid hardware attestation enforcement
|
||||||
|
+ setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
|
||||||
|
+ setBuildField("MODEL", "Nexus 6P");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
@@ -67,7 +68,6 @@ public final class AttestationHooks {
|
||||||
|
|
||||||
|
if (PACKAGE_FINSKY.equals(app.getPackageName())) {
|
||||||
|
sIsFinsky = true;
|
||||||
|
- spoofBuildGms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From 7893f246007a1989420583ab8728a5ced89e944d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Date: Tue, 6 Dec 2022 15:59:08 +0100
|
||||||
|
Subject: [PATCH 20/22] gmscompat: Use actual device model name
|
||||||
|
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6
|
||||||
|
---
|
||||||
|
core/java/com/android/internal/gmscompat/AttestationHooks.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 328d9777b2a2..7649bb6533da 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -56,7 +56,7 @@ public final class AttestationHooks {
|
||||||
|
private static void spoofBuildGms() {
|
||||||
|
// Alter model name and fingerprint to avoid hardware attestation enforcement
|
||||||
|
setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
|
||||||
|
- setBuildField("MODEL", "Nexus 6P");
|
||||||
|
+ setBuildField("MODEL", Build.MODEL + "\u200b");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+57
@@ -0,0 +1,57 @@
|
|||||||
|
From dd5e4484df6868958941773ac310396b281e5ceb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anirudh Gupta <anirudhgupta109@aosip.dev>
|
||||||
|
Date: Wed, 4 Jan 2023 18:20:56 +0000
|
||||||
|
Subject: [PATCH 21/22] gmscompat: Set shipping level to 32 for devices >=33
|
||||||
|
|
||||||
|
If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
|
||||||
|
setting it to 32 allows for software attestation and passing CTS
|
||||||
|
|
||||||
|
Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
---
|
||||||
|
.../internal/gmscompat/AttestationHooks.java | 18 ++++++++++++++++++
|
||||||
|
1 file changed, 18 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index 7649bb6533da..d2b1d2879c9c 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -18,6 +18,7 @@ package com.android.internal.gmscompat;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import android.os.Build;
|
||||||
|
+import android.os.Build.VERSION;
|
||||||
|
import android.os.SystemProperties;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
@@ -53,10 +54,27 @@ public final class AttestationHooks {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private static void setVersionField(String key, Integer value) {
|
||||||
|
+ try {
|
||||||
|
+ // Unlock
|
||||||
|
+ Field field = Build.VERSION.class.getDeclaredField(key);
|
||||||
|
+ field.setAccessible(true);
|
||||||
|
+
|
||||||
|
+ // Edit
|
||||||
|
+ field.set(null, value);
|
||||||
|
+
|
||||||
|
+ // Lock
|
||||||
|
+ field.setAccessible(false);
|
||||||
|
+ } catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
+ Log.e(TAG, "Failed to spoof Build." + key, e);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
private static void spoofBuildGms() {
|
||||||
|
// Alter model name and fingerprint to avoid hardware attestation enforcement
|
||||||
|
setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
|
||||||
|
setBuildField("MODEL", Build.MODEL + "\u200b");
|
||||||
|
+ setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.S);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
From 4ffed064b21d9662631ee70d20dfd8441fcec574 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
Date: Wed, 8 Feb 2023 15:21:01 +0000
|
||||||
|
Subject: [PATCH 22/22] gmscompat: Make CTS/Play Integrity pass again
|
||||||
|
|
||||||
|
The logic behind CTS and Play Integrity has been updated today it now
|
||||||
|
checks the product and model names against the fingerprint and if
|
||||||
|
they do not match the CTS profile will fail.
|
||||||
|
|
||||||
|
Also while we are at it use a newer FP from Pixel XL and add logging
|
||||||
|
for key attestation blocking for debugging.
|
||||||
|
|
||||||
|
Test: Boot, check for CTS and Play Integrity
|
||||||
|
|
||||||
|
Change-Id: I089d5ef935bba40338e10c795ea7d181103ffd15
|
||||||
|
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
|
||||||
|
---
|
||||||
|
.../internal/gmscompat/AttestationHooks.java | 20 +++++++++----------
|
||||||
|
1 file changed, 9 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
index d2b1d2879c9c..ef7a308a25bc 100644
|
||||||
|
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
|
||||||
|
@@ -72,9 +72,11 @@ public final class AttestationHooks {
|
||||||
|
|
||||||
|
private static void spoofBuildGms() {
|
||||||
|
// Alter model name and fingerprint to avoid hardware attestation enforcement
|
||||||
|
- setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
|
||||||
|
- setBuildField("MODEL", Build.MODEL + "\u200b");
|
||||||
|
- setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.S);
|
||||||
|
+ setBuildField("FINGERPRINT", "google/marlin/marlin:7.1.2/NJH47F/4146041:user/release-keys");
|
||||||
|
+ setBuildField("PRODUCT", "marlin");
|
||||||
|
+ setBuildField("DEVICE", "marlin");
|
||||||
|
+ setBuildField("MODEL", "Pixel XL");
|
||||||
|
+ setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.N_MR1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initApplicationBeforeOnCreate(Application app) {
|
||||||
|
@@ -90,18 +92,14 @@ public final class AttestationHooks {
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isCallerSafetyNet() {
|
||||||
|
- return Arrays.stream(Thread.currentThread().getStackTrace())
|
||||||
|
+ return sIsGms && Arrays.stream(Thread.currentThread().getStackTrace())
|
||||||
|
.anyMatch(elem -> elem.getClassName().contains("DroidGuard"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void onEngineGetCertificateChain() {
|
||||||
|
- // Check stack for SafetyNet
|
||||||
|
- if (sIsGms && isCallerSafetyNet()) {
|
||||||
|
- throw new UnsupportedOperationException();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // Check stack for PlayIntegrity
|
||||||
|
- if (sIsFinsky) {
|
||||||
|
+ // Check stack for SafetyNet or Play Integrity
|
||||||
|
+ if (isCallerSafetyNet() || sIsFinsky) {
|
||||||
|
+ Log.i(TAG, "Blocked key attestation sIsGms=" + sIsGms + " sIsFinsky=" + sIsFinsky);
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
From a7c48516ef7fddb7c71566299daf2bdab72e3bcd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Tue, 26 Oct 2021 08:16:00 +0000
|
|
||||||
Subject: [PATCH] [TEMP] Build fixes for Android 12
|
|
||||||
|
|
||||||
---
|
|
||||||
Android.mk | 6 ++++--
|
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Android.mk b/Android.mk
|
|
||||||
index d5b099a2f..efc60d309 100644
|
|
||||||
--- a/Android.mk
|
|
||||||
+++ b/Android.mk
|
|
||||||
@@ -51,12 +51,14 @@ LOCAL_SHARED_LIBRARIES += \
|
|
||||||
libjni_trueportrait \
|
|
||||||
libjni_filtergenerator
|
|
||||||
|
|
||||||
-LOCAL_REQUIRED_MODULES := libts_detected_face_jni libts_face_beautify_jni
|
|
||||||
-
|
|
||||||
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
|
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES += org.apache.http.legacy
|
|
||||||
|
|
||||||
+LOCAL_OPTIONAL_USES_LIBRARIES := \
|
|
||||||
+ com.google.android.media.effects \
|
|
||||||
+ org.apache.http.legacy
|
|
||||||
+
|
|
||||||
LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
From 6f9026e0548bd82e7b728ef29dd7d14db93b2105 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Sat, 26 Jun 2021 14:23:09 +0000
|
|
||||||
Subject: [PATCH] Jelly: MainActivity: Restore applyThemeColor
|
|
||||||
|
|
||||||
Fixes black statusbar on start
|
|
||||||
|
|
||||||
Change-Id: I6816f5b1dcb3c7bcaee2736a9e2a3ecd63217bc6
|
|
||||||
---
|
|
||||||
app/src/main/java/org/lineageos/jelly/MainActivity.kt | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/app/src/main/java/org/lineageos/jelly/MainActivity.kt b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
|
||||||
index 2902b0a..9ff74ed 100644
|
|
||||||
--- a/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
|
||||||
+++ b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
|
||||||
@@ -193,6 +193,7 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
|
|
||||||
findViewById(R.id.search_menu_cancel),
|
|
||||||
this)
|
|
||||||
setUiMode()
|
|
||||||
+ applyThemeColor(mThemeColor)
|
|
||||||
try {
|
|
||||||
val httpCacheDir = File(cacheDir, "suggestion_responses")
|
|
||||||
val httpCacheSize = 1024 * 1024.toLong() // 1 MiB
|
|
||||||
@@ -763,4 +764,4 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
|
|
||||||
private const val STORAGE_PERM_REQ = 423
|
|
||||||
private const val LOCATION_PERM_REQ = 424
|
|
||||||
}
|
|
||||||
-}
|
|
||||||
\ No newline at end of file
|
|
||||||
+}
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+18
-18
@@ -1,4 +1,4 @@
|
|||||||
From 10a8d7cb2306f928abc91fbeb24f3b6fc6aa9057 Mon Sep 17 00:00:00 2001
|
From 3dda22bc6cad9da7d937218f157fe762dafb5d7d Mon Sep 17 00:00:00 2001
|
||||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 13 Jan 2019 21:44:48 +0800
|
Date: Sun, 13 Jan 2019 21:44:48 +0800
|
||||||
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
|
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
|
||||||
@@ -14,10 +14,10 @@ Change-Id: Icb02c8dfd84882f736e37d6cd92c35e5eb288faa
|
|||||||
6 files changed, 11 insertions(+), 11 deletions(-)
|
6 files changed, 11 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
diff --git a/res/layout/long_screen_layout.xml b/res/layout/long_screen_layout.xml
|
diff --git a/res/layout/long_screen_layout.xml b/res/layout/long_screen_layout.xml
|
||||||
index 40d0938..1119cef 100644
|
index 3252c10..ed4efd9 100644
|
||||||
--- a/res/layout/long_screen_layout.xml
|
--- a/res/layout/long_screen_layout.xml
|
||||||
+++ b/res/layout/long_screen_layout.xml
|
+++ b/res/layout/long_screen_layout.xml
|
||||||
@@ -36,7 +36,7 @@
|
@@ -25,7 +25,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
@@ -27,13 +27,13 @@ index 40d0938..1119cef 100644
|
|||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
|
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
|
||||||
index 37d129d..97600b8 100644
|
index 9823209..a15a439 100644
|
||||||
--- a/res/values-zh-rCN/strings.xml
|
--- a/res/values-zh-rCN/strings.xml
|
||||||
+++ b/res/values-zh-rCN/strings.xml
|
+++ b/res/values-zh-rCN/strings.xml
|
||||||
@@ -446,9 +446,9 @@
|
@@ -456,9 +456,9 @@
|
||||||
<string name="auto_power_save_summary_on">电量 %s 时自动启用省电</string>
|
<string name="display_rotation_90_title">90 度</string>
|
||||||
<string name="auto_power_save_summary_off">不要自动启用省电</string>
|
<string name="display_rotation_180_title">180 度</string>
|
||||||
<string name="auto_power_save_never">永不</string>
|
<string name="display_rotation_270_title">270 度</string>
|
||||||
- <string name="long_screen_settings_title">全屏应用</string>
|
- <string name="long_screen_settings_title">全屏应用</string>
|
||||||
- <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
|
- <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
|
||||||
- <string name="long_screen_settings_no_apps">无应用</string>
|
- <string name="long_screen_settings_no_apps">无应用</string>
|
||||||
@@ -44,10 +44,10 @@ index 37d129d..97600b8 100644
|
|||||||
<string name="charging_sounds_enable_title">启用充电提示音</string>
|
<string name="charging_sounds_enable_title">启用充电提示音</string>
|
||||||
<string name="charging_sounds_summary">连接或断开电源时发出声音</string>
|
<string name="charging_sounds_summary">连接或断开电源时发出声音</string>
|
||||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
index efb9fbf..dda3125 100644
|
index 0358a7e..5996a8f 100644
|
||||||
--- a/res/values/strings.xml
|
--- a/res/values/strings.xml
|
||||||
+++ b/res/values/strings.xml
|
+++ b/res/values/strings.xml
|
||||||
@@ -563,9 +563,9 @@
|
@@ -579,9 +579,9 @@
|
||||||
<string name="display_rotation_270_title">270 degrees</string>
|
<string name="display_rotation_270_title">270 degrees</string>
|
||||||
|
|
||||||
<!-- Applications: Long screen -->
|
<!-- Applications: Long screen -->
|
||||||
@@ -61,22 +61,22 @@ index efb9fbf..dda3125 100644
|
|||||||
<!-- Sounds: Charging sounds -->
|
<!-- Sounds: Charging sounds -->
|
||||||
<string name="charging_sounds_settings_title">Charging sounds</string>
|
<string name="charging_sounds_settings_title">Charging sounds</string>
|
||||||
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
|
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
|
||||||
index ec947fa..20da90a 100644
|
index 9a4f7bb..ece52c9 100644
|
||||||
--- a/res/xml/long_screen_prefs.xml
|
--- a/res/xml/long_screen_prefs.xml
|
||||||
+++ b/res/xml/long_screen_prefs.xml
|
+++ b/res/xml/long_screen_prefs.xml
|
||||||
@@ -18,6 +18,6 @@
|
@@ -6,6 +6,6 @@
|
||||||
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:lineage="http://schemas.android.com/apk/res/org.lineageos.lineageparts"
|
|
||||||
android:key="long_screen_settings"
|
android:key="long_screen_settings"
|
||||||
- android:title="@string/long_screen_settings_title">
|
- android:title="@string/long_screen_settings_title">
|
||||||
+ android:title="@string/inverse_long_screen_settings_title">
|
+ android:title="@string/inverse_long_screen_settings_title">
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
|
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
|
||||||
index 803b214..6f61e9d 100644
|
index d6b19c0..6e65a31 100644
|
||||||
--- a/res/xml/parts_catalog.xml
|
--- a/res/xml/parts_catalog.xml
|
||||||
+++ b/res/xml/parts_catalog.xml
|
+++ b/res/xml/parts_catalog.xml
|
||||||
@@ -81,8 +81,8 @@
|
@@ -75,8 +75,8 @@
|
||||||
lineage:xmlRes="@xml/power_menu_settings" />
|
lineage:xmlRes="@xml/power_menu_settings" />
|
||||||
|
|
||||||
<part android:key="long_screen_settings"
|
<part android:key="long_screen_settings"
|
||||||
@@ -88,10 +88,10 @@ index 803b214..6f61e9d 100644
|
|||||||
lineage:xmlRes="@xml/long_screen_prefs" />
|
lineage:xmlRes="@xml/long_screen_prefs" />
|
||||||
|
|
||||||
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
index ac04058..50ff8f6 100644
|
index 7155e12..4b89260 100644
|
||||||
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||||
@@ -246,7 +246,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
|
@@ -222,7 +222,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
|
||||||
mApplicationsState.ensureIcon(entry);
|
mApplicationsState.ensureIcon(entry);
|
||||||
holder.icon.setImageDrawable(entry.icon);
|
holder.icon.setImageDrawable(entry.icon);
|
||||||
holder.state.setTag(entry);
|
holder.state.setTag(entry);
|
||||||
@@ -101,5 +101,5 @@ index ac04058..50ff8f6 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+15
-3
@@ -1,4 +1,4 @@
|
|||||||
From 3f7f3f9546f9f23d66381f7dff887cd562285ce6 Mon Sep 17 00:00:00 2001
|
From c93f729acb568f290085cea4014fbe384ec40289 Mon Sep 17 00:00:00 2001
|
||||||
From: Paul Keith <javelinanddart@gmail.com>
|
From: Paul Keith <javelinanddart@gmail.com>
|
||||||
Date: Tue, 30 Oct 2018 15:46:18 +0100
|
Date: Tue, 30 Oct 2018 15:46:18 +0100
|
||||||
Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
|
Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
|
||||||
@@ -7,6 +7,7 @@ Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
|
|||||||
Change-Id: I7194dca022e5062926fa35709de282721ca64320
|
Change-Id: I7194dca022e5062926fa35709de282721ca64320
|
||||||
---
|
---
|
||||||
res/drawable/ic_wear_read.xml | 9 +++++++++
|
res/drawable/ic_wear_read.xml | 9 +++++++++
|
||||||
|
res/values-zh-rCN/cm_strings.xml | 1 +
|
||||||
res/values/cm_strings.xml | 3 +++
|
res/values/cm_strings.xml | 3 +++
|
||||||
.../messaging/datamodel/BugleNotifications.java | 14 ++++++++++++++
|
.../messaging/datamodel/BugleNotifications.java | 14 ++++++++++++++
|
||||||
.../datamodel/MessageNotificationState.java | 8 ++++++++
|
.../datamodel/MessageNotificationState.java | 8 ++++++++
|
||||||
@@ -14,7 +15,7 @@ Change-Id: I7194dca022e5062926fa35709de282721ca64320
|
|||||||
.../messaging/receiver/NotificationReceiver.java | 12 +++++++++++-
|
.../messaging/receiver/NotificationReceiver.java | 12 +++++++++++-
|
||||||
src/com/android/messaging/ui/UIIntents.java | 11 +++++++++++
|
src/com/android/messaging/ui/UIIntents.java | 11 +++++++++++
|
||||||
src/com/android/messaging/ui/UIIntentsImpl.java | 14 ++++++++++++++
|
src/com/android/messaging/ui/UIIntentsImpl.java | 14 ++++++++++++++
|
||||||
8 files changed, 81 insertions(+), 2 deletions(-)
|
9 files changed, 82 insertions(+), 2 deletions(-)
|
||||||
create mode 100644 res/drawable/ic_wear_read.xml
|
create mode 100644 res/drawable/ic_wear_read.xml
|
||||||
|
|
||||||
diff --git a/res/drawable/ic_wear_read.xml b/res/drawable/ic_wear_read.xml
|
diff --git a/res/drawable/ic_wear_read.xml b/res/drawable/ic_wear_read.xml
|
||||||
@@ -32,6 +33,17 @@ index 0000000..9d017e6
|
|||||||
+ android:fillColor="#ffffff"
|
+ android:fillColor="#ffffff"
|
||||||
+ android:pathData="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z" />
|
+ android:pathData="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z" />
|
||||||
+</vector>
|
+</vector>
|
||||||
|
diff --git a/res/values-zh-rCN/cm_strings.xml b/res/values-zh-rCN/cm_strings.xml
|
||||||
|
index 3cfebff..f1ffeab 100644
|
||||||
|
--- a/res/values-zh-rCN/cm_strings.xml
|
||||||
|
+++ b/res/values-zh-rCN/cm_strings.xml
|
||||||
|
@@ -19,5 +19,6 @@
|
||||||
|
<string name="swipe_to_delete_conversation_pref_summary">向右滑动以删除会话</string>
|
||||||
|
<string name="show_emoticons_pref_title">访问表情符号</string>
|
||||||
|
<string name="show_emoticons_pref_summary">在键盘上显示表情符号键</string>
|
||||||
|
+ <string name="notification_mark_as_read">标记为已读</string>
|
||||||
|
<string name="notification_channel_messages_title">短信</string>
|
||||||
|
</resources>
|
||||||
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
||||||
index f285555..858f093 100644
|
index f285555..858f093 100644
|
||||||
--- a/res/values/cm_strings.xml
|
--- a/res/values/cm_strings.xml
|
||||||
@@ -219,5 +231,5 @@ index d64082d..9281899 100644
|
|||||||
* Gets a PendingIntent associated with an Intent to start an Activity. All notifications
|
* Gets a PendingIntent associated with an Intent to start an Activity. All notifications
|
||||||
* that starts an Activity must use this method to get a PendingIntent, which achieves two
|
* that starts an Activity must use this method to get a PendingIntent, which achieves two
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+82
-297
@@ -1,47 +1,37 @@
|
|||||||
From 0fdc4088295718c69121443e5b0fee5d213babd2 Mon Sep 17 00:00:00 2001
|
From 316e6779dde5db01258fcf5139e1d4a33933b114 Mon Sep 17 00:00:00 2001
|
||||||
From: Vachounet <vachounet@live.fr>
|
From: Vachounet <vachounet@live.fr>
|
||||||
Date: Mon, 26 Oct 2020 17:05:18 +0100
|
Date: Mon, 26 Oct 2020 17:05:18 +0100
|
||||||
Subject: [PATCH] Trebuchet: Move clear all button to actions view
|
Subject: [PATCH] Trebuchet: Move clear all button to actions view
|
||||||
|
|
||||||
|
@AndyCGYan: Instead of removing the original, hide it in a simple way
|
||||||
|
|
||||||
Change-Id: I7a0b2729c163169f7606ad4644870d07d5165e8e
|
Change-Id: I7a0b2729c163169f7606ad4644870d07d5165e8e
|
||||||
---
|
---
|
||||||
.../ic_clear_all_recents.xml} | 20 +++---
|
.../res/drawable/ic_recents_clear_all.xml | 18 ++++++++++++++++++
|
||||||
.../res/layout/overview_actions_container.xml | 17 ++++-
|
.../res/layout/overview_actions_container.xml | 17 ++++++++++++++++-
|
||||||
.../RecentsViewStateController.java | 4 --
|
.../quickstep/fallback/RecentsState.java | 2 +-
|
||||||
.../FallbackRecentsStateController.java | 4 --
|
.../quickstep/views/LauncherRecentsView.java | 3 +--
|
||||||
.../android/quickstep/views/RecentsView.java | 64 ++-----------------
|
.../android/quickstep/views/RecentsView.java | 6 +++++-
|
||||||
5 files changed, 31 insertions(+), 78 deletions(-)
|
5 files changed, 41 insertions(+), 5 deletions(-)
|
||||||
rename quickstep/res/{layout/overview_clear_all_button.xml => drawable/ic_clear_all_recents.xml} (52%)
|
create mode 100644 quickstep/res/drawable/ic_recents_clear_all.xml
|
||||||
|
|
||||||
diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/drawable/ic_clear_all_recents.xml
|
diff --git a/quickstep/res/drawable/ic_recents_clear_all.xml b/quickstep/res/drawable/ic_recents_clear_all.xml
|
||||||
similarity index 52%
|
new file mode 100644
|
||||||
rename from quickstep/res/layout/overview_clear_all_button.xml
|
index 0000000000..2ad0bb824d
|
||||||
rename to quickstep/res/drawable/ic_clear_all_recents.xml
|
--- /dev/null
|
||||||
index 1ee726e62e..7cba0220b0 100644
|
+++ b/quickstep/res/drawable/ic_recents_clear_all.xml
|
||||||
--- a/quickstep/res/layout/overview_clear_all_button.xml
|
@@ -0,0 +1,18 @@
|
||||||
+++ b/quickstep/res/drawable/ic_clear_all_recents.xml
|
|
||||||
@@ -1,6 +1,4 @@
|
|
||||||
-<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
-<!--
|
|
||||||
- Copyright (C) 2018 The Android Open Source Project
|
|
||||||
+<!-- Copyright (C) 2020 The Android Open Source Project
|
+<!-- Copyright (C) 2020 The Android Open Source Project
|
||||||
|
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
+ you may not use this file except in compliance with the License.
|
||||||
you may not use this file except in compliance with the License.
|
+ You may obtain a copy of the License at
|
||||||
@@ -14,12 +12,10 @@
|
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
See the License for the specific language governing permissions and
|
+ Unless required by applicable law or agreed to in writing, software
|
||||||
limitations under the License.
|
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
-->
|
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
-<com.android.quickstep.views.ClearAllButton
|
+ See the License for the specific language governing permissions and
|
||||||
- xmlns:android="http://schemas.android.com/apk/res/android"
|
+ limitations under the License.
|
||||||
- style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
+-->
|
||||||
- android:id="@+id/clear_all"
|
|
||||||
- android:layout_width="wrap_content"
|
|
||||||
- android:layout_height="wrap_content"
|
|
||||||
- android:text="@string/recents_clear_all"
|
|
||||||
- android:textColor="?android:attr/textColorPrimary"
|
|
||||||
- android:textSize="14sp" />
|
|
||||||
\ No newline at end of file
|
|
||||||
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
+ android:height="24dp"
|
+ android:height="24dp"
|
||||||
+ android:width="24dp"
|
+ android:width="24dp"
|
||||||
@@ -50,133 +40,95 @@ index 1ee726e62e..7cba0220b0 100644
|
|||||||
+ <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" />
|
+ <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" />
|
||||||
+</vector>
|
+</vector>
|
||||||
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
|
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
|
||||||
index b652252ce1..f12cad6875 100644
|
index 0fda0bf8d4..9a6f5ae062 100644
|
||||||
--- a/quickstep/res/layout/overview_actions_container.xml
|
--- a/quickstep/res/layout/overview_actions_container.xml
|
||||||
+++ b/quickstep/res/layout/overview_actions_container.xml
|
+++ b/quickstep/res/layout/overview_actions_container.xml
|
||||||
@@ -46,6 +46,21 @@
|
@@ -40,6 +40,21 @@
|
||||||
android:layout_height="1dp"
|
android:text="@string/action_screenshot"
|
||||||
android:layout_weight="1" />
|
android:theme="@style/ThemeControlHighlightWorkspaceColor" />
|
||||||
|
|
||||||
|
+ <Space
|
||||||
|
+ android:id="@+id/action_clear_all_space"
|
||||||
|
+ android:layout_width="@dimen/overview_actions_button_spacing"
|
||||||
|
+ android:layout_height="1dp" />
|
||||||
|
+
|
||||||
+ <Button
|
+ <Button
|
||||||
|
+ android:id="@+id/action_clear_all"
|
||||||
+ style="@style/OverviewActionButton"
|
+ style="@style/OverviewActionButton"
|
||||||
+ android:id="@+id/clear_all"
|
|
||||||
+ android:layout_width="wrap_content"
|
+ android:layout_width="wrap_content"
|
||||||
+ android:layout_height="wrap_content"
|
+ android:layout_height="wrap_content"
|
||||||
|
+ android:drawableStart="@drawable/ic_recents_clear_all"
|
||||||
+ android:text="@string/recents_clear_all"
|
+ android:text="@string/recents_clear_all"
|
||||||
+ android:theme="@style/ThemeControlHighlightWorkspaceColor"
|
+ android:theme="@style/ThemeControlHighlightWorkspaceColor"
|
||||||
+ android:drawableStart="@drawable/ic_clear_all_recents"
|
|
||||||
+ />
|
+ />
|
||||||
+
|
+
|
||||||
+ <Space
|
<Space
|
||||||
+ android:layout_width="0dp"
|
android:id="@+id/action_split_space"
|
||||||
+ android:layout_height="1dp"
|
android:layout_width="@dimen/overview_actions_button_spacing"
|
||||||
+ android:layout_weight="1" />
|
@@ -68,4 +83,4 @@
|
||||||
+
|
|
||||||
<Button
|
|
||||||
android:id="@+id/action_share"
|
|
||||||
style="@style/OverviewActionButton"
|
|
||||||
@@ -64,4 +79,4 @@
|
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
-</com.android.quickstep.views.OverviewActionsView>
|
-</com.android.quickstep.views.OverviewActionsView>
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
+</com.android.quickstep.views.OverviewActionsView>
|
+</com.android.quickstep.views.OverviewActionsView>
|
||||||
diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
||||||
index 996d36aadc..459a2c77f1 100644
|
index 8b5f091e11..601021b5bf 100644
|
||||||
--- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
||||||
+++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
|
||||||
@@ -40,7 +40,6 @@ import com.android.launcher3.anim.PendingAnimation;
|
@@ -106,7 +106,7 @@ public class RecentsState implements BaseState<RecentsState> {
|
||||||
import com.android.launcher3.anim.PropertySetter;
|
* For this state, whether clear all button should be shown.
|
||||||
import com.android.launcher3.states.StateAnimationConfig;
|
*/
|
||||||
import com.android.launcher3.util.MultiValueAlpha;
|
public boolean hasClearAllButton() {
|
||||||
-import com.android.quickstep.views.ClearAllButton;
|
- return hasFlag(FLAG_CLEAR_ALL_BUTTON);
|
||||||
import com.android.quickstep.views.LauncherRecentsView;
|
+ return false;
|
||||||
import com.android.quickstep.views.RecentsView;
|
}
|
||||||
|
|
||||||
@@ -103,9 +102,6 @@ public final class RecentsViewStateController extends
|
|
||||||
|
|
||||||
private void setAlphas(PropertySetter propertySetter, StateAnimationConfig config,
|
|
||||||
LauncherState state) {
|
|
||||||
- float clearAllButtonAlpha = state.areElementsVisible(mLauncher, CLEAR_ALL_BUTTON) ? 1 : 0;
|
|
||||||
- propertySetter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
|
|
||||||
- clearAllButtonAlpha, LINEAR);
|
|
||||||
float overviewButtonAlpha = state.areElementsVisible(mLauncher, OVERVIEW_ACTIONS)
|
|
||||||
&& mRecentsView.shouldShowOverviewActionsForState(state) ? 1 : 0;
|
|
||||||
propertySetter.setFloat(mLauncher.getActionsView().getVisibilityAlpha(),
|
|
||||||
diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
|
||||||
index f0364eb410..7c60d9f5af 100644
|
|
||||||
--- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
|
||||||
+++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
|
||||||
@@ -36,7 +36,6 @@ import com.android.launcher3.statemanager.StateManager.StateHandler;
|
|
||||||
import com.android.launcher3.states.StateAnimationConfig;
|
|
||||||
import com.android.launcher3.util.MultiValueAlpha;
|
|
||||||
import com.android.quickstep.RecentsActivity;
|
|
||||||
-import com.android.quickstep.views.ClearAllButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State controller for fallback recents activity
|
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
||||||
@@ -74,9 +73,6 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
|
index 6c27587058..dbaf180e68 100644
|
||||||
|
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
||||||
private void setProperties(RecentsState state, StateAnimationConfig config,
|
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
|
||||||
PropertySetter setter) {
|
@@ -143,8 +143,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher
|
||||||
- float clearAllButtonAlpha = state.hasClearAllButton() ? 1 : 0;
|
super.setOverviewStateEnabled(enabled);
|
||||||
- setter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
|
if (enabled) {
|
||||||
- clearAllButtonAlpha, LINEAR);
|
LauncherState state = mActivity.getStateManager().getState();
|
||||||
float overviewButtonAlpha =
|
- boolean hasClearAllButton = (state.getVisibleElements(mActivity)
|
||||||
state.hasOverviewActions() && mRecentsView.shouldShowOverviewActionsForState(state)
|
- & CLEAR_ALL_BUTTON) != 0;
|
||||||
? 1 : 0;
|
+ boolean hasClearAllButton = false;
|
||||||
|
setDisallowScrollToClearAll(!hasClearAllButton);
|
||||||
|
}
|
||||||
|
if (mActivity.getDesktopVisibilityController() != null) {
|
||||||
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
index ce79125be1..b447166d6e 100644
|
index 5e645ea917..0dc0b3b62e 100644
|
||||||
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
@@ -96,6 +96,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
|
@@ -117,6 +117,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
|
||||||
import android.view.accessibility.AccessibilityEvent;
|
import android.view.accessibility.AccessibilityEvent;
|
||||||
import android.view.accessibility.AccessibilityNodeInfo;
|
import android.view.accessibility.AccessibilityNodeInfo;
|
||||||
import android.view.animation.Interpolator;
|
import android.view.animation.Interpolator;
|
||||||
+import android.widget.Button;
|
+import android.widget.Button;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.OverScroller;
|
import android.widget.OverScroller;
|
||||||
@@ -378,8 +379,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
import android.widget.Toast;
|
||||||
|
@@ -472,6 +473,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
private final RecentsModel mModel;
|
private final RecentsModel mModel;
|
||||||
private final int mRowSpacing;
|
private final int mSplitPlaceholderSize;
|
||||||
private final int mGridSideMargin;
|
private final int mSplitPlaceholderInset;
|
||||||
- private final ClearAllButton mClearAllButton;
|
+ private Button mActionClearAllButton;
|
||||||
- private final Rect mClearAllButtonDeadZoneRect = new Rect();
|
private final ClearAllButton mClearAllButton;
|
||||||
+ private Button mClearAllButton;
|
private final Rect mClearAllButtonDeadZoneRect = new Rect();
|
||||||
private final Rect mTaskViewDeadZoneRect = new Rect();
|
private final Rect mTaskViewDeadZoneRect = new Rect();
|
||||||
/**
|
@@ -976,6 +978,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
* Reflects if Recents is currently in the middle of a gesture
|
|
||||||
@@ -593,9 +593,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
mModel = RecentsModel.INSTANCE.get(context);
|
|
||||||
mIdp = InvariantDeviceProfile.INSTANCE.get(context);
|
|
||||||
|
|
||||||
- mClearAllButton = (ClearAllButton) LayoutInflater.from(context)
|
|
||||||
- .inflate(R.layout.overview_clear_all_button, this, false);
|
|
||||||
- mClearAllButton.setOnClickListener(this::dismissAllTasks);
|
|
||||||
mTaskViewPool = new ViewPool<>(context, this, R.layout.task, 20 /* max size */,
|
|
||||||
10 /* initial size */);
|
|
||||||
|
|
||||||
@@ -769,6 +766,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
mActionsView = actionsView;
|
mActionsView = actionsView;
|
||||||
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
|
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
|
||||||
mSplitPlaceholderView = splitPlaceholderView;
|
mSplitSelectStateController = splitController;
|
||||||
+ mClearAllButton = (Button) mActionsView.findViewById(R.id.clear_all);
|
+ mActionClearAllButton = (Button) mActionsView.findViewById(R.id.action_clear_all);
|
||||||
+ mClearAllButton.setOnClickListener(this::dismissAllTasks);
|
+ mActionClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SplitPlaceholderView getSplitPlaceholder() {
|
public SplitSelectStateController getSplitSelectController() {
|
||||||
@@ -910,7 +909,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
@@ -1342,7 +1346,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
}
|
|
||||||
|
|
||||||
private void updateTaskStartIndex(View affectingView) {
|
|
||||||
- if (!(affectingView instanceof TaskView) && !(affectingView instanceof ClearAllButton)) {
|
|
||||||
+ if (!(affectingView instanceof TaskView)) {
|
|
||||||
int childCount = getChildCount();
|
|
||||||
|
|
||||||
mTaskViewStartIndex = 0;
|
|
||||||
@@ -975,7 +974,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
* button fully visible, center page is Clear All button.
|
* button fully visible, center page is Clear All button.
|
||||||
*/
|
*/
|
||||||
public boolean isClearAllHidden() {
|
public boolean isClearAllHidden() {
|
||||||
@@ -185,173 +137,6 @@ index ce79125be1..b447166d6e 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1044,11 +1043,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
mTouchDownToStartHome = true;
|
|
||||||
} else {
|
|
||||||
updateDeadZoneRects();
|
|
||||||
- final boolean clearAllButtonDeadZoneConsumed =
|
|
||||||
- mClearAllButton.getAlpha() == 1
|
|
||||||
- && mClearAllButtonDeadZoneRect.contains(x, y);
|
|
||||||
final boolean cameFromNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
|
|
||||||
- if (!clearAllButtonDeadZoneConsumed && !cameFromNavBar
|
|
||||||
+ if (!cameFromNavBar
|
|
||||||
&& !mTaskViewDeadZoneRect.contains(x + getScrollX(), y)) {
|
|
||||||
mTouchDownToStartHome = true;
|
|
||||||
}
|
|
||||||
@@ -1123,18 +1119,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
|
|
||||||
final int requiredTaskCount = tasks.size();
|
|
||||||
if (getTaskViewCount() != requiredTaskCount) {
|
|
||||||
- if (indexOfChild(mClearAllButton) != -1) {
|
|
||||||
- removeView(mClearAllButton);
|
|
||||||
- }
|
|
||||||
for (int i = getTaskViewCount(); i < requiredTaskCount; i++) {
|
|
||||||
addView(mTaskViewPool.getView());
|
|
||||||
}
|
|
||||||
while (getTaskViewCount() > requiredTaskCount) {
|
|
||||||
removeView(getChildAt(getChildCount() - 1));
|
|
||||||
}
|
|
||||||
- if (requiredTaskCount > 0) {
|
|
||||||
- addView(mClearAllButton);
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rebind and reset all task views
|
|
||||||
@@ -1184,16 +1174,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
for (int i = getTaskViewCount() - 1; i >= 0; i--) {
|
|
||||||
removeView(getTaskViewAt(i));
|
|
||||||
}
|
|
||||||
- if (indexOfChild(mClearAllButton) != -1) {
|
|
||||||
- removeView(mClearAllButton);
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getTaskViewCount() {
|
|
||||||
int taskViewCount = getChildCount() - mTaskViewStartIndex;
|
|
||||||
- if (indexOfChild(mClearAllButton) != -1) {
|
|
||||||
- taskViewCount--;
|
|
||||||
- }
|
|
||||||
return taskViewCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1249,7 +1233,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
for (int i = 0; i < taskCount; i++) {
|
|
||||||
getTaskViewAt(i).setFullscreenProgress(mFullscreenProgress);
|
|
||||||
}
|
|
||||||
- mClearAllButton.setFullscreenProgress(fullscreenProgress);
|
|
||||||
|
|
||||||
// Fade out the actions view quickly (0.1 range)
|
|
||||||
mActionsView.getFullscreenAlpha().setValue(
|
|
||||||
@@ -1298,10 +1281,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
setLayoutDirection(mIsRtl
|
|
||||||
? View.LAYOUT_DIRECTION_RTL
|
|
||||||
: View.LAYOUT_DIRECTION_LTR);
|
|
||||||
- mClearAllButton.setLayoutDirection(mIsRtl
|
|
||||||
- ? View.LAYOUT_DIRECTION_LTR
|
|
||||||
- : View.LAYOUT_DIRECTION_RTL);
|
|
||||||
- mClearAllButton.setRotation(mOrientationHandler.getDegreesRotated());
|
|
||||||
|
|
||||||
if (forceRecreateDragLayerControllers
|
|
||||||
|| !mOrientationHandler.equals(oldOrientationHandler)) {
|
|
||||||
@@ -1390,8 +1369,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
accumulatedTranslationX += mIsRtl ? widthDiff : -widthDiff;
|
|
||||||
}
|
|
||||||
|
|
||||||
- mClearAllButton.setFullscreenTranslationPrimary(accumulatedTranslationX);
|
|
||||||
-
|
|
||||||
updateGridProperties();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1473,7 +1450,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int scroll = mOrientationHandler.getPrimaryScroll(this);
|
|
||||||
- mClearAllButton.onRecentsViewScroll(scroll, mOverviewGridEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@@ -1819,9 +1795,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
// Add an empty view for now until the task plan is loaded and applied
|
|
||||||
final TaskView taskView = mTaskViewPool.getView();
|
|
||||||
addView(taskView, mTaskViewStartIndex);
|
|
||||||
- if (wasEmpty) {
|
|
||||||
- addView(mClearAllButton);
|
|
||||||
- }
|
|
||||||
// The temporary running task is only used for the duration between the start of the
|
|
||||||
// gesture and the task list is loaded and applied
|
|
||||||
mTmpRunningTask = Task.from(new TaskKey(runningTaskInfo), runningTaskInfo, false);
|
|
||||||
@@ -2152,12 +2125,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- mClearAllButton.setGridTranslationPrimary(
|
|
||||||
- clearAllTotalTranslationX - snappedTaskGridTranslationX);
|
|
||||||
- mClearAllButton.setGridScrollOffset(
|
|
||||||
- mIsRtl ? mLastComputedTaskSize.left - mLastComputedGridSize.left
|
|
||||||
- : mLastComputedTaskSize.right - mLastComputedGridSize.right);
|
|
||||||
-
|
|
||||||
setGridProgress(mGridProgress);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2190,7 +2157,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
for (int i = 0; i < taskCount; i++) {
|
|
||||||
getTaskViewAt(i).setGridProgress(gridProgress);
|
|
||||||
}
|
|
||||||
- mClearAllButton.setGridProgress(gridProgress);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void enableLayoutTransitions() {
|
|
||||||
@@ -2452,7 +2418,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
removeViewInLayout(taskView);
|
|
||||||
|
|
||||||
if (getTaskViewCount() == 0) {
|
|
||||||
- removeViewInLayout(mClearAllButton);
|
|
||||||
startHome();
|
|
||||||
} else {
|
|
||||||
snapToPageImmediately(pageToSnapTo);
|
|
||||||
@@ -2661,7 +2626,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
child.setStableAlpha(alpha);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- mClearAllButton.setContentAlpha(mContentAlpha);
|
|
||||||
int alphaInt = Math.round(alpha * 255);
|
|
||||||
mEmptyMessagePaint.setAlpha(alphaInt);
|
|
||||||
mEmptyIcon.setAlpha(alphaInt);
|
|
||||||
@@ -3132,15 +3096,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateDeadZoneRects() {
|
|
||||||
- // Get the deadzone rect surrounding the clear all button to not dismiss overview to home
|
|
||||||
- mClearAllButtonDeadZoneRect.setEmpty();
|
|
||||||
- if (mClearAllButton.getWidth() > 0) {
|
|
||||||
- int verticalMargin = getResources()
|
|
||||||
- .getDimensionPixelSize(R.dimen.recents_clear_all_deadzone_vertical_margin);
|
|
||||||
- mClearAllButton.getHitRect(mClearAllButtonDeadZoneRect);
|
|
||||||
- mClearAllButtonDeadZoneRect.inset(-getPaddingRight() / 2, -verticalMargin);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
// Get the deadzone rect between the task views
|
|
||||||
mTaskViewDeadZoneRect.setEmpty();
|
|
||||||
int count = getTaskViewCount();
|
|
||||||
@@ -3548,7 +3503,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
if (layoutChildren) {
|
|
||||||
int clearAllWidthDiff = mOrientationHandler.getPrimaryValue(mTaskWidth, mTaskHeight)
|
|
||||||
- mOrientationHandler.getPrimarySize(mClearAllButton);
|
|
||||||
- mClearAllButton.setScrollOffsetPrimary(mIsRtl ? clearAllWidthDiff : -clearAllWidthDiff);
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean pageScrollChanged = false;
|
|
||||||
@@ -3596,10 +3550,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|
||||||
showAsFullscreen()));
|
|
||||||
}
|
|
||||||
|
|
||||||
- public ClearAllButton getClearAllButton() {
|
|
||||||
- return mClearAllButton;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
/**
|
|
||||||
* @return How many pixels the running task is offset on the currently laid out dominant axis.
|
|
||||||
*/
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -1,8 +1,8 @@
|
|||||||
From 8613949607345b954525b24dedc843f5039ac781 Mon Sep 17 00:00:00 2001
|
From 80d66b7f255176e7cf761ce9c62c436cb729df71 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 5 Sep 2019 02:08:22 +0000
|
Date: Thu, 5 Sep 2019 02:08:22 +0000
|
||||||
Subject: [PATCH] vendor_lineage: Log privapp-permissions whitelist violations
|
Subject: [PATCH 1/2] vendor_lineage: Log privapp-permissions whitelist
|
||||||
instead
|
violations instead
|
||||||
|
|
||||||
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
|
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
|
||||||
---
|
---
|
||||||
@@ -10,10 +10,10 @@ Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
|
|||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/config/common.mk b/config/common.mk
|
diff --git a/config/common.mk b/config/common.mk
|
||||||
index 9cc39324..fcf13b2b 100644
|
index 7048c9cb..9dc5c710 100644
|
||||||
--- a/config/common.mk
|
--- a/config/common.mk
|
||||||
+++ b/config/common.mk
|
+++ b/config/common.mk
|
||||||
@@ -78,9 +78,9 @@ PRODUCT_COPY_FILES += \
|
@@ -74,9 +74,9 @@ PRODUCT_COPY_FILES += \
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/org.lineageos.android.xml
|
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/org.lineageos.android.xml
|
||||||
|
|
||||||
@@ -23,8 +23,8 @@ index 9cc39324..fcf13b2b 100644
|
|||||||
- ro.control_privapp_permissions=enforce
|
- ro.control_privapp_permissions=enforce
|
||||||
+ ro.control_privapp_permissions=log
|
+ ro.control_privapp_permissions=log
|
||||||
|
|
||||||
# Include AOSP audio files
|
ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
|
||||||
include vendor/lineage/config/aosp_audio.mk
|
# Lineage SDK
|
||||||
--
|
--
|
||||||
2.25.1
|
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
|
||||||
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
From facde4b2b88c2ced8092714df21c4e09751ca1da Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Tue, 30 Nov 2021 12:58:00 +0000
|
|
||||||
Subject: [PATCH] SearchLauncher: Adapt to Trebuchet
|
|
||||||
|
|
||||||
---
|
|
||||||
apps/SearchLauncher/Android.mk | 4 ++--
|
|
||||||
apps/SearchLauncher/AndroidManifest.xml | 3 ++-
|
|
||||||
.../quickstep/res/layout/search_container_all_apps.xml | 2 +-
|
|
||||||
3 files changed, 5 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/apps/SearchLauncher/Android.mk b/apps/SearchLauncher/Android.mk
|
|
||||||
index a9f182a..6b90364 100644
|
|
||||||
--- a/apps/SearchLauncher/Android.mk
|
|
||||||
+++ b/apps/SearchLauncher/Android.mk
|
|
||||||
@@ -20,7 +20,7 @@ include $(BUILD_PREBUILT)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# Relative path for Launcher3 directory
|
|
||||||
-LAUNCHER_PATH := ../../../../packages/apps/Launcher3
|
|
||||||
+LAUNCHER_PATH := ../../../../packages/apps/Trebuchet
|
|
||||||
|
|
||||||
LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := lib_launcherClient
|
|
||||||
@@ -59,7 +59,7 @@ include $(BUILD_PACKAGE)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
# Relative path for Launcher3 directory
|
|
||||||
-LAUNCHER_PATH := ../../../../packages/apps/Launcher3
|
|
||||||
+LAUNCHER_PATH := ../../../../packages/apps/Trebuchet
|
|
||||||
|
|
||||||
LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
|
||||||
diff --git a/apps/SearchLauncher/AndroidManifest.xml b/apps/SearchLauncher/AndroidManifest.xml
|
|
||||||
index d5ffded..a9b5597 100644
|
|
||||||
--- a/apps/SearchLauncher/AndroidManifest.xml
|
|
||||||
+++ b/apps/SearchLauncher/AndroidManifest.xml
|
|
||||||
@@ -55,7 +55,8 @@
|
|
||||||
android:label="@string/derived_app_name"
|
|
||||||
android:largeHeap="@bool/config_largeHeap"
|
|
||||||
android:restoreAnyVersion="true"
|
|
||||||
- android:supportsRtl="true" >
|
|
||||||
+ android:supportsRtl="true"
|
|
||||||
+ tools:replace="android:icon" >
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name="com.android.searchlauncher.SearchLauncher"
|
|
||||||
diff --git a/apps/SearchLauncher/quickstep/res/layout/search_container_all_apps.xml b/apps/SearchLauncher/quickstep/res/layout/search_container_all_apps.xml
|
|
||||||
index 1fae132..82ccf38 100644
|
|
||||||
--- a/apps/SearchLauncher/quickstep/res/layout/search_container_all_apps.xml
|
|
||||||
+++ b/apps/SearchLauncher/quickstep/res/layout/search_container_all_apps.xml
|
|
||||||
@@ -47,7 +47,7 @@
|
|
||||||
android:scrollHorizontally="true"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
- android:textColorHint="@drawable/all_apps_search_hint"
|
|
||||||
+ android:textColorHint="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:visibility="invisible" />
|
|
||||||
</com.android.searchlauncher.HotseatQsbWidget>
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+7
-7
@@ -1,4 +1,4 @@
|
|||||||
From 996084a373929cf6ba65bdfe5d984328c0448ccc Mon Sep 17 00:00:00 2001
|
From 45ce666776f48f82151a4fc3c8a3219f3e4c210f Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 20 Jun 2021 09:08:43 +0000
|
Date: Sun, 20 Jun 2021 09:08:43 +0000
|
||||||
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2)
|
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2)
|
||||||
@@ -9,7 +9,7 @@ Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61
|
|||||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
|
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
|
||||||
index f0627a307..032636014 100755
|
index c00e1e98b..490d15215 100755
|
||||||
--- a/tools/buildinfo.sh
|
--- a/tools/buildinfo.sh
|
||||||
+++ b/tools/buildinfo.sh
|
+++ b/tools/buildinfo.sh
|
||||||
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then
|
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then
|
||||||
@@ -21,7 +21,7 @@ index f0627a307..032636014 100755
|
|||||||
echo "ro.build.version.incremental=$BUILD_NUMBER"
|
echo "ro.build.version.incremental=$BUILD_NUMBER"
|
||||||
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
|
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
|
||||||
echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
|
echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
|
||||||
@@ -21,7 +21,7 @@ echo "ro.build.version.release_or_codename=$PLATFORM_VERSION"
|
@@ -23,7 +23,7 @@ echo "ro.build.version.release_or_preview_display=$PLATFORM_DISPLAY_VERSION"
|
||||||
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
|
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
|
||||||
echo "ro.build.version.base_os=$PLATFORM_BASE_OS"
|
echo "ro.build.version.base_os=$PLATFORM_BASE_OS"
|
||||||
echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION"
|
echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION"
|
||||||
@@ -30,13 +30,13 @@ index f0627a307..032636014 100755
|
|||||||
echo "ro.build.date.utc=`$DATE +%s`"
|
echo "ro.build.date.utc=`$DATE +%s`"
|
||||||
echo "ro.build.type=$TARGET_BUILD_TYPE"
|
echo "ro.build.type=$TARGET_BUILD_TYPE"
|
||||||
echo "ro.build.user=$BUILD_USERNAME"
|
echo "ro.build.user=$BUILD_USERNAME"
|
||||||
@@ -56,5 +56,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then
|
@@ -58,5 +58,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "ro.lineage.device=$LINEAGE_DEVICE"
|
echo "ro.lineage.device=$LINEAGE_DEVICE"
|
||||||
+echo "ro.lineage.version=LineageOS 19.0 Self-built CGMod"
|
+echo "ro.lineage.version=LineageOS 20 Self-built CGMod"
|
||||||
+echo "ro.lineage.display.version=LineageOS 19.0 Self-built CGMod"
|
+echo "ro.lineage.display.version=LineageOS 20 Self-built CGMod"
|
||||||
+echo "ro.modversion=LineageOS 19.0 Self-built CGMod"
|
+echo "ro.modversion=LineageOS 20 Self-built CGMod"
|
||||||
+
|
+
|
||||||
+echo "lockscreen.rot_override=true"
|
+echo "lockscreen.rot_override=true"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From c33bf332540e7057d1d9f7491bf345658965aae9 Mon Sep 17 00:00:00 2001
|
From 1c0c37fd29fb20537eca319cd5c3874127414d8a Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 16 Oct 2021 00:39:15 +0000
|
Date: Sat, 16 Oct 2021 00:39:15 +0000
|
||||||
Subject: [PATCH 2/2] build: Remove Stk (1/2)
|
Subject: [PATCH 2/2] build: Remove Stk (1/2)
|
||||||
@@ -9,7 +9,7 @@ Change-Id: I24ef17c74c3137a11b463cde96c74d0edc853edd
|
|||||||
1 file changed, 1 deletion(-)
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
|
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
|
||||||
index f13c9db4d..a559e244d 100644
|
index 1a639ef71..49a080076 100644
|
||||||
--- a/target/product/generic_system.mk
|
--- a/target/product/generic_system.mk
|
||||||
+++ b/target/product/generic_system.mk
|
+++ b/target/product/generic_system.mk
|
||||||
@@ -32,7 +32,6 @@ PRODUCT_PACKAGES += \
|
@@ -32,7 +32,6 @@ PRODUCT_PACKAGES += \
|
||||||
|
|||||||
@@ -1,173 +0,0 @@
|
|||||||
From 5598980edbd93751dc3c006d9d88b1b0e70170cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Wed, 27 Oct 2021 14:38:37 +0000
|
|
||||||
Subject: [PATCH 01/16] Add LineageMonetAccentOverlay
|
|
||||||
|
|
||||||
Applies the signature teal of LineageOS (#167C80) when Monet is absent - thanks @kdrag0n
|
|
||||||
|
|
||||||
Change-Id: Ib93b2bc68a08dfe12a7c3f503dcc62cce098b459
|
|
||||||
---
|
|
||||||
packages/overlays/Android.mk | 1 +
|
|
||||||
.../LineageMonetAccentOverlay/Android.bp | 28 ++++++++
|
|
||||||
.../AndroidManifest.xml | 22 ++++++
|
|
||||||
.../res/values/config.xml | 72 +++++++++++++++++++
|
|
||||||
4 files changed, 123 insertions(+)
|
|
||||||
create mode 100644 packages/overlays/LineageMonetAccentOverlay/Android.bp
|
|
||||||
create mode 100644 packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
|
|
||||||
create mode 100644 packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
|
|
||||||
|
|
||||||
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
|
|
||||||
index 3a114bc8ec79..15c55d3d588e 100644
|
|
||||||
--- a/packages/overlays/Android.mk
|
|
||||||
+++ b/packages/overlays/Android.mk
|
|
||||||
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \
|
|
||||||
DisplayCutoutEmulationTallOverlay \
|
|
||||||
DisplayCutoutEmulationWaterfallOverlay \
|
|
||||||
FontNotoSerifSourceOverlay \
|
|
||||||
+ LineageMonetAccentOverlay \
|
|
||||||
NavigationBarMode3ButtonOverlay \
|
|
||||||
NavigationBarModeGesturalOverlay \
|
|
||||||
NavigationBarModeGesturalOverlayNarrowBack \
|
|
||||||
diff --git a/packages/overlays/LineageMonetAccentOverlay/Android.bp b/packages/overlays/LineageMonetAccentOverlay/Android.bp
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..e4da9231dc7c
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/packages/overlays/LineageMonetAccentOverlay/Android.bp
|
|
||||||
@@ -0,0 +1,28 @@
|
|
||||||
+//
|
|
||||||
+// Copyright 2021, The Android Open Source Project
|
|
||||||
+//
|
|
||||||
+// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
+// you may not use this file except in compliance with the License.
|
|
||||||
+// You may obtain a copy of the License at
|
|
||||||
+//
|
|
||||||
+// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
+//
|
|
||||||
+// Unless required by applicable law or agreed to in writing, software
|
|
||||||
+// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
+// See the License for the specific language governing permissions and
|
|
||||||
+// limitations under the License.
|
|
||||||
+//
|
|
||||||
+package {
|
|
||||||
+ // See: http://go/android-license-faq
|
|
||||||
+ // A large-scale-change added 'default_applicable_licenses' to import
|
|
||||||
+ // all of the 'license_kinds' from "frameworks_base_license"
|
|
||||||
+ // to get the below license kinds:
|
|
||||||
+ // SPDX-license-identifier-Apache-2.0
|
|
||||||
+ default_applicable_licenses: ["frameworks_base_license"],
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+runtime_resource_overlay {
|
|
||||||
+ name: "LineageMonetAccentOverlay",
|
|
||||||
+ product_specific: true,
|
|
||||||
+}
|
|
||||||
diff --git a/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml b/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..11062b67bc61
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
|
|
||||||
@@ -0,0 +1,22 @@
|
|
||||||
+<!--
|
|
||||||
+ ~ Copyright (C) 2021 The Android Open Source Project
|
|
||||||
+ ~
|
|
||||||
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
+ ~ you may not use this file except in compliance with the License.
|
|
||||||
+ ~ You may obtain a copy of the License at
|
|
||||||
+ ~
|
|
||||||
+ ~ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
+ ~
|
|
||||||
+ ~ Unless required by applicable law or agreed to in writing, software
|
|
||||||
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
+ ~ See the License for the specific language governing permissions and
|
|
||||||
+ ~ limitations under the License.
|
|
||||||
+ -->
|
|
||||||
+
|
|
||||||
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
+ package="org.lineageos.overlay.accent.monet"
|
|
||||||
+ android:versionCode="1"
|
|
||||||
+ android:versionName="1.0">
|
|
||||||
+ <overlay android:targetPackage="android" android:priority="0" android:isStatic="true"/>
|
|
||||||
+</manifest>
|
|
||||||
diff --git a/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml b/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..4777409bb587
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
|
|
||||||
@@ -0,0 +1,72 @@
|
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
+<resources>
|
|
||||||
+ <color name="system_accent1_0">#FFFFFF</color>
|
|
||||||
+ <color name="system_accent1_10">#EFFFFF</color>
|
|
||||||
+ <color name="system_accent1_50">#B4FDFF</color>
|
|
||||||
+ <color name="system_accent1_100">#6EF6FC</color>
|
|
||||||
+ <color name="system_accent1_200">#4CD9E0</color>
|
|
||||||
+ <color name="system_accent1_300">#1EBDC4</color>
|
|
||||||
+ <color name="system_accent1_400">#00A1A7</color>
|
|
||||||
+ <color name="system_accent1_500">#008388</color>
|
|
||||||
+ <color name="system_accent1_600">#00696E</color>
|
|
||||||
+ <color name="system_accent1_700">#004F53</color>
|
|
||||||
+ <color name="system_accent1_800">#00373A</color>
|
|
||||||
+ <color name="system_accent1_900">#002022</color>
|
|
||||||
+ <color name="system_accent1_1000">#000000</color>
|
|
||||||
+
|
|
||||||
+ <color name="system_accent2_0">#FFFFFF</color>
|
|
||||||
+ <color name="system_accent2_10">#EFFFFF</color>
|
|
||||||
+ <color name="system_accent2_50">#DAF6F7</color>
|
|
||||||
+ <color name="system_accent2_100">#CCE8E8</color>
|
|
||||||
+ <color name="system_accent2_200">#B0CCCC</color>
|
|
||||||
+ <color name="system_accent2_300">#96B0B1</color>
|
|
||||||
+ <color name="system_accent2_400">#7B9697</color>
|
|
||||||
+ <color name="system_accent2_500">#617B7C</color>
|
|
||||||
+ <color name="system_accent2_600">#496364</color>
|
|
||||||
+ <color name="system_accent2_700">#324B4D</color>
|
|
||||||
+ <color name="system_accent2_800">#1B3436</color>
|
|
||||||
+ <color name="system_accent2_900">#051F21</color>
|
|
||||||
+ <color name="system_accent2_1000">#000000</color>
|
|
||||||
+
|
|
||||||
+ <color name="system_accent3_0">#FFFFFF</color>
|
|
||||||
+ <color name="system_accent3_10">#FDFCFF</color>
|
|
||||||
+ <color name="system_accent3_50">#EBF1FF</color>
|
|
||||||
+ <color name="system_accent3_100">#D4E3FF</color>
|
|
||||||
+ <color name="system_accent3_200">#ACC8F7</color>
|
|
||||||
+ <color name="system_accent3_300">#91ACDB</color>
|
|
||||||
+ <color name="system_accent3_400">#7692BE</color>
|
|
||||||
+ <color name="system_accent3_500">#5C77A2</color>
|
|
||||||
+ <color name="system_accent3_600">#445F8A</color>
|
|
||||||
+ <color name="system_accent3_700">#2B4770</color>
|
|
||||||
+ <color name="system_accent3_800">#113158</color>
|
|
||||||
+ <color name="system_accent3_900">#001B3D</color>
|
|
||||||
+ <color name="system_accent3_1000">#000000</color>
|
|
||||||
+
|
|
||||||
+ <color name="system_neutral1_0">#FFFFFF</color>
|
|
||||||
+ <color name="system_neutral1_10">#FAFDFC</color>
|
|
||||||
+ <color name="system_neutral1_50">#EFF1F1</color>
|
|
||||||
+ <color name="system_neutral1_100">#E0E3E2</color>
|
|
||||||
+ <color name="system_neutral1_200">#C4C7C6</color>
|
|
||||||
+ <color name="system_neutral1_300">#A9ACAB</color>
|
|
||||||
+ <color name="system_neutral1_400">#8E9191</color>
|
|
||||||
+ <color name="system_neutral1_500">#737776</color>
|
|
||||||
+ <color name="system_neutral1_600">#5B5F5F</color>
|
|
||||||
+ <color name="system_neutral1_700">#444747</color>
|
|
||||||
+ <color name="system_neutral1_800">#2E3131</color>
|
|
||||||
+ <color name="system_neutral1_900">#191C1C</color>
|
|
||||||
+ <color name="system_neutral1_1000">#000000</color>
|
|
||||||
+
|
|
||||||
+ <color name="system_neutral2_0">#FFFFFF</color>
|
|
||||||
+ <color name="system_neutral2_10">#F4FEFE</color>
|
|
||||||
+ <color name="system_neutral2_50">#E8F3F2</color>
|
|
||||||
+ <color name="system_neutral2_100">#DAE5E4</color>
|
|
||||||
+ <color name="system_neutral2_200">#BEC8C9</color>
|
|
||||||
+ <color name="system_neutral2_300">#A3ADAE</color>
|
|
||||||
+ <color name="system_neutral2_400">#889393</color>
|
|
||||||
+ <color name="system_neutral2_500">#6E7878</color>
|
|
||||||
+ <color name="system_neutral2_600">#566061</color>
|
|
||||||
+ <color name="system_neutral2_700">#3F4949</color>
|
|
||||||
+ <color name="system_neutral2_800">#293232</color>
|
|
||||||
+ <color name="system_neutral2_900">#141D1E</color>
|
|
||||||
+ <color name="system_neutral2_1000">#000000</color>
|
|
||||||
+</resources>
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
From 64c0e12dc7a4eb6add7631a84dda17e2012f687c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 18 Jun 2023 19:33:27 +0800
|
||||||
|
Subject: [PATCH 01/21] Add keylayout for Backbone One for Android, with AB/XY
|
||||||
|
keys swapped
|
||||||
|
|
||||||
|
Change-Id: Ia057c084099015b544c926cd57c37b4ac314867a
|
||||||
|
---
|
||||||
|
data/keyboards/Vendor_358a_Product_0201.kl | 31 ++++++++++++++++++++++
|
||||||
|
1 file changed, 31 insertions(+)
|
||||||
|
create mode 100644 data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
|
||||||
|
diff --git a/data/keyboards/Vendor_358a_Product_0201.kl b/data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..e15907f9c6f2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/data/keyboards/Vendor_358a_Product_0201.kl
|
||||||
|
@@ -0,0 +1,31 @@
|
||||||
|
+#
|
||||||
|
+# Backbone One for Android
|
||||||
|
+#
|
||||||
|
+
|
||||||
|
+# AB/XY swapped
|
||||||
|
+key 305 BUTTON_A
|
||||||
|
+key 304 BUTTON_B
|
||||||
|
+key 308 BUTTON_X
|
||||||
|
+key 307 BUTTON_Y
|
||||||
|
+
|
||||||
|
+key 310 BUTTON_L1
|
||||||
|
+key 311 BUTTON_R1
|
||||||
|
+key 312 BUTTON_L2
|
||||||
|
+key 313 BUTTON_R2
|
||||||
|
+
|
||||||
|
+key 317 BUTTON_THUMBL
|
||||||
|
+key 318 BUTTON_THUMBR
|
||||||
|
+
|
||||||
|
+axis 0x00 X flat 4096
|
||||||
|
+axis 0x01 Y flat 4096
|
||||||
|
+axis 0x02 Z flat 4096
|
||||||
|
+axis 0x05 RZ flat 4096
|
||||||
|
+
|
||||||
|
+axis 0x0a LTRIGGER
|
||||||
|
+axis 0x09 RTRIGGER
|
||||||
|
+
|
||||||
|
+axis 0x10 HAT_X
|
||||||
|
+axis 0x11 HAT_Y
|
||||||
|
+
|
||||||
|
+key 315 BUTTON_START
|
||||||
|
+key 314 BUTTON_SELECT
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
From d8f26074114f9bb4e9a57ece4cb39d42e0ffa90c Mon Sep 17 00:00:00 2001
|
From 2e9df83d63b2c316a6cec6fcbc253ef0919cf5d3 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 20 Jun 2021 03:39:32 +0000
|
Date: Sun, 20 Jun 2021 03:39:32 +0000
|
||||||
Subject: [PATCH 02/16] Add MiuiNavbarOverlay
|
Subject: [PATCH 02/21] Add MiuiNavbarOverlay
|
||||||
|
|
||||||
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
|
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
|
||||||
---
|
---
|
||||||
@@ -29,13 +29,13 @@ Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
|
|||||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
|
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
|
||||||
|
|
||||||
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
|
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
|
||||||
index 15c55d3d588e..ff20a7a30092 100644
|
index 69641e69a9f2..1efc296d9689 100644
|
||||||
--- a/packages/overlays/Android.mk
|
--- a/packages/overlays/Android.mk
|
||||||
+++ b/packages/overlays/Android.mk
|
+++ b/packages/overlays/Android.mk
|
||||||
@@ -27,6 +27,7 @@ LOCAL_REQUIRED_MODULES := \
|
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \
|
||||||
|
DisplayCutoutEmulationTallOverlay \
|
||||||
DisplayCutoutEmulationWaterfallOverlay \
|
DisplayCutoutEmulationWaterfallOverlay \
|
||||||
FontNotoSerifSourceOverlay \
|
FontNotoSerifSourceOverlay \
|
||||||
LineageMonetAccentOverlay \
|
|
||||||
+ MiuiNavbarOverlay \
|
+ MiuiNavbarOverlay \
|
||||||
NavigationBarMode3ButtonOverlay \
|
NavigationBarMode3ButtonOverlay \
|
||||||
NavigationBarModeGesturalOverlay \
|
NavigationBarModeGesturalOverlay \
|
||||||
@@ -385,5 +385,5 @@ literal 0
|
|||||||
HcmV?d00001
|
HcmV?d00001
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
From cf35535a94712e9f81d9532fa4a494a8628b4641 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 99b15db780dc..cff3e668f053 100644
|
||||||
|
--- a/packages/SettingsProvider/res/values/defaults.xml
|
||||||
|
+++ b/packages/SettingsProvider/res/values/defaults.xml
|
||||||
|
@@ -36,7 +36,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
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
From 26f39b897540abbdc64f25f671de87b9df33c04d Mon Sep 17 00:00:00 2001
|
|
||||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Fri, 22 Mar 2019 00:41:20 +0800
|
|
||||||
Subject: [PATCH 04/16] Disable FP lockouts
|
|
||||||
|
|
||||||
Both timed and permanent lockouts - GET THE FUCK OUT
|
|
||||||
Now targeting LockoutFramework, introduced in Android 12
|
|
||||||
|
|
||||||
Change-Id: I2d4b091f3546d4d7903bfb4d5585629212dc9915
|
|
||||||
---
|
|
||||||
.../fingerprint/hidl/LockoutFrameworkImpl.java | 17 +----------------
|
|
||||||
1 file changed, 1 insertion(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
|
||||||
index dc5dace98825..386e4f868e8d 100644
|
|
||||||
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
|
||||||
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
|
||||||
@@ -100,25 +100,10 @@ public class LockoutFrameworkImpl implements LockoutTracker {
|
|
||||||
mLockoutResetCallback.onLockoutReset(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
- void addFailedAttemptForUser(int userId) {
|
|
||||||
- mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
|
|
||||||
- mTimedLockoutCleared.put(userId, false);
|
|
||||||
-
|
|
||||||
- if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
|
|
||||||
- scheduleLockoutResetForUser(userId);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ void addFailedAttemptForUser(int userId) {}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @LockoutMode int getLockoutModeForUser(int userId) {
|
|
||||||
- final int failedAttempts = mFailedAttempts.get(userId, 0);
|
|
||||||
- if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
|
|
||||||
- return LOCKOUT_PERMANENT;
|
|
||||||
- } else if (failedAttempts > 0
|
|
||||||
- && !mTimedLockoutCleared.get(userId, false)
|
|
||||||
- && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
|
|
||||||
- return LOCKOUT_TIMED;
|
|
||||||
- }
|
|
||||||
return LOCKOUT_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From 2b7f5a1ca1c43ae5d7af48eeb07afa08f581e49b Mon Sep 17 00:00:00 2001
|
From 8201fef9ab532374796549c938ea2fc172bf20f5 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Mon, 27 Sep 2021 16:30:00 +0000
|
Date: Mon, 27 Sep 2021 16:30:00 +0000
|
||||||
Subject: [PATCH 03/16] Disable cursor drag by default for editable TextViews
|
Subject: [PATCH 04/21] Disable cursor drag by default for editable TextViews
|
||||||
|
|
||||||
Requested by @TadiT7
|
Requested by @TadiT7
|
||||||
|
|
||||||
@@ -24,5 +24,5 @@ index fb40ee5ec843..c0c6fb6e9431 100644
|
|||||||
/**
|
/**
|
||||||
* Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
|
* Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
From 0dba3680960846702881fed2b3e716825af92d58 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 b27ff411dd58..5ce49bd98c5c 100644
|
||||||
|
--- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
||||||
|
+++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
|
||||||
|
@@ -1792,25 +1792,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
|
||||||
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
From 1da3b1d0155f06373057ee7b08691da664e94da8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Thu, 2 Sep 2021 16:15:19 +0000
|
|
||||||
Subject: [PATCH 05/16] Keyguard: Adjust clock style
|
|
||||||
|
|
||||||
Thinner font, less padding and unintrusive colors
|
|
||||||
|
|
||||||
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
|
|
||||||
---
|
|
||||||
.../SystemUI/res-keyguard/layout/keyguard_clock_switch.xml | 7 ++++---
|
|
||||||
packages/SystemUI/res-keyguard/values/dimens.xml | 6 +++---
|
|
||||||
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
|
||||||
packages/SystemUI/res/values/styles.xml | 4 ++--
|
|
||||||
.../src/com/android/keyguard/AnimatableClockView.java | 2 +-
|
|
||||||
5 files changed, 10 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
|
||||||
index 28c61663bd4d..84ea2446f9d7 100644
|
|
||||||
--- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
|
||||||
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
|
||||||
@@ -38,10 +38,10 @@
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:gravity="start"
|
|
||||||
android:textSize="@dimen/clock_text_size"
|
|
||||||
- android:fontFamily="@font/clock"
|
|
||||||
+ android:fontFamily="sans-serif-thin"
|
|
||||||
android:elegantTextHeight="false"
|
|
||||||
android:singleLine="true"
|
|
||||||
- android:fontFeatureSettings="pnum"
|
|
||||||
+ android:fontFeatureSettings="tnum"
|
|
||||||
chargeAnimationDelay="350"
|
|
||||||
dozeWeight="200"
|
|
||||||
lockScreenWeight="400"
|
|
||||||
@@ -60,9 +60,10 @@
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:textSize="@dimen/large_clock_text_size"
|
|
||||||
- android:fontFamily="@font/clock"
|
|
||||||
+ android:fontFamily="sans-serif-thin"
|
|
||||||
android:typeface="monospace"
|
|
||||||
android:elegantTextHeight="false"
|
|
||||||
+ android:fontFeatureSettings="tnum"
|
|
||||||
chargeAnimationDelay="200"
|
|
||||||
dozeWeight="200"
|
|
||||||
lockScreenWeight="400"
|
|
||||||
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
|
|
||||||
index 7e3c87b24f07..58a1734aad22 100644
|
|
||||||
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
|
|
||||||
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
|
|
||||||
@@ -94,8 +94,8 @@
|
|
||||||
<dimen name="num_pad_key_margin_end">12dp</dimen>
|
|
||||||
|
|
||||||
<!-- additional offset for clock switch area items -->
|
|
||||||
- <dimen name="clock_padding_start">28dp</dimen>
|
|
||||||
- <dimen name="below_clock_padding_start">32dp</dimen>
|
|
||||||
+ <dimen name="clock_padding_start">22dp</dimen>
|
|
||||||
+ <dimen name="below_clock_padding_start">28dp</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>
|
|
||||||
</resources>
|
|
||||||
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
|
||||||
index 098b7e8dedbe..86f053535ee6 100644
|
|
||||||
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
|
||||||
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
|
||||||
@@ -123,8 +123,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/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
|
||||||
index bb258ab18f82..f03f14d3316c 100644
|
|
||||||
--- a/packages/SystemUI/res/values/styles.xml
|
|
||||||
+++ b/packages/SystemUI/res/values/styles.xml
|
|
||||||
@@ -343,7 +343,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">@*android:color/system_accent1_100</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/LockPatternStyle</item>
|
|
||||||
<item name="passwordStyle">@style/PasswordTheme</item>
|
|
||||||
@@ -359,7 +359,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">@*android:color/system_accent2_600</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>
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java b/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
|
|
||||||
index ef3104a21708..ec54cdb53f22 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
|
|
||||||
@@ -113,7 +113,7 @@ public class AnimatableClockView extends TextView {
|
|
||||||
|
|
||||||
void refreshTime() {
|
|
||||||
mTime.setTimeInMillis(System.currentTimeMillis());
|
|
||||||
- setText(DateFormat.format(mFormat, mTime));
|
|
||||||
+ setText(DateFormat.format(mFormat, mTime).toString() + ' ');
|
|
||||||
setContentDescription(DateFormat.format(mDescFormat, mTime));
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
From c16a1a66b9e311a2dfbf1925d8f17783933571e5 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 +++++
|
||||||
|
.../android/systemui/shared/clocks/AnimatableClockView.kt | 2 +-
|
||||||
|
.../systemui/shared/clocks/DefaultClockController.kt | 4 ++--
|
||||||
|
.../SystemUI/res-keyguard/layout/keyguard_slice_view.xml | 2 +-
|
||||||
|
packages/SystemUI/res-keyguard/values/dimens.xml | 6 +++---
|
||||||
|
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
||||||
|
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
|
||||||
|
packages/SystemUI/res/values/styles.xml | 4 ++--
|
||||||
|
10 files changed, 17 insertions(+), 13 deletions(-)
|
||||||
|
create mode 100644 packages/SystemUI/customization/res/values/colors.xml
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/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/src/com/android/systemui/shared/clocks/AnimatableClockView.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
|
||||||
|
index 86bd5f2bff5a..b99a8ba487cb 100644
|
||||||
|
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
|
||||||
|
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
|
||||||
|
@@ -146,7 +146,7 @@ class AnimatableClockView @JvmOverloads constructor(
|
||||||
|
fun refreshTime() {
|
||||||
|
time.timeInMillis = timeOverrideInMillis ?: System.currentTimeMillis()
|
||||||
|
contentDescription = DateFormat.format(descFormat, time)
|
||||||
|
- val formattedText = DateFormat.format(format, time)
|
||||||
|
+ val formattedText = DateFormat.format(format, time).toString() + ' '
|
||||||
|
logBuffer?.log(TAG, DEBUG,
|
||||||
|
{ str1 = formattedText?.toString() },
|
||||||
|
{ "refreshTime: new formattedText=$str1" }
|
||||||
|
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
index 4df7a44d3e1d..447160a8cb63 100644
|
||||||
|
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
|
||||||
|
@@ -143,9 +143,9 @@ class DefaultClockController(
|
||||||
|
if (seedColor != null) {
|
||||||
|
seedColor!!
|
||||||
|
} else if (isRegionDark) {
|
||||||
|
- resources.getColor(android.R.color.system_accent1_100)
|
||||||
|
+ resources.getColor(R.color.clock_default_color_dark)
|
||||||
|
} else {
|
||||||
|
- resources.getColor(android.R.color.system_accent2_600)
|
||||||
|
+ resources.getColor(R.color.clock_default_color_light)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentColor == color) {
|
||||||
|
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
|
||||||
|
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 edd6eff92c1c..14df77dc4a4e 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||||
|
@@ -91,10 +91,10 @@
|
||||||
|
<dimen name="num_pad_key_margin_end">12dp</dimen>
|
||||||
|
|
||||||
|
<!-- additional offset for clock switch area items -->
|
||||||
|
- <dimen name="clock_padding_start">28dp</dimen>
|
||||||
|
- <dimen name="below_clock_padding_start">32dp</dimen>
|
||||||
|
+ <dimen name="clock_padding_start">22dp</dimen>
|
||||||
|
+ <dimen name="below_clock_padding_start">28dp</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 04dffb6e8c52..c81e018702bb 100644
|
||||||
|
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
|
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
|
@@ -117,8 +117,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 8b8594032816..9135e78f3e4c 100644
|
||||||
|
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
@@ -74,7 +74,7 @@
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:textDirection="locale"
|
||||||
|
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
|
||||||
|
+ android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="?attr/wallpaperTextColorSecondary"
|
||||||
|
android:singleLine="true"
|
||||||
|
systemui:showMissingSim="true"
|
||||||
|
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||||
|
index 892c2f4caa39..6996e41e08da 100644
|
||||||
|
--- a/packages/SystemUI/res/values/styles.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/styles.xml
|
||||||
|
@@ -302,7 +302,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>
|
||||||
|
@@ -324,7 +324,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
|
||||||
|
|
||||||
-59
@@ -1,59 +0,0 @@
|
|||||||
From e6b6d26e1a86a3ff38630121164f83b653f20199 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Sat, 2 Nov 2019 06:41:03 +0000
|
|
||||||
Subject: [PATCH 06/16] Keyguard: Hide padlock unless UDFPS is in use
|
|
||||||
|
|
||||||
Fair enough Google, but don't give me that otherwise
|
|
||||||
|
|
||||||
Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
|
|
||||||
---
|
|
||||||
.../keyguard/LockIconViewController.java | 29 +++++--------------
|
|
||||||
1 file changed, 7 insertions(+), 22 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
|
||||||
index 52ebf2fa09d0..0ed36b4fa949 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
|
||||||
@@ -259,32 +259,17 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon;
|
|
||||||
- boolean wasShowingLockIcon = mShowLockIcon;
|
|
||||||
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon;
|
|
||||||
boolean wasShowingUnlockIcon = mShowUnlockIcon;
|
|
||||||
- mShowLockIcon = !mCanDismissLockScreen && !mUserUnlockedWithBiometric && isLockScreen()
|
|
||||||
- && (!mUdfpsEnrolled || !mRunningFPS);
|
|
||||||
- mShowUnlockIcon = mCanDismissLockScreen && isLockScreen();
|
|
||||||
+ mShowUnlockIcon = mCanDismissLockScreen && isLockScreen() && mUdfpsEnrolled;
|
|
||||||
mShowAODFpIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS;
|
|
||||||
|
|
||||||
final CharSequence prevContentDescription = mView.getContentDescription();
|
|
||||||
- if (mShowLockIcon) {
|
|
||||||
- mView.setImageDrawable(mLockIcon);
|
|
||||||
- mView.setVisibility(View.VISIBLE);
|
|
||||||
- mView.setContentDescription(mLockedLabel);
|
|
||||||
- } else if (mShowUnlockIcon) {
|
|
||||||
- if (!wasShowingUnlockIcon) {
|
|
||||||
- if (wasShowingFpIcon) {
|
|
||||||
- mView.setImageDrawable(mFpToUnlockIcon);
|
|
||||||
- mFpToUnlockIcon.forceAnimationOnUI();
|
|
||||||
- mFpToUnlockIcon.start();
|
|
||||||
- } else if (wasShowingLockIcon) {
|
|
||||||
- mView.setImageDrawable(mLockToUnlockIcon);
|
|
||||||
- mLockToUnlockIcon.forceAnimationOnUI();
|
|
||||||
- mLockToUnlockIcon.start();
|
|
||||||
- } else {
|
|
||||||
- mView.setImageDrawable(mUnlockIcon);
|
|
||||||
- }
|
|
||||||
+ if (mShowUnlockIcon) {
|
|
||||||
+ if (wasShowingFpIcon) {
|
|
||||||
+ mView.setImageDrawable(mFpToUnlockIcon);
|
|
||||||
+ mFpToUnlockIcon.forceAnimationOnUI();
|
|
||||||
+ mFpToUnlockIcon.start();
|
|
||||||
}
|
|
||||||
mView.setVisibility(View.VISIBLE);
|
|
||||||
mView.setContentDescription(mUnlockedLabel);
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
From c9d2af70d90a8cf81dae5bfba93d6f59c0373bdb 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
|
||||||
|
---
|
||||||
|
.../com/android/keyguard/LockIconViewController.java | 12 +++---------
|
||||||
|
1 file changed, 3 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||||
|
index 0887b220dee1..423549dd3ab2 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||||
|
@@ -295,20 +295,14 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon
|
||||||
|
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon
|
||||||
|
&& !mShowAodUnlockedIcon && !mShowAodLockIcon;
|
||||||
|
- mShowLockIcon = !mCanDismissLockScreen && !mUserUnlockedWithBiometric && isLockScreen()
|
||||||
|
- && (!mUdfpsEnrolled || !mRunningFPS);
|
||||||
|
- mShowUnlockIcon = (mCanDismissLockScreen || mUserUnlockedWithBiometric) && isLockScreen();
|
||||||
|
+ mShowUnlockIcon = (mCanDismissLockScreen || mUserUnlockedWithBiometric) && isLockScreen() && mUdfpsEnrolled;
|
||||||
|
mShowAodUnlockedIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && mCanDismissLockScreen;
|
||||||
|
mShowAodLockIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS && !mCanDismissLockScreen;
|
||||||
|
|
||||||
|
final CharSequence prevContentDescription = mView.getContentDescription();
|
||||||
|
- if (mShowLockIcon) {
|
||||||
|
- mView.updateIcon(ICON_LOCK, false);
|
||||||
|
- mView.setContentDescription(mLockedLabel);
|
||||||
|
- mView.setVisibility(View.VISIBLE);
|
||||||
|
- } else if (mShowUnlockIcon) {
|
||||||
|
+ if (mShowUnlockIcon) {
|
||||||
|
if (wasShowingFpIcon) {
|
||||||
|
// fp icon was shown by UdfpsView, and now we still want to animate the transition
|
||||||
|
// in this drawable
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
-38
@@ -1,38 +0,0 @@
|
|||||||
From 66149d4057081df5f550cad82db44b5c0f2bd0c7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Wed, 1 Sep 2021 14:41:53 +0000
|
|
||||||
Subject: [PATCH 07/16] Keyguard: Never switch to large clock
|
|
||||||
|
|
||||||
It looks alright actually, but as always breaks under landscape
|
|
||||||
|
|
||||||
Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
|
|
||||||
---
|
|
||||||
.../com/android/keyguard/KeyguardClockSwitch.java | 12 +-----------
|
|
||||||
1 file changed, 1 insertion(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
|
|
||||||
index a36a03473e0e..60195bcd23fb 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
|
|
||||||
@@ -280,17 +280,7 @@ public class KeyguardClockSwitch extends RelativeLayout {
|
|
||||||
* the smaller version.
|
|
||||||
*/
|
|
||||||
boolean willSwitchToLargeClock(boolean hasVisibleNotifications) {
|
|
||||||
- if (mHasVisibleNotifications != null
|
|
||||||
- && hasVisibleNotifications == mHasVisibleNotifications) {
|
|
||||||
- return false;
|
|
||||||
- }
|
|
||||||
- boolean landscape = getResources().getConfiguration().orientation
|
|
||||||
- == Configuration.ORIENTATION_LANDSCAPE;
|
|
||||||
- boolean useLargeClock = !hasVisibleNotifications && !landscape;
|
|
||||||
- animateClockChange(useLargeClock);
|
|
||||||
-
|
|
||||||
- mHasVisibleNotifications = hasVisibleNotifications;
|
|
||||||
- return useLargeClock;
|
|
||||||
+ return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Paint getPaint() {
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
From ff1164da64003d5a6d6e57fd75ba1d8684167dd7 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: Never switch to large clock
|
||||||
|
|
||||||
|
It looks alright actually, but as always breaks under landscape
|
||||||
|
|
||||||
|
Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
|
||||||
|
---
|
||||||
|
.../src/com/android/keyguard/KeyguardClockSwitchController.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
||||||
|
index ba217804c96e..ab3391372e2c 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
|
||||||
|
@@ -470,7 +470,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
|
||||||
|
|
||||||
+72
-38
@@ -1,25 +1,25 @@
|
|||||||
From 2c4a2751c3ecee97883a3b8606e479ec2068f8c8 Mon Sep 17 00:00:00 2001
|
From a8a951832a14ed9fb5e718a14c4dc9ec73d24693 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 2 Nov 2019 08:31:36 +0000
|
Date: Sat, 2 Nov 2019 08:31:36 +0000
|
||||||
Subject: [PATCH 08/16] Keyguard: Refine indication text
|
Subject: [PATCH 09/21] Keyguard: Refine indication text
|
||||||
|
|
||||||
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
|
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
|
||||||
---
|
---
|
||||||
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
.../SystemUI/res-keyguard/values/styles.xml | 2 --
|
||||||
.../SystemUI/res/layout/keyguard_bottom_area.xml | 1 +
|
.../res/layout/keyguard_bottom_area.xml | 1 +
|
||||||
packages/SystemUI/res/values/dimens.xml | 2 +-
|
packages/SystemUI/res/values/dimens.xml | 3 +--
|
||||||
.../KeyguardIndicationRotateTextViewController.java | 12 +++++++++++-
|
...ardIndicationRotateTextViewController.java | 12 ++++++++++-
|
||||||
.../statusbar/KeyguardIndicationController.java | 5 ++---
|
.../KeyguardIndicationController.java | 21 ++-----------------
|
||||||
.../statusbar/phone/KeyguardIndicationTextView.java | 2 +-
|
.../phone/KeyguardIndicationTextView.java | 2 +-
|
||||||
6 files changed, 16 insertions(+), 8 deletions(-)
|
6 files changed, 16 insertions(+), 25 deletions(-)
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
index 86f053535ee6..b03c87af3059 100644
|
index c81e018702bb..cc87f9f3d7cf 100644
|
||||||
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||||
@@ -137,8 +137,6 @@
|
@@ -132,8 +132,6 @@
|
||||||
<item name="android:textSize">14sp</item>
|
|
||||||
<item name="android:maxLines">1</item>
|
<item name="android:maxLines">1</item>
|
||||||
|
<item name="android:gravity">center</item>
|
||||||
<item name="android:textColor">?attr/wallpaperTextColor</item>
|
<item name="android:textColor">?attr/wallpaperTextColor</item>
|
||||||
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
|
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
|
||||||
- <item name="android:shadowRadius">?attr/shadowRadius</item>
|
- <item name="android:shadowRadius">?attr/shadowRadius</item>
|
||||||
@@ -27,10 +27,10 @@ index 86f053535ee6..b03c87af3059 100644
|
|||||||
|
|
||||||
<style name="TextAppearance.Keyguard.BottomArea.Button">
|
<style name="TextAppearance.Keyguard.BottomArea.Button">
|
||||||
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
index 8dbd59d42ab7..68cba51e07fa 100644
|
index 4048a39344bd..2f884baf0bd5 100644
|
||||||
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
|
||||||
@@ -36,6 +36,7 @@
|
@@ -35,6 +35,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@@ -39,23 +39,27 @@ index 8dbd59d42ab7..68cba51e07fa 100644
|
|||||||
android:paddingEnd="@dimen/keyguard_indication_text_padding"
|
android:paddingEnd="@dimen/keyguard_indication_text_padding"
|
||||||
android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
|
android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
|
||||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
index 5d4e4a6ad3c4..cd11fb7d81ac 100644
|
index ceebab2b08ef..e2c65f5542b7 100644
|
||||||
--- a/packages/SystemUI/res/values/dimens.xml
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
@@ -920,7 +920,7 @@
|
@@ -815,11 +815,10 @@
|
||||||
<dimen name="keyguard_lock_width">42dp</dimen>
|
<dimen name="keyguard_lock_height">42dp</dimen>
|
||||||
<dimen name="keyguard_lock_padding">20dp</dimen>
|
<dimen name="keyguard_lock_padding">20dp</dimen>
|
||||||
|
|
||||||
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
|
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
|
||||||
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
|
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
|
||||||
<dimen name="lock_icon_margin_bottom">98dp</dimen>
|
<dimen name="lock_icon_margin_bottom">74dp</dimen>
|
||||||
|
<dimen name="ambient_indication_margin_bottom">71dp</dimen>
|
||||||
|
|
||||||
|
-
|
||||||
|
<!-- How much two taps can be apart to still be recognized as a double tap on the lockscreen -->
|
||||||
|
<dimen name="double_tap_slop">32dp</dimen>
|
||||||
|
|
||||||
<!-- The text size for battery level -->
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||||
index a424674ed252..b2af483bb76e 100644
|
index 0745456b3e43..0fc0b9e29fb7 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||||
@@ -182,12 +182,22 @@ public class KeyguardIndicationRotateTextViewController extends
|
@@ -224,12 +224,22 @@ public class KeyguardIndicationRotateTextViewController extends
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -63,7 +67,7 @@ index a424674ed252..b2af483bb76e 100644
|
|||||||
+ * @return true if there are available non-resting indications to show.
|
+ * @return true if there are available non-resting indications to show.
|
||||||
*/
|
*/
|
||||||
public boolean hasIndications() {
|
public boolean hasIndications() {
|
||||||
+ if (hasIndication(INDICATION_TYPE_RESTING)) {
|
+ if (hasIndication(INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE)) {
|
||||||
+ return mIndicationMessages.keySet().size() > 1;
|
+ return mIndicationMessages.keySet().size() > 1;
|
||||||
+ }
|
+ }
|
||||||
return mIndicationMessages.keySet().size() > 0;
|
return mIndicationMessages.keySet().size() > 0;
|
||||||
@@ -77,40 +81,70 @@ index a424674ed252..b2af483bb76e 100644
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
/**
|
/**
|
||||||
* Immediately show the passed indication type and schedule the next indication to show.
|
* Clears all messages in the queue and sets the current message to an empty string.
|
||||||
* Will re-add this indication to be re-shown after all other indications have been
|
*/
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
index 8a397199dc84..f2df767db567 100644
|
index 2b3444e64acb..b8567d17785a 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||||
@@ -433,12 +433,11 @@ public class KeyguardIndicationController {
|
@@ -407,7 +407,6 @@ public class KeyguardIndicationController {
|
||||||
|
updateLockScreenDisclosureMsg();
|
||||||
|
updateLockScreenOwnerInfo();
|
||||||
|
updateLockScreenBatteryMsg(animate);
|
||||||
|
- updateLockScreenUserLockedMsg(userId);
|
||||||
|
updateLockScreenTrustMsg(userId, getTrustGrantedIndication(), getTrustManagedIndication());
|
||||||
|
updateLockScreenAlignmentMsg();
|
||||||
|
updateLockScreenLogoutView();
|
||||||
|
@@ -518,22 +517,6 @@ public class KeyguardIndicationController {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateResting() {
|
- private void updateLockScreenUserLockedMsg(int userId) {
|
||||||
- if (!TextUtils.isEmpty(mRestingIndication)
|
- if (!mKeyguardUpdateMonitor.isUserUnlocked(userId)
|
||||||
- && !mRotateTextViewController.hasIndications()) {
|
- || mKeyguardUpdateMonitor.isEncryptedOrLockdown(userId)) {
|
||||||
|
- mRotateTextViewController.updateIndication(
|
||||||
|
- INDICATION_TYPE_USER_LOCKED,
|
||||||
|
- new KeyguardIndication.Builder()
|
||||||
|
- .setMessage(mContext.getResources().getText(
|
||||||
|
- com.android.internal.R.string.lockscreen_storage_locked))
|
||||||
|
- .setTextColor(mInitialTextColorState)
|
||||||
|
- .build(),
|
||||||
|
- false);
|
||||||
|
- } else {
|
||||||
|
- mRotateTextViewController.hideIndication(INDICATION_TYPE_USER_LOCKED);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
private void updateBiometricMessage() {
|
||||||
|
if (mDozing) {
|
||||||
|
updateDeviceEntryIndication(false);
|
||||||
|
@@ -626,11 +609,11 @@ public class KeyguardIndicationController {
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateLockScreenPersistentUnlockMsg() {
|
||||||
|
- if (!TextUtils.isEmpty(mPersistentUnlockMessage)) {
|
||||||
+ if (!mRotateTextViewController.hasIndications()) {
|
+ if (!mRotateTextViewController.hasIndications()) {
|
||||||
mRotateTextViewController.updateIndication(
|
mRotateTextViewController.updateIndication(
|
||||||
INDICATION_TYPE_RESTING,
|
INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE,
|
||||||
new KeyguardIndication.Builder()
|
new KeyguardIndication.Builder()
|
||||||
- .setMessage(mRestingIndication)
|
- .setMessage(mPersistentUnlockMessage)
|
||||||
+ .setMessage(mContext.getResources().getString(R.string.keyguard_unlock))
|
+ .setMessage(mContext.getResources().getString(R.string.keyguard_unlock))
|
||||||
.setTextColor(mInitialTextColorState)
|
.setTextColor(mInitialTextColorState)
|
||||||
.build(),
|
.build(),
|
||||||
false);
|
true);
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||||
index a5b5f1cbf1e7..df981c4e3129 100644
|
index 9d30cb4c4852..f179194fb0e1 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||||
@@ -49,7 +49,7 @@ public class KeyguardIndicationTextView extends TextView {
|
@@ -46,7 +46,7 @@ public class KeyguardIndicationTextView extends TextView {
|
||||||
|
@StyleRes
|
||||||
private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button;
|
private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button;
|
||||||
|
|
||||||
private long mNextAnimationTime = 0;
|
|
||||||
- private boolean mAnimationsEnabled = true;
|
- private boolean mAnimationsEnabled = true;
|
||||||
+ private boolean mAnimationsEnabled = false;
|
+ private boolean mAnimationsEnabled = false;
|
||||||
private LinkedList<CharSequence> mMessages = new LinkedList<>();
|
private CharSequence mMessage;
|
||||||
private LinkedList<KeyguardIndication> mKeyguardIndicationInfo = new LinkedList<>();
|
private KeyguardIndication mKeyguardIndicationInfo;
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
-322
@@ -1,322 +0,0 @@
|
|||||||
From cca9cb4645f5aa079c5ed39339f02f78a7e68695 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Sat, 20 Mar 2021 10:35:14 +0000
|
|
||||||
Subject: [PATCH 09/16] Keyguard/UI: Fix status bar / quick settings margins
|
|
||||||
and paddings
|
|
||||||
|
|
||||||
Last revised on 2021/12/10, targeting s-qpr1
|
|
||||||
|
|
||||||
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
|
|
||||||
- Link keyguard paddings to status_bar_padding_{start|end}
|
|
||||||
- Add status_bar_padding_{start|end} to quick settings header
|
|
||||||
- Remove several unnecessary margins and paddings
|
|
||||||
- Animate padding for new QS clock in s-qpr1
|
|
||||||
|
|
||||||
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
|
|
||||||
---
|
|
||||||
.../res/layout/keyguard_status_bar.xml | 2 +-
|
|
||||||
.../res/layout/quick_qs_status_icons.xml | 6 --
|
|
||||||
.../quick_status_bar_header_date_privacy.xml | 5 +-
|
|
||||||
.../SystemUI/res/values-sw600dp/dimens.xml | 6 --
|
|
||||||
packages/SystemUI/res/values/dimens.xml | 6 +-
|
|
||||||
.../systemui/qs/QuickStatusBarHeader.java | 61 +++++++++++++------
|
|
||||||
.../phone/KeyguardStatusBarView.java | 7 ---
|
|
||||||
7 files changed, 47 insertions(+), 46 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
|
||||||
index 850b01717308..054db34023af 100644
|
|
||||||
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
|
||||||
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
|
||||||
@@ -62,7 +62,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/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
|
||||||
index 27514617fb23..ada85c137600 100644
|
|
||||||
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
|
||||||
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
|
||||||
@@ -21,7 +21,6 @@
|
|
||||||
android:layout_height="@*android:dimen/quick_qs_offset_height"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
- android:minHeight="48dp"
|
|
||||||
android:clickable="false"
|
|
||||||
android:focusable="true"
|
|
||||||
android:theme="@style/QSHeaderTheme">
|
|
||||||
@@ -39,10 +38,7 @@
|
|
||||||
android:id="@+id/clock"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
- android:minHeight="48dp"
|
|
||||||
android:gravity="center_vertical|start"
|
|
||||||
- android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
|
|
||||||
- android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="@style/TextAppearance.QS.Status" />
|
|
||||||
|
|
||||||
@@ -50,7 +46,6 @@
|
|
||||||
android:id="@+id/date_clock"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
- android:layout_marginStart="@dimen/status_bar_left_clock_end_padding"
|
|
||||||
android:gravity="center_vertical|start"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="@style/TextAppearance.QS.Status"
|
|
||||||
@@ -64,7 +59,6 @@
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
- android:minHeight="48dp"
|
|
||||||
android:minWidth="48dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
|
||||||
index b1e8c386fe21..cff67718bc47 100644
|
|
||||||
--- a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
|
||||||
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
|
||||||
@@ -25,14 +25,12 @@
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_gravity="top"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
- android:clickable="true"
|
|
||||||
- android:minHeight="48dp">
|
|
||||||
+ android:clickable="true">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/date_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
- android:minHeight="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical|start" >
|
|
||||||
|
|
||||||
@@ -76,7 +74,6 @@
|
|
||||||
android:id="@+id/privacy_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
- android:minHeight="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical|end" >
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
|
||||||
index 0a34dfd71c7e..3d590d752a7b 100644
|
|
||||||
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
|
|
||||||
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
|
||||||
@@ -53,9 +53,6 @@
|
|
||||||
<!-- end margin for multi user switch in collapsed quick settings -->
|
|
||||||
<dimen name="multi_user_switch_keyguard_margin">6dp</dimen>
|
|
||||||
|
|
||||||
- <!-- Margin on the left side of the carrier text on Keyguard -->
|
|
||||||
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
|
|
||||||
-
|
|
||||||
<!-- The width/height of the phone/camera/unlock icon on keyguard. -->
|
|
||||||
<dimen name="keyguard_affordance_height">80dp</dimen>
|
|
||||||
<dimen name="keyguard_affordance_width">120dp</dimen>
|
|
||||||
@@ -64,9 +61,6 @@
|
|
||||||
phone hints. -->
|
|
||||||
<dimen name="edge_tap_area_width">80dp</dimen>
|
|
||||||
|
|
||||||
- <!-- Margin on the right side of the system icon group on Keyguard. -->
|
|
||||||
- <dimen name="system_icons_keyguard_padding_end">2dp</dimen>
|
|
||||||
-
|
|
||||||
<!-- Screen pinning request width -->
|
|
||||||
<dimen name="screen_pinning_request_width">400dp</dimen>
|
|
||||||
<!-- Screen pinning request bottom button circle widths -->
|
|
||||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
|
||||||
index cd11fb7d81ac..786b21f7595a 100644
|
|
||||||
--- a/packages/SystemUI/res/values/dimens.xml
|
|
||||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
|
||||||
@@ -449,7 +449,7 @@
|
|
||||||
<dimen name="system_icons_super_container_margin_start">16dp</dimen>
|
|
||||||
|
|
||||||
<!-- Margin end of the system icons super container when the avatar is missing. -->
|
|
||||||
- <dimen name="system_icons_super_container_avatarless_margin_end">6dp</dimen>
|
|
||||||
+ <dimen name="system_icons_super_container_avatarless_margin_end">0dp</dimen>
|
|
||||||
|
|
||||||
<!-- Width for the notification panel and related windows -->
|
|
||||||
<dimen name="match_parent">-1px</dimen>
|
|
||||||
@@ -868,7 +868,7 @@
|
|
||||||
<dimen name="kg_framed_avatar_size">32dp</dimen>
|
|
||||||
|
|
||||||
<!-- Margin on the left side of the carrier text on Keyguard -->
|
|
||||||
- <dimen name="keyguard_carrier_text_margin">16dp</dimen>
|
|
||||||
+ <dimen name="keyguard_carrier_text_margin">@dimen/status_bar_padding_start</dimen>
|
|
||||||
|
|
||||||
<!-- Margin on the left side of the battery % in the header. -->
|
|
||||||
<dimen name="header_battery_margin_expanded">6dp</dimen>
|
|
||||||
@@ -877,7 +877,7 @@
|
|
||||||
<dimen name="header_battery_margin_keyguard">6dp</dimen>
|
|
||||||
|
|
||||||
<!-- Margin on the right side of the system icon group on Keyguard. -->
|
|
||||||
- <dimen name="system_icons_keyguard_padding_end">4dp</dimen>
|
|
||||||
+ <dimen name="system_icons_keyguard_padding_end">@dimen/status_bar_padding_end</dimen>
|
|
||||||
|
|
||||||
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
|
|
||||||
from Keyguard. -->
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
|
||||||
index 3478ec463573..386b4e007a90 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
|
||||||
@@ -91,6 +91,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
private QSExpansionPathInterpolator mQSExpansionPathInterpolator;
|
|
||||||
|
|
||||||
private int mRoundedCornerPadding = 0;
|
|
||||||
+ private int mStatusBarPaddingStart;
|
|
||||||
+ private int mStatusBarPaddingEnd;
|
|
||||||
+ private int mHeaderPaddingLeft;
|
|
||||||
+ private int mHeaderPaddingRight;
|
|
||||||
private int mWaterfallTopInset;
|
|
||||||
private int mCutOutPaddingLeft;
|
|
||||||
private int mCutOutPaddingRight;
|
|
||||||
@@ -102,6 +106,8 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
private List<String> mRssiIgnoredSlots;
|
|
||||||
private boolean mIsSingleCarrier;
|
|
||||||
|
|
||||||
+ private boolean mHasLeftCutout;
|
|
||||||
+ private boolean mHasRightCutout;
|
|
||||||
private boolean mHasCenterCutout;
|
|
||||||
private boolean mConfigShowBatteryEstimate;
|
|
||||||
|
|
||||||
@@ -244,6 +250,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
mRoundedCornerPadding = resources.getDimensionPixelSize(
|
|
||||||
R.dimen.rounded_corner_content_padding);
|
|
||||||
|
|
||||||
+ mStatusBarPaddingStart = resources.getDimensionPixelSize(
|
|
||||||
+ R.dimen.status_bar_padding_start);
|
|
||||||
+ mStatusBarPaddingEnd = resources.getDimensionPixelSize(
|
|
||||||
+ R.dimen.status_bar_padding_end);
|
|
||||||
+
|
|
||||||
int qsOffsetHeight = resources.getDimensionPixelSize(
|
|
||||||
com.android.internal.R.dimen.quick_qs_offset_height);
|
|
||||||
|
|
||||||
@@ -324,6 +335,9 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
.addFloat(mDateView, "alpha", 0, 0, 1)
|
|
||||||
.addFloat(mClockDateView, "alpha", 1, 0, 0)
|
|
||||||
.addFloat(mQSCarriers, "alpha", 0, 1)
|
|
||||||
+ // Use statusbar paddings when collapsed, align with QS when expanded, and animate translation
|
|
||||||
+ .addFloat(mClockContainer, "translationX", mHeaderPaddingLeft + mStatusBarPaddingStart, 0)
|
|
||||||
+ .addFloat(mRightLayout, "translationX", -(mHeaderPaddingRight + mStatusBarPaddingEnd), 0)
|
|
||||||
.setListener(new TouchAnimator.ListenerAdapter() {
|
|
||||||
@Override
|
|
||||||
public void onAnimationAtEnd() {
|
|
||||||
@@ -430,8 +444,6 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
Pair<Integer, Integer> padding =
|
|
||||||
StatusBarWindowView.paddingNeededForCutoutAndRoundedCorner(
|
|
||||||
cutout, cornerCutoutPadding, -1);
|
|
||||||
- mDatePrivacyView.setPadding(padding.first, 0, padding.second, 0);
|
|
||||||
- mClockIconsView.setPadding(padding.first, 0, padding.second, 0);
|
|
||||||
LinearLayout.LayoutParams datePrivacySeparatorLayoutParams =
|
|
||||||
(LinearLayout.LayoutParams) mDatePrivacySeparator.getLayoutParams();
|
|
||||||
LinearLayout.LayoutParams mClockIconsSeparatorLayoutParams =
|
|
||||||
@@ -446,6 +458,12 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
mClockIconsSeparatorLayoutParams.width = 0;
|
|
||||||
setSeparatorVisibility(false);
|
|
||||||
mShowClockIconsSeparator = false;
|
|
||||||
+ if (cornerCutoutPadding.first != 0) {
|
|
||||||
+ mHasLeftCutout = true;
|
|
||||||
+ }
|
|
||||||
+ if (cornerCutoutPadding.second != 0) {
|
|
||||||
+ mHasRightCutout = true;
|
|
||||||
+ }
|
|
||||||
mHasCenterCutout = false;
|
|
||||||
} else {
|
|
||||||
datePrivacySeparatorLayoutParams.width = topCutout.width();
|
|
||||||
@@ -453,6 +471,8 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
mClockIconsSeparatorLayoutParams.width = topCutout.width();
|
|
||||||
mShowClockIconsSeparator = true;
|
|
||||||
setSeparatorVisibility(mKeyguardExpansionFraction == 0f);
|
|
||||||
+ mHasLeftCutout = false;
|
|
||||||
+ mHasRightCutout = false;
|
|
||||||
mHasCenterCutout = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -497,34 +517,37 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
|
||||||
private void updateHeadersPadding() {
|
|
||||||
setContentMargins(mDatePrivacyView, 0, 0);
|
|
||||||
setContentMargins(mClockIconsView, 0, 0);
|
|
||||||
- int paddingLeft = 0;
|
|
||||||
- int paddingRight = 0;
|
|
||||||
|
|
||||||
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
|
|
||||||
+ // Note: these are supposedly notification_side_paddings
|
|
||||||
int leftMargin = lp.leftMargin;
|
|
||||||
int rightMargin = lp.rightMargin;
|
|
||||||
|
|
||||||
// The clock might collide with cutouts, let's shift it out of the way.
|
|
||||||
- // We only do that if the inset is bigger than our own padding, since it's nicer to
|
|
||||||
- // align with
|
|
||||||
- if (mCutOutPaddingLeft > 0) {
|
|
||||||
- // if there's a cutout, let's use at least the rounded corner inset
|
|
||||||
- int cutoutPadding = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding);
|
|
||||||
- paddingLeft = Math.max(cutoutPadding - leftMargin, 0);
|
|
||||||
+ // Margin will be the reference point of paddings/translations
|
|
||||||
+ // and will have to be subtracted from cutout paddings
|
|
||||||
+ boolean headerPaddingUpdated = false;
|
|
||||||
+ int headerPaddingLeft = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding) - leftMargin;
|
|
||||||
+ if (headerPaddingLeft != mHeaderPaddingLeft) {
|
|
||||||
+ mHeaderPaddingLeft = headerPaddingLeft;
|
|
||||||
+ headerPaddingUpdated = true;
|
|
||||||
}
|
|
||||||
- if (mCutOutPaddingRight > 0) {
|
|
||||||
- // if there's a cutout, let's use at least the rounded corner inset
|
|
||||||
- int cutoutPadding = Math.max(mCutOutPaddingRight, mRoundedCornerPadding);
|
|
||||||
- paddingRight = Math.max(cutoutPadding - rightMargin, 0);
|
|
||||||
+ int headerPaddingRight = Math.max(mCutOutPaddingRight, mRoundedCornerPadding) - rightMargin;
|
|
||||||
+ if (headerPaddingRight != mHeaderPaddingRight) {
|
|
||||||
+ mHeaderPaddingRight = headerPaddingRight;
|
|
||||||
+ headerPaddingUpdated = true;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- mDatePrivacyView.setPadding(paddingLeft,
|
|
||||||
+ // Update header animator with new paddings
|
|
||||||
+ if (headerPaddingUpdated) {
|
|
||||||
+ updateAnimators();
|
|
||||||
+ }
|
|
||||||
+ mDatePrivacyView.setPadding(mHeaderPaddingLeft + mStatusBarPaddingStart,
|
|
||||||
mWaterfallTopInset,
|
|
||||||
- paddingRight,
|
|
||||||
+ mHeaderPaddingRight + mStatusBarPaddingEnd,
|
|
||||||
0);
|
|
||||||
- mClockIconsView.setPadding(paddingLeft,
|
|
||||||
+ mClockIconsView.setPadding(0,
|
|
||||||
mWaterfallTopInset,
|
|
||||||
- paddingRight,
|
|
||||||
+ 0,
|
|
||||||
0);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
|
||||||
index efc02548763a..ce5719c674dd 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
|
||||||
@@ -164,14 +164,7 @@ public class KeyguardStatusBarView extends RelativeLayout implements
|
|
||||||
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.25.1
|
|
||||||
|
|
||||||
+165
@@ -0,0 +1,165 @@
|
|||||||
|
From 0425dac4b2f22dc37e117b55a0fdefe91f6e2ebb 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 2023/03/22, targeting T QPR2
|
||||||
|
|
||||||
|
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/combined_qs_header.xml | 2 +-
|
||||||
|
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
|
||||||
|
packages/SystemUI/res/values-sw600dp/dimens.xml | 3 ---
|
||||||
|
packages/SystemUI/res/values/dimens.xml | 2 +-
|
||||||
|
packages/SystemUI/res/xml/qqs_header.xml | 4 ++--
|
||||||
|
.../android/systemui/shade/ShadeHeaderController.kt | 10 +++++++---
|
||||||
|
.../statusbar/phone/KeyguardStatusBarView.java | 7 -------
|
||||||
|
7 files changed, 12 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/layout/combined_qs_header.xml b/packages/SystemUI/res/layout/combined_qs_header.xml
|
||||||
|
index 828a4535e656..65c8e52d00ac 100644
|
||||||
|
--- a/packages/SystemUI/res/layout/combined_qs_header.xml
|
||||||
|
+++ b/packages/SystemUI/res/layout/combined_qs_header.xml
|
||||||
|
@@ -151,4 +151,4 @@
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
-</com.android.systemui.util.NoRemeasureMotionLayout>
|
||||||
|
\ No newline at end of file
|
||||||
|
+</com.android.systemui.util.NoRemeasureMotionLayout>
|
||||||
|
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
index 9135e78f3e4c..ddaea938c858 100644
|
||||||
|
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||||
|
@@ -69,7 +69,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 59becc69506c..9168a5ce1ced 100644
|
||||||
|
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||||
|
@@ -28,9 +28,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 -->
|
||||||
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
index e2c65f5542b7..d0a9055e1905 100644
|
||||||
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
@@ -790,7 +790,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 00a0444a1c9d..a5c3f8e982ca 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"
|
||||||
|
@@ -109,4 +109,4 @@
|
||||||
|
app:layout_constraintHorizontal_bias="1"
|
||||||
|
/>
|
||||||
|
</Constraint>
|
||||||
|
-</ConstraintSet>
|
||||||
|
\ No newline at end of file
|
||||||
|
+</ConstraintSet>
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
index a6b88370f836..e7632971d37e 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
|
||||||
|
@@ -132,6 +132,8 @@ constructor(
|
||||||
|
|
||||||
|
private var roundedCorners = 0
|
||||||
|
private var cutout: DisplayCutout? = null
|
||||||
|
+ private var statusBarPaddingStart = 0
|
||||||
|
+ private var statusBarPaddingEnd = 0
|
||||||
|
private var lastInsets: WindowInsets? = null
|
||||||
|
private var textColorPrimary = Color.TRANSPARENT
|
||||||
|
|
||||||
|
@@ -364,14 +366,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
|
||||||
|
)
|
||||||
|
|
||||||
|
@@ -483,7 +488,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 7b6fc66a208d..ab919f4c5882 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||||
|
@@ -164,14 +164,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
|
||||||
|
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
|
||||||
|
|
||||||
-378
@@ -1,378 +0,0 @@
|
|||||||
From da27cecc0366133f80c38aa479da212faa503181 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Tue, 19 Oct 2021 12:11:24 +0000
|
|
||||||
Subject: [PATCH 10/16] Revert "monet: Add support for monet (cam16)"
|
|
||||||
|
|
||||||
This reverts commit f4460c9cb0494ddcc1829b05298d140fa1afc526.
|
|
||||||
|
|
||||||
Change-Id: I94ca83b2c147a32afeb4fbddbc5d6dbcfd804199
|
|
||||||
---
|
|
||||||
packages/SystemUI/Android.bp | 2 -
|
|
||||||
packages/SystemUI/monet/Android.bp | 12 --
|
|
||||||
packages/SystemUI/monet/AndroidManifest.xml | 4 -
|
|
||||||
.../com/android/systemui/monet/ColorScheme.kt | 168 ------------------
|
|
||||||
.../com/android/systemui/monet/Shades.java | 19 --
|
|
||||||
.../theme/ThemeOverlayController.java | 56 ++----
|
|
||||||
6 files changed, 10 insertions(+), 251 deletions(-)
|
|
||||||
delete mode 100644 packages/SystemUI/monet/Android.bp
|
|
||||||
delete mode 100644 packages/SystemUI/monet/AndroidManifest.xml
|
|
||||||
delete mode 100644 packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
|
|
||||||
delete mode 100644 packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
|
|
||||||
index e677b10295f6..e86486dbc6bc 100644
|
|
||||||
--- a/packages/SystemUI/Android.bp
|
|
||||||
+++ b/packages/SystemUI/Android.bp
|
|
||||||
@@ -97,7 +97,6 @@ android_library {
|
|
||||||
"lottie",
|
|
||||||
"org.lineageos.platform.internal",
|
|
||||||
"vendor.lineage.powershare-V1.0-java",
|
|
||||||
- "monet",
|
|
||||||
],
|
|
||||||
manifest: "AndroidManifest.xml",
|
|
||||||
additional_manifests: ["LineageManifest.xml"],
|
|
||||||
@@ -188,7 +187,6 @@ android_library {
|
|
||||||
"WindowManager-Shell",
|
|
||||||
"org.lineageos.platform.internal",
|
|
||||||
"vendor.lineage.powershare-V1.0-java",
|
|
||||||
- "monet",
|
|
||||||
],
|
|
||||||
libs: [
|
|
||||||
"android.test.runner",
|
|
||||||
diff --git a/packages/SystemUI/monet/Android.bp b/packages/SystemUI/monet/Android.bp
|
|
||||||
deleted file mode 100644
|
|
||||||
index 42563765b077..000000000000
|
|
||||||
--- a/packages/SystemUI/monet/Android.bp
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,12 +0,0 @@
|
|
||||||
-java_library {
|
|
||||||
- name: "monet",
|
|
||||||
- platform_apis: true,
|
|
||||||
- static_libs: [
|
|
||||||
- "androidx.annotation_annotation",
|
|
||||||
- "androidx.core_core",
|
|
||||||
- ],
|
|
||||||
- srcs: [
|
|
||||||
- "src/**/*.java",
|
|
||||||
- "src/**/*.kt",
|
|
||||||
- ],
|
|
||||||
-}
|
|
||||||
diff --git a/packages/SystemUI/monet/AndroidManifest.xml b/packages/SystemUI/monet/AndroidManifest.xml
|
|
||||||
deleted file mode 100644
|
|
||||||
index 37f0050ee949..000000000000
|
|
||||||
--- a/packages/SystemUI/monet/AndroidManifest.xml
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,4 +0,0 @@
|
|
||||||
-<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
- package="com.android.systemui.monet">
|
|
||||||
-</manifest>
|
|
||||||
diff --git a/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt b/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
|
|
||||||
deleted file mode 100644
|
|
||||||
index 56a9c805ca81..000000000000
|
|
||||||
--- a/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,168 +0,0 @@
|
|
||||||
-package com.android.systemui.monet
|
|
||||||
-
|
|
||||||
-import android.app.WallpaperColors
|
|
||||||
-import android.graphics.Color
|
|
||||||
-import com.android.internal.graphics.ColorUtils
|
|
||||||
-import com.android.internal.graphics.cam.Cam
|
|
||||||
-import com.android.internal.graphics.cam.CamUtils
|
|
||||||
-import kotlin.math.absoluteValue
|
|
||||||
-import kotlin.math.roundToInt
|
|
||||||
-
|
|
||||||
-public class ColorScheme(i: Int, val darkTheme: Boolean) {
|
|
||||||
- val accent1: List<Int>
|
|
||||||
- val accent2: List<Int>
|
|
||||||
- val accent3: List<Int>
|
|
||||||
- val neutral1: List<Int>
|
|
||||||
- val neutral2: List<Int>
|
|
||||||
-
|
|
||||||
- init {
|
|
||||||
- val fromInt = Cam.fromInt(if (i == 0) -14979341 else i)
|
|
||||||
- val hue = fromInt.hue
|
|
||||||
- accent1 = Shades.of(hue, fromInt.chroma.coerceAtLeast(48.0f)).toList()
|
|
||||||
- accent2 = Shades.of(hue, 16.0f).toList()
|
|
||||||
- accent3 = Shades.of(60.0f + hue, 32.0f).toList()
|
|
||||||
- neutral1 = Shades.of(hue, 4.0f).toList()
|
|
||||||
- neutral2 = Shades.of(hue, 8.0f).toList()
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- val accentColors1: List<Int>
|
|
||||||
- get() {
|
|
||||||
- return accent1
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- val allAccentColors: List<Int>
|
|
||||||
- get() {
|
|
||||||
- val arrayList = mutableListOf<Int>()
|
|
||||||
- arrayList.addAll(accent1)
|
|
||||||
- arrayList.addAll(accent2)
|
|
||||||
- arrayList.addAll(accent3)
|
|
||||||
- return arrayList
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- val allNeutralColors: List<Int>
|
|
||||||
- get() {
|
|
||||||
- val arrayList = mutableListOf<Int>()
|
|
||||||
- arrayList.addAll(neutral1)
|
|
||||||
- arrayList.addAll(neutral2)
|
|
||||||
- return arrayList
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- override fun toString(): String {
|
|
||||||
- return "ColorScheme {\n" +
|
|
||||||
- " neutral1: ${humanReadable(neutral1)}\n" +
|
|
||||||
- " neutral2: ${humanReadable(neutral2)}\n" +
|
|
||||||
- " accent1: ${humanReadable(accent1)}\n" +
|
|
||||||
- " accent2: ${humanReadable(accent2)}\n" +
|
|
||||||
- " accent3: ${humanReadable(accent3)}\n" +
|
|
||||||
- "}"
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- companion object {
|
|
||||||
- @JvmStatic
|
|
||||||
- fun getSeedColor(wallpaperColors: WallpaperColors): Int {
|
|
||||||
- return getSeedColors(wallpaperColors).first()
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @JvmStatic
|
|
||||||
- fun getSeedColors(wallpaperColors: WallpaperColors): List<Int> {
|
|
||||||
- val intValue2 = wallpaperColors.allColors.values.reduce { a, b -> a + b }.toDouble()
|
|
||||||
- val z2 = (intValue2 == 0.0)
|
|
||||||
- if (z2) {
|
|
||||||
- val list2 = wallpaperColors.mainColors.map {
|
|
||||||
- it.toArgb()
|
|
||||||
- }.distinct().filter {
|
|
||||||
- Cam.fromInt(it).chroma >= 15.0f && CamUtils.lstarFromInt(it) >= 10.0f
|
|
||||||
- }.toList()
|
|
||||||
-
|
|
||||||
- if (list2.isEmpty()) {
|
|
||||||
- return listOf(-14979341)
|
|
||||||
- }
|
|
||||||
- return list2
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- val linkedHashMap = wallpaperColors.allColors.mapValues { it.value.toDouble() / intValue2 }
|
|
||||||
-
|
|
||||||
- val linkedHashMap2 = wallpaperColors.allColors.mapValues { Cam.fromInt(it.key) }
|
|
||||||
-
|
|
||||||
- val huePopulation = huePopulations(linkedHashMap2, linkedHashMap)
|
|
||||||
-
|
|
||||||
- val linkedHashMap3 = wallpaperColors.allColors.mapValues {
|
|
||||||
- val cam = linkedHashMap2[it.key]!!
|
|
||||||
- val i = cam.hue.roundToInt()
|
|
||||||
- val i2 = i - 15
|
|
||||||
- val i3 = i + 15
|
|
||||||
- var d = 0.0
|
|
||||||
- for (a in i2..i3) {
|
|
||||||
- d += huePopulation[wrapDegrees(a)]
|
|
||||||
- }
|
|
||||||
- d
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- val linkedHashMap4 = linkedHashMap2.filter {
|
|
||||||
- val key4 = it.key
|
|
||||||
- val lstarFromInt = CamUtils.lstarFromInt(key4)
|
|
||||||
- val d2 = linkedHashMap3[key4]!!
|
|
||||||
- it.value.chroma >= 15.0f && lstarFromInt >= 10.0f && (z2 || d2 > 0.01)
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- val arrayList3 = mutableListOf<Int>()
|
|
||||||
- val linkedHashMap5 = linkedHashMap4.mapValues {
|
|
||||||
- score(it.value, linkedHashMap3[it.key]!!)
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- val list3 = linkedHashMap5.entries.toMutableList()
|
|
||||||
- list3.sortByDescending { it.value }
|
|
||||||
-
|
|
||||||
- for (entry6 in list3) {
|
|
||||||
- val num2 = entry6.key
|
|
||||||
- val z = arrayList3.find {
|
|
||||||
- val hue1 = linkedHashMap2[num2]!!.hue
|
|
||||||
- val hue2 = linkedHashMap2[it]!!.hue
|
|
||||||
- hueDiff(hue1, hue2) < 15 } != null
|
|
||||||
- if (z) {
|
|
||||||
- continue
|
|
||||||
- }
|
|
||||||
- arrayList3.add(num2)
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (arrayList3.isEmpty()) {
|
|
||||||
- arrayList3.add(-14979341)
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return arrayList3;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private fun wrapDegrees(i: Int): Int {
|
|
||||||
- if (i < 0) {
|
|
||||||
- return (i % 360) + 360
|
|
||||||
- }
|
|
||||||
- return if (i >= 360) i % 360 else i
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private fun hueDiff(f: Float, f2: Float): Float {
|
|
||||||
- return 180f - ((f - f2).absoluteValue - 180f).absoluteValue
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private fun humanReadable(list: List<Int>): String {
|
|
||||||
- return list.joinToString { "#" + Integer.toHexString(it) }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private fun score(cam: Cam, d: Double): Double {
|
|
||||||
- val f = cam.getChroma()
|
|
||||||
- val d2 = if (f < 48.0) 0.1 else 0.3
|
|
||||||
- val d3 = d * 70.0
|
|
||||||
- return ((f - 48.0) * d2) + d3
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private fun huePopulations(map: Map<Int, Cam>, map2: Map<Int, Double>): List<Double> {
|
|
||||||
- val arrayList = List(size = 360, init = { 0.0 }).toMutableList()
|
|
||||||
- for (entry in map2.entries) {
|
|
||||||
- val d = map2[entry.key]!!
|
|
||||||
- val cam = map[entry.key]!!
|
|
||||||
- val i2 = cam.hue.roundToInt() % 360
|
|
||||||
- arrayList[i2] = arrayList[i2] + d
|
|
||||||
- }
|
|
||||||
- return arrayList
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
diff --git a/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java b/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
|
|
||||||
deleted file mode 100644
|
|
||||||
index 5ab00a1afcb4..000000000000
|
|
||||||
--- a/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,19 +0,0 @@
|
|
||||||
-package com.android.systemui.monet;
|
|
||||||
-
|
|
||||||
-import com.android.internal.annotations.VisibleForTesting;
|
|
||||||
-import com.android.internal.graphics.ColorUtils;
|
|
||||||
-
|
|
||||||
-@VisibleForTesting
|
|
||||||
-public class Shades {
|
|
||||||
- public static int[] of(float f, float f2) {
|
|
||||||
- int[] iArr = new int[12];
|
|
||||||
- iArr[0] = ColorUtils.CAMToColor(f, f2, 99.0f);
|
|
||||||
- iArr[1] = ColorUtils.CAMToColor(f, f2, 95.0f);
|
|
||||||
- int i = 2;
|
|
||||||
- while (i < 12) {
|
|
||||||
- iArr[i] = ColorUtils.CAMToColor(f, f2, i == 6 ? 49.6f : (float) (100 - ((i - 1) * 10)));
|
|
||||||
- i++;
|
|
||||||
- }
|
|
||||||
- return iArr;
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
|
||||||
index 1e35c9e51150..81999b534046 100644
|
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
|
||||||
@@ -37,7 +37,6 @@ import android.content.IntentFilter;
|
|
||||||
import android.content.om.FabricatedOverlay;
|
|
||||||
import android.content.om.OverlayIdentifier;
|
|
||||||
import android.content.pm.UserInfo;
|
|
||||||
-import android.content.res.Configuration;
|
|
||||||
import android.database.ContentObserver;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.net.Uri;
|
|
||||||
@@ -48,11 +47,9 @@ import android.provider.Settings;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.ArrayMap;
|
|
||||||
import android.util.Log;
|
|
||||||
-import android.util.TypedValue;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
-import com.android.internal.graphics.ColorUtils;
|
|
||||||
import com.android.systemui.Dumpable;
|
|
||||||
import com.android.systemui.SystemUI;
|
|
||||||
import com.android.systemui.broadcast.BroadcastDispatcher;
|
|
||||||
@@ -61,7 +58,6 @@ import com.android.systemui.dagger.qualifiers.Background;
|
|
||||||
import com.android.systemui.dagger.qualifiers.Main;
|
|
||||||
import com.android.systemui.dump.DumpManager;
|
|
||||||
import com.android.systemui.keyguard.WakefulnessLifecycle;
|
|
||||||
-import com.android.systemui.monet.ColorScheme;
|
|
||||||
import com.android.systemui.settings.UserTracker;
|
|
||||||
import com.android.systemui.statusbar.FeatureFlags;
|
|
||||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
|
||||||
@@ -75,7 +71,6 @@ import java.io.FileDescriptor;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashSet;
|
|
||||||
-import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.concurrent.Executor;
|
|
||||||
@@ -408,56 +403,25 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
|
||||||
* Return the main theme color from a given {@link WallpaperColors} instance.
|
|
||||||
*/
|
|
||||||
protected int getNeutralColor(@NonNull WallpaperColors wallpaperColors) {
|
|
||||||
- return ColorScheme.getSeedColor(wallpaperColors);
|
|
||||||
+ return wallpaperColors.getPrimaryColor().toArgb();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected int getAccentColor(@NonNull WallpaperColors wallpaperColors) {
|
|
||||||
- return ColorScheme.getSeedColor(wallpaperColors);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private final boolean inDarkMode() {
|
|
||||||
- return (mContext.getResources().getConfiguration().uiMode
|
|
||||||
- & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
|
|
||||||
+ Color accentCandidate = wallpaperColors.getSecondaryColor();
|
|
||||||
+ if (accentCandidate == null) {
|
|
||||||
+ accentCandidate = wallpaperColors.getTertiaryColor();
|
|
||||||
+ }
|
|
||||||
+ if (accentCandidate == null) {
|
|
||||||
+ accentCandidate = wallpaperColors.getPrimaryColor();
|
|
||||||
+ }
|
|
||||||
+ return accentCandidate.toArgb();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Given a color candidate, return an overlay definition.
|
|
||||||
*/
|
|
||||||
protected @Nullable FabricatedOverlay getOverlay(int color, int type) {
|
|
||||||
- ColorScheme colorScheme = new ColorScheme(color, inDarkMode());
|
|
||||||
- List<Integer> colors;
|
|
||||||
- String name;
|
|
||||||
-
|
|
||||||
- if (type == ACCENT) {
|
|
||||||
- colors = colorScheme.getAllAccentColors();
|
|
||||||
- name = "accent";
|
|
||||||
- } else {
|
|
||||||
- colors = colorScheme.getAllNeutralColors();
|
|
||||||
- name = "neutral";
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- int size = colorScheme.getAccent1().size();
|
|
||||||
- FabricatedOverlay.Builder builder =
|
|
||||||
- new FabricatedOverlay.Builder(mContext.getPackageName(), name, "android");
|
|
||||||
-
|
|
||||||
- for (int i = 0; i < colors.size(); i++) {
|
|
||||||
- int lightness = i % size;
|
|
||||||
- int shade = i / size + 1;
|
|
||||||
-
|
|
||||||
- String targetResource = "android:color/system_";
|
|
||||||
- if (lightness == 0) {
|
|
||||||
- targetResource += name + shade + "_10";
|
|
||||||
- } else if (lightness == 1) {
|
|
||||||
- targetResource += name + shade + "_50";
|
|
||||||
- } else {
|
|
||||||
- targetResource += name + shade + "_" + (lightness - 1) + "00";
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- builder.setResourceValue(targetResource, TypedValue.TYPE_INT_COLOR_ARGB8,
|
|
||||||
- ColorUtils.setAlphaComponent(colors.get(i).intValue(), 0xFF));
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return builder.build();
|
|
||||||
+ return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateThemeOverlays() {
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
From 4803ddab6f362587e769b2aa5d60a041345d26af 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 31d22eb38a24..65a71664e245 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.graphics.ColorUtils;
|
||||||
|
import com.android.settingslib.Utils;
|
||||||
|
import com.android.systemui.R;
|
||||||
|
import com.android.systemui.animation.Interpolators;
|
||||||
|
-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
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From b8fe4a2e79bd273f69bb0331eb0d07ad0454d43f Mon Sep 17 00:00:00 2001
|
From f5ad15c1785d0a458bc2be47f0ef2a8d5283ae86 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 5 Sep 2021 01:20:12 +0000
|
Date: Sun, 5 Sep 2021 01:20:12 +0000
|
||||||
Subject: [PATCH 11/16] Revert "Update RAT icons to match Silk design"
|
Subject: [PATCH 12/21] Revert "Update RAT icons to match Silk design"
|
||||||
|
|
||||||
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
|
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
|
||||||
---
|
---
|
||||||
@@ -269,5 +269,5 @@ index 48faeb22416f..1511659ea42f 100644
|
|||||||
+ android:pathData="M14.21,12.81c0.36,-0.16 0.69,-0.36 0.97,-0.61c0.41,-0.38 0.72,-0.83 0.94,-1.37c0.21,-0.54 0.32,-1.14 0.32,-1.79c0,-0.92 -0.16,-1.7 -0.49,-2.33c-0.32,-0.64 -0.79,-1.12 -1.43,-1.45c-0.62,-0.33 -1.4,-0.49 -2.32,-0.49H8.23V19h1.8v-5.76h2.5L15.06,19h1.92v-0.12L14.21,12.81zM10.03,11.71V6.32h2.18c0.59,0 1.06,0.11 1.42,0.34c0.36,0.22 0.62,0.54 0.78,0.95c0.16,0.41 0.24,0.89 0.24,1.44c0,0.49 -0.09,0.93 -0.27,1.34c-0.18,0.4 -0.46,0.73 -0.82,0.97c-0.36,0.23 -0.82,0.35 -1.37,0.35H10.03z"/>
|
+ android:pathData="M14.21,12.81c0.36,-0.16 0.69,-0.36 0.97,-0.61c0.41,-0.38 0.72,-0.83 0.94,-1.37c0.21,-0.54 0.32,-1.14 0.32,-1.79c0,-0.92 -0.16,-1.7 -0.49,-2.33c-0.32,-0.64 -0.79,-1.12 -1.43,-1.45c-0.62,-0.33 -1.4,-0.49 -2.32,-0.49H8.23V19h1.8v-5.76h2.5L15.06,19h1.92v-0.12L14.21,12.81zM10.03,11.71V6.32h2.18c0.59,0 1.06,0.11 1.42,0.34c0.36,0.22 0.62,0.54 0.78,0.95c0.16,0.41 0.24,0.89 0.24,1.44c0,0.49 -0.09,0.93 -0.27,1.34c-0.18,0.4 -0.46,0.73 -0.82,0.97c-0.36,0.23 -0.82,0.35 -1.37,0.35H10.03z"/>
|
||||||
</vector>
|
</vector>
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
From 15e59be158a3305a17e14cc18883d323d2afc54b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Thu, 29 Sep 2022 11:27:57 +0000
|
||||||
|
Subject: [PATCH 13/21] Revert "Use the default top clock margin on h800
|
||||||
|
devices"
|
||||||
|
|
||||||
|
This reverts commits 50ba380f4d8d1c2523e0f76295ca556038796bfd
|
||||||
|
and 2a254b4d479029aec46f79a0ed14ffab6d0424bc.
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values-h800dp/dimens.xml | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values-h800dp/dimens.xml b/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
index 3a71994e07e2..4b9bce0eda99 100644
|
||||||
|
--- a/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values-h800dp/dimens.xml
|
||||||
|
@@ -15,6 +15,9 @@
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
+ <!-- Minimum margin between clock and top of screen or ambient indication -->
|
||||||
|
+ <dimen name="keyguard_clock_top_margin">38dp</dimen>
|
||||||
|
+
|
||||||
|
<!-- With the large clock, move up slightly from the center -->
|
||||||
|
<dimen name="keyguard_large_clock_top_margin">-112dp</dimen>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+30
-34
@@ -1,50 +1,47 @@
|
|||||||
From fe5e86fc264bf9ca5d6cfa89d28d51bd123c2966 Mon Sep 17 00:00:00 2001
|
From 6927e68fa4ec001ec72e9f68e4454a37c8bc7bb5 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 7 Oct 2020 14:00:35 +0000
|
Date: Wed, 7 Oct 2020 14:00:35 +0000
|
||||||
Subject: [PATCH 12/16] UI: Always render windows into cutouts
|
Subject: [PATCH 14/21] UI: Always render windows into cutouts
|
||||||
|
|
||||||
Eliminates black/white letterboxing
|
Eliminates black/white letterboxing
|
||||||
Quick and dirty way to do the latter - wait for proper fix from Google
|
Quick and dirty way to do the latter - wait for proper fix from Google
|
||||||
|
|
||||||
Change-Id: I4661c7979bfa7de453329fcddbaeefc2009e2da3
|
Change-Id: I4661c7979bfa7de453329fcddbaeefc2009e2da3
|
||||||
---
|
---
|
||||||
.../com/android/server/wm/DisplayFrames.java | 31 +++----------------
|
.../com/android/server/wm/DisplayFrames.java | 28 +++----------------
|
||||||
.../com/android/server/wm/DisplayPolicy.java | 2 +-
|
.../com/android/server/wm/DisplayPolicy.java | 1 +
|
||||||
2 files changed, 5 insertions(+), 28 deletions(-)
|
2 files changed, 5 insertions(+), 24 deletions(-)
|
||||||
|
|
||||||
diff --git a/services/core/java/com/android/server/wm/DisplayFrames.java b/services/core/java/com/android/server/wm/DisplayFrames.java
|
diff --git a/services/core/java/com/android/server/wm/DisplayFrames.java b/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||||
index 32e43ca4e56c..18c28ae674f9 100644
|
index 33641f72b2ff..6e201970ac03 100644
|
||||||
--- a/services/core/java/com/android/server/wm/DisplayFrames.java
|
--- a/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||||
+++ b/services/core/java/com/android/server/wm/DisplayFrames.java
|
+++ b/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||||
@@ -98,33 +98,10 @@ public class DisplayFrames {
|
@@ -92,30 +92,10 @@ public class DisplayFrames {
|
||||||
state.setDisplayCutout(cutout);
|
|
||||||
state.setRoundedCorners(roundedCorners);
|
state.setRoundedCorners(roundedCorners);
|
||||||
state.setPrivacyIndicatorBounds(indicatorBounds);
|
state.setPrivacyIndicatorBounds(indicatorBounds);
|
||||||
- if (!cutout.isEmpty()) {
|
state.getDisplayCutoutSafe(safe);
|
||||||
- if (cutout.getSafeInsetLeft() > 0) {
|
- if (safe.left > unrestricted.left) {
|
||||||
- safe.left = unrestricted.left + cutout.getSafeInsetLeft();
|
|
||||||
- }
|
|
||||||
- if (cutout.getSafeInsetTop() > 0) {
|
|
||||||
- safe.top = unrestricted.top + cutout.getSafeInsetTop();
|
|
||||||
- }
|
|
||||||
- if (cutout.getSafeInsetRight() > 0) {
|
|
||||||
- safe.right = unrestricted.right - cutout.getSafeInsetRight();
|
|
||||||
- }
|
|
||||||
- if (cutout.getSafeInsetBottom() > 0) {
|
|
||||||
- safe.bottom = unrestricted.bottom - cutout.getSafeInsetBottom();
|
|
||||||
- }
|
|
||||||
- state.getSource(ITYPE_LEFT_DISPLAY_CUTOUT).setFrame(
|
- state.getSource(ITYPE_LEFT_DISPLAY_CUTOUT).setFrame(
|
||||||
- unrestricted.left, unrestricted.top, safe.left, unrestricted.bottom);
|
- unrestricted.left, unrestricted.top, safe.left, unrestricted.bottom);
|
||||||
|
- } else {
|
||||||
|
- state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
||||||
|
- }
|
||||||
|
- if (safe.top > unrestricted.top) {
|
||||||
- state.getSource(ITYPE_TOP_DISPLAY_CUTOUT).setFrame(
|
- state.getSource(ITYPE_TOP_DISPLAY_CUTOUT).setFrame(
|
||||||
- unrestricted.left, unrestricted.top, unrestricted.right, safe.top);
|
- unrestricted.left, unrestricted.top, unrestricted.right, safe.top);
|
||||||
|
- } else {
|
||||||
|
- state.removeSource(ITYPE_TOP_DISPLAY_CUTOUT);
|
||||||
|
- }
|
||||||
|
- if (safe.right < unrestricted.right) {
|
||||||
- state.getSource(ITYPE_RIGHT_DISPLAY_CUTOUT).setFrame(
|
- state.getSource(ITYPE_RIGHT_DISPLAY_CUTOUT).setFrame(
|
||||||
- safe.right, unrestricted.top, unrestricted.right, unrestricted.bottom);
|
- safe.right, unrestricted.top, unrestricted.right, unrestricted.bottom);
|
||||||
|
- } else {
|
||||||
|
- state.removeSource(ITYPE_RIGHT_DISPLAY_CUTOUT);
|
||||||
|
- }
|
||||||
|
- if (safe.bottom < unrestricted.bottom) {
|
||||||
- state.getSource(ITYPE_BOTTOM_DISPLAY_CUTOUT).setFrame(
|
- state.getSource(ITYPE_BOTTOM_DISPLAY_CUTOUT).setFrame(
|
||||||
- unrestricted.left, safe.bottom, unrestricted.right, unrestricted.bottom);
|
- unrestricted.left, safe.bottom, unrestricted.right, unrestricted.bottom);
|
||||||
- } else {
|
- } else {
|
||||||
- state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
|
||||||
- state.removeSource(ITYPE_TOP_DISPLAY_CUTOUT);
|
|
||||||
- state.removeSource(ITYPE_RIGHT_DISPLAY_CUTOUT);
|
|
||||||
- state.removeSource(ITYPE_BOTTOM_DISPLAY_CUTOUT);
|
- state.removeSource(ITYPE_BOTTOM_DISPLAY_CUTOUT);
|
||||||
- }
|
- }
|
||||||
+ state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
+ state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
||||||
@@ -55,18 +52,17 @@ index 32e43ca4e56c..18c28ae674f9 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
index 41247363146d..554dea8efb33 100644
|
index 1468360b37b7..a1f70e4c8deb 100644
|
||||||
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||||
@@ -1655,7 +1655,7 @@ public class DisplayPolicy {
|
@@ -1558,6 +1558,7 @@ public class DisplayPolicy {
|
||||||
pf.set((fl & FLAG_LAYOUT_IN_SCREEN) == 0 ? attached.getFrame() : df);
|
displayFrames = win.getDisplayFrames(displayFrames);
|
||||||
}
|
|
||||||
|
|
||||||
- final int cutoutMode = attrs.layoutInDisplayCutoutMode;
|
final WindowManager.LayoutParams attrs = win.mAttrs.forRotation(displayFrames.mRotation);
|
||||||
+ final int cutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
|
+ attrs.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
|
||||||
// Ensure that windows with a DEFAULT or NEVER display cutout mode are laid out in
|
sTmpClientFrames.attachedFrame = attached != null ? attached.getFrame() : null;
|
||||||
// the cutout safe zone.
|
|
||||||
if (cutoutMode != LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) {
|
// If this window has different LayoutParams for rotations, we cannot trust its requested
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+7
-7
@@ -1,7 +1,7 @@
|
|||||||
From e2fe18aa9aab73594414b11164ed180ca8b16cd1 Mon Sep 17 00:00:00 2001
|
From 89c565bf1a9ce56a64191059424bf9f5fe04f1d9 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 1 Sep 2021 14:10:50 +0000
|
Date: Wed, 1 Sep 2021 14:10:50 +0000
|
||||||
Subject: [PATCH 13/16] UI: Kill rounded corners in notification scrim
|
Subject: [PATCH 15/21] UI: Kill rounded corners in notification scrim
|
||||||
|
|
||||||
Rounded corners in S is nicely implemented, but this is one occasion where it looks out of place
|
Rounded corners in S is nicely implemented, but this is one occasion where it looks out of place
|
||||||
|
|
||||||
@@ -11,18 +11,18 @@ Change-Id: I09ed59e0e658ebd512a9d02a8ef3edfe2c9888da
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
index 786b21f7595a..7217156d8972 100644
|
index d0a9055e1905..30881992795d 100644
|
||||||
--- a/packages/SystemUI/res/values/dimens.xml
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
@@ -757,7 +757,7 @@
|
@@ -726,7 +726,7 @@
|
||||||
<item name="keyguard_clock_line_spacing_scale_burmese" type="dimen" format="float">1</item>
|
<!-- With the large clock, move up slightly from the center -->
|
||||||
|
<dimen name="keyguard_large_clock_top_margin">-60dp</dimen>
|
||||||
|
|
||||||
<item name="scrim_behind_alpha" format="float" type="dimen">0.62</item>
|
|
||||||
- <dimen name="notification_scrim_corner_radius">32dp</dimen>
|
- <dimen name="notification_scrim_corner_radius">32dp</dimen>
|
||||||
+ <dimen name="notification_scrim_corner_radius">0dp</dimen>
|
+ <dimen name="notification_scrim_corner_radius">0dp</dimen>
|
||||||
|
|
||||||
<!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
|
<!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
|
||||||
<dimen name="keyguard_min_swipe_amount">110dp</dimen>
|
<dimen name="keyguard_min_swipe_amount">110dp</dimen>
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+9
-10
@@ -1,20 +1,18 @@
|
|||||||
From 81538d4126c99a86cb8f3ea13becca665db468e8 Mon Sep 17 00:00:00 2001
|
From be2477f3314d044e1d7581905a4d358aa0f0a2a7 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Mon, 26 Oct 2020 14:06:56 +0000
|
Date: Mon, 26 Oct 2020 14:06:56 +0000
|
||||||
Subject: [PATCH 14/16] UI: Reconfigure power menu items
|
Subject: [PATCH 16/21] UI: Reconfigure power menu items
|
||||||
|
|
||||||
Screenshot/airplane are broken as of now
|
|
||||||
|
|
||||||
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
|
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
|
||||||
---
|
---
|
||||||
core/res/res/values/config.xml | 5 -----
|
core/res/res/values/config.xml | 5 +----
|
||||||
1 file changed, 5 deletions(-)
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||||
index 3a62b51d3cbc..5e9c9988e946 100644
|
index 87e3ddcf8fdf..64d592b2230b 100644
|
||||||
--- a/core/res/res/values/config.xml
|
--- a/core/res/res/values/config.xml
|
||||||
+++ b/core/res/res/values/config.xml
|
+++ b/core/res/res/values/config.xml
|
||||||
@@ -2963,13 +2963,8 @@
|
@@ -3305,13 +3305,10 @@
|
||||||
"logout" = Logout the current user
|
"logout" = Logout the current user
|
||||||
-->
|
-->
|
||||||
<string-array translatable="false" name="config_globalActionsList">
|
<string-array translatable="false" name="config_globalActionsList">
|
||||||
@@ -23,11 +21,12 @@ index 3a62b51d3cbc..5e9c9988e946 100644
|
|||||||
<item>power</item>
|
<item>power</item>
|
||||||
<item>restart</item>
|
<item>restart</item>
|
||||||
- <item>logout</item>
|
- <item>logout</item>
|
||||||
- <item>screenshot</item>
|
<item>screenshot</item>
|
||||||
- <item>bugreport</item>
|
- <item>bugreport</item>
|
||||||
|
+ <item>airplane</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
|
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
From 9248a81745f91699e2b6891746536deaab96dbf0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Tue, 19 Oct 2021 12:09:34 +0000
|
|
||||||
Subject: [PATCH 16/16] UI: Remove privacy dot padding
|
|
||||||
|
|
||||||
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
|
|
||||||
---
|
|
||||||
packages/SystemUI/res/values/dimens.xml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
|
||||||
index 7217156d8972..4354442fb51d 100644
|
|
||||||
--- a/packages/SystemUI/res/values/dimens.xml
|
|
||||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
|
||||||
@@ -1265,7 +1265,7 @@
|
|
||||||
<dimen name="ongoing_appops_chip_max_width">76dp</dimen>
|
|
||||||
<dimen name="ongoing_appops_dot_diameter">6dp</dimen>
|
|
||||||
<!-- Total minimum padding to enforce to ensure that the dot can always show -->
|
|
||||||
- <dimen name="ongoing_appops_dot_min_padding">20dp</dimen>
|
|
||||||
+ <dimen name="ongoing_appops_dot_min_padding">0dp</dimen>
|
|
||||||
|
|
||||||
<dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen>
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
From f22928416285a9ac0ab6f8cd683c8dd5d95bf15b 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 418bbc7c7932..245bde4c543a 100644
|
||||||
|
--- a/packages/SystemUI/res/values/config.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/config.xml
|
||||||
|
@@ -68,7 +68,7 @@
|
||||||
|
|
||||||
|
<!-- The default tiles to display in QuickSettings -->
|
||||||
|
<string name="quick_settings_tiles_default" translatable="false">
|
||||||
|
- internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle
|
||||||
|
+ wifi,cell,hotspot,location,rotation,flashlight
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<!-- The class path of the Safety Quick Settings Tile -->
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From 39e52d3177af783e0fdb08f997d1a4971485b896 Mon Sep 17 00:00:00 2001
|
From fe8362152cdb0a17376ffedb37030cc57d14b375 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Tue, 29 Jun 2021 22:57:01 +0000
|
Date: Tue, 29 Jun 2021 22:57:01 +0000
|
||||||
Subject: [PATCH 15/16] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
|
Subject: [PATCH 18/21] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
|
||||||
|
|
||||||
I decide what's good enough for a wallpaper!
|
I decide what's good enough for a wallpaper!
|
||||||
|
|
||||||
@@ -11,10 +11,10 @@ Change-Id: I5ccd85b3df12e53746a4ac6cbc37ba8d11f6c336
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
||||||
index 7ef0a19ec44c..8dbf94a9caad 100644
|
index a34a50c4b7b0..028f77fb21b0 100644
|
||||||
--- a/core/java/android/app/WallpaperColors.java
|
--- a/core/java/android/app/WallpaperColors.java
|
||||||
+++ b/core/java/android/app/WallpaperColors.java
|
+++ b/core/java/android/app/WallpaperColors.java
|
||||||
@@ -543,7 +543,7 @@ public final class WallpaperColors implements Parcelable {
|
@@ -580,7 +580,7 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
|
||||||
int hints = 0;
|
int hints = 0;
|
||||||
double meanLuminance = totalLuminance / pixels.length;
|
double meanLuminance = totalLuminance / pixels.length;
|
||||||
@@ -24,5 +24,5 @@ index 7ef0a19ec44c..8dbf94a9caad 100644
|
|||||||
}
|
}
|
||||||
if (meanLuminance < DARK_THEME_MEAN_LUMINANCE) {
|
if (meanLuminance < DARK_THEME_MEAN_LUMINANCE) {
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
From a0cd4caf1cd92218e44db206ec2f67839ce4dbe8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Tue, 19 Oct 2021 12:09:34 +0000
|
||||||
|
Subject: [PATCH 19/21] UI: Remove privacy dot
|
||||||
|
|
||||||
|
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values/dimens.xml | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
index 30881992795d..7ead38868815 100644
|
||||||
|
--- a/packages/SystemUI/res/values/dimens.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||||
|
@@ -1059,12 +1059,12 @@
|
||||||
|
<dimen name="ongoing_appops_chip_min_width">56dp</dimen>
|
||||||
|
<!-- Three privacy items. This value must not be exceeded -->
|
||||||
|
<dimen name="ongoing_appops_chip_max_width">76dp</dimen>
|
||||||
|
- <dimen name="ongoing_appops_dot_diameter">6dp</dimen>
|
||||||
|
+ <dimen name="ongoing_appops_dot_diameter">0dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_min_animation_width">10dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_animation_in_status_bar_translation_x">15dp</dimen>
|
||||||
|
<dimen name="ongoing_appops_chip_animation_out_status_bar_translation_x">7dp</dimen>
|
||||||
|
<!-- Total minimum padding to enforce to ensure that the dot can always show -->
|
||||||
|
- <dimen name="ongoing_appops_dot_min_padding">20dp</dimen>
|
||||||
|
+ <dimen name="ongoing_appops_dot_min_padding">0dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
From 7cacf0df0092432cd2347e0cbae0c1c3d0f5dcf9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Wed, 22 Mar 2023 00:29:13 +0000
|
||||||
|
Subject: [PATCH 20/21] UI: Restore quick settings fonts to pre-T-QPR2
|
||||||
|
|
||||||
|
TODO: Large header clock looks better in Regular - perhaps figure out how to transition smoothly?
|
||||||
|
Change-Id: If2e57fee61b6bd4b6b7fedc7e3011164cd2cb56f
|
||||||
|
---
|
||||||
|
packages/SystemUI/res/values/styles.xml | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||||
|
index 6996e41e08da..5e6d45ac9305 100644
|
||||||
|
--- a/packages/SystemUI/res/values/styles.xml
|
||||||
|
+++ b/packages/SystemUI/res/values/styles.xml
|
||||||
|
@@ -134,7 +134,7 @@
|
||||||
|
<!-- This is hard coded to be sans-serif-condensed to match the icons -->
|
||||||
|
|
||||||
|
<style name="TextAppearance.QS.Status">
|
||||||
|
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||||
|
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
|
||||||
|
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||||
|
<item name="android:textSize">14sp</item>
|
||||||
|
<item name="android:letterSpacing">0.01</item>
|
||||||
|
@@ -152,6 +152,7 @@
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextAppearance.QS.Status.Build">
|
||||||
|
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||||
|
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
From 9732bf6c88d489f587e62d9f6b382e876295cbd6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 30 Sep 2022 16:02:16 +0000
|
||||||
|
Subject: [PATCH 21/21] UI: Revert to HSL luminance for wallpaper dark hints
|
||||||
|
|
||||||
|
Y U no test for consistency, Google?
|
||||||
|
|
||||||
|
Change-Id: Ie5663bdf518b4ef93d6deb634e707a32d052ac55
|
||||||
|
---
|
||||||
|
core/java/android/app/WallpaperColors.java | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
||||||
|
index 028f77fb21b0..63ccf961a2d8 100644
|
||||||
|
--- a/core/java/android/app/WallpaperColors.java
|
||||||
|
+++ b/core/java/android/app/WallpaperColors.java
|
||||||
|
@@ -555,15 +555,15 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
float[] tmpHsl = new float[3];
|
||||||
|
for (int i = 0; i < pixels.length; i++) {
|
||||||
|
int pixelColor = pixels[i];
|
||||||
|
- ColorUtils.colorToHSL(pixelColor, tmpHsl);
|
||||||
|
final int alpha = Color.alpha(pixelColor);
|
||||||
|
|
||||||
|
// Apply composite colors where the foreground is a black layer with an alpha value of
|
||||||
|
// the dim amount and the background is the wallpaper pixel color.
|
||||||
|
int compositeColors = ColorUtils.compositeColors(blackTransparent, pixelColor);
|
||||||
|
|
||||||
|
- // Calculate the adjusted luminance of the dimmed wallpaper pixel color.
|
||||||
|
- double adjustedLuminance = ColorUtils.calculateLuminance(compositeColors);
|
||||||
|
+ // Calculate the luminance of the dimmed wallpaper pixel color.
|
||||||
|
+ ColorUtils.colorToHSL(compositeColors, tmpHsl);
|
||||||
|
+ double luminance = tmpHsl[2];
|
||||||
|
|
||||||
|
// Make sure we don't have a dark pixel mass that will
|
||||||
|
// make text illegible.
|
||||||
|
@@ -575,7 +575,7 @@ public final class WallpaperColors implements Parcelable {
|
||||||
|
pixels[i] = Color.RED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- totalLuminance += adjustedLuminance;
|
||||||
|
+ totalLuminance += luminance;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hints = 0;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
-3028
File diff suppressed because it is too large
Load Diff
+3049
File diff suppressed because it is too large
Load Diff
+15
-16
@@ -1,37 +1,36 @@
|
|||||||
From ced2463ffce1b064312ac607fcab72ef3a7a3c3c Mon Sep 17 00:00:00 2001
|
From ef3810b1d55f079278f3ac3ef83f7b5b2eaaa7c1 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 5 Sep 2021 00:30:33 +0000
|
Date: Sun, 5 Sep 2021 00:30:33 +0000
|
||||||
Subject: [PATCH 2/4] DeskClock: Remove night mode
|
Subject: [PATCH 2/4] DeskClock: Remove night mode
|
||||||
|
|
||||||
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
|
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
|
||||||
---
|
---
|
||||||
res/xml/screensaver_settings.xml | 8 +-------
|
res/xml/screensaver_settings.xml | 7 -------
|
||||||
src/com/android/deskclock/Screensaver.java | 5 ++---
|
src/com/android/deskclock/Screensaver.java | 5 ++---
|
||||||
src/com/android/deskclock/ScreensaverActivity.java | 2 +-
|
src/com/android/deskclock/ScreensaverActivity.java | 2 +-
|
||||||
3 files changed, 4 insertions(+), 11 deletions(-)
|
3 files changed, 3 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
diff --git a/res/xml/screensaver_settings.xml b/res/xml/screensaver_settings.xml
|
diff --git a/res/xml/screensaver_settings.xml b/res/xml/screensaver_settings.xml
|
||||||
index 1680aab83..73375dcfa 100644
|
index 7b8c9764a..908f76fef 100644
|
||||||
--- a/res/xml/screensaver_settings.xml
|
--- a/res/xml/screensaver_settings.xml
|
||||||
+++ b/res/xml/screensaver_settings.xml
|
+++ b/res/xml/screensaver_settings.xml
|
||||||
@@ -24,10 +24,4 @@
|
@@ -26,11 +26,4 @@
|
||||||
android:key="screensaver_clock_style"
|
android:title="@string/clock_style"
|
||||||
android:title="@string/clock_style" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
- <CheckBoxPreference
|
- <CheckBoxPreference
|
||||||
- android:defaultValue="true"
|
- android:defaultValue="true"
|
||||||
- android:key="screensaver_night_mode"
|
- android:key="screensaver_night_mode"
|
||||||
- android:summary="@string/night_mode_summary"
|
- android:summary="@string/night_mode_summary"
|
||||||
- android:title="@string/night_mode_title" />
|
- android:title="@string/night_mode_title"
|
||||||
|
- app:iconSpaceReserved="false" />
|
||||||
-
|
-
|
||||||
-</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
\ No newline at end of file
|
|
||||||
+</PreferenceScreen>
|
|
||||||
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
|
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
|
||||||
index 49530d44c..864a41575 100644
|
index ad92b1149..f6c03ed0a 100644
|
||||||
--- a/src/com/android/deskclock/Screensaver.java
|
--- a/src/com/android/deskclock/Screensaver.java
|
||||||
+++ b/src/com/android/deskclock/Screensaver.java
|
+++ b/src/com/android/deskclock/Screensaver.java
|
||||||
@@ -164,9 +164,8 @@ public final class Screensaver extends DreamService {
|
@@ -136,9 +136,8 @@ public final class Screensaver extends DreamService {
|
||||||
|
|
||||||
private void setClockStyle() {
|
private void setClockStyle() {
|
||||||
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
|
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
|
||||||
@@ -44,10 +43,10 @@ index 49530d44c..864a41575 100644
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
|
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
index e1db8c5ff..a735263b3 100644
|
index b30f82ee7..90235351f 100644
|
||||||
--- a/src/com/android/deskclock/ScreensaverActivity.java
|
--- a/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
+++ b/src/com/android/deskclock/ScreensaverActivity.java
|
+++ b/src/com/android/deskclock/ScreensaverActivity.java
|
||||||
@@ -117,7 +117,7 @@ public class ScreensaverActivity extends BaseActivity {
|
@@ -101,7 +101,7 @@ public class ScreensaverActivity extends BaseActivity {
|
||||||
Utils.setClockIconTypeface(mMainClockView);
|
Utils.setClockIconTypeface(mMainClockView);
|
||||||
Utils.setTimeFormat((TextClock) digitalClock, false);
|
Utils.setTimeFormat((TextClock) digitalClock, false);
|
||||||
Utils.setClockStyle(digitalClock, analogClock);
|
Utils.setClockStyle(digitalClock, analogClock);
|
||||||
@@ -57,5 +56,5 @@ index e1db8c5ff..a735263b3 100644
|
|||||||
|
|
||||||
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
|
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+156
-127
@@ -1,4 +1,4 @@
|
|||||||
From 0c1aaa76cff06f583c8e4fdc598bf9bf88834cf0 Mon Sep 17 00:00:00 2001
|
From 3430de2c592c9d9b4a08c16477fff4ad1a4ca775 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 19 Jan 2022 18:04:36 +0000
|
Date: Wed, 19 Jan 2022 18:04:36 +0000
|
||||||
Subject: [PATCH 3/4] DeskClock: Adapt digital clocks to S style
|
Subject: [PATCH 3/4] DeskClock: Adapt digital clocks to S style
|
||||||
@@ -13,67 +13,28 @@ Caveats/TODO:
|
|||||||
|
|
||||||
Change-Id: I10c6fa213c89ac2f6e342be13fdd6390f7f787b0
|
Change-Id: I10c6fa213c89ac2f6e342be13fdd6390f7f787b0
|
||||||
---
|
---
|
||||||
res/layout-land/main_clock_frame.xml | 18 ++---
|
res/layout/date_and_next_alarm_time.xml | 53 +++++++------
|
||||||
res/layout/date_and_next_alarm_time.xml | 51 ++++++------
|
res/layout/desk_clock_saver.xml | 10 +--
|
||||||
res/layout/desk_clock_saver.xml | 12 +--
|
res/layout/digital_widget.xml | 69 ++++++++---------
|
||||||
res/layout/digital_widget.xml | 71 ++++++++---------
|
|
||||||
res/layout/digital_widget_sizer.xml | 77 ++++++++-----------
|
res/layout/digital_widget_sizer.xml | 77 ++++++++-----------
|
||||||
res/layout/main_clock_frame.xml | 21 +++--
|
res/layout/main_clock_frame.xml | 36 +++------
|
||||||
res/values/dimens.xml | 12 ++-
|
res/values/dimens.xml | 12 ++-
|
||||||
res/values/styles.xml | 18 +++++
|
res/values/styles.xml | 18 +++++
|
||||||
.../alarmclock/DigitalAppWidgetProvider.java | 29 ++++---
|
.../alarmclock/DigitalAppWidgetProvider.java | 31 ++++----
|
||||||
src/com/android/deskclock/AlarmUtils.java | 2 +-
|
src/com/android/deskclock/AlarmUtils.java | 2 +-
|
||||||
10 files changed, 162 insertions(+), 149 deletions(-)
|
src/com/android/deskclock/ClockFragment.java | 3 -
|
||||||
|
src/com/android/deskclock/Utils.java | 19 -----
|
||||||
|
11 files changed, 155 insertions(+), 175 deletions(-)
|
||||||
|
|
||||||
diff --git a/res/layout-land/main_clock_frame.xml b/res/layout-land/main_clock_frame.xml
|
|
||||||
index b72f62333..afa9404f3 100644
|
|
||||||
--- a/res/layout-land/main_clock_frame.xml
|
|
||||||
+++ b/res/layout-land/main_clock_frame.xml
|
|
||||||
@@ -20,10 +20,11 @@
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
- <FrameLayout
|
|
||||||
+ <LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
- android:layout_height="0dp"
|
|
||||||
- android:layout_weight="1">
|
|
||||||
+ android:layout_height="wrap_content"
|
|
||||||
+ android:gravity="center_vertical|start"
|
|
||||||
+ android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.android.deskclock.AnalogClock
|
|
||||||
android:id="@+id/analog_clock"
|
|
||||||
@@ -37,16 +38,13 @@
|
|
||||||
|
|
||||||
<com.android.deskclock.widget.AutoSizingTextClock
|
|
||||||
android:id="@+id/digital_clock"
|
|
||||||
- style="@style/display_time"
|
|
||||||
+ style="@style/sc_keyguard_clock"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
- android:layout_height="wrap_content"
|
|
||||||
- android:ellipsize="none"
|
|
||||||
- android:singleLine="true"
|
|
||||||
- android:textSize="@dimen/main_clock_digital_font_size" />
|
|
||||||
+ android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
- </FrameLayout>
|
|
||||||
+ <include layout="@layout/date_and_next_alarm_time" />
|
|
||||||
|
|
||||||
- <include layout="@layout/date_and_next_alarm_time" />
|
|
||||||
+ </LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/hairline"
|
|
||||||
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
|
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
|
||||||
index ad25502a8..d89172637 100644
|
index 9a0cb9103..b29ffedcf 100644
|
||||||
--- a/res/layout/date_and_next_alarm_time.xml
|
--- a/res/layout/date_and_next_alarm_time.xml
|
||||||
+++ b/res/layout/date_and_next_alarm_time.xml
|
+++ b/res/layout/date_and_next_alarm_time.xml
|
||||||
@@ -18,34 +18,39 @@
|
@@ -18,36 +18,41 @@
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
- android:layout_gravity="center"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
- android:layout_gravity="center_vertical"
|
||||||
- android:gravity="center">
|
- android:gravity="center">
|
||||||
+ android:gravity="center_vertical|start"
|
+ android:gravity="center_vertical|start"
|
||||||
+ android:orientation="vertical">
|
+ android:orientation="vertical">
|
||||||
@@ -84,9 +45,10 @@ index ad25502a8..d89172637 100644
|
|||||||
+ style="@style/sc_keyguard_row"
|
+ style="@style/sc_keyguard_row"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
- android:textAllCaps="true" />
|
- android:textAllCaps="true"
|
||||||
+ android:paddingTop="@dimen/sc_keyguard_status_area_top_padding"
|
+ android:paddingTop="@dimen/sc_keyguard_status_area_top_padding"
|
||||||
+ android:paddingStart="@dimen/sc_keyguard_row_date_start_padding" />
|
+ android:paddingStart="@dimen/sc_keyguard_row_date_start_padding"
|
||||||
|
tools:text="Sa., 01.01."/>
|
||||||
|
|
||||||
- <TextView
|
- <TextView
|
||||||
- android:id="@+id/nextAlarmIcon"
|
- android:id="@+id/nextAlarmIcon"
|
||||||
@@ -104,13 +66,13 @@ index ad25502a8..d89172637 100644
|
|||||||
- <TextView
|
- <TextView
|
||||||
- android:id="@+id/nextAlarm"
|
- android:id="@+id/nextAlarm"
|
||||||
- style="@style/body"
|
- style="@style/body"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
- android:textAllCaps="true"
|
||||||
|
- tools:text="Mo., 07:00"/>
|
||||||
+ <LinearLayout
|
+ <LinearLayout
|
||||||
android:layout_width="wrap_content"
|
+ android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
+ android:layout_height="wrap_content"
|
||||||
- android:textAllCaps="true" />
|
|
||||||
-
|
|
||||||
-</LinearLayout>
|
|
||||||
\ No newline at end of file
|
|
||||||
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
|
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
|
||||||
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
|
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
|
||||||
+
|
+
|
||||||
@@ -128,16 +90,17 @@ index ad25502a8..d89172637 100644
|
|||||||
+ android:id="@+id/nextAlarm"
|
+ android:id="@+id/nextAlarm"
|
||||||
+ style="@style/sc_keyguard_row"
|
+ style="@style/sc_keyguard_row"
|
||||||
+ android:layout_width="wrap_content"
|
+ android:layout_width="wrap_content"
|
||||||
+ android:layout_height="wrap_content" />
|
+ android:layout_height="wrap_content"
|
||||||
|
+ tools:text="Mo., 07:00"/>
|
||||||
+
|
+
|
||||||
+ </LinearLayout>
|
+ </LinearLayout>
|
||||||
+
|
|
||||||
+</LinearLayout>
|
</LinearLayout>
|
||||||
diff --git a/res/layout/desk_clock_saver.xml b/res/layout/desk_clock_saver.xml
|
diff --git a/res/layout/desk_clock_saver.xml b/res/layout/desk_clock_saver.xml
|
||||||
index dafabfddf..d24219dbb 100644
|
index c147bf7cd..d24219dbb 100644
|
||||||
--- a/res/layout/desk_clock_saver.xml
|
--- a/res/layout/desk_clock_saver.xml
|
||||||
+++ b/res/layout/desk_clock_saver.xml
|
+++ b/res/layout/desk_clock_saver.xml
|
||||||
@@ -42,19 +42,13 @@
|
@@ -42,16 +42,10 @@
|
||||||
|
|
||||||
<TextClock
|
<TextClock
|
||||||
android:id="@+id/digital_clock"
|
android:id="@+id/digital_clock"
|
||||||
@@ -156,13 +119,8 @@ index dafabfddf..d24219dbb 100644
|
|||||||
|
|
||||||
<include layout="@layout/date_and_next_alarm_time" />
|
<include layout="@layout/date_and_next_alarm_time" />
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
-</FrameLayout>
|
|
||||||
\ No newline at end of file
|
|
||||||
+</FrameLayout>
|
|
||||||
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
|
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
|
||||||
index c5b4837a6..e376a5a7a 100644
|
index 5cf896a84..e376a5a7a 100644
|
||||||
--- a/res/layout/digital_widget.xml
|
--- a/res/layout/digital_widget.xml
|
||||||
+++ b/res/layout/digital_widget.xml
|
+++ b/res/layout/digital_widget.xml
|
||||||
@@ -19,58 +19,53 @@
|
@@ -19,58 +19,53 @@
|
||||||
@@ -256,13 +214,6 @@ index c5b4837a6..e376a5a7a 100644
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -82,4 +77,4 @@
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:divider="@null" />
|
|
||||||
|
|
||||||
-</LinearLayout>
|
|
||||||
\ No newline at end of file
|
|
||||||
+</LinearLayout>
|
|
||||||
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
|
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
|
||||||
index f524cf536..b9a28c79f 100644
|
index f524cf536..b9a28c79f 100644
|
||||||
--- a/res/layout/digital_widget_sizer.xml
|
--- a/res/layout/digital_widget_sizer.xml
|
||||||
@@ -367,56 +318,66 @@ index f524cf536..b9a28c79f 100644
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
|
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
|
||||||
index ab960728f..72b71d4f4 100644
|
index c26f61dbd..c2e84eaa3 100644
|
||||||
--- a/res/layout/main_clock_frame.xml
|
--- a/res/layout/main_clock_frame.xml
|
||||||
+++ b/res/layout/main_clock_frame.xml
|
+++ b/res/layout/main_clock_frame.xml
|
||||||
@@ -33,10 +33,11 @@
|
@@ -26,44 +26,28 @@
|
||||||
android:gravity="center_horizontal"
|
android:layout_marginEnd="24dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
- <FrameLayout
|
- <androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
- android:layout_width="match_parent"
|
||||||
+ <LinearLayout
|
+ <LinearLayout
|
||||||
android:layout_width="wrap_content"
|
+ android:layout_width="wrap_content"
|
||||||
- android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
- android:layout_weight="1">
|
- android:layout_gravity="start">
|
||||||
+ android:layout_height="wrap_content"
|
|
||||||
+ android:gravity="center_vertical|start"
|
+ android:gravity="center_vertical|start"
|
||||||
+ android:orientation="vertical">
|
+ android:orientation="vertical">
|
||||||
|
|
||||||
<com.android.deskclock.AnalogClock
|
<com.android.deskclock.AnalogClock
|
||||||
android:id="@+id/analog_clock"
|
android:id="@+id/analog_clock"
|
||||||
@@ -50,18 +51,14 @@
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
- android:layout_marginTop="@dimen/circle_margin_top"
|
||||||
|
- app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
- app:layout_constraintDimensionRatio="1:1"
|
||||||
|
- app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
- app:layout_constraintStart_toStartOf="parent"
|
||||||
|
- app:layout_constraintTop_toTopOf="parent"
|
||||||
|
- app:layout_constraintWidth_percent="@dimen/analog_clock_width_percent"/>
|
||||||
|
+ android:layout_marginTop="@dimen/circle_margin_top"/>
|
||||||
|
|
||||||
<com.android.deskclock.widget.AutoSizingTextClock
|
<com.android.deskclock.widget.AutoSizingTextClock
|
||||||
android:id="@+id/digital_clock"
|
android:id="@+id/digital_clock"
|
||||||
- style="@style/display_time"
|
- style="@style/display_time"
|
||||||
|
- android:layout_width="match_parent"
|
||||||
+ style="@style/sc_keyguard_clock"
|
+ style="@style/sc_keyguard_clock"
|
||||||
android:layout_width="wrap_content"
|
+ android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
- android:ellipsize="none"
|
- android:ellipsize="none"
|
||||||
- android:includeFontPadding="false"
|
- android:includeFontPadding="false"
|
||||||
- android:paddingTop="@dimen/main_clock_digital_padding"
|
android:paddingTop="@dimen/main_clock_digital_padding"
|
||||||
- android:singleLine="true"
|
- android:singleLine="true"
|
||||||
- android:textSize="@dimen/main_clock_digital_font_size" />
|
- android:textSize="@dimen/main_clock_digital_font_size"
|
||||||
+ android:paddingTop="@dimen/main_clock_digital_padding" />
|
- app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
- app:layout_constraintStart_toStartOf="parent"
|
||||||
|
- app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="01:23"/>
|
||||||
|
|
||||||
- </FrameLayout>
|
- </androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
+ <include layout="@layout/date_and_next_alarm_time" />
|
+ <include layout="@layout/date_and_next_alarm_time" />
|
||||||
|
+
|
||||||
- <include layout="@layout/date_and_next_alarm_time" />
|
|
||||||
+ </LinearLayout>
|
+ </LinearLayout>
|
||||||
|
|
||||||
<View
|
- <include
|
||||||
android:id="@+id/hairline"
|
- layout="@layout/date_and_next_alarm_time"
|
||||||
@@ -77,4 +74,4 @@
|
- android:id="@+id/date_and_next_alarm_time"
|
||||||
android:layout_height="match_parent"
|
- android:layout_width="wrap_content"
|
||||||
android:layout_weight="@integer/gutter_width_percent" />
|
- android:layout_height="wrap_content"
|
||||||
|
- android:layout_gravity="start"/>
|
||||||
-</LinearLayout>
|
</LinearLayout>
|
||||||
\ No newline at end of file
|
|
||||||
+</LinearLayout>
|
|
||||||
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
|
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
|
||||||
index 6a384e94b..c4b47abb7 100644
|
index c136fe25a..58a9fedc0 100644
|
||||||
--- a/res/values/dimens.xml
|
--- a/res/values/dimens.xml
|
||||||
+++ b/res/values/dimens.xml
|
+++ b/res/values/dimens.xml
|
||||||
@@ -62,7 +62,7 @@
|
@@ -62,7 +62,7 @@
|
||||||
@@ -428,10 +389,10 @@ index 6a384e94b..c4b47abb7 100644
|
|||||||
|
|
||||||
<dimen name="backspace_icon_size">24dp</dimen>
|
<dimen name="backspace_icon_size">24dp</dimen>
|
||||||
<dimen name="no_alarms_size">90dp</dimen>
|
<dimen name="no_alarms_size">90dp</dimen>
|
||||||
@@ -129,4 +129,14 @@
|
@@ -144,4 +144,14 @@
|
||||||
|
<dimen name="settings_padding">4dp</dimen>
|
||||||
|
|
||||||
<!-- KitKat floating action button container height; see -v21 folder for newer platforms. -->
|
<dimen name="analog_clock_width_percent">0.5</dimen>
|
||||||
<dimen name="fab_height">96dp</dimen>
|
|
||||||
+
|
+
|
||||||
+ <!-- Keyguard dimens, taken from S fwb -->
|
+ <!-- Keyguard dimens, taken from S fwb -->
|
||||||
+ <dimen name="sc_keyguard_clock_text_size">86dp</dimen>
|
+ <dimen name="sc_keyguard_clock_text_size">86dp</dimen>
|
||||||
@@ -444,13 +405,14 @@ index 6a384e94b..c4b47abb7 100644
|
|||||||
+ <dimen name="sc_keyguard_row_alarm_start_padding">5.5dp</dimen>
|
+ <dimen name="sc_keyguard_row_alarm_start_padding">5.5dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
diff --git a/res/values/styles.xml b/res/values/styles.xml
|
diff --git a/res/values/styles.xml b/res/values/styles.xml
|
||||||
index fbe62ae3a..e9ae028f9 100644
|
index 8c6364344..159f24766 100644
|
||||||
--- a/res/values/styles.xml
|
--- a/res/values/styles.xml
|
||||||
+++ b/res/values/styles.xml
|
+++ b/res/values/styles.xml
|
||||||
@@ -134,4 +134,22 @@
|
@@ -209,4 +209,22 @@
|
||||||
<item name="android:numbersSelectorColor">?attr/colorAccent</item>
|
<item name="layout_constraintStart_toStartOf">parent</item>
|
||||||
|
<item name="layout_constraintTop_toBottomOf">@id/timer_setup_time</item>
|
||||||
</style>
|
</style>
|
||||||
|
+
|
||||||
+ <style name="sc_keyguard_clock">
|
+ <style name="sc_keyguard_clock">
|
||||||
+ <item name="android:fontFamily">sans-serif-light</item>
|
+ <item name="android:fontFamily">sans-serif-light</item>
|
||||||
+ <item name="android:fontFeatureSettings">tnum</item>
|
+ <item name="android:fontFeatureSettings">tnum</item>
|
||||||
@@ -468,22 +430,21 @@ index fbe62ae3a..e9ae028f9 100644
|
|||||||
+ <item name="android:includeFontPadding">false</item>
|
+ <item name="android:includeFontPadding">false</item>
|
||||||
+ <item name="android:maxLines">1</item>
|
+ <item name="android:maxLines">1</item>
|
||||||
+ </style>
|
+ </style>
|
||||||
+
|
|
||||||
</resources>
|
</resources>
|
||||||
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
index 80a724e85..52685f1f4 100644
|
index b54a500c5..fb1b30aa7 100644
|
||||||
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
@@ -211,7 +211,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -223,7 +223,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
if (Utils.isWidgetClickable(wm, widgetId)) {
|
if (Utils.isWidgetClickable(wm, widgetId)) {
|
||||||
final Intent openApp = new Intent(context, DeskClock.class);
|
final Intent openApp = new Intent(context, DeskClock.class);
|
||||||
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, 0);
|
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, FLAG_IMMUTABLE);
|
||||||
- rv.setOnClickPendingIntent(R.id.digital_widget, pi);
|
- rv.setOnClickPendingIntent(R.id.digital_widget, pi);
|
||||||
+ rv.setOnClickPendingIntent(R.id.digital_widget_actual, pi);
|
+ rv.setOnClickPendingIntent(R.id.digital_widget_actual, pi);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure child views of the remote view.
|
// Configure child views of the remote view.
|
||||||
@@ -243,7 +243,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -255,7 +255,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
final int targetWidthPx = portrait ? minWidthPx : maxWidthPx;
|
final int targetWidthPx = portrait ? minWidthPx : maxWidthPx;
|
||||||
final int targetHeightPx = portrait ? maxHeightPx : minHeightPx;
|
final int targetHeightPx = portrait ? maxHeightPx : minHeightPx;
|
||||||
final int largestClockFontSizePx =
|
final int largestClockFontSizePx =
|
||||||
@@ -492,7 +453,7 @@ index 80a724e85..52685f1f4 100644
|
|||||||
|
|
||||||
// Create a size template that describes the widget bounds.
|
// Create a size template that describes the widget bounds.
|
||||||
final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx);
|
final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx);
|
||||||
@@ -314,13 +314,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -327,13 +327,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Measure the widget at the largest possible size.
|
// Measure the widget at the largest possible size.
|
||||||
@@ -508,7 +469,7 @@ index 80a724e85..52685f1f4 100644
|
|||||||
if (low.hasViolations()) {
|
if (low.hasViolations()) {
|
||||||
return low;
|
return low;
|
||||||
}
|
}
|
||||||
@@ -332,7 +332,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -345,7 +345,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
return low;
|
return low;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -517,7 +478,7 @@ index 80a724e85..52685f1f4 100644
|
|||||||
if (midSize.hasViolations()) {
|
if (midSize.hasViolations()) {
|
||||||
high = midSize;
|
high = midSize;
|
||||||
} else {
|
} else {
|
||||||
@@ -395,7 +395,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -411,7 +411,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
* the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting
|
* the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting
|
||||||
* size measurements.
|
* size measurements.
|
||||||
*/
|
*/
|
||||||
@@ -526,8 +487,8 @@ index 80a724e85..52685f1f4 100644
|
|||||||
// Create a copy of the given template sizes.
|
// Create a copy of the given template sizes.
|
||||||
final Sizes measuredSizes = template.newSize();
|
final Sizes measuredSizes = template.newSize();
|
||||||
|
|
||||||
@@ -406,13 +406,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -422,13 +422,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
final TextView nextAlarmIcon = (TextView) sizer.findViewById(R.id.nextAlarmIcon);
|
final TextView nextAlarmIcon = sizer.findViewById(R.id.nextAlarmIcon);
|
||||||
|
|
||||||
// Adjust the font sizes.
|
// Adjust the font sizes.
|
||||||
- measuredSizes.setClockFontSizePx(clockFontSize);
|
- measuredSizes.setClockFontSizePx(clockFontSize);
|
||||||
@@ -542,7 +503,7 @@ index 80a724e85..52685f1f4 100644
|
|||||||
|
|
||||||
// Measure and layout the sizer.
|
// Measure and layout the sizer.
|
||||||
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
||||||
@@ -493,11 +493,16 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -509,12 +509,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; }
|
private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; }
|
||||||
private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; }
|
private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; }
|
||||||
private int getClockFontSizePx() { return mClockFontSizePx; }
|
private int getClockFontSizePx() { return mClockFontSizePx; }
|
||||||
@@ -557,17 +518,19 @@ index 80a724e85..52685f1f4 100644
|
|||||||
- mFontSizePx = max(1, round(clockFontSizePx / 7.5f));
|
- mFontSizePx = max(1, round(clockFontSizePx / 7.5f));
|
||||||
- mIconFontSizePx = (int) (mFontSizePx * 1.4f);
|
- mIconFontSizePx = (int) (mFontSizePx * 1.4f);
|
||||||
- mIconPaddingPx = mFontSizePx / 3;
|
- mIconPaddingPx = mFontSizePx / 3;
|
||||||
|
- }
|
||||||
+ mFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardRowTextSizePx));
|
+ mFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardRowTextSizePx));
|
||||||
+ mIconFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardAlarmIconSizePx));
|
+ mIconFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardAlarmIconSizePx));
|
||||||
+ mIconPaddingPx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) alarmIconPaddingPx));
|
+ 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
|
diff --git a/src/com/android/deskclock/AlarmUtils.java b/src/com/android/deskclock/AlarmUtils.java
|
||||||
index db60ace95..43767d313 100644
|
index c3739bac8..5b931a46d 100644
|
||||||
--- a/src/com/android/deskclock/AlarmUtils.java
|
--- a/src/com/android/deskclock/AlarmUtils.java
|
||||||
+++ b/src/com/android/deskclock/AlarmUtils.java
|
+++ b/src/com/android/deskclock/AlarmUtils.java
|
||||||
@@ -37,7 +37,7 @@ import java.util.Locale;
|
@@ -38,7 +38,7 @@ import java.util.Locale;
|
||||||
public class AlarmUtils {
|
public class AlarmUtils {
|
||||||
|
|
||||||
public static String getFormattedTime(Context context, Calendar time) {
|
public static String getFormattedTime(Context context, Calendar time) {
|
||||||
@@ -576,6 +539,72 @@ index db60ace95..43767d313 100644
|
|||||||
final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
|
final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
|
||||||
return (String) DateFormat.format(pattern, time);
|
return (String) DateFormat.format(pattern, time);
|
||||||
}
|
}
|
||||||
--
|
diff --git a/src/com/android/deskclock/ClockFragment.java b/src/com/android/deskclock/ClockFragment.java
|
||||||
2.25.1
|
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
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -1,4 +1,4 @@
|
|||||||
From 1ed07dfbc441e06da971a04d6a40eaff13c27b3a Mon Sep 17 00:00:00 2001
|
From 169570068c3a78f7294d581b2df864ccd3057579 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 20 Jan 2022 04:42:03 +0000
|
Date: Thu, 20 Jan 2022 04:42:03 +0000
|
||||||
Subject: [PATCH 4/4] DeskClock: Wallpaper-based text coloring for digital
|
Subject: [PATCH 4/4] DeskClock: Wallpaper-based text coloring for digital
|
||||||
@@ -12,10 +12,10 @@ Change-Id: Ie22c4980526575f73ebb4e56780d4c2193cc45d3
|
|||||||
1 file changed, 57 insertions(+)
|
1 file changed, 57 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
index 52685f1f4..fec78bed7 100644
|
index fb1b30aa7..c04528240 100644
|
||||||
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||||
@@ -19,6 +19,8 @@ package com.android.alarmclock;
|
@@ -38,6 +38,8 @@ import static java.lang.Math.round;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.AlarmManager;
|
import android.app.AlarmManager;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
@@ -23,8 +23,8 @@ index 52685f1f4..fec78bed7 100644
|
|||||||
+import android.app.WallpaperManager;
|
+import android.app.WallpaperManager;
|
||||||
import android.appwidget.AppWidgetManager;
|
import android.appwidget.AppWidgetManager;
|
||||||
import android.appwidget.AppWidgetProvider;
|
import android.appwidget.AppWidgetProvider;
|
||||||
import android.content.ComponentName;
|
import android.content.BroadcastReceiver;
|
||||||
@@ -108,12 +110,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -111,12 +113,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
|
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
|
||||||
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
|
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ index 52685f1f4..fec78bed7 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -203,6 +233,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -215,6 +245,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
*/
|
*/
|
||||||
private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId,
|
private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId,
|
||||||
Bundle options, boolean portrait) {
|
Bundle options, boolean portrait) {
|
||||||
@@ -85,7 +85,7 @@ index 52685f1f4..fec78bed7 100644
|
|||||||
// Create a remote view for the digital clock.
|
// Create a remote view for the digital clock.
|
||||||
final String packageName = context.getPackageName();
|
final String packageName = context.getPackageName();
|
||||||
final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget);
|
final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget);
|
||||||
@@ -260,6 +303,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -272,6 +315,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
|
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
|
||||||
rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
|
rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ index 52685f1f4..fec78bed7 100644
|
|||||||
final int smallestWorldCityListSizePx =
|
final int smallestWorldCityListSizePx =
|
||||||
resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size);
|
resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size);
|
||||||
if (sizes.getListHeight() <= smallestWorldCityListSizePx) {
|
if (sizes.getListHeight() <= smallestWorldCityListSizePx) {
|
||||||
@@ -414,6 +468,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
@@ -430,6 +484,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||||
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
|
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
|
||||||
nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
|
nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
|
||||||
|
|
||||||
@@ -114,5 +114,5 @@ index 52685f1f4..fec78bed7 100644
|
|||||||
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
|
||||||
final int heightSize = View.MeasureSpec.getSize(measuredSizes.mTargetHeightPx);
|
final int heightSize = View.MeasureSpec.getSize(measuredSizes.mTargetHeightPx);
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
-6543
File diff suppressed because it is too large
Load Diff
+26
@@ -0,0 +1,26 @@
|
|||||||
|
From 99b3533fe66a7bdc71dd6c63c4ba6c75e2ef2082 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 3facdeeb..878b7e21 100644
|
||||||
|
--- a/src/com/android/nfc/NfcService.java
|
||||||
|
+++ b/src/com/android/nfc/NfcService.java
|
||||||
|
@@ -133,7 +133,7 @@ public class NfcService implements DeviceHostListener {
|
||||||
|
public static final String PREF = "NfcServicePrefs";
|
||||||
|
|
||||||
|
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_NDEF_PUSH_ON = "ndef_push_on";
|
||||||
|
static final boolean NDEF_PUSH_ON_DEFAULT = false;
|
||||||
|
static final String PREF_SECURE_NFC_ON = "secure_nfc_on";
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
+227
@@ -0,0 +1,227 @@
|
|||||||
|
From 4c3fbe18f838dce0c06342016ca4c933cf077a05 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 13 Mar 2022 11:22:48 +0000
|
||||||
|
Subject: [PATCH] Revert "[DO NOT MERGE] Allow a settings override for
|
||||||
|
double-line clock"
|
||||||
|
|
||||||
|
Sorry but I SAID NEVER!
|
||||||
|
|
||||||
|
This reverts commit cb4836b4868adc1f06212ce82851a5f16169ab5c.
|
||||||
|
|
||||||
|
Change-Id: I8b4b1354f23981f6edbe7f3c81ec4f511da3cc1a
|
||||||
|
---
|
||||||
|
res/values/strings.xml | 4 -
|
||||||
|
res/xml/security_lockscreen_settings.xml | 6 --
|
||||||
|
.../LockscreenClockPreferenceController.java | 70 ---------------
|
||||||
|
...ckscreenClockPreferenceControllerTest.java | 90 -------------------
|
||||||
|
4 files changed, 170 deletions(-)
|
||||||
|
delete mode 100644 src/com/android/settings/display/LockscreenClockPreferenceController.java
|
||||||
|
delete mode 100644 tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
|
||||||
|
|
||||||
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||||
|
index 62062b5fe8..35a8a39689 100644
|
||||||
|
--- a/res/values/strings.xml
|
||||||
|
+++ b/res/values/strings.xml
|
||||||
|
@@ -13812,10 +13812,6 @@
|
||||||
|
<string name="lockscreen_trivial_controls_summary">Control external devices without unlocking your phone or tablet if allowed by the device controls app</string>
|
||||||
|
<!-- Trivial Device disabled controls summary [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="lockscreen_trivial_disabled_controls_summary">To use, first turn on \u0022Show device controls\u0022</string>
|
||||||
|
- <!-- Lockscreen double-line clock summary [CHAR LIMIT=NONE] -->
|
||||||
|
- <string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
|
||||||
|
- <!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
|
||||||
|
- <string name="lockscreen_double_line_clock_setting_toggle">Double-line clock</string>
|
||||||
|
<!-- Lock screen shortcuts preference [CHAR LIMIT=60] -->
|
||||||
|
<string name="lockscreen_quick_affordances_title">Shortcuts</string>
|
||||||
|
<!-- Summary for the lock screen button preference [CHAR LIMIT=60] -->
|
||||||
|
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
|
||||||
|
index 77a32122ee..b71839fe23 100644
|
||||||
|
--- a/res/xml/security_lockscreen_settings.xml
|
||||||
|
+++ b/res/xml/security_lockscreen_settings.xml
|
||||||
|
@@ -78,12 +78,6 @@
|
||||||
|
android:key="customizable_lock_screen_quick_affordances"
|
||||||
|
android:title="@string/lockscreen_quick_affordances_title"
|
||||||
|
settings:controller="com.android.settings.display.CustomizableLockScreenQuickAffordancesPreferenceController" />
|
||||||
|
-
|
||||||
|
- <SwitchPreference
|
||||||
|
- android:key="lockscreen_double_line_clock_switch"
|
||||||
|
- android:title="@string/lockscreen_double_line_clock_setting_toggle"
|
||||||
|
- android:summary="@string/lockscreen_double_line_clock_summary"
|
||||||
|
- settings:controller="com.android.settings.display.LockscreenClockPreferenceController" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
diff --git a/src/com/android/settings/display/LockscreenClockPreferenceController.java b/src/com/android/settings/display/LockscreenClockPreferenceController.java
|
||||||
|
deleted file mode 100644
|
||||||
|
index 70ae55eaf9..0000000000
|
||||||
|
--- a/src/com/android/settings/display/LockscreenClockPreferenceController.java
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,70 +0,0 @@
|
||||||
|
-/*
|
||||||
|
- * Copyright (C) 2021 The Android Open Source Project
|
||||||
|
- *
|
||||||
|
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
- * you may not use this file except in compliance with the License.
|
||||||
|
- * You may obtain a copy of the License at
|
||||||
|
- *
|
||||||
|
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
- *
|
||||||
|
- * Unless required by applicable law or agreed to in writing, software
|
||||||
|
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
- * See the License for the specific language governing permissions and
|
||||||
|
- * limitations under the License.
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-package com.android.settings.display;
|
||||||
|
-
|
||||||
|
-import android.content.Context;
|
||||||
|
-import android.provider.Settings;
|
||||||
|
-
|
||||||
|
-import androidx.preference.Preference;
|
||||||
|
-
|
||||||
|
-import com.android.settings.R;
|
||||||
|
-import com.android.settings.core.TogglePreferenceController;
|
||||||
|
-
|
||||||
|
-/**
|
||||||
|
- * Preference to enable/disable the large double-line clock on lockscreen
|
||||||
|
- */
|
||||||
|
-public class LockscreenClockPreferenceController extends TogglePreferenceController {
|
||||||
|
-
|
||||||
|
- private static final String SETTING_KEY = Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK;
|
||||||
|
-
|
||||||
|
- public LockscreenClockPreferenceController(Context context, String preferenceKey) {
|
||||||
|
- super(context, preferenceKey);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public boolean isChecked() {
|
||||||
|
- return Settings.Secure.getInt(mContext.getContentResolver(), SETTING_KEY, 1) != 0;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public boolean setChecked(boolean isChecked) {
|
||||||
|
- return Settings.Secure.putInt(mContext.getContentResolver(), SETTING_KEY,
|
||||||
|
- isChecked ? 1 : 0);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public CharSequence getSummary() {
|
||||||
|
- return mContext.getText(R.string.lockscreen_double_line_clock_summary);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public int getAvailabilityStatus() {
|
||||||
|
- return AVAILABLE;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public void updateState(Preference preference) {
|
||||||
|
- super.updateState(preference);
|
||||||
|
- preference.setEnabled(true);
|
||||||
|
- refreshSummary(preference);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public int getSliceHighlightMenuRes() {
|
||||||
|
- return R.string.menu_key_display;
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
diff --git a/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
|
||||||
|
deleted file mode 100644
|
||||||
|
index 94f2dc6655..0000000000
|
||||||
|
--- a/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,90 +0,0 @@
|
||||||
|
-/*
|
||||||
|
- * Copyright (C) 2021 The Android Open Source Project
|
||||||
|
- *
|
||||||
|
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
- * you may not use this file except in compliance with the License.
|
||||||
|
- * You may obtain a copy of the License at
|
||||||
|
- *
|
||||||
|
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
- *
|
||||||
|
- * Unless required by applicable law or agreed to in writing, software
|
||||||
|
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
- * See the License for the specific language governing permissions and
|
||||||
|
- * limitations under the License.
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-package com.android.settings.display;
|
||||||
|
-
|
||||||
|
-import static com.google.common.truth.Truth.assertThat;
|
||||||
|
-
|
||||||
|
-import android.content.ContentResolver;
|
||||||
|
-import android.content.Context;
|
||||||
|
-import android.provider.Settings;
|
||||||
|
-
|
||||||
|
-import androidx.preference.Preference;
|
||||||
|
-
|
||||||
|
-import org.junit.Before;
|
||||||
|
-import org.junit.Test;
|
||||||
|
-import org.junit.runner.RunWith;
|
||||||
|
-import org.mockito.Mock;
|
||||||
|
-import org.mockito.MockitoAnnotations;
|
||||||
|
-import org.robolectric.RobolectricTestRunner;
|
||||||
|
-import org.robolectric.RuntimeEnvironment;
|
||||||
|
-
|
||||||
|
-@RunWith(RobolectricTestRunner.class)
|
||||||
|
-public class LockscreenClockPreferenceControllerTest {
|
||||||
|
-
|
||||||
|
- private static final String TEST_KEY = "test_key";
|
||||||
|
- private static final String SETTING_KEY = Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK;
|
||||||
|
-
|
||||||
|
- private Context mContext;
|
||||||
|
- private ContentResolver mContentResolver;
|
||||||
|
- private LockscreenClockPreferenceController mController;
|
||||||
|
-
|
||||||
|
- @Mock
|
||||||
|
- private Preference mPreference;
|
||||||
|
-
|
||||||
|
- @Before
|
||||||
|
- public void setUp() {
|
||||||
|
- MockitoAnnotations.initMocks(this);
|
||||||
|
- mContext = RuntimeEnvironment.application;
|
||||||
|
- mContentResolver = mContext.getContentResolver();
|
||||||
|
- mController = new LockscreenClockPreferenceController(mContext, TEST_KEY);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Test
|
||||||
|
- public void isChecked_SettingIs1_returnTrue() {
|
||||||
|
- Settings.Secure.putInt(mContentResolver, SETTING_KEY, 1);
|
||||||
|
-
|
||||||
|
- assertThat(mController.isChecked()).isTrue();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Test
|
||||||
|
- public void isChecked_SettingIs0_returnFalse() {
|
||||||
|
- Settings.Secure.putInt(mContentResolver, SETTING_KEY, 0);
|
||||||
|
-
|
||||||
|
- assertThat(mController.isChecked()).isFalse();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Test
|
||||||
|
- public void isChecked_SettingIsNotSet_returnTrue() {
|
||||||
|
- Settings.Secure.putString(mContentResolver, SETTING_KEY, null);
|
||||||
|
-
|
||||||
|
- assertThat(mController.isChecked()).isTrue();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Test
|
||||||
|
- public void setChecked_true_SettingIsNot0() {
|
||||||
|
- mController.setChecked(true);
|
||||||
|
-
|
||||||
|
- assertThat(Settings.Secure.getInt(mContentResolver, SETTING_KEY, 0)).isNotEqualTo(0);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Test
|
||||||
|
- public void setChecked_false_SettingIs0() {
|
||||||
|
- mController.setChecked(false);
|
||||||
|
-
|
||||||
|
- assertThat(Settings.Secure.getInt(mContentResolver, SETTING_KEY, 0)).isEqualTo(0);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
-260
@@ -1,260 +0,0 @@
|
|||||||
From 54374a8c7cdb6df7657090ff849cce25d051ee52 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Mon, 10 Jan 2022 04:44:58 +0000
|
|
||||||
Subject: [PATCH] Revert "Implement LocalColorExtractor using monet theme
|
|
||||||
engine"
|
|
||||||
|
|
||||||
This reverts commit 43594af5b025d2223f9eab97e9226541b2851419.
|
|
||||||
---
|
|
||||||
Android.bp | 1 -
|
|
||||||
res/values/config.xml | 2 +-
|
|
||||||
.../widget/LocalWallpaperColorsExtractor.java | 212 ------------------
|
|
||||||
3 files changed, 1 insertion(+), 214 deletions(-)
|
|
||||||
delete mode 100644 src/com/android/launcher3/widget/LocalWallpaperColorsExtractor.java
|
|
||||||
|
|
||||||
diff --git a/Android.bp b/Android.bp
|
|
||||||
index 621eaf0a1e..f700dedf03 100644
|
|
||||||
--- a/Android.bp
|
|
||||||
+++ b/Android.bp
|
|
||||||
@@ -122,7 +122,6 @@ android_library {
|
|
||||||
"com.google.android.material_material",
|
|
||||||
"iconloader_base",
|
|
||||||
"libGoogleFeed",
|
|
||||||
- "monet",
|
|
||||||
],
|
|
||||||
manifest: "AndroidManifest-common.xml",
|
|
||||||
sdk_version: "current",
|
|
||||||
diff --git a/res/values/config.xml b/res/values/config.xml
|
|
||||||
index 95f94af904..0ac0f9c588 100644
|
|
||||||
--- a/res/values/config.xml
|
|
||||||
+++ b/res/values/config.xml
|
|
||||||
@@ -87,7 +87,7 @@
|
|
||||||
|
|
||||||
<!-- Default packages -->
|
|
||||||
<string name="wallpaper_picker_package" translatable="false"></string>
|
|
||||||
- <string name="local_colors_extraction_class" translatable="false">com.android.launcher3.widget.LocalWallpaperColorsExtractor</string>
|
|
||||||
+ <string name="local_colors_extraction_class" translatable="false"></string>
|
|
||||||
|
|
||||||
<!-- Accessibility actions -->
|
|
||||||
<item type="id" name="action_remove" />
|
|
||||||
diff --git a/src/com/android/launcher3/widget/LocalWallpaperColorsExtractor.java b/src/com/android/launcher3/widget/LocalWallpaperColorsExtractor.java
|
|
||||||
deleted file mode 100644
|
|
||||||
index 29d464826e..0000000000
|
|
||||||
--- a/src/com/android/launcher3/widget/LocalWallpaperColorsExtractor.java
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,212 +0,0 @@
|
|
||||||
-package com.android.launcher3.widget;
|
|
||||||
-
|
|
||||||
-import android.app.WallpaperColors;
|
|
||||||
-import android.app.WallpaperManager;
|
|
||||||
-import android.content.Context;
|
|
||||||
-import android.content.res.Configuration;
|
|
||||||
-import android.content.res.Resources;
|
|
||||||
-import android.graphics.Rect;
|
|
||||||
-import android.graphics.RectF;
|
|
||||||
-import android.util.SparseIntArray;
|
|
||||||
-import android.view.View;
|
|
||||||
-import android.widget.RemoteViews;
|
|
||||||
-
|
|
||||||
-import com.android.launcher3.DeviceProfile;
|
|
||||||
-import com.android.launcher3.Launcher;
|
|
||||||
-import com.android.launcher3.Utilities;
|
|
||||||
-import com.android.launcher3.widget.LocalColorExtractor;
|
|
||||||
-import com.android.systemui.monet.ColorScheme;
|
|
||||||
-
|
|
||||||
-import java.util.List;
|
|
||||||
-
|
|
||||||
-public class LocalWallpaperColorsExtractor extends LocalColorExtractor implements
|
|
||||||
- WallpaperManager.LocalWallpaperColorConsumer {
|
|
||||||
-
|
|
||||||
- private final WallpaperManager wallpaperManager;
|
|
||||||
- private Listener listener;
|
|
||||||
- private Context mContext;
|
|
||||||
-
|
|
||||||
- // For calculating and returning bounds
|
|
||||||
- private final float[] tempFloatArray = new float[4];
|
|
||||||
- private final Rect tempRect = new Rect();
|
|
||||||
- private final RectF tempRectF = new RectF();
|
|
||||||
-
|
|
||||||
- public static final int[] accent = {
|
|
||||||
- android.R.color.system_accent1_10,
|
|
||||||
- android.R.color.system_accent1_50,
|
|
||||||
- android.R.color.system_accent1_100,
|
|
||||||
- android.R.color.system_accent1_200,
|
|
||||||
- android.R.color.system_accent1_300,
|
|
||||||
- android.R.color.system_accent1_400,
|
|
||||||
- android.R.color.system_accent1_500,
|
|
||||||
- android.R.color.system_accent1_600,
|
|
||||||
- android.R.color.system_accent1_700,
|
|
||||||
- android.R.color.system_accent1_800,
|
|
||||||
- android.R.color.system_accent1_900,
|
|
||||||
- android.R.color.system_accent1_1000,
|
|
||||||
- android.R.color.system_accent2_10,
|
|
||||||
- android.R.color.system_accent2_50,
|
|
||||||
- android.R.color.system_accent2_100,
|
|
||||||
- android.R.color.system_accent2_200,
|
|
||||||
- android.R.color.system_accent2_300,
|
|
||||||
- android.R.color.system_accent2_400,
|
|
||||||
- android.R.color.system_accent2_500,
|
|
||||||
- android.R.color.system_accent2_600,
|
|
||||||
- android.R.color.system_accent2_700,
|
|
||||||
- android.R.color.system_accent2_800,
|
|
||||||
- android.R.color.system_accent2_900,
|
|
||||||
- android.R.color.system_accent2_1000,
|
|
||||||
- android.R.color.system_accent3_10,
|
|
||||||
- android.R.color.system_accent3_50,
|
|
||||||
- android.R.color.system_accent3_100,
|
|
||||||
- android.R.color.system_accent3_200,
|
|
||||||
- android.R.color.system_accent3_300,
|
|
||||||
- android.R.color.system_accent3_400,
|
|
||||||
- android.R.color.system_accent3_500,
|
|
||||||
- android.R.color.system_accent3_600,
|
|
||||||
- android.R.color.system_accent3_700,
|
|
||||||
- android.R.color.system_accent3_800,
|
|
||||||
- android.R.color.system_accent3_900,
|
|
||||||
- android.R.color.system_accent3_1000
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- public static final int[] neutral = {
|
|
||||||
- android.R.color.system_neutral1_10,
|
|
||||||
- android.R.color.system_neutral1_50,
|
|
||||||
- android.R.color.system_neutral1_100,
|
|
||||||
- android.R.color.system_neutral1_200,
|
|
||||||
- android.R.color.system_neutral1_300,
|
|
||||||
- android.R.color.system_neutral1_400,
|
|
||||||
- android.R.color.system_neutral1_500,
|
|
||||||
- android.R.color.system_neutral1_600,
|
|
||||||
- android.R.color.system_neutral1_700,
|
|
||||||
- android.R.color.system_neutral1_800,
|
|
||||||
- android.R.color.system_neutral1_900,
|
|
||||||
- android.R.color.system_neutral1_1000,
|
|
||||||
- android.R.color.system_neutral2_10,
|
|
||||||
- android.R.color.system_neutral2_50,
|
|
||||||
- android.R.color.system_neutral2_100,
|
|
||||||
- android.R.color.system_neutral2_200,
|
|
||||||
- android.R.color.system_neutral2_300,
|
|
||||||
- android.R.color.system_neutral2_400,
|
|
||||||
- android.R.color.system_neutral2_500,
|
|
||||||
- android.R.color.system_neutral2_600,
|
|
||||||
- android.R.color.system_neutral2_700,
|
|
||||||
- android.R.color.system_neutral2_800,
|
|
||||||
- android.R.color.system_neutral2_900,
|
|
||||||
- android.R.color.system_neutral2_1000
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- public LocalWallpaperColorsExtractor(Context context) {
|
|
||||||
- mContext = context;
|
|
||||||
- wallpaperManager = (WallpaperManager) context.getSystemService(Context.WALLPAPER_SERVICE);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private static void addColorsToArray(List<Integer> list, int[] resArray, SparseIntArray array) {
|
|
||||||
- for (int i = 0; i < resArray.length; i++) {
|
|
||||||
- array.put(resArray[i], -16777216 | list.get(i));
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Override
|
|
||||||
- public void setListener(Listener listener) {
|
|
||||||
- this.listener = listener;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Override
|
|
||||||
- public void addLocation(List<RectF> locations) {
|
|
||||||
- wallpaperManager.addOnColorsChangedListener(this, locations);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Override
|
|
||||||
- public void removeLocations() {
|
|
||||||
- wallpaperManager.removeOnColorsChangedListener(this);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Override
|
|
||||||
- public SparseIntArray generateColorsOverride(WallpaperColors colors) {
|
|
||||||
- SparseIntArray colorRes = new SparseIntArray(5 * 13);
|
|
||||||
- boolean nightMode = (mContext.getResources().getConfiguration().uiMode
|
|
||||||
- & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
|
|
||||||
-
|
|
||||||
- ColorScheme colorScheme = new ColorScheme(ColorScheme.getSeedColor(colors), nightMode);
|
|
||||||
-
|
|
||||||
- addColorsToArray(colorScheme.getAllAccentColors(), accent, colorRes);
|
|
||||||
- addColorsToArray(colorScheme.getAllNeutralColors(), neutral, colorRes);
|
|
||||||
-
|
|
||||||
- return colorRes;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Override
|
|
||||||
- public void applyColorsOverride(Context base, WallpaperColors colors) {
|
|
||||||
- RemoteViews.ColorResources res =
|
|
||||||
- RemoteViews.ColorResources.create(base, generateColorsOverride(colors));
|
|
||||||
- if (res != null) {
|
|
||||||
- res.apply(base);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Override
|
|
||||||
- public void getExtractedRectForView(Launcher launcher, int pageId, View v,
|
|
||||||
- RectF colorExtractionRectOut) {
|
|
||||||
- Rect viewRect = tempRect;
|
|
||||||
- viewRect.set(0, 0, v.getWidth(), v.getHeight());
|
|
||||||
- Utilities.getBoundsForViewInDragLayer(launcher.getDragLayer(), v, viewRect, false,
|
|
||||||
- tempFloatArray, tempRectF);
|
|
||||||
- Utilities.setRect(tempRectF, viewRect);
|
|
||||||
- getExtractedRectForViewRect(launcher, pageId, viewRect, colorExtractionRectOut);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Override
|
|
||||||
- public void getExtractedRectForViewRect(Launcher launcher, int pageId, Rect rectInDragLayer,
|
|
||||||
- RectF colorExtractionRectOut) {
|
|
||||||
- // If the view hasn't been measured and laid out, we cannot do this.
|
|
||||||
- if (rectInDragLayer.isEmpty()) {
|
|
||||||
- colorExtractionRectOut.setEmpty();
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- Resources res = launcher.getResources();
|
|
||||||
- DeviceProfile dp = launcher.getDeviceProfile().inv.getDeviceProfile(launcher);
|
|
||||||
- float screenWidth = dp.widthPx;
|
|
||||||
- float screenHeight = dp.heightPx;
|
|
||||||
- int numScreens = launcher.getWorkspace().getNumPagesForWallpaperParallax();
|
|
||||||
- pageId = Utilities.isRtl(res) ? numScreens - pageId - 1 : pageId;
|
|
||||||
- float relativeScreenWidth = 1f / numScreens;
|
|
||||||
-
|
|
||||||
- int[] dragLayerBounds = new int[2];
|
|
||||||
- launcher.getDragLayer().getLocationOnScreen(dragLayerBounds);
|
|
||||||
- // Translate from drag layer coordinates to screen coordinates.
|
|
||||||
- int screenLeft = rectInDragLayer.left + dragLayerBounds[0];
|
|
||||||
- int screenTop = rectInDragLayer.top + dragLayerBounds[1];
|
|
||||||
- int screenRight = rectInDragLayer.right + dragLayerBounds[0];
|
|
||||||
- int screenBottom = rectInDragLayer.bottom + dragLayerBounds[1];
|
|
||||||
-
|
|
||||||
- // This is the position of the view relative to the wallpaper, as expected by the
|
|
||||||
- // local color extraction of the WallpaperManager.
|
|
||||||
- // The coordinate system is such that, on the horizontal axis, each screen has a
|
|
||||||
- // distinct range on the [0,1] segment. So if there are 3 screens, they will have the
|
|
||||||
- // ranges [0, 1/3], [1/3, 2/3] and [2/3, 1]. The position on the subrange should be
|
|
||||||
- // the position of the view relative to the screen. For the vertical axis, this is
|
|
||||||
- // simply the location of the view relative to the screen.
|
|
||||||
- // Translate from drag layer coordinates to screen coordinates
|
|
||||||
- colorExtractionRectOut.left = (screenLeft / screenWidth + pageId) * relativeScreenWidth;
|
|
||||||
- colorExtractionRectOut.right = (screenRight / screenWidth + pageId) * relativeScreenWidth;
|
|
||||||
- colorExtractionRectOut.top = screenTop / screenHeight;
|
|
||||||
- colorExtractionRectOut.bottom = screenBottom / screenHeight;
|
|
||||||
-
|
|
||||||
- if (colorExtractionRectOut.left < 0
|
|
||||||
- || colorExtractionRectOut.right > 1
|
|
||||||
- || colorExtractionRectOut.top < 0
|
|
||||||
- || colorExtractionRectOut.bottom > 1) {
|
|
||||||
- colorExtractionRectOut.setEmpty();
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Override
|
|
||||||
- public void onColorsChanged(RectF area, WallpaperColors colors) {
|
|
||||||
- if (listener != null) {
|
|
||||||
- listener.onColorsChanged(area, generateColorsOverride(colors));
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+13
-20
@@ -1,24 +1,24 @@
|
|||||||
From deccbf542c72d5e1f78e83b3e895eb1f9480ac75 Mon Sep 17 00:00:00 2001
|
From f32dde0ff88ec58029be1fe4a1b42b94ff1bdbab Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Thu, 28 Oct 2021 02:30:59 +0000
|
Date: Thu, 28 Oct 2021 02:30:59 +0000
|
||||||
Subject: [PATCH] Trebuchet: Make overview scrim transparent again
|
Subject: [PATCH 1/2] Trebuchet: Make overview scrim transparent again
|
||||||
|
|
||||||
Also revert texts/buttons to workspace color
|
Also revert texts/buttons to workspace color
|
||||||
|
|
||||||
Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
|
Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
|
||||||
---
|
---
|
||||||
quickstep/res/values/styles.xml | 4 ++--
|
quickstep/res/values/styles.xml | 2 +-
|
||||||
quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +-
|
quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +-
|
||||||
res/color-v31/overview_scrim.xml | 2 +-
|
res/color-v31/overview_scrim.xml | 2 +-
|
||||||
res/color-v31/overview_scrim_dark.xml | 2 +-
|
res/color-v31/overview_scrim_dark.xml | 2 +-
|
||||||
res/color/overview_button.xml | 6 +++---
|
res/color/overview_button.xml | 6 +++---
|
||||||
5 files changed, 8 insertions(+), 8 deletions(-)
|
5 files changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
|
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
|
||||||
index 07c448df9e..c3a3bb8375 100644
|
index 8eea37f6c2..623f60f81a 100644
|
||||||
--- a/quickstep/res/values/styles.xml
|
--- a/quickstep/res/values/styles.xml
|
||||||
+++ b/quickstep/res/values/styles.xml
|
+++ b/quickstep/res/values/styles.xml
|
||||||
@@ -130,7 +130,7 @@
|
@@ -176,7 +176,7 @@
|
||||||
parent="@android:style/Widget.DeviceDefault.Button.Borderless">
|
parent="@android:style/Widget.DeviceDefault.Button.Borderless">
|
||||||
<item name="android:textColor">@color/overview_button</item>
|
<item name="android:textColor">@color/overview_button</item>
|
||||||
<item name="android:drawableTint">@color/overview_button</item>
|
<item name="android:drawableTint">@color/overview_button</item>
|
||||||
@@ -27,18 +27,11 @@ index 07c448df9e..c3a3bb8375 100644
|
|||||||
<item name="android:drawablePadding">8dp</item>
|
<item name="android:drawablePadding">8dp</item>
|
||||||
<item name="android:textAllCaps">false</item>
|
<item name="android:textAllCaps">false</item>
|
||||||
</style>
|
</style>
|
||||||
@@ -139,4 +139,4 @@
|
|
||||||
<style name="BaseIcon.Workspace.Taskbar" >
|
|
||||||
<item name="iconDisplay">taskbar</item>
|
|
||||||
</style>
|
|
||||||
-</resources>
|
|
||||||
\ No newline at end of file
|
|
||||||
+</resources>
|
|
||||||
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
index b447166d6e..d94a93a909 100644
|
index 9222e456e5..678c0dfd80 100644
|
||||||
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
@@ -606,7 +606,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
@@ -783,7 +783,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||||
mEmptyIcon.setCallback(this);
|
mEmptyIcon.setCallback(this);
|
||||||
mEmptyMessage = context.getText(R.string.recents_empty_message);
|
mEmptyMessage = context.getText(R.string.recents_empty_message);
|
||||||
mEmptyMessagePaint = new TextPaint();
|
mEmptyMessagePaint = new TextPaint();
|
||||||
@@ -48,25 +41,25 @@ index b447166d6e..d94a93a909 100644
|
|||||||
.getDimension(R.dimen.recents_empty_message_text_size));
|
.getDimension(R.dimen.recents_empty_message_text_size));
|
||||||
mEmptyMessagePaint.setTypeface(Typeface.create(Themes.getDefaultBodyFont(context),
|
mEmptyMessagePaint.setTypeface(Typeface.create(Themes.getDefaultBodyFont(context),
|
||||||
diff --git a/res/color-v31/overview_scrim.xml b/res/color-v31/overview_scrim.xml
|
diff --git a/res/color-v31/overview_scrim.xml b/res/color-v31/overview_scrim.xml
|
||||||
index 80799957ff..894997c59a 100644
|
index 212518ff65..894997c59a 100644
|
||||||
--- a/res/color-v31/overview_scrim.xml
|
--- a/res/color-v31/overview_scrim.xml
|
||||||
+++ b/res/color-v31/overview_scrim.xml
|
+++ b/res/color-v31/overview_scrim.xml
|
||||||
@@ -14,5 +14,5 @@
|
@@ -14,5 +14,5 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
- <item android:color="@android:color/system_neutral2_500" android:lStar="87" />
|
- <item android:color="@android:color/system_neutral2_200" />
|
||||||
+ <item android:color="@android:color/transparent" />
|
+ <item android:color="@android:color/transparent" />
|
||||||
</selector>
|
</selector>
|
||||||
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
|
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
|
||||||
index b8ed7747e0..894997c59a 100644
|
index 2ab8ecdec9..894997c59a 100644
|
||||||
--- a/res/color-v31/overview_scrim_dark.xml
|
--- a/res/color-v31/overview_scrim_dark.xml
|
||||||
+++ b/res/color-v31/overview_scrim_dark.xml
|
+++ b/res/color-v31/overview_scrim_dark.xml
|
||||||
@@ -14,5 +14,5 @@
|
@@ -14,5 +14,5 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
- <item android:color="@android:color/system_neutral1_800" />
|
- <item android:color="@android:color/system_neutral1_500" android:lStar="35" />
|
||||||
+ <item android:color="@android:color/transparent" />
|
+ <item android:color="@android:color/transparent" />
|
||||||
</selector>
|
</selector>
|
||||||
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml
|
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml
|
||||||
@@ -89,5 +82,5 @@ index aa48b78604..e638ac2d4a 100644
|
|||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
+</selector>
|
+</selector>
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+82
@@ -0,0 +1,82 @@
|
|||||||
|
From c04fae6b45b624a39d684c4b6cf02440a3fe83b5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Fri, 18 Mar 2022 08:42:18 +0000
|
||||||
|
Subject: [PATCH 2/2] Trebuchet: Kill haptics in recents
|
||||||
|
|
||||||
|
This partially reverts commit cc5c8843dfebfa92057b6ce8904ac58cd05ffaef.
|
||||||
|
|
||||||
|
Change-Id: Ie3b0eabe8cc0421e696720740edc492cae2f5153
|
||||||
|
---
|
||||||
|
.../NoButtonQuickSwitchTouchController.java | 8 --------
|
||||||
|
.../TaskViewTouchController.java | 5 -----
|
||||||
|
.../android/quickstep/views/RecentsView.java | 19 -------------------
|
||||||
|
3 files changed, 32 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
|
||||||
|
index 847114a960..eef4be2964 100644
|
||||||
|
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
|
||||||
|
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
|
||||||
|
@@ -419,14 +419,6 @@ 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);
|
||||||
|
- }
|
||||||
|
|
||||||
|
nonOverviewAnim.setDuration(Math.max(xDuration, yDuration));
|
||||||
|
mNonOverviewAnim.setEndAction(() -> onAnimationToStateCompleted(targetState));
|
||||||
|
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
|
||||||
|
index eddc50c64f..09f253b08d 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 678c0dfd80..8e75a7c18d 100644
|
||||||
|
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
@@ -1466,25 +1466,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
|
||||||
|
|
||||||
+13
-6
@@ -1,4 +1,4 @@
|
|||||||
From 9f56f5ced9534094a72c14d996bd21dd7800a059 Mon Sep 17 00:00:00 2001
|
From b09034c7e5f9bbc2d29c3f10452259956fcb9f46 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 16 Oct 2021 00:33:15 +0000
|
Date: Sat, 16 Oct 2021 00:33:15 +0000
|
||||||
Subject: [PATCH] Replace captive portal URLs globally
|
Subject: [PATCH] Replace captive portal URLs globally
|
||||||
@@ -8,17 +8,17 @@ URLs from Chinese OEM UIs are faster and more reliable than g.cn and other int'l
|
|||||||
|
|
||||||
Change-Id: Ic3e124b2b62838a2bcf1dad0d670515f3d056964
|
Change-Id: Ic3e124b2b62838a2bcf1dad0d670515f3d056964
|
||||||
---
|
---
|
||||||
res/values-mcc460/config.xml | 24 ------------------------
|
res/values-mcc460/config.xml | 31 -------------------------------
|
||||||
res/values/config.xml | 7 +++----
|
res/values/config.xml | 7 +++----
|
||||||
2 files changed, 3 insertions(+), 28 deletions(-)
|
2 files changed, 3 insertions(+), 35 deletions(-)
|
||||||
delete mode 100644 res/values-mcc460/config.xml
|
delete mode 100644 res/values-mcc460/config.xml
|
||||||
|
|
||||||
diff --git a/res/values-mcc460/config.xml b/res/values-mcc460/config.xml
|
diff --git a/res/values-mcc460/config.xml b/res/values-mcc460/config.xml
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 2863edd7..00000000
|
index 3c4b4933..00000000
|
||||||
--- a/res/values-mcc460/config.xml
|
--- a/res/values-mcc460/config.xml
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,24 +0,0 @@
|
@@ -1,31 +0,0 @@
|
||||||
-<?xml version="1.0" encoding="utf-8"?>
|
-<?xml version="1.0" encoding="utf-8"?>
|
||||||
-<resources>
|
-<resources>
|
||||||
- <!-- Network validation URL configuration for devices using a Chinese SIM (MCC 460).
|
- <!-- Network validation URL configuration for devices using a Chinese SIM (MCC 460).
|
||||||
@@ -26,13 +26,20 @@ index 2863edd7..00000000
|
|||||||
- general case as this could degrade the user experience (portals not detected properly).
|
- general case as this could degrade the user experience (portals not detected properly).
|
||||||
- However in China the default URLs are not accessible in general. The below alternatives
|
- However in China the default URLs are not accessible in general. The below alternatives
|
||||||
- should allow users to connect to local networks normally. -->
|
- should allow users to connect to local networks normally. -->
|
||||||
|
- <!-- default_captive_portal_http_url is not configured as overlayable so
|
||||||
|
- OEMs that wish to change captive_portal_http_url configuration must
|
||||||
|
- do so via configuring runtime resource overlay to
|
||||||
|
- config_captive_portal_http_url and *NOT* by changing or overlaying
|
||||||
|
- this resource. It will break if the enforcement of overlayable starts.
|
||||||
|
- -->
|
||||||
|
- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.cn/generate_204</string>
|
||||||
- <!-- default_captive_portal_https_url is not configured as overlayable so
|
- <!-- default_captive_portal_https_url is not configured as overlayable so
|
||||||
- OEMs that wish to change captive_portal_https_url configuration must
|
- OEMs that wish to change captive_portal_https_url configuration must
|
||||||
- do so via configuring runtime resource overlay to
|
- do so via configuring runtime resource overlay to
|
||||||
- config_captive_portal_https_url and *NOT* by changing or overlaying
|
- config_captive_portal_https_url and *NOT* by changing or overlaying
|
||||||
- this resource. It will break if the enforcement of overlayable starts.
|
- this resource. It will break if the enforcement of overlayable starts.
|
||||||
- -->
|
- -->
|
||||||
- <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.com/generate_204</string>
|
- <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.cn/generate_204</string>
|
||||||
- <!-- default_captive_portal_fallback_urls is not configured as overlayable
|
- <!-- default_captive_portal_fallback_urls is not configured as overlayable
|
||||||
- so OEMs that wish to change captive_portal_fallback_urls configuration
|
- so OEMs that wish to change captive_portal_fallback_urls configuration
|
||||||
- must do so via configuring runtime resource overlay to
|
- must do so via configuring runtime resource overlay to
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
From bd33859aa15ad4ab099716b0d029b333c6300134 Mon Sep 17 00:00:00 2001
|
From 863e8f70e3a4f987938ff4ad01c22822bc38e409 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 20 Jun 2021 09:09:15 +0000
|
Date: Sun, 20 Jun 2021 09:09:15 +0000
|
||||||
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)
|
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)
|
||||||
@@ -32,5 +32,5 @@ index 28044e2c..c5aa9617 100644
|
|||||||
ADDITIONAL_SYSTEM_PROPERTIES += \
|
ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||||
ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION)
|
ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION)
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From e3633d610a46dfa849b01ae66ff233e615efa079 Mon Sep 17 00:00:00 2001
|
From 34f8aa093286970f82014f1dae0e86e4cbeba896 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 16 Oct 2021 00:41:07 +0000
|
Date: Sat, 16 Oct 2021 00:41:07 +0000
|
||||||
Subject: [PATCH 2/4] build: Remove Stk (2/2)
|
Subject: [PATCH 2/4] build: Remove Stk (2/2)
|
||||||
@@ -36,5 +36,5 @@ index 6adf48d9..e63b320d 100644
|
|||||||
# Default ringtone
|
# Default ringtone
|
||||||
PRODUCT_PRODUCT_PROPERTIES += \
|
PRODUCT_PRODUCT_PROPERTIES += \
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
From ef538d98c3401b7324682ebf96f32f28649dc036 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Wed, 27 Oct 2021 13:23:31 +0000
|
|
||||||
Subject: [PATCH 3/4] Revert "overlay: Enable monet"
|
|
||||||
|
|
||||||
This reverts commit 97a1727968a2fca85c3bdc419637e9c02fce9ce7.
|
|
||||||
---
|
|
||||||
.../frameworks/base/packages/SystemUI/res/values/flags.xml | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml b/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
|
|
||||||
index d22d0f23..64c6e78b 100644
|
|
||||||
--- a/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
|
|
||||||
+++ b/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
|
|
||||||
@@ -17,5 +17,4 @@
|
|
||||||
<resources>
|
|
||||||
<bool name="flag_conversations">true</bool>
|
|
||||||
<bool name="flag_charging_ripple">true</bool>
|
|
||||||
- <bool name="flag_monet">true</bool>
|
|
||||||
</resources>
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From 89941c7836527978fb1834a14e9ad95cb1c5c9d0 Mon Sep 17 00:00:00 2001
|
From 84b5b23519166701423a324cac955e9110e36eae Mon Sep 17 00:00:00 2001
|
||||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Mon, 1 Jul 2019 07:03:04 +0000
|
Date: Mon, 1 Jul 2019 07:03:04 +0000
|
||||||
Subject: [PATCH 4/4] vendor_lineage: Ignore neverallows... again
|
Subject: [PATCH 3/4] vendor_lineage: Ignore neverallows... again
|
||||||
|
|
||||||
Because unofficial builds are better than no builds!
|
Because unofficial builds are better than no builds!
|
||||||
|
|
||||||
@@ -26,5 +26,5 @@ index f2e595ff..d6d036a9 100644
|
|||||||
# Rules for QCOM targets
|
# Rules for QCOM targets
|
||||||
include $(TOPDIR)vendor/lineage/build/core/qcom_target.mk
|
include $(TOPDIR)vendor/lineage/build/core/qcom_target.mk
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+2242
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
|
||||||
|
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
From ad25fd64270b2c3dc9fbce5e97c2eb75d63f015b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Thu, 19 Jan 2023 16:44:01 -0500
|
||||||
|
Subject: [PATCH 2/2] Rework property overriding
|
||||||
|
|
||||||
|
- Support property read with callback in addition to previous
|
||||||
|
constant-size property_get
|
||||||
|
- Add another class of redirect "keymaster", to redirect to AOSP/GSI
|
||||||
|
props + SPL based on boot.img
|
||||||
|
---
|
||||||
|
libc/system_properties/system_properties.cpp | 77 +++++++++++++++-----
|
||||||
|
1 file changed, 58 insertions(+), 19 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
|
||||||
|
index d6e7e3e68..40ff48bad 100644
|
||||||
|
--- a/libc/system_properties/system_properties.cpp
|
||||||
|
+++ b/libc/system_properties/system_properties.cpp
|
||||||
|
@@ -35,6 +35,7 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <new>
|
||||||
|
@@ -60,23 +61,70 @@ static void read_self() {
|
||||||
|
if(self_ok) return;
|
||||||
|
self_ok = true;
|
||||||
|
|
||||||
|
- int fd = open("/proc/self/comm", O_RDONLY);
|
||||||
|
+ char cmdline[128];
|
||||||
|
+ int fd = open("/proc/self/cmdline", O_RDONLY);
|
||||||
|
if(fd<0) return;
|
||||||
|
- read(fd, comm, sizeof(comm)-1);
|
||||||
|
- for(unsigned i=0; i<sizeof(comm); i++)
|
||||||
|
- if(comm[i] == '\n')
|
||||||
|
- comm[i] = 0;
|
||||||
|
+ read(fd, cmdline, sizeof(cmdline)-1);
|
||||||
|
+ for(unsigned i=0; i<sizeof(cmdline); i++)
|
||||||
|
+ if(cmdline[i] == '\n')
|
||||||
|
+ cmdline[i] = 0;
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
+ // Truncate to last /, we don't want `/` in the prop
|
||||||
|
+ const char *c = strrchr(cmdline, '/');
|
||||||
|
+ if (c != nullptr) {
|
||||||
|
+ c = c+1;
|
||||||
|
+ } else {
|
||||||
|
+ c = cmdline;
|
||||||
|
+ }
|
||||||
|
+ // Take only the last 16 bytes (prop names max is 32)
|
||||||
|
+ if(strlen(c) < 15) {
|
||||||
|
+ strcpy(comm, c);
|
||||||
|
+ } else {
|
||||||
|
+ strcpy(comm, c + strlen(c) - 15);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
//That's calling ourselves but that's fine because we already have self_ok = true
|
||||||
|
char propName[PROP_NAME_MAX];
|
||||||
|
memset(propName, 0, PROP_NAME_MAX);
|
||||||
|
strncpy(propName, "debug.phh.props.", PROP_NAME_MAX - 1);
|
||||||
|
- strncat(propName, comm, PROP_NAME_MAX - 1);
|
||||||
|
+ strncat(propName, comm, PROP_NAME_MAX - strlen(propName) - 1);
|
||||||
|
|
||||||
|
+ //async_safe_format_log(ANDROID_LOG_WARN, "libc", "Reading debug prop %s", propName);
|
||||||
|
__system_property_get(propName, comm_override);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static const char* redirectToProp(const char *name) {
|
||||||
|
+ read_self();
|
||||||
|
+ /*if(strstr(name, "ro.keymaster") != nullptr || strstr(name, "security_patch") != nullptr || strstr(name, "release") != nullptr) {
|
||||||
|
+ async_safe_format_log(ANDROID_LOG_WARN, "libc", "Process/comm %s/%s is reading %s", comm, comm_override, name);
|
||||||
|
+ }*/
|
||||||
|
+ if(strcmp(comm_override, "vendor") == 0) {
|
||||||
|
+ if(strcmp(name, "ro.product.device") == 0) {
|
||||||
|
+ return "ro.product.vendor.device";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.product.manufacturer") == 0) {
|
||||||
|
+ return "ro.product.vendor.manufacturer";
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(comm_override, "keymaster") == 0) {
|
||||||
|
+ if(strcmp(name, "ro.product.model") == 0) {
|
||||||
|
+ return "ro.keymaster.mod";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.product.brand") == 0) {
|
||||||
|
+ return "ro.keymaster.brn";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.build.version.release") == 0) {
|
||||||
|
+ return "ro.keymaster.xxx.release";
|
||||||
|
+ }
|
||||||
|
+ if(strcmp(name, "ro.build.version.security_patch") == 0) {
|
||||||
|
+ return "ro.keymaster.xxx.security_patch";
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return name;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static bool is_dir(const char* pathname) {
|
||||||
|
struct stat info;
|
||||||
|
if (stat(pathname, &info) == -1) {
|
||||||
|
@@ -150,17 +198,19 @@ uint32_t SystemProperties::AreaSerial() {
|
||||||
|
}
|
||||||
|
|
||||||
|
const prop_info* SystemProperties::Find(const char* name) {
|
||||||
|
+ const char* newName = redirectToProp(name);
|
||||||
|
+
|
||||||
|
if (!initialized_) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- prop_area* pa = contexts_->GetPropAreaForName(name);
|
||||||
|
+ prop_area* pa = contexts_->GetPropAreaForName(newName);
|
||||||
|
if (!pa) {
|
||||||
|
async_safe_format_log(ANDROID_LOG_WARN, "libc", "Access denied finding property \"%s\"", name);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- return pa->find(name);
|
||||||
|
+ return pa->find(newName);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool is_read_only(const char* name) {
|
||||||
|
@@ -243,17 +293,6 @@ void SystemProperties::ReadCallback(const prop_info* pi,
|
||||||
|
}
|
||||||
|
|
||||||
|
int SystemProperties::Get(const char* name, char* value) {
|
||||||
|
- read_self();
|
||||||
|
- if(strcmp(comm_override, "vendor") == 0) {
|
||||||
|
- if(strcmp(name, "ro.product.device") == 0) {
|
||||||
|
- int r = Get("ro.product.vendor.device", value);
|
||||||
|
- if(r>0) return r;
|
||||||
|
- }
|
||||||
|
- if(strcmp(name, "ro.product.manufacturer") == 0) {
|
||||||
|
- int r = Get("ro.product.vendor.manufacturer", value);
|
||||||
|
- if(r>0) return r;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
const prop_info* pi = Find(name);
|
||||||
|
|
||||||
|
if (pi != nullptr) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
From ff787114856cc9ccb057cf524e7089f7aed558cc Mon Sep 17 00:00:00 2001
|
From faff60c8814e2d31519d86e92faf08761a1d1de1 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Wed, 8 Dec 2021 07:04:53 +0000
|
Date: Wed, 8 Dec 2021 07:04:53 +0000
|
||||||
Subject: [PATCH] Remove init.vndk-nodef.rc
|
Subject: [PATCH] Remove init.vndk-nodef.rc
|
||||||
@@ -11,18 +11,18 @@ Thanks @Kethen for the insight!
|
|||||||
|
|
||||||
Change-Id: I7c14fe5229e953f620bb225fa5c981752d0ac5f9
|
Change-Id: I7c14fe5229e953f620bb225fa5c981752d0ac5f9
|
||||||
---
|
---
|
||||||
target/product/gsi/Android.mk | 12 ------------
|
target/product/gsi/Android.mk | 13 -------------
|
||||||
target/product/gsi/init.gsi.rc | 2 --
|
target/product/gsi/init.gsi.rc | 2 --
|
||||||
target/product/gsi/init.vndk-nodef.rc | 3 ---
|
target/product/gsi/init.vndk-nodef.rc | 3 ---
|
||||||
target/product/gsi_release.mk | 3 +--
|
target/product/gsi_release.mk | 1 -
|
||||||
4 files changed, 1 insertion(+), 19 deletions(-)
|
4 files changed, 19 deletions(-)
|
||||||
delete mode 100644 target/product/gsi/init.vndk-nodef.rc
|
delete mode 100644 target/product/gsi/init.vndk-nodef.rc
|
||||||
|
|
||||||
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
|
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
|
||||||
index cb4fdcb33..f2c0f212c 100644
|
index 85e551d3f..c1f37e07f 100644
|
||||||
--- a/target/product/gsi/Android.mk
|
--- a/target/product/gsi/Android.mk
|
||||||
+++ b/target/product/gsi/Android.mk
|
+++ b/target/product/gsi/Android.mk
|
||||||
@@ -228,15 +228,3 @@ LOCAL_SYSTEM_EXT_MODULE := true
|
@@ -247,16 +247,3 @@ LOCAL_SYSTEM_EXT_MODULE := true
|
||||||
LOCAL_MODULE_RELATIVE_PATH := init
|
LOCAL_MODULE_RELATIVE_PATH := init
|
||||||
|
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
@@ -30,16 +30,17 @@ index cb4fdcb33..f2c0f212c 100644
|
|||||||
-
|
-
|
||||||
-include $(CLEAR_VARS)
|
-include $(CLEAR_VARS)
|
||||||
-LOCAL_MODULE := init.vndk-nodef.rc
|
-LOCAL_MODULE := init.vndk-nodef.rc
|
||||||
-LOCAL_LICENSE_KINDS := legacy_restricted
|
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||||
-LOCAL_LICENSE_CONDITIONS := restricted
|
-LOCAL_LICENSE_CONDITIONS := notice
|
||||||
|
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
||||||
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
||||||
-LOCAL_MODULE_CLASS := ETC
|
-LOCAL_MODULE_CLASS := ETC
|
||||||
-LOCAL_SYSTEM_EXT_MODULE := true
|
-LOCAL_SYSTEM_EXT_MODULE := true
|
||||||
-LOCAL_MODULE_RELATIVE_PATH := init
|
-LOCAL_MODULE_RELATIVE_PATH := gsi
|
||||||
-
|
-
|
||||||
-include $(BUILD_PREBUILT)
|
-include $(BUILD_PREBUILT)
|
||||||
diff --git a/target/product/gsi/init.gsi.rc b/target/product/gsi/init.gsi.rc
|
diff --git a/target/product/gsi/init.gsi.rc b/target/product/gsi/init.gsi.rc
|
||||||
index f48284322..c6faba78d 100644
|
index 69c8e467b..c6faba78d 100644
|
||||||
--- a/target/product/gsi/init.gsi.rc
|
--- a/target/product/gsi/init.gsi.rc
|
||||||
+++ b/target/product/gsi/init.gsi.rc
|
+++ b/target/product/gsi/init.gsi.rc
|
||||||
@@ -1,5 +1,3 @@
|
@@ -1,5 +1,3 @@
|
||||||
@@ -47,30 +48,28 @@ index f48284322..c6faba78d 100644
|
|||||||
# Android init script for GSI required initialization
|
# Android init script for GSI required initialization
|
||||||
#
|
#
|
||||||
-
|
-
|
||||||
-import /system/system_ext/etc/init/init.vndk-${ro.vndk.version:-nodef}.rc
|
-import /system/system_ext/etc/gsi/init.vndk-${ro.vndk.version:-nodef}.rc
|
||||||
diff --git a/target/product/gsi/init.vndk-nodef.rc b/target/product/gsi/init.vndk-nodef.rc
|
diff --git a/target/product/gsi/init.vndk-nodef.rc b/target/product/gsi/init.vndk-nodef.rc
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index efeef117b..000000000
|
index 1b141a05e..000000000
|
||||||
--- a/target/product/gsi/init.vndk-nodef.rc
|
--- a/target/product/gsi/init.vndk-nodef.rc
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,3 +0,0 @@
|
@@ -1,3 +0,0 @@
|
||||||
-on early-init
|
-on early-init
|
||||||
- # Must define BOARD_VNDK_VERSION
|
- # Reboot if BOARD_VNDK_VERSION is not defined
|
||||||
- exec - root -- /system/bin/reboot bootloader
|
- exec - root -- /system/bin/reboot bootloader
|
||||||
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
|
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
|
||||||
index d924d0bc1..5c3e10de7 100644
|
index 74501cd1f..575e90b14 100644
|
||||||
--- a/target/product/gsi_release.mk
|
--- a/target/product/gsi_release.mk
|
||||||
+++ b/target/product/gsi_release.mk
|
+++ b/target/product/gsi_release.mk
|
||||||
@@ -59,8 +59,7 @@ PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_with_prebuilts.flattened
|
@@ -60,7 +60,6 @@ PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_with_prebuilts.flattened
|
||||||
# GSI specific tasks on boot
|
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
gsi_skip_mount.cfg \
|
gsi_skip_mount.cfg \
|
||||||
- init.gsi.rc \
|
init.gsi.rc \
|
||||||
- init.vndk-nodef.rc \
|
- init.vndk-nodef.rc \
|
||||||
+ init.gsi.rc
|
|
||||||
|
|
||||||
# Support additional P, Q and R VNDK packages
|
# Support additional VNDK snapshots
|
||||||
PRODUCT_EXTRA_VNDK_VERSIONS := 28 29 30
|
PRODUCT_EXTRA_VNDK_VERSIONS := \
|
||||||
--
|
--
|
||||||
2.25.1
|
2.25.1
|
||||||
|
|
||||||
|
|||||||
@@ -1,199 +0,0 @@
|
|||||||
From 978be1fd8202655676e335cdd611f9c6756c0025 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Sun, 8 Aug 2021 01:43:40 +0000
|
|
||||||
Subject: [PATCH 1/4] treble: Lineage-ify
|
|
||||||
|
|
||||||
Squash of:
|
|
||||||
- Proper target names
|
|
||||||
- Remove fsck SELinux labels
|
|
||||||
- treble: Add overlay-lineage
|
|
||||||
- treble: Don't specify config_wallpaperCropperPackage
|
|
||||||
- treble: Don't handle apns-conf
|
|
||||||
|
|
||||||
Change-Id: I25eee7a3804f335430a447ae1424402d7e37851b
|
|
||||||
---
|
|
||||||
base-pre.mk | 3 -
|
|
||||||
base.mk | 16 ++--
|
|
||||||
generate.sh | 3 +
|
|
||||||
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
|
|
||||||
.../base/core/res/res/values/config.xml | 1 -
|
|
||||||
sepolicy/file_contexts | 3 -
|
|
||||||
6 files changed, 93 insertions(+), 14 deletions(-)
|
|
||||||
create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
|
||||||
|
|
||||||
diff --git a/base-pre.mk b/base-pre.mk
|
|
||||||
index 6a317e4..e69de29 100644
|
|
||||||
--- a/base-pre.mk
|
|
||||||
+++ b/base-pre.mk
|
|
||||||
@@ -1,3 +0,0 @@
|
|
||||||
-#Use a more decent APN config
|
|
||||||
-PRODUCT_COPY_FILES += \
|
|
||||||
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
|
||||||
diff --git a/base.mk b/base.mk
|
|
||||||
index 73abbab..057ad0c 100644
|
|
||||||
--- a/base.mk
|
|
||||||
+++ b/base.mk
|
|
||||||
@@ -8,12 +8,14 @@ PRODUCT_COPY_FILES := \
|
|
||||||
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
|
|
||||||
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
|
|
||||||
|
|
||||||
-#Use a more decent APN config
|
|
||||||
-PRODUCT_COPY_FILES += \
|
|
||||||
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
|
||||||
-
|
|
||||||
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/phh/treble/sepolicy
|
|
||||||
-PRODUCT_PACKAGE_OVERLAYS += device/phh/treble/overlay
|
|
||||||
+
|
|
||||||
+PRODUCT_PACKAGE_OVERLAYS += \
|
|
||||||
+ device/phh/treble/overlay \
|
|
||||||
+ device/phh/treble/overlay-lineage
|
|
||||||
+
|
|
||||||
+PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += \
|
|
||||||
+ device/phh/treble/overlay-lineage/lineage-sdk
|
|
||||||
|
|
||||||
$(call inherit-product, vendor/hardware_overlay/overlay.mk)
|
|
||||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
|
||||||
@@ -30,11 +32,11 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
||||||
ro.build.version.security_patch=$(PLATFORM_SECURITY_PATCH) \
|
|
||||||
ro.adb.secure=0 \
|
|
||||||
ro.logd.auditd=true
|
|
||||||
-
|
|
||||||
+
|
|
||||||
#Huawei HiSuite (also other OEM custom programs I guess) it's of no use in AOSP builds
|
|
||||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
||||||
persist.sys.usb.config=adb \
|
|
||||||
- ro.cust.cdrom=/dev/null
|
|
||||||
+ ro.cust.cdrom=/dev/null
|
|
||||||
|
|
||||||
#VNDK config files
|
|
||||||
PRODUCT_COPY_FILES += \
|
|
||||||
diff --git a/generate.sh b/generate.sh
|
|
||||||
index 352fe12..7e4f137 100644
|
|
||||||
--- a/generate.sh
|
|
||||||
+++ b/generate.sh
|
|
||||||
@@ -65,6 +65,9 @@ for part in a ab;do
|
|
||||||
fi
|
|
||||||
|
|
||||||
target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
|
|
||||||
+ if [ "$1" == "lineage" ];then
|
|
||||||
+ target="lineage_${target}"
|
|
||||||
+ fi
|
|
||||||
|
|
||||||
baseArch="$arch"
|
|
||||||
if [ "$arch" = "a64" ];then
|
|
||||||
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..8df673a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
|
||||||
@@ -0,0 +1,81 @@
|
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
+<!--
|
|
||||||
+ Copyright (C) 2015-2016 The CyanogenMod Project
|
|
||||||
+ 2017-2018 The LineageOS Project
|
|
||||||
+
|
|
||||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
+ you may not use this file except in compliance with the License.
|
|
||||||
+ You may obtain a copy of the License at
|
|
||||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
+ Unless required by applicable law or agreed to in writing, software
|
|
||||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
+ See the License for the specific language governing permissions and
|
|
||||||
+ limitations under the License.
|
|
||||||
+-->
|
|
||||||
+<resources>
|
|
||||||
+ <!-- Whether device has screen with higher aspect ratio -->
|
|
||||||
+ <bool name="config_haveHigherAspectRatioScreen">true</bool>
|
|
||||||
+
|
|
||||||
+ <!-- All the capabilities of the LEDs on this device, stored as a bit field.
|
|
||||||
+ This integer should equal the sum of the corresponding value for each
|
|
||||||
+ of the following capabilities present:
|
|
||||||
+ // Device has a color adjustable battery light.
|
|
||||||
+ LIGHTS_RGB_NOTIFICATION_LED = 1
|
|
||||||
+ // Device has a color adjustable notification light.
|
|
||||||
+ LIGHTS_RGB_BATTERY_LED = 2
|
|
||||||
+ LIGHTS_MULTIPLE_NOTIFICATION_LED = 4 (deprecated)
|
|
||||||
+ // The notification light has adjustable pulsing capability.
|
|
||||||
+ LIGHTS_PULSATING_LED = 8
|
|
||||||
+ // Device has a multi-segment battery light that is able to
|
|
||||||
+ // use the light brightness value to determine how many
|
|
||||||
+ // segments to show (in order to represent battery level).
|
|
||||||
+ LIGHTS_SEGMENTED_BATTERY_LED = 16
|
|
||||||
+ // The notification light supports HAL adjustable brightness
|
|
||||||
+ // via the alpha channel.
|
|
||||||
+ // Note: if a device notification light supports LIGHTS_RGB_NOTIFICATION_LED
|
|
||||||
+ // then HAL support is not necessary for brightness control. In this case,
|
|
||||||
+ // brightness support will be provided by lineage-sdk through the scaling of
|
|
||||||
+ // RGB color values.
|
|
||||||
+ LIGHTS_ADJUSTABLE_NOTIFICATION_LED_BRIGHTNESS = 32
|
|
||||||
+ // Device has a battery light.
|
|
||||||
+ LIGHTS_BATTERY_LED = 64
|
|
||||||
+ // The battery light supports HAL adjustable brightness via
|
|
||||||
+ // the alpha channel.
|
|
||||||
+ // Note: if a device battery light supports LIGHTS_RGB_BATTERY_LED then HAL
|
|
||||||
+ // support is not necessary for brightness control. In this case,
|
|
||||||
+ // brightness support will be provided by lineage-sdk through the scaling of
|
|
||||||
+ // RGB color values.
|
|
||||||
+ LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS = 128
|
|
||||||
+ For example, a device with notification and battery lights that supports
|
|
||||||
+ pulsating and RGB control would set this config to 75. -->
|
|
||||||
+ <integer name="config_deviceLightCapabilities">255</integer>
|
|
||||||
+
|
|
||||||
+ <!-- Hardware keys present on the device, stored as a bit field.
|
|
||||||
+ This integer should equal the sum of the corresponding value for each
|
|
||||||
+ of the following keys present:
|
|
||||||
+ 1 - Home
|
|
||||||
+ 2 - Back
|
|
||||||
+ 4 - Menu
|
|
||||||
+ 8 - Assistant (search)
|
|
||||||
+ 16 - App switch
|
|
||||||
+ 32 - Camera
|
|
||||||
+ 64 - Volume rocker
|
|
||||||
+ For example, a device with Home, Back and Menu keys would set this
|
|
||||||
+ config to 7. -->
|
|
||||||
+ <integer name="config_deviceHardwareKeys">127</integer>
|
|
||||||
+
|
|
||||||
+ <!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
|
|
||||||
+ This integer should equal the sum of the corresponding value for each
|
|
||||||
+ of the following keys present:
|
|
||||||
+ 1 - Home
|
|
||||||
+ 2 - Back
|
|
||||||
+ 4 - Menu
|
|
||||||
+ 8 - Assistant (search)
|
|
||||||
+ 16 - App switch
|
|
||||||
+ 32 - Camera
|
|
||||||
+ 64 - Volume rocker
|
|
||||||
+ For example, a device with Home, Back and Menu keys would set this
|
|
||||||
+ config to 7. -->
|
|
||||||
+ <integer name="config_deviceHardwareWakeKeys">127</integer>
|
|
||||||
+</resources>
|
|
||||||
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
|
|
||||||
index 89be3f6..bad8f29 100644
|
|
||||||
--- a/overlay/frameworks/base/core/res/res/values/config.xml
|
|
||||||
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
|
|
||||||
@@ -22,7 +22,6 @@
|
|
||||||
<string name="config_icon_mask" translatable="false">"M50 0C77.6 0 100 22.4 100 50C100 77.6 77.6 100 50 100C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0Z"</string>
|
|
||||||
<bool name="config_useRoundIcon">true</bool>
|
|
||||||
|
|
||||||
- <string name="config_wallpaperCropperPackage">com.android.wallpaperpicker</string>
|
|
||||||
<bool name="config_unplugTurnsOnScreen">true</bool>
|
|
||||||
<integer name="config_multiuserMaximumUsers">5</integer>
|
|
||||||
<bool name="config_enableMultiUserUI">true</bool>
|
|
||||||
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
|
|
||||||
index 999ff97..11dd447 100644
|
|
||||||
--- a/sepolicy/file_contexts
|
|
||||||
+++ b/sepolicy/file_contexts
|
|
||||||
@@ -7,9 +7,6 @@
|
|
||||||
/system/bin/asus-motor u:object_r:phhsu_exec:s0
|
|
||||||
/system/bin/xiaomi-touch u:object_r:phhsu_exec:s0
|
|
||||||
|
|
||||||
-#/system/bin/fsck\.exfat u:object_r:fsck_exec:s0
|
|
||||||
-/system/bin/fsck\.ntfs u:object_r:fsck_exec:s0
|
|
||||||
-
|
|
||||||
/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
|
|
||||||
|
|
||||||
/sec_storage(/.*)? u:object_r:teecd_data_file:s0
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
From 7ebb3f6332087fb5243955bb28c656e14a411660 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Sun, 8 Aug 2021 09:29:32 +0000
|
|
||||||
Subject: [PATCH 2/4] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
|
|
||||||
|
|
||||||
Change-Id: I725443154fabde548d2e6c1b072d34c27596c421
|
|
||||||
---
|
|
||||||
board-base.mk | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/board-base.mk b/board-base.mk
|
|
||||||
index 1ddacaf..e363dd5 100644
|
|
||||||
--- a/board-base.mk
|
|
||||||
+++ b/board-base.mk
|
|
||||||
@@ -7,3 +7,5 @@ BOARD_ROOT_EXTRA_FOLDERS += bt_firmware sec_storage efs persist
|
|
||||||
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
|
||||||
|
|
||||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
|
||||||
+
|
|
||||||
+BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
From 56c20273ac8c3c34de36f80edc2e94fc5f60b78a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
||||||
Date: Wed, 20 Oct 2021 11:30:25 +0000
|
|
||||||
Subject: [PATCH 3/4] treble: Set TARGET_NO_KERNEL_OVERRIDE
|
|
||||||
|
|
||||||
Taken from Lineage generic targets - skips building kernel cleanly
|
|
||||||
|
|
||||||
Change-Id: Id71d3a3aed56fd4e815a64ef4191b125fc5026ce
|
|
||||||
---
|
|
||||||
board-base.mk | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/board-base.mk b/board-base.mk
|
|
||||||
index e363dd5..3900f97 100644
|
|
||||||
--- a/board-base.mk
|
|
||||||
+++ b/board-base.mk
|
|
||||||
@@ -9,3 +9,5 @@ BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
|
||||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
|
||||||
|
|
||||||
BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
|
||||||
+
|
|
||||||
+TARGET_NO_KERNEL_OVERRIDE := true
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
From 39c3d994822d367cad58827e6cfa8dcd7e13b519 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Victor Bo <bvoid@yandex.ru>
|
|
||||||
Date: Tue, 15 Sep 2020 21:26:45 -0400
|
|
||||||
Subject: [PATCH 4/4] add offline charger sepolicy
|
|
||||||
|
|
||||||
---
|
|
||||||
sepolicy/gsicharger.te | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
create mode 100644 sepolicy/gsicharger.te
|
|
||||||
|
|
||||||
diff --git a/sepolicy/gsicharger.te b/sepolicy/gsicharger.te
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..91cfb5c
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sepolicy/gsicharger.te
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+permissive charger;
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user