13 Commits

Author SHA1 Message Date
Andy CrossGate Yan
101f11cb07 Changes for April 2024 2024-04-21 16:27:08 +08:00
Andy CrossGate Yan
dbc6fa9ce3 Changes for March 2023 2023-03-23 11:50:19 +00:00
Andy CrossGate Yan
e5f5c09b6c Changes for February 2023 2023-02-24 00:37:44 +00:00
Andy CrossGate Yan
ecd9df23d3 Changes for January 2023 2023-01-12 13:33:25 +00:00
Andy CrossGate Yan
a64922781e Changes for November 2022 2022-11-23 12:29:44 +00:00
Andy CrossGate Yan
032c9f3ace Changes for October 2022 2022-10-12 00:45:44 +00:00
Andy CrossGate Yan
61bac8f672 Changes for September 2022 2022-09-12 08:15:33 +00:00
Andy CrossGate Yan
fcd4d5adab Changes for August 2022 2022-08-14 09:07:51 +00:00
Andy CrossGate Yan
6d6652514e Changes for July 2022, syncing up to v415 2022-07-21 23:51:47 +00:00
Andy CrossGate Yan
c40dad91ee Changes for June 2022, syncing up to v414 2022-06-14 08:34:07 +08:00
Andy CrossGate Yan
969f476c22 Changes for May 2022, syncing up to v413 2022-05-12 00:37:03 +00:00
Andy CrossGate Yan
3f1880e5fa Changes for April 2022, syncing up to v412 2022-04-10 15:49:06 +00:00
Andy CrossGate Yan
f8937ff81f Changes for March 2022, syncing up to v410 2022-03-20 14:04:11 +00:00
189 changed files with 4834 additions and 12813 deletions

View File

@@ -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

View File

@@ -1,7 +1,7 @@
From 160ca5e73a2d075c5514db911180d4523fedf860 Mon Sep 17 00:00:00 2001
From 70d36ecebffeae156a82209215badbf3de4b3f18 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Apr 2018 10:01:19 +0800
Subject: [PATCH 02/19] Disable vendor mismatch warning
Subject: [PATCH 01/11] Disable vendor mismatch warning
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
---
@@ -9,10 +9,10 @@ Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 5d0d182230e1..789968e19ab6 100644
index 1308c12e1715..04dc3822cc27 100644
--- a/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 {
@@ -5676,20 +5676,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
}
if (!Build.isBuildConsistent()) {
@@ -36,5 +36,5 @@ index 5d0d182230e1..789968e19ab6 100644
}
}
--
2.25.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 79e4311950c147ce85983a7088f4d921050f3f74 Mon Sep 17 00:00:00 2001
From d0ac5ca676b4a2d27b0d0c87b8cc9599e5ecfe9a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 02:23:48 +0000
Subject: [PATCH 03/19] UI: Adjust default navbar layouts
Subject: [PATCH 02/11] UI: Adjust default navbar layouts
- Slightly tighten nodpi layout
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
@@ -45,10 +45,10 @@ index 07b797a32428..000000000000
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
-</resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index ebf7b8407727..557699b35aa8 100644
index 53523e3f4f5a..94cc561f5fb0 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -350,7 +350,7 @@
@@ -332,7 +332,7 @@
</string-array>
<!-- Nav bar button default ordering/layout -->
@@ -58,5 +58,5 @@ index ebf7b8407727..557699b35aa8 100644
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
--
2.25.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 47b42ba04a71792b6a0d9bcfa6fe515593d4bcc8 Mon Sep 17 00:00:00 2001
From 0b5f5038a27cabde31ca07b3beac5d078f773de0 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 9 Mar 2018 15:41:26 +0800
Subject: [PATCH 04/19] UI: Disable left (seascape) navigation bar optionally
Subject: [PATCH 03/11] UI: Disable left (seascape) navigation bar optionally
Toggle this behaviour with property "persist.ui.seascape.disable"
@@ -45,12 +45,12 @@ index f1e1366404a2..f43bef8532b8 100644
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
index 0a5d7f41f40f..969d70099cfb 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) {
@@ -2694,9 +2694,10 @@ public class DisplayPolicy {
}
}
if (navigationBarCanMove() && displayWidth > displayHeight) {
- if (displayRotation == Surface.ROTATION_270) {
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
@@ -62,5 +62,5 @@ index 21bca6ed6a53..b699c4e4f38d 100644
}
}
--
2.25.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 66956ebbdb5645ff2cfb2a010d4371faa7c41554 Mon Sep 17 00:00:00 2001
From 47ff170393f48d8710192e5dafb573b56d254523 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 10 Jan 2021 11:44:29 +0000
Subject: [PATCH 05/19] UI: Disable wallpaper zoom
Subject: [PATCH 04/11] UI: Disable wallpaper zoom
It does little more than inducing motion sickness
@@ -11,10 +11,10 @@ Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3ce1886fef6d..d8f280ddbf93 100644
index 13a0a3935691..06d2b910b038 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -4770,7 +4770,7 @@
@@ -4844,7 +4844,7 @@
<string name="config_customMediaSessionPolicyProvider"></string>
<!-- The max scale for the wallpaper when it's zoomed in -->
@@ -24,5 +24,5 @@ index 3ce1886fef6d..d8f280ddbf93 100644
<!-- Package name that will receive an explicit manifest broadcast for
android.os.action.POWER_SAVE_MODE_CHANGED. -->
--
2.25.1
2.34.1

View File

@@ -0,0 +1,35 @@
From 8d4516fa71e352f6f0841053c34bb806b7ca1d73 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 05/11] 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 cafebcec454e..11515b57dff1 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

View File

@@ -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

View File

@@ -0,0 +1,56 @@
From d1e369eda326fd4a45ac1c33ca439ecc9dab5ffd Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 19 Mar 2022 09:22:24 +0000
Subject: [PATCH 06/11] UI: Restore split-screen divider to pre-Sv2 looks
- Kill rounded corners - where two rectangles collide should be perfectly straight
- Make it black again - taskbar should mind its own business
Change-Id: I240b627793b615c82bd07ebd77638cde180ef80f
---
.../Shell/res/color/split_divider_background.xml | 4 ++--
.../wm/shell/common/split/SplitLayout.java | 15 +--------------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/libs/WindowManager/Shell/res/color/split_divider_background.xml b/libs/WindowManager/Shell/res/color/split_divider_background.xml
index 329e5b9b31a0..cd54ac26a7fd 100644
--- a/libs/WindowManager/Shell/res/color/split_divider_background.xml
+++ b/libs/WindowManager/Shell/res/color/split_divider_background.xml
@@ -15,5 +15,5 @@
~ limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_500" android:lStar="35" />
-</selector>
\ No newline at end of file
+ <item android:color="@android:color/black" />
+</selector>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
index ba343cb12085..e74013346afd 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
@@ -128,20 +128,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
}
private int getDividerInsets(Resources resources, Display display) {
- final int dividerInset = resources.getDimensionPixelSize(
- com.android.internal.R.dimen.docked_stack_divider_insets);
-
- int radius = 0;
- RoundedCorner corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_RIGHT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
-
- return Math.max(dividerInset, radius);
+ return 0;
}
/** Gets bounds of the primary split. */
--
2.34.1

View File

@@ -1,7 +1,7 @@
From 65e25646ab0c3cbfdc7199a791cd5e8bcccbaffe Mon Sep 17 00:00:00 2001
From 1ed6413b27ee4180cf9cef072f7b3b4dffb2bc4f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 6 Oct 2020 01:41:16 +0000
Subject: [PATCH 07/19] UI: Revive navbar layout tuning via sysui_nav_bar
Subject: [PATCH 07/11] UI: Revive navbar layout tuning via sysui_nav_bar
tunable
Google keeps fixing what ain't broken.
@@ -12,7 +12,7 @@ Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352
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
index c8bc143f0bd8..fab079b91608 100644
index eb9544c1372b..8cc9a32a1794 100644
--- a/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
@@ -60,5 +60,5 @@ index c8bc143f0bd8..fab079b91608 100644
final String newValue = getDefaultLayout();
if (!Objects.equals(mCurrentLayout, newValue)) {
--
2.25.1
2.34.1

View File

@@ -1,7 +1,7 @@
From e2774d80fc6cd0de872259c555f21ae2e8f8bf2c Mon Sep 17 00:00:00 2001
From 581a0131edae00b1e1f8f1f996b9d0e9e7a3847f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 26 Apr 2020 08:56:13 +0000
Subject: [PATCH 08/19] UI: Use SNAP_FIXED_RATIO for multi-window globally
Subject: [PATCH 08/11] UI: Use SNAP_FIXED_RATIO for multi-window globally
Enables multiple snap targets under landscape for phone UI
@@ -40,7 +40,7 @@ index 7308dc5882c1..000000000000
-</resources>
\ No newline at end of file
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
index 34b6a54be493..3921c9edfeac 100644
index 624581aba7dd..658654e2a63f 100644
--- a/core/res/res/values-sw600dp/config.xml
+++ b/core/res/res/values-sw600dp/config.xml
@@ -3,16 +3,16 @@
@@ -78,10 +78,10 @@ index 34b6a54be493..3921c9edfeac 100644
Only applies if the device display is not square. -->
<bool name="config_navBarCanMove">false</bool>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d8f280ddbf93..3a62b51d3cbc 100644
index 06d2b910b038..60a4e15d93ec 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3531,7 +3531,7 @@
@@ -3589,7 +3589,7 @@
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
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
orientation requests from apps would be ignored if the display is close-to-square. -->
--
2.25.1
2.34.1

View File

@@ -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

View File

@@ -1,7 +1,7 @@
From 262b65f0ca1c307215c538c378775874c054ef01 Mon Sep 17 00:00:00 2001
From f47f31e3e83c3c29e7c791ab2ff5c18a61d91dcc Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 3 Nov 2020 22:43:12 -0800
Subject: [PATCH 10/19] core: Remove old app target SDK dialog
Subject: [PATCH 09/11] core: Remove old app target SDK dialog
If an app is old, users should already know that, and there's usually no
point in warning them about it because they would already be using a
@@ -27,5 +27,5 @@ index 994f07959f3b..6749ae78c09c 100644
/**
--
2.25.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 3606dbe992a728d9e348d1d1802c189cc6a393f7 Mon Sep 17 00:00:00 2001
From 053445b81746800f6382d385a9fe962c23cb2d59 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 5 Oct 2021 21:01:50 -0700
Subject: [PATCH 18/19] Paint: Enable subpixel text positioning by default
Subject: [PATCH 10/11] Paint: Enable subpixel text positioning by default
On desktop Linux, subpixel text positioning is necessary to avoid
kerning issues, and Android is no different. Even though most phone
@@ -37,5 +37,5 @@ index 42e470b7f660..9c0036e5d716 100644
/**
* Font hinter option that disables font hinting.
--
2.25.1
2.34.1

View File

@@ -0,0 +1,28 @@
From b4fa57280a91d884655c0cdfe2767d9277e6d238 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 17 Mar 2024 17:10:38 +0800
Subject: [PATCH 11/11] Remove debuggable requirement for signature spoofing
Change-Id: I8d637ddbbd117a9c5b1d9c5e462b0f4b30d98333
---
.../java/com/android/server/pm/PackageManagerService.java | 4 ----
1 file changed, 4 deletions(-)
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index b6c08ab5f935..f2b6e35a5392 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -8939,10 +8939,6 @@ public class PackageManagerService extends IPackageManager.Stub
private static native boolean isDebuggable();
public static boolean isMicrogSigned(AndroidPackage p) {
- if (!isDebuggable()) {
- return false;
- }
-
// Allowlist the following apps:
// * com.android.vending - microG Companion
// * com.google.android.gms - microG Services
--
2.34.1

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,4 +1,4 @@
From 10a8d7cb2306f928abc91fbeb24f3b6fc6aa9057 Mon Sep 17 00:00:00 2001
From 9ee8209308b775f6cd4a104fe1cd89c9645e4742 Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Jan 2019 21:44:48 +0800
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
@@ -27,13 +27,13 @@ index 40d0938..1119cef 100644
android:visibility="gone" />
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 37d129d..97600b8 100644
index 9340e57..63a4b71 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -446,9 +446,9 @@
<string name="auto_power_save_summary_on">电量 %s 时自动启用省电</string>
<string name="auto_power_save_summary_off">不要自动启用省电</string>
<string name="auto_power_save_never">永不</string>
@@ -434,9 +434,9 @@
<string name="display_rotation_90_title">90 度</string>
<string name="display_rotation_180_title">180 度</string>
<string name="display_rotation_270_title">270 度</string>
- <string name="long_screen_settings_title">全屏应用</string>
- <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
- <string name="long_screen_settings_no_apps">无应用</string>
@@ -44,10 +44,10 @@ index 37d129d..97600b8 100644
<string name="charging_sounds_enable_title">启用充电提示音</string>
<string name="charging_sounds_summary">连接或断开电源时发出声音</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index efb9fbf..dda3125 100644
index 9fe4181..998a5f6 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -563,9 +563,9 @@
@@ -567,9 +567,9 @@
<string name="display_rotation_270_title">270 degrees</string>
<!-- Applications: Long screen -->

View File

@@ -1,47 +1,37 @@
From 0fdc4088295718c69121443e5b0fee5d213babd2 Mon Sep 17 00:00:00 2001
From 4c2395403ad6cc13c07f50889779a26404c1b096 Mon Sep 17 00:00:00 2001
From: Vachounet <vachounet@live.fr>
Date: Mon, 26 Oct 2020 17:05:18 +0100
Subject: [PATCH] Trebuchet: Move clear all button to actions view
@AndyCGYan: Instead of removing the original, hide it in a simple way
Change-Id: I7a0b2729c163169f7606ad4644870d07d5165e8e
---
.../ic_clear_all_recents.xml} | 20 +++---
.../res/layout/overview_actions_container.xml | 17 ++++-
.../RecentsViewStateController.java | 4 --
.../FallbackRecentsStateController.java | 4 --
.../android/quickstep/views/RecentsView.java | 64 ++-----------------
5 files changed, 31 insertions(+), 78 deletions(-)
rename quickstep/res/{layout/overview_clear_all_button.xml => drawable/ic_clear_all_recents.xml} (52%)
.../res/drawable/ic_recents_clear_all.xml | 18 ++++++++++++++++++
.../res/layout/overview_actions_container.xml | 17 ++++++++++++++++-
.../quickstep/fallback/RecentsState.java | 2 +-
.../quickstep/views/LauncherRecentsView.java | 3 +--
.../android/quickstep/views/RecentsView.java | 6 +++++-
5 files changed, 41 insertions(+), 5 deletions(-)
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
similarity index 52%
rename from quickstep/res/layout/overview_clear_all_button.xml
rename to quickstep/res/drawable/ic_clear_all_recents.xml
index 1ee726e62e..7cba0220b0 100644
--- a/quickstep/res/layout/overview_clear_all_button.xml
+++ 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
diff --git a/quickstep/res/drawable/ic_recents_clear_all.xml b/quickstep/res/drawable/ic_recents_clear_all.xml
new file mode 100644
index 0000000000..2ad0bb824d
--- /dev/null
+++ b/quickstep/res/drawable/ic_recents_clear_all.xml
@@ -0,0 +1,18 @@
+<!-- Copyright (C) 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.
@@ -14,12 +12,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<com.android.quickstep.views.ClearAllButton
- xmlns:android="http://schemas.android.com/apk/res/android"
- 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
+ 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
@@ -50,133 +40,95 @@ index 1ee726e62e..7cba0220b0 100644
+ <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" />
+</vector>
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
+++ b/quickstep/res/layout/overview_actions_container.xml
@@ -46,6 +46,21 @@
android:layout_height="1dp"
android:layout_weight="1" />
@@ -40,6 +40,21 @@
android:text="@string/action_screenshot"
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
+ android:id="@+id/action_clear_all"
+ style="@style/OverviewActionButton"
+ android:id="@+id/clear_all"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:drawableStart="@drawable/ic_recents_clear_all"
+ android:text="@string/recents_clear_all"
+ android:theme="@style/ThemeControlHighlightWorkspaceColor"
+ android:drawableStart="@drawable/ic_clear_all_recents"
+ />
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="1dp"
+ android:layout_weight="1" />
+
<Button
android:id="@+id/action_share"
style="@style/OverviewActionButton"
@@ -64,4 +79,4 @@
<Space
android:id="@+id/action_split_space"
android:layout_width="@dimen/overview_actions_button_spacing"
@@ -68,4 +83,4 @@
android:visibility="gone" />
</LinearLayout>
-</com.android.quickstep.views.OverviewActionsView>
\ No newline at end of file
+</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
index 996d36aadc..459a2c77f1 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
@@ -40,7 +40,6 @@ import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.anim.PropertySetter;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.util.MultiValueAlpha;
-import com.android.quickstep.views.ClearAllButton;
import com.android.quickstep.views.LauncherRecentsView;
import com.android.quickstep.views.RecentsView;
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
index 15feb18367..dcd172170b 100644
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
@@ -102,7 +102,7 @@ public class RecentsState implements BaseState<RecentsState> {
* For this state, whether clear all button should be shown.
*/
public boolean hasClearAllButton() {
- return hasFlag(FLAG_CLEAR_ALL_BUTTON);
+ return false;
}
@@ -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
@@ -74,9 +73,6 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
private void setProperties(RecentsState state, StateAnimationConfig config,
PropertySetter setter) {
- float clearAllButtonAlpha = state.hasClearAllButton() ? 1 : 0;
- setter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
- clearAllButtonAlpha, LINEAR);
float overviewButtonAlpha =
state.hasOverviewActions() && mRecentsView.shouldShowOverviewActionsForState(state)
? 1 : 0;
/**
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index e0395ea5aa..dd6fb70de9 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -120,8 +120,7 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun
super.setOverviewStateEnabled(enabled);
if (enabled) {
LauncherState state = mActivity.getStateManager().getState();
- boolean hasClearAllButton = (state.getVisibleElements(mActivity)
- & CLEAR_ALL_BUTTON) != 0;
+ boolean hasClearAllButton = false;
setDisallowScrollToClearAll(!hasClearAllButton);
}
}
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 eb107d4964..c0e4429804 100644
--- a/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;
@@ -104,6 +104,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.Interpolator;
+import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.OverScroller;
@@ -378,8 +379,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
import android.widget.Toast;
@@ -425,6 +426,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
private final int mScrollHapticMinGapMillis;
private final RecentsModel mModel;
private final int mRowSpacing;
private final int mGridSideMargin;
- private final ClearAllButton mClearAllButton;
- private final Rect mClearAllButtonDeadZoneRect = new Rect();
+ private Button mClearAllButton;
private final int mSplitPlaceholderSize;
+ private Button mActionClearAllButton;
private final ClearAllButton mClearAllButton;
private final Rect mClearAllButtonDeadZoneRect = new Rect();
private final Rect mTaskViewDeadZoneRect = new Rect();
/**
* 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
@@ -860,6 +862,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mActionsView = actionsView;
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
mSplitPlaceholderView = splitPlaceholderView;
+ mClearAllButton = (Button) mActionsView.findViewById(R.id.clear_all);
+ mClearAllButton.setOnClickListener(this::dismissAllTasks);
mSplitSelectStateController = splitController;
+ mActionClearAllButton = (Button) mActionsView.findViewById(R.id.action_clear_all);
+ mActionClearAllButton.setOnClickListener(this::dismissAllTasks);
}
public SplitPlaceholderView getSplitPlaceholder() {
@@ -910,7 +909,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
public SplitSelectStateController getSplitPlaceholder() {
@@ -1157,7 +1161,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
* button fully visible, center page is Clear All button.
*/
public boolean isClearAllHidden() {
@@ -185,173 +137,6 @@ index ce79125be1..b447166d6e 100644
}
@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

View File

@@ -1,8 +1,8 @@
From 8613949607345b954525b24dedc843f5039ac781 Mon Sep 17 00:00:00 2001
From 2270e02fcbb2b3bae7fb16ab0f2b81b589b8aa7e Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Sep 2019 02:08:22 +0000
Subject: [PATCH] vendor_lineage: Log privapp-permissions whitelist violations
instead
Subject: [PATCH 1/2] vendor_lineage: Log privapp-permissions whitelist
violations instead
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
---
@@ -10,10 +10,10 @@ Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/common.mk b/config/common.mk
index 9cc39324..fcf13b2b 100644
index 584ecbc3..08f9b0e1 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -78,9 +78,9 @@ PRODUCT_COPY_FILES += \
@@ -74,9 +74,9 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/org.lineageos.android.xml
@@ -23,8 +23,8 @@ index 9cc39324..fcf13b2b 100644
- ro.control_privapp_permissions=enforce
+ ro.control_privapp_permissions=log
# Include AOSP audio files
include vendor/lineage/config/aosp_audio.mk
ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
# Lineage SDK
--
2.25.1

View File

@@ -0,0 +1,32 @@
From 0d6bfed52c387c47ce3165766771d3f899bc0ca8 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 ee5bc917..4a4ae958 100644
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
@@ -155,12 +155,4 @@
<bool name="config_supportsMicToggle">true</bool>
<!-- 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>
</resources>
--
2.25.1

View File

@@ -1,13 +1,13 @@
From facde4b2b88c2ced8092714df21c4e09751ca1da Mon Sep 17 00:00:00 2001
From 2a0ccee75e3fd1ab7d5ef27fd46c9e6d41eed9d6 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 30 Nov 2021 12:58:00 +0000
Subject: [PATCH] SearchLauncher: Adapt to Trebuchet
Subject: [PATCH 1/2] 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(-)
apps/SearchLauncher/Android.mk | 4 ++--
apps/SearchLauncher/AndroidManifest.xml | 5 +++--
.../quickstep/res/layout/search_container_all_apps.xml | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/apps/SearchLauncher/Android.mk b/apps/SearchLauncher/Android.mk
index a9f182a..6b90364 100644
@@ -32,10 +32,15 @@ index a9f182a..6b90364 100644
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
index d5ffded..5a249b5 100644
--- a/apps/SearchLauncher/AndroidManifest.xml
+++ b/apps/SearchLauncher/AndroidManifest.xml
@@ -55,7 +55,8 @@
@@ -51,11 +51,12 @@
android:fullBackupOnly="true"
android:fullBackupContent="@xml/backupscheme"
android:hardwareAccelerated="true"
- android:icon="@drawable/ic_launcher_home"
+ android:icon="@mipmap/ic_launcher"
android:label="@string/derived_app_name"
android:largeHeap="@bool/config_largeHeap"
android:restoreAnyVersion="true"

View File

@@ -0,0 +1,42 @@
From a17bd2428ec11241769a53c54cfba01303c95c81 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Mar 2022 02:13:47 +0000
Subject: [PATCH 2/2] SearchLauncher: Fix build on Sv2
---
apps/SearchLauncher/Android.mk | 5 ++++-
.../src/com/android/searchlauncher/HotseatQsbWidget.java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/apps/SearchLauncher/Android.mk b/apps/SearchLauncher/Android.mk
index 6b90364..8202b04 100644
--- a/apps/SearchLauncher/Android.mk
+++ b/apps/SearchLauncher/Android.mk
@@ -61,7 +61,10 @@ include $(CLEAR_VARS)
# Relative path for Launcher3 directory
LAUNCHER_PATH := ../../../../packages/apps/Trebuchet
-LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
+LOCAL_STATIC_ANDROID_LIBRARIES := \
+ Launcher3CommonDepsLib \
+ Launcher3QuickStepLib \
+ QuickstepResLib
LOCAL_STATIC_JAVA_LIBRARIES := \
lib_launcherClient \
SystemUISharedLib \
diff --git a/apps/SearchLauncher/quickstep/src/com/android/searchlauncher/HotseatQsbWidget.java b/apps/SearchLauncher/quickstep/src/com/android/searchlauncher/HotseatQsbWidget.java
index 24c2de9..17162ed 100644
--- a/apps/SearchLauncher/quickstep/src/com/android/searchlauncher/HotseatQsbWidget.java
+++ b/apps/SearchLauncher/quickstep/src/com/android/searchlauncher/HotseatQsbWidget.java
@@ -126,7 +126,7 @@ public class HotseatQsbWidget extends QsbContainerView implements Insettable, Se
MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams();
mlp.topMargin = Math.max(-mFixedTranslationY, insets.top - mMarginTopAdjusting);
- Rect padding = mActivity.getDeviceProfile().getHotseatLayoutPadding();
+ Rect padding = mActivity.getDeviceProfile().getHotseatLayoutPadding(getContext());
setPaddingUnchecked(padding.left, 0, padding.right, 0);
--
2.25.1

View File

@@ -1,4 +1,4 @@
From 996084a373929cf6ba65bdfe5d984328c0448ccc Mon Sep 17 00:00:00 2001
From e5c811e641abc8088cad017fdb8e282ef6899ed1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 09:08:43 +0000
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2)
@@ -9,7 +9,7 @@ Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
index f0627a307..032636014 100755
index f0627a307..13cc396e7 100755
--- a/tools/buildinfo.sh
+++ b/tools/buildinfo.sh
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then
@@ -34,9 +34,9 @@ index f0627a307..032636014 100755
fi
echo "ro.lineage.device=$LINEAGE_DEVICE"
+echo "ro.lineage.version=LineageOS 19.0 Self-built CGMod"
+echo "ro.lineage.display.version=LineageOS 19.0 Self-built CGMod"
+echo "ro.modversion=LineageOS 19.0 Self-built CGMod"
+echo "ro.lineage.version=LineageOS 19.1 Self-built CGMod"
+echo "ro.lineage.display.version=LineageOS 19.1 Self-built CGMod"
+echo "ro.modversion=LineageOS 19.1 Self-built CGMod"
+
+echo "lockscreen.rot_override=true"

View File

@@ -1,4 +1,4 @@
From c33bf332540e7057d1d9f7491bf345658965aae9 Mon Sep 17 00:00:00 2001
From 537feb3970057cd71a77387a40c0f5b6d6fe5dfb Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 00:39:15 +0000
Subject: [PATCH 2/2] build: Remove Stk (1/2)

View File

@@ -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

View File

@@ -1,7 +1,7 @@
From d8f26074114f9bb4e9a57ece4cb39d42e0ffa90c Mon Sep 17 00:00:00 2001
From 25d9150d8e100259647ba248fdc13ccd23497137 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 03:39:32 +0000
Subject: [PATCH 02/16] Add MiuiNavbarOverlay
Subject: [PATCH 01/19] Add MiuiNavbarOverlay
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
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
index 15c55d3d588e..ff20a7a30092 100644
index 3a114bc8ec79..8028b5bb9c2b 100644
--- a/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 \
FontNotoSerifSourceOverlay \
LineageMonetAccentOverlay \
+ MiuiNavbarOverlay \
NavigationBarMode3ButtonOverlay \
NavigationBarModeGesturalOverlay \

View File

@@ -0,0 +1,26 @@
From 05ac45a37799322ddb9774326359a3414fb7f8d8 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 02/19] 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 8e6e251ff3f2..53324ba4d966 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.25.1

View File

@@ -1,7 +1,7 @@
From 2b7f5a1ca1c43ae5d7af48eeb07afa08f581e49b Mon Sep 17 00:00:00 2001
From 21208235ad12f038f80f22416992ada15d1a3868 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 27 Sep 2021 16:30:00 +0000
Subject: [PATCH 03/16] Disable cursor drag by default for editable TextViews
Subject: [PATCH 03/19] Disable cursor drag by default for editable TextViews
Requested by @TadiT7

View File

@@ -1,7 +1,7 @@
From 26f39b897540abbdc64f25f671de87b9df33c04d Mon Sep 17 00:00:00 2001
From 938658e1a31d80907f8f3f616710b27efb5aa74f Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Fri, 22 Mar 2019 00:41:20 +0800
Subject: [PATCH 04/16] Disable FP lockouts
Subject: [PATCH 04/19] Disable FP lockouts
Both timed and permanent lockouts - GET THE FUCK OUT
Now targeting LockoutFramework, introduced in Android 12

View File

@@ -0,0 +1,40 @@
From 4a72033948d6fb7bbef8b4c4233d0f8077f83ae1 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/19] Disable "RESTRICTED bucket" toast
Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8
---
.../server/usage/AppStandbyController.java | 16 +---------------
1 file changed, 1 insertion(+), 15 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 4b081d258fd4..ded38c55325a 100644
--- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
+++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
@@ -1493,21 +1493,7 @@ public class AppStandbyController
.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.
- if (Build.IS_DEBUGGABLE) {
- 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.25.1

View File

@@ -1,21 +1,22 @@
From 1da3b1d0155f06373057ee7b08691da664e94da8 Mon Sep 17 00:00:00 2001
From f8b17ff4c88c210606c33bf9c622c1b9ee99153e 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
Subject: [PATCH 06/19] Keyguard: Adjust clock style
Thinner font, less padding and unintrusive colors
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
---
.../SystemUI/res-keyguard/layout/keyguard_clock_switch.xml | 7 ++++---
.../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/values/styles.xml | 4 ++--
.../src/com/android/keyguard/AnimatableClockView.java | 2 +-
5 files changed, 10 insertions(+), 11 deletions(-)
6 files changed, 11 insertions(+), 12 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
index 87a9825af1cb..93e827ac540e 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 @@
@@ -43,11 +44,24 @@ index 28c61663bd4d..84ea2446f9d7 100644
chargeAnimationDelay="200"
dozeWeight="200"
lockScreenWeight="400"
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 7e3c87b24f07..58a1734aad22 100644
index 89dd741e2898..5aedf82f4d32 100644
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -94,8 +94,8 @@
@@ -89,10 +89,10 @@
<dimen name="num_pad_key_margin_end">12dp</dimen>
<!-- additional offset for clock switch area items -->
@@ -58,12 +72,14 @@ index 7e3c87b24f07..58a1734aad22 100644
<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>
<!-- 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 098b7e8dedbe..86f053535ee6 100644
index b8770e831d45..7f47e274304a 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -123,8 +123,6 @@
@@ -116,8 +116,6 @@
<item name="android:ellipsize">end</item>
<item name="android:maxLines">2</item>
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
@@ -73,10 +89,10 @@ index 098b7e8dedbe..86f053535ee6 100644
<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
index ba0361de6e8b..c5899b93c937 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -343,7 +343,7 @@
@@ -274,7 +274,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>
@@ -85,7 +101,7 @@ index bb258ab18f82..f03f14d3316c 100644
<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 @@
@@ -290,7 +290,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>
@@ -95,10 +111,10 @@ index bb258ab18f82..f03f14d3316c 100644
<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
index 2a0c2855c3b2..b6e18b8c20f8 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 {
@@ -134,7 +134,7 @@ public class AnimatableClockView extends TextView {
void refreshTime() {
mTime.setTimeInMillis(System.currentTimeMillis());

View File

@@ -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

View File

@@ -0,0 +1,43 @@
From 5dc1b1b3954e77640b15dc5a9f850c2048060595 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/19] 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 cc452c6f3b79..477be22c60f5 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -254,20 +254,14 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
}
boolean wasShowingUnlock = mShowUnlockIcon;
- 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.25.1

View File

@@ -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

View File

@@ -0,0 +1,28 @@
From 19bce23d94b7a5288cadc6523371b5155422808a 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/19] 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 86b12d3c0c3d..6eb97228b880 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
@@ -436,7 +436,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
private void updateDoubleLineClock() {
mCanShowDoubleLineClock = mSecureSettings.getInt(
- Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 1) != 0;
+ Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 0) != 0;
if (!mCanShowDoubleLineClock) {
mUiExecutor.execute(() -> displayClock(KeyguardClockSwitch.SMALL));
--
2.25.1

View File

@@ -1,25 +1,25 @@
From 2c4a2751c3ecee97883a3b8606e479ec2068f8c8 Mon Sep 17 00:00:00 2001
From 595b07a5e1d1f446dea60072eb5fd35945aee741 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 08:31:36 +0000
Subject: [PATCH 08/16] Keyguard: Refine indication text
Subject: [PATCH 09/19] Keyguard: Refine indication text
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
---
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
.../SystemUI/res/layout/keyguard_bottom_area.xml | 1 +
packages/SystemUI/res/values/dimens.xml | 2 +-
packages/SystemUI/res/values/dimens.xml | 3 +--
.../KeyguardIndicationRotateTextViewController.java | 12 +++++++++++-
.../statusbar/KeyguardIndicationController.java | 5 ++---
.../statusbar/KeyguardIndicationController.java | 7 ++++---
.../statusbar/phone/KeyguardIndicationTextView.java | 2 +-
6 files changed, 16 insertions(+), 8 deletions(-)
6 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index 86f053535ee6..b03c87af3059 100644
index 7f47e274304a..bb6c56455d72 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -137,8 +137,6 @@
<item name="android:textSize">14sp</item>
@@ -131,8 +131,6 @@
<item name="android:maxLines">1</item>
<item name="android:gravity">center</item>
<item name="android:textColor">?attr/wallpaperTextColor</item>
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
- <item name="android:shadowRadius">?attr/shadowRadius</item>
@@ -27,10 +27,10 @@ index 86f053535ee6..b03c87af3059 100644
<style name="TextAppearance.Keyguard.BottomArea.Button">
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
index 8dbd59d42ab7..68cba51e07fa 100644
index 759670e01e71..470c4ca488c2 100644
--- a/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_height="wrap_content"
android:gravity="center"
@@ -39,23 +39,27 @@ index 8dbd59d42ab7..68cba51e07fa 100644
android:paddingEnd="@dimen/keyguard_indication_text_padding"
android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 5d4e4a6ad3c4..cd11fb7d81ac 100644
index 79246750afbf..aa59fd6a9b51 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -920,7 +920,7 @@
<dimen name="keyguard_lock_width">42dp</dimen>
@@ -696,11 +696,10 @@
<dimen name="keyguard_lock_height">42dp</dimen>
<dimen name="keyguard_lock_padding">20dp</dimen>
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
<dimen name="lock_icon_margin_bottom">98dp</dimen>
<dimen name="lock_icon_margin_bottom">110dp</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
index a424674ed252..b2af483bb76e 100644
index d73d9cdb7d40..a7a23032963a 100644
--- a/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
@@ -218,12 +218,22 @@ public class KeyguardIndicationRotateTextViewController extends
}
/**
@@ -77,13 +81,13 @@ index a424674ed252..b2af483bb76e 100644
+ }
+
/**
* Immediately show the passed indication type and schedule the next indication to show.
* Will re-add this indication to be re-shown after all other indications have been
* Clears all messages in the queue and sets the current message to an empty string.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index 8a397199dc84..f2df767db567 100644
index d7b4738340e6..d89440057975 100644
--- a/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 {
@@ -471,12 +471,11 @@ public class KeyguardIndicationController {
}
private void updateResting() {
@@ -98,18 +102,31 @@ index 8a397199dc84..f2df767db567 100644
.setTextColor(mInitialTextColorState)
.build(),
false);
@@ -861,10 +860,12 @@ public class KeyguardIndicationController {
public void handleMessage(Message msg) {
if (msg.what == MSG_HIDE_TRANSIENT) {
hideTransientIndication();
+ updatePersistentIndications(false /* animate */, KeyguardUpdateMonitor.getCurrentUser());
} else if (msg.what == MSG_SHOW_ACTION_TO_UNLOCK) {
showActionToUnlock();
} else if (msg.what == MSG_HIDE_BIOMETRIC_MESSAGE) {
hideBiometricMessage();
+ updatePersistentIndications(false /* animate */, KeyguardUpdateMonitor.getCurrentUser());
}
}
};
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
index a5b5f1cbf1e7..df981c4e3129 100644
index 339f371c0d12..bd1432303463 100644
--- a/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 {
@@ -44,7 +44,7 @@ public class KeyguardIndicationTextView extends TextView {
@StyleRes
private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button;
private long mNextAnimationTime = 0;
- private boolean mAnimationsEnabled = true;
+ private boolean mAnimationsEnabled = false;
private LinkedList<CharSequence> mMessages = new LinkedList<>();
private LinkedList<KeyguardIndication> mKeyguardIndicationInfo = new LinkedList<>();
private CharSequence mMessage;
private KeyguardIndication mKeyguardIndicationInfo;
--
2.25.1

View File

@@ -1,10 +1,10 @@
From cca9cb4645f5aa079c5ed39339f02f78a7e68695 Mon Sep 17 00:00:00 2001
From d1f90b64712601d17974e3651fa709e409f171d6 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
Subject: [PATCH 10/19] Keyguard/UI: Fix status bar / quick settings margins
and paddings
Last revised on 2021/12/10, targeting s-qpr1
Last revised on 2022/03/13, targeting s-v2
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]
@@ -23,13 +23,13 @@ As a result, below changes have been made:
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
---
.../res/layout/keyguard_status_bar.xml | 2 +-
.../res/layout/quick_qs_status_icons.xml | 6 --
.../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 +++++++++++++------
.../SystemUI/res/values-sw600dp/dimens.xml | 3 --
packages/SystemUI/res/values/dimens.xml | 2 +-
.../systemui/qs/QuickStatusBarHeader.java | 51 ++++++++++++-------
.../phone/KeyguardStatusBarView.java | 7 ---
7 files changed, 47 insertions(+), 46 deletions(-)
7 files changed, 35 insertions(+), 41 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
@@ -45,14 +45,14 @@ index 850b01717308..054db34023af 100644
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
index 7a370d8cbc48..0247eebea131 100644
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
@@ -21,7 +21,6 @@
android:layout_height="@*android:dimen/quick_qs_offset_height"
android:clipChildren="false"
android:clipToPadding="false"
- android:minHeight="48dp"
- android:minHeight="@dimen/qs_header_row_min_height"
android:clickable="false"
android:focusable="true"
android:theme="@style/QSHeaderTheme">
@@ -60,7 +60,7 @@ index 27514617fb23..ada85c137600 100644
android:id="@+id/clock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:minHeight="48dp"
- android:minHeight="@dimen/qs_header_row_min_height"
android:gravity="center_vertical|start"
- android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
- android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
@@ -79,7 +79,7 @@ index 27514617fb23..ada85c137600 100644
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:minHeight="48dp"
- android:minHeight="@dimen/qs_header_row_min_height"
android:minWidth="48dp"
android:layout_marginStart="8dp"
android:layout_gravity="end|center_vertical"
@@ -112,12 +112,12 @@ index b1e8c386fe21..cff67718bc47 100644
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
index 7d033018c27f..3cd67d844895 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>
@@ -27,9 +27,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>
@@ -125,53 +125,25 @@ index 0a34dfd71c7e..3d590d752a7b 100644
<!-- 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
index aa59fd6a9b51..a55c394a3e53 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 @@
@@ -672,7 +672,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
index 5d3539b66141..a93c71987855 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;
@@ -98,6 +98,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private StatusBarContentInsetsProvider mInsetsProvider;
private int mRoundedCornerPadding = 0;
+ private int mStatusBarPaddingStart;
@@ -181,16 +153,7 @@ index 3478ec463573..386b4e007a90 100644
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
@@ -271,6 +275,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mRoundedCornerPadding = resources.getDimensionPixelSize(
R.dimen.rounded_corner_content_padding);
@@ -199,10 +162,10 @@ index 3478ec463573..386b4e007a90 100644
+ mStatusBarPaddingEnd = resources.getDimensionPixelSize(
+ R.dimen.status_bar_padding_end);
+
int qsOffsetHeight = resources.getDimensionPixelSize(
com.android.internal.R.dimen.quick_qs_offset_height);
int qsOffsetHeight = SystemBarUtils.getQuickQsOffsetHeight(mContext);
@@ -324,6 +335,9 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mDatePrivacyView.getLayoutParams().height =
@@ -358,6 +367,9 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
.addFloat(mDateView, "alpha", 0, 0, 1)
.addFloat(mClockDateView, "alpha", 1, 0, 0)
.addFloat(mQSCarriers, "alpha", 0, 1)
@@ -212,41 +175,19 @@ index 3478ec463573..386b4e007a90 100644
.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);
@@ -463,8 +475,6 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
.getStatusBarContentInsetsForCurrentRotation();
boolean hasCornerCutout = mInsetsProvider.currentRotationHasCornerCutout();
- mDatePrivacyView.setPadding(sbInsets.first, 0, sbInsets.second, 0);
- mStatusIconsView.setPadding(sbInsets.first, 0, sbInsets.second, 0);
LinearLayout.LayoutParams datePrivacySeparatorLayoutParams =
(LinearLayout.LayoutParams) mDatePrivacySeparator.getLayoutParams();
LinearLayout.LayoutParams mClockIconsSeparatorLayoutParams =
@@ -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
@@ -528,34 +538,37 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private void updateHeadersPadding() {
setContentMargins(mDatePrivacyView, 0, 0);
setContentMargins(mClockIconsView, 0, 0);
setContentMargins(mStatusIconsView, 0, 0);
- int paddingLeft = 0;
- int paddingRight = 0;
@@ -290,8 +231,8 @@ index 3478ec463573..386b4e007a90 100644
- paddingRight,
+ mHeaderPaddingRight + mStatusBarPaddingEnd,
0);
- mClockIconsView.setPadding(paddingLeft,
+ mClockIconsView.setPadding(0,
- mStatusIconsView.setPadding(paddingLeft,
+ mStatusIconsView.setPadding(0,
mWaterfallTopInset,
- paddingRight,
+ 0,
@@ -299,10 +240,10 @@ index 3478ec463573..386b4e007a90 100644
}
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
index b11843cd5d1f..049939ed41a2 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
@@ -151,14 +151,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
getResources().getDimensionPixelSize(
com.android.internal.R.dimen.text_size_small_material));

View File

@@ -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

View File

@@ -0,0 +1,26 @@
From bfd123cf8cd9c926838c95d0a2eaf3a034cd359a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 17 Apr 2022 08:48:42 +0000
Subject: [PATCH 11/19] Replace NTP server
Change-Id: I938ab46026d841e7536d8fc02b0ef6b28ebb6ea1
---
core/res/res/values/config.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 60a4e15d93ec..999e5b95003c 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2246,7 +2246,7 @@
<bool name="config_actionMenuItemAllCaps">true</bool>
<!-- Remote server that can provide NTP responses. -->
- <string translatable="false" name="config_ntpServer">time.android.com</string>
+ <string translatable="false" name="config_ntpServer">cn.pool.ntp.org</string>
<!-- Normal polling frequency in milliseconds -->
<integer name="config_ntpPollingInterval">86400000</integer>
<!-- Try-again polling interval in milliseconds, in case the network request failed -->
--
2.25.1

View File

@@ -0,0 +1,44 @@
From 529ab35d8bff56cacbf77689fde2bbb4e720fa0a 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 12/19] 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 79ac96e3bde2..9b76bab5c2a7 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.FileDescriptor;
@@ -447,15 +446,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.25.1

View File

@@ -1,7 +1,7 @@
From b8fe4a2e79bd273f69bb0331eb0d07ad0454d43f Mon Sep 17 00:00:00 2001
From 243c196f3e5bacc8c05cbc7632f2846445836759 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 5 Sep 2021 01:20:12 +0000
Subject: [PATCH 11/16] Revert "Update RAT icons to match Silk design"
Subject: [PATCH 13/19] Revert "Update RAT icons to match Silk design"
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
---

View File

@@ -1,7 +1,7 @@
From fe5e86fc264bf9ca5d6cfa89d28d51bd123c2966 Mon Sep 17 00:00:00 2001
From b472b86f1bc17ade0b4b5e2e9743d11ef704ab4f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 7 Oct 2020 14:00:35 +0000
Subject: [PATCH 12/16] UI: Always render windows into cutouts
Subject: [PATCH 14/19] UI: Always render windows into cutouts
Eliminates black/white letterboxing
Quick and dirty way to do the latter - wait for proper fix from Google
@@ -55,10 +55,10 @@ 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
index 41247363146d..554dea8efb33 100644
index 969d70099cfb..3a64c085beaf 100644
--- a/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 {
@@ -1867,7 +1867,7 @@ public class DisplayPolicy {
pf.set((fl & FLAG_LAYOUT_IN_SCREEN) == 0 ? attached.getFrame() : df);
}

View File

@@ -1,7 +1,7 @@
From e2fe18aa9aab73594414b11164ed180ca8b16cd1 Mon Sep 17 00:00:00 2001
From 9fe9c77b0d6ced77567fc17a09688ee6b6c4c9e5 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 1 Sep 2021 14:10:50 +0000
Subject: [PATCH 13/16] UI: Kill rounded corners in notification scrim
Subject: [PATCH 15/19] 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
@@ -11,13 +11,13 @@ Change-Id: I09ed59e0e658ebd512a9d02a8ef3edfe2c9888da
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 786b21f7595a..7217156d8972 100644
index a55c394a3e53..f61b7564c732 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -757,7 +757,7 @@
@@ -608,7 +608,7 @@
<!-- Burmese line spacing multiplier between hours and minutes of the keyguard clock -->
<item name="keyguard_clock_line_spacing_scale_burmese" type="dimen" format="float">1</item>
<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">0dp</dimen>

View File

@@ -1,20 +1,18 @@
From 81538d4126c99a86cb8f3ea13becca665db468e8 Mon Sep 17 00:00:00 2001
From 53ca533e468c5b88268399b905ad61585431361b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 26 Oct 2020 14:06:56 +0000
Subject: [PATCH 14/16] UI: Reconfigure power menu items
Screenshot/airplane are broken as of now
Subject: [PATCH 16/19] UI: Reconfigure power menu items
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
---
core/res/res/values/config.xml | 5 -----
1 file changed, 5 deletions(-)
core/res/res/values/config.xml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3a62b51d3cbc..5e9c9988e946 100644
index 999e5b95003c..b61233bdf931 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2963,13 +2963,8 @@
@@ -3016,13 +3016,10 @@
"logout" = Logout the current user
-->
<string-array translatable="false" name="config_globalActionsList">
@@ -23,8 +21,9 @@ index 3a62b51d3cbc..5e9c9988e946 100644
<item>power</item>
<item>restart</item>
- <item>logout</item>
- <item>screenshot</item>
<item>screenshot</item>
- <item>bugreport</item>
+ <item>airplane</item>
</string-array>
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully

View File

@@ -0,0 +1,26 @@
From 819573575f21c3ebef03940d91b48ed1fe206034 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/19] 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 94cc561f5fb0..ad20d2227087 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -74,7 +74,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 minimum number of tiles to display in QuickSettings -->
--
2.25.1

View File

@@ -1,7 +1,7 @@
From 39e52d3177af783e0fdb08f997d1a4971485b896 Mon Sep 17 00:00:00 2001
From 7b901ace4b384da0a0df89c08d9088e83a9f6f2a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 29 Jun 2021 22:57:01 +0000
Subject: [PATCH 15/16] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
Subject: [PATCH 18/19] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
I decide what's good enough for a wallpaper!

View File

@@ -1,7 +1,7 @@
From 9248a81745f91699e2b6891746536deaab96dbf0 Mon Sep 17 00:00:00 2001
From 0a817f70313c950e3662f2c64b2d5c35d6a8b14d Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 19 Oct 2021 12:09:34 +0000
Subject: [PATCH 16/16] UI: Remove privacy dot padding
Subject: [PATCH 19/19] UI: Remove privacy dot padding
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
---
@@ -9,10 +9,10 @@ Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
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
index f61b7564c732..bed34e0a6402 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1265,7 +1265,7 @@
@@ -938,7 +938,7 @@
<dimen name="ongoing_appops_chip_max_width">76dp</dimen>
<dimen name="ongoing_appops_dot_diameter">6dp</dimen>
<!-- Total minimum padding to enforce to ensure that the dot can always show -->

View File

@@ -1,7 +1,7 @@
From ced2463ffce1b064312ac607fcab72ef3a7a3c3c Mon Sep 17 00:00:00 2001
From 3ae6c0a36285aee1b18aca199593c828d9d6d2ec Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 5 Sep 2021 00:30:33 +0000
Subject: [PATCH 2/4] DeskClock: Remove night mode
Subject: [PATCH 1/3] DeskClock: Remove night mode
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
---
@@ -28,10 +28,10 @@ index 1680aab83..73375dcfa 100644
\ No newline at end of file
+</PreferenceScreen>
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
index 49530d44c..864a41575 100644
index 29cc13ff9..8def22b30 100644
--- a/src/com/android/deskclock/Screensaver.java
+++ b/src/com/android/deskclock/Screensaver.java
@@ -164,9 +164,8 @@ public final class Screensaver extends DreamService {
@@ -141,9 +141,8 @@ public final class Screensaver extends DreamService {
private void setClockStyle() {
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
@@ -44,10 +44,10 @@ index 49530d44c..864a41575 100644
/**
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
index e1db8c5ff..a735263b3 100644
index cf770086b..7a756df7d 100644
--- a/src/com/android/deskclock/ScreensaverActivity.java
+++ b/src/com/android/deskclock/ScreensaverActivity.java
@@ -117,7 +117,7 @@ public class ScreensaverActivity extends BaseActivity {
@@ -107,7 +107,7 @@ public class ScreensaverActivity extends BaseActivity {
Utils.setClockIconTypeface(mMainClockView);
Utils.setTimeFormat((TextClock) digitalClock, false);
Utils.setClockStyle(digitalClock, analogClock);

View File

@@ -1,7 +1,7 @@
From 0c1aaa76cff06f583c8e4fdc598bf9bf88834cf0 Mon Sep 17 00:00:00 2001
From fe60811c629e1e8376955463f4f0dafc5b832056 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 19 Jan 2022 18:04:36 +0000
Subject: [PATCH 3/4] DeskClock: Adapt digital clocks to S style
Subject: [PATCH 2/3] DeskClock: Adapt digital clocks to S style
Lollipop is so yesterday...
Bring the layouts of various digital clocks (app, widget, daydream)
@@ -13,23 +13,23 @@ Caveats/TODO:
Change-Id: I10c6fa213c89ac2f6e342be13fdd6390f7f787b0
---
res/layout-land/main_clock_frame.xml | 18 ++---
res/layout/date_and_next_alarm_time.xml | 51 ++++++------
res/layout-land/main_clock_frame.xml | 19 ++---
res/layout/date_and_next_alarm_time.xml | 57 +++++++-------
res/layout/desk_clock_saver.xml | 12 +--
res/layout/digital_widget.xml | 71 ++++++++---------
res/layout/digital_widget_sizer.xml | 77 ++++++++-----------
res/layout/main_clock_frame.xml | 21 +++--
res/layout/main_clock_frame.xml | 23 +++---
res/values/dimens.xml | 12 ++-
res/values/styles.xml | 18 +++++
.../alarmclock/DigitalAppWidgetProvider.java | 29 ++++---
res/values/styles.xml | 19 +++++
.../alarmclock/DigitalAppWidgetProvider.java | 31 ++++----
src/com/android/deskclock/AlarmUtils.java | 2 +-
10 files changed, 162 insertions(+), 149 deletions(-)
10 files changed, 167 insertions(+), 156 deletions(-)
diff --git a/res/layout-land/main_clock_frame.xml b/res/layout-land/main_clock_frame.xml
index b72f62333..afa9404f3 100644
index 6abfdddd6..8ad98c0cf 100644
--- a/res/layout-land/main_clock_frame.xml
+++ b/res/layout-land/main_clock_frame.xml
@@ -20,10 +20,11 @@
@@ -21,10 +21,11 @@
android:gravity="center_horizontal"
android:orientation="vertical">
@@ -44,36 +44,38 @@ index b72f62333..afa9404f3 100644
<com.android.deskclock.AnalogClock
android:id="@+id/analog_clock"
@@ -37,16 +38,13 @@
@@ -38,19 +39,13 @@
<com.android.deskclock.widget.AutoSizingTextClock
android:id="@+id/digital_clock"
- style="@style/display_time"
+ style="@style/sc_keyguard_clock"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
android:layout_height="wrap_content"
- android:ellipsize="none"
- android:singleLine="true"
- android:textSize="@dimen/main_clock_digital_font_size" />
+ android:layout_height="wrap_content" />
- android:textSize="@dimen/main_clock_digital_font_size"
tools:text="01:23" />
- </FrameLayout>
+ <include layout="@layout/date_and_next_alarm_time" />
- <include layout="@layout/date_and_next_alarm_time" />
- <include layout="@layout/date_and_next_alarm_time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"/>
+ </LinearLayout>
<View
android:id="@+id/hairline"
</LinearLayout>
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 23df1cd3b..b29ffedcf 100644
--- a/res/layout/date_and_next_alarm_time.xml
+++ b/res/layout/date_and_next_alarm_time.xml
@@ -18,34 +18,39 @@
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -18,36 +18,41 @@
android:layout_width="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_vertical|start"
+ android:orientation="vertical">
@@ -84,9 +86,10 @@ index ad25502a8..d89172637 100644
+ style="@style/sc_keyguard_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAllCaps="true" />
- android:textAllCaps="true"
+ 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
- android:id="@+id/nextAlarmIcon"
@@ -104,15 +107,18 @@ index ad25502a8..d89172637 100644
- <TextView
- android:id="@+id/nextAlarm"
- style="@style/body"
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAllCaps="true" />
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAllCaps="true"
- tools:text="Mo., 07:00"/>
-
-</LinearLayout>
\ No newline at end of file
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/sc_keyguard_row_top_padding"
+ android:paddingStart="@dimen/sc_keyguard_row_alarm_start_padding">
+
+ <TextView
+ android:id="@+id/nextAlarmIcon"
@@ -128,7 +134,8 @@ index ad25502a8..d89172637 100644
+ android:id="@+id/nextAlarm"
+ style="@style/sc_keyguard_row"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ tools:text="Mo., 07:00"/>
+
+ </LinearLayout>
+
@@ -367,59 +374,55 @@ index f524cf536..b9a28c79f 100644
</LinearLayout>
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
index ab960728f..72b71d4f4 100644
index 159956f19..d0701eaf0 100644
--- a/res/layout/main_clock_frame.xml
+++ b/res/layout/main_clock_frame.xml
@@ -33,10 +33,11 @@
android:gravity="center_horizontal"
android:orientation="vertical">
@@ -24,11 +24,11 @@
android:layout_marginEnd="24dp"
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">
- <FrameLayout
+ <LinearLayout
android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:layout_gravity="start">
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical|start"
+ android:orientation="vertical">
<com.android.deskclock.AnalogClock
android:id="@+id/analog_clock"
@@ -50,18 +51,14 @@
<com.android.deskclock.AnalogClock
android:id="@+id/analog_clock"
@@ -42,17 +42,14 @@
<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:includeFontPadding="false"
- android:paddingTop="@dimen/main_clock_digital_padding"
- android:singleLine="true"
- android:textSize="@dimen/main_clock_digital_font_size" />
+ android:paddingTop="@dimen/main_clock_digital_padding" />
<com.android.deskclock.widget.AutoSizingTextClock
android:id="@+id/digital_clock"
- style="@style/display_time"
- android:layout_width="match_parent"
+ style="@style/sc_keyguard_clock"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:ellipsize="none"
- android:includeFontPadding="false"
android:paddingTop="@dimen/main_clock_digital_padding"
- android:singleLine="true"
- android:textSize="@dimen/main_clock_digital_font_size"
tools:text="01:23" />
- </FrameLayout>
+ <include layout="@layout/date_and_next_alarm_time" />
- <include layout="@layout/date_and_next_alarm_time" />
+ </LinearLayout>
<View
android:id="@+id/hairline"
@@ -77,4 +74,4 @@
android:layout_height="match_parent"
android:layout_weight="@integer/gutter_width_percent" />
- </FrameLayout>
+ <include layout="@layout/date_and_next_alarm_time" />
+
+ </LinearLayout>
- <include layout="@layout/date_and_next_alarm_time" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 6a384e94b..c4b47abb7 100644
index 856ef8241..3061e27f6 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -62,7 +62,7 @@
@@ -61,7 +61,7 @@
<dimen name="body_font_padding">4dp</dimen>
<dimen name="alarm_label_size">14sp</dimen>
@@ -428,10 +431,10 @@ index 6a384e94b..c4b47abb7 100644
<dimen name="backspace_icon_size">24dp</dimen>
<dimen name="no_alarms_size">90dp</dimen>
@@ -129,4 +129,14 @@
@@ -140,4 +140,14 @@
<dimen name="alarm_clock_expanded_vertical_margin">8dp</dimen>
<!-- KitKat floating action button container height; see -v21 folder for newer platforms. -->
<dimen name="fab_height">96dp</dimen>
<dimen name="settings_padding">4dp</dimen>
+
+ <!-- Keyguard dimens, taken from S fwb -->
+ <dimen name="sc_keyguard_clock_text_size">86dp</dimen>
@@ -444,13 +447,14 @@ index 6a384e94b..c4b47abb7 100644
+ <dimen name="sc_keyguard_row_alarm_start_padding">5.5dp</dimen>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index fbe62ae3a..e9ae028f9 100644
index 7ae54c97c..73a800383 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -134,4 +134,22 @@
<item name="android:numbersSelectorColor">?attr/colorAccent</item>
@@ -187,4 +187,23 @@
<style name="TextAppearance.Title" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textSize">22.0sp</item>
</style>
+
+ <style name="sc_keyguard_clock">
+ <item name="android:fontFamily">sans-serif-light</item>
+ <item name="android:fontFeatureSettings">tnum</item>
@@ -471,19 +475,19 @@ index fbe62ae3a..e9ae028f9 100644
+
</resources>
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
index 80a724e85..52685f1f4 100644
index e31f2d801..a93766697 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -211,7 +211,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -212,7 +212,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
if (Utils.isWidgetClickable(wm, widgetId)) {
final Intent openApp = new Intent(context, DeskClock.class);
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, 0);
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, FLAG_IMMUTABLE);
- rv.setOnClickPendingIntent(R.id.digital_widget, pi);
+ rv.setOnClickPendingIntent(R.id.digital_widget_actual, pi);
}
// Configure child views of the remote view.
@@ -243,7 +243,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -244,7 +244,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
final int targetWidthPx = portrait ? minWidthPx : maxWidthPx;
final int targetHeightPx = portrait ? maxHeightPx : minHeightPx;
final int largestClockFontSizePx =
@@ -492,7 +496,7 @@ index 80a724e85..52685f1f4 100644
// Create a size template that describes the widget bounds.
final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx);
@@ -314,13 +314,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -316,13 +316,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
}
// Measure the widget at the largest possible size.
@@ -508,7 +512,7 @@ index 80a724e85..52685f1f4 100644
if (low.hasViolations()) {
return low;
}
@@ -332,7 +332,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -334,7 +334,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
return low;
}
@@ -517,7 +521,7 @@ index 80a724e85..52685f1f4 100644
if (midSize.hasViolations()) {
high = midSize;
} else {
@@ -395,7 +395,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -397,7 +397,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
* the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting
* size measurements.
*/
@@ -526,7 +530,7 @@ index 80a724e85..52685f1f4 100644
// Create a copy of the given template sizes.
final Sizes measuredSizes = template.newSize();
@@ -406,13 +406,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -408,13 +408,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
final TextView nextAlarmIcon = (TextView) sizer.findViewById(R.id.nextAlarmIcon);
// Adjust the font sizes.
@@ -542,7 +546,7 @@ index 80a724e85..52685f1f4 100644
// Measure and layout the sizer.
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
@@ -493,11 +493,16 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -495,12 +495,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; }
private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; }
private int getClockFontSizePx() { return mClockFontSizePx; }
@@ -557,12 +561,14 @@ index 80a724e85..52685f1f4 100644
- mFontSizePx = max(1, round(clockFontSizePx / 7.5f));
- mIconFontSizePx = (int) (mFontSizePx * 1.4f);
- mIconPaddingPx = mFontSizePx / 3;
- }
+ mFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardRowTextSizePx));
+ mIconFontSizePx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) keyguardAlarmIconSizePx));
+ mIconPaddingPx = max(1, round(clockFontSizePx / (float) keyguardClockTextSizePx * (float) alarmIconPaddingPx));
}
+ }
/**
* @return the amount of widget height available to the world cities list
diff --git a/src/com/android/deskclock/AlarmUtils.java b/src/com/android/deskclock/AlarmUtils.java
index db60ace95..43767d313 100644
--- a/src/com/android/deskclock/AlarmUtils.java

View File

@@ -1,7 +1,7 @@
From 1ed07dfbc441e06da971a04d6a40eaff13c27b3a Mon Sep 17 00:00:00 2001
From dffc4d40020757da96c73e62a78ce94d6277feba Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 20 Jan 2022 04:42:03 +0000
Subject: [PATCH 4/4] DeskClock: Wallpaper-based text coloring for digital
Subject: [PATCH 3/3] DeskClock: Wallpaper-based text coloring for digital
clock widget
RemoteViews is such a restrictive PITA
@@ -12,7 +12,7 @@ Change-Id: Ie22c4980526575f73ebb4e56780d4c2193cc45d3
1 file changed, 57 insertions(+)
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
index 52685f1f4..fec78bed7 100644
index a93766697..de56f09ca 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -19,6 +19,8 @@ package com.android.alarmclock;
@@ -24,7 +24,7 @@ index 52685f1f4..fec78bed7 100644
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
@@ -108,12 +110,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -109,12 +111,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
@@ -65,7 +65,7 @@ index 52685f1f4..fec78bed7 100644
}
@Override
@@ -203,6 +233,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -204,6 +234,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
*/
private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId,
Bundle options, boolean portrait) {
@@ -85,7 +85,7 @@ index 52685f1f4..fec78bed7 100644
// Create a remote view for the digital clock.
final String packageName = context.getPackageName();
final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget);
@@ -260,6 +303,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -261,6 +304,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
@@ -103,7 +103,7 @@ index 52685f1f4..fec78bed7 100644
final int smallestWorldCityListSizePx =
resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size);
if (sizes.getListHeight() <= smallestWorldCityListSizePx) {
@@ -414,6 +468,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -416,6 +470,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);

View File

@@ -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

View File

@@ -0,0 +1,225 @@
From aecf59a8082d92f24514c7475e2665424f8736a9 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.
---
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 6fcff4103b..417669d4c0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13291,10 +13291,6 @@
<string name="lockscreen_privacy_controls_setting_toggle">Show device controls</string>
<!-- Device controls summary [CHAR LIMIT=NONE] -->
<string name="lockscreen_privacy_controls_summary">Access controls when locked</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>
<!-- Title for RTT setting. [CHAR LIMIT=NONE] -->
<string name="rtt_settings_title"></string>
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
index 60dc599c2e..755b3c2ee9 100644
--- a/res/xml/security_lockscreen_settings.xml
+++ b/res/xml/security_lockscreen_settings.xml
@@ -67,12 +67,6 @@
android:title="@string/lockscreen_privacy_controls_setting_toggle"
android:summary="@string/lockscreen_privacy_controls_summary"
settings:controller="com.android.settings.display.ControlsPrivacyPreferenceController" />
-
- <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.25.1

View File

@@ -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

View File

@@ -1,7 +1,7 @@
From deccbf542c72d5e1f78e83b3e895eb1f9480ac75 Mon Sep 17 00:00:00 2001
From 32f8fec323dfe5f7d7f357e26e7f7a494bddaba3 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 28 Oct 2021 02:30:59 +0000
Subject: [PATCH] Trebuchet: Make overview scrim transparent again
Subject: [PATCH 1/2] Trebuchet: Make overview scrim transparent again
Also revert texts/buttons to workspace color
@@ -15,7 +15,7 @@ Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index 07c448df9e..c3a3bb8375 100644
index 2efe72e651..03c28773a7 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -130,7 +130,7 @@
@@ -27,18 +27,18 @@ index 07c448df9e..c3a3bb8375 100644
<item name="android:drawablePadding">8dp</item>
<item name="android:textAllCaps">false</item>
</style>
@@ -139,4 +139,4 @@
<style name="BaseIcon.Workspace.Taskbar" >
<item name="iconDisplay">taskbar</item>
@@ -170,4 +170,4 @@
<item name="android:textSize">24sp</item>
<item name="android:lines">2</item>
</style>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index b447166d6e..d94a93a909 100644
index 13295f27c1..c0e4429804 100644
--- a/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
@@ -702,7 +702,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mEmptyIcon.setCallback(this);
mEmptyMessage = context.getText(R.string.recents_empty_message);
mEmptyMessagePaint = new TextPaint();
@@ -59,14 +59,14 @@ index 80799957ff..894997c59a 100644
+ <item android:color="@android:color/transparent" />
</selector>
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
+++ b/res/color-v31/overview_scrim_dark.xml
@@ -14,5 +14,5 @@
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_800" />
- <item android:color="@android:color/system_neutral1_500" android:lStar="35" />
+ <item android:color="@android:color/transparent" />
</selector>
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml

View File

@@ -0,0 +1,82 @@
From e8b6e0902bc8c77df404b67a9a619d7705940125 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 f6148a7c8f..546f5f3c18 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
@@ -407,14 +407,6 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
nonOverviewAnim.setFloatValues(startProgress, endProgress);
mNonOverviewAnim.dispatchOnStart();
}
- if (targetState == QUICK_SWITCH) {
- // 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 308bca62e4..d964371784 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java
@@ -367,11 +367,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
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 c0e4429804..436f3521a6 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1294,25 +1294,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
}
- @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.25.1

View File

@@ -1,4 +1,4 @@
From bd33859aa15ad4ab099716b0d029b333c6300134 Mon Sep 17 00:00:00 2001
From d8b053839dd5514000f7e57a4591bad19ade8d79 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 09:09:15 +0000
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)

View File

@@ -1,4 +1,4 @@
From e3633d610a46dfa849b01ae66ff233e615efa079 Mon Sep 17 00:00:00 2001
From e86607a8d98ad07a972c0885850e904ae458b42f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 00:41:07 +0000
Subject: [PATCH 2/4] build: Remove Stk (2/2)

View File

@@ -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

View File

@@ -1,7 +1,7 @@
From 89941c7836527978fb1834a14e9ad95cb1c5c9d0 Mon Sep 17 00:00:00 2001
From 445d002e99fec39a330eb92ae7a4fe1f0cf66463 Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
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!

View File

@@ -1,4 +1,4 @@
From ff787114856cc9ccb057cf524e7089f7aed558cc Mon Sep 17 00:00:00 2001
From 7891d4dd5e8ef676e94f65cc66a362c21af24a84 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 8 Dec 2021 07:04:53 +0000
Subject: [PATCH] Remove init.vndk-nodef.rc
@@ -58,7 +58,7 @@ index efeef117b..000000000
- # Must define BOARD_VNDK_VERSION
- exec - root -- /system/bin/reboot bootloader
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index d924d0bc1..5c3e10de7 100644
index a2a29ed0f..74413b191 100644
--- a/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
@@ -69,8 +69,8 @@ index d924d0bc1..5c3e10de7 100644
- init.vndk-nodef.rc \
+ init.gsi.rc
# Support additional P, Q and R VNDK packages
PRODUCT_EXTRA_VNDK_VERSIONS := 28 29 30
# Support additional VNDK snapshots
PRODUCT_EXTRA_VNDK_VERSIONS := \
--
2.25.1

View File

@@ -1,7 +1,7 @@
From 978be1fd8202655676e335cdd611f9c6756c0025 Mon Sep 17 00:00:00 2001
From 36d4972e3fa6befa6d5a05d46b53239bea3943ed Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 01:43:40 +0000
Subject: [PATCH 1/4] treble: Lineage-ify
Subject: [PATCH 1/9] treble: Lineage-ify
Squash of:
- Proper target names
@@ -14,11 +14,11 @@ Change-Id: I25eee7a3804f335430a447ae1424402d7e37851b
---
base-pre.mk | 3 -
base.mk | 16 ++--
generate.sh | 3 +
generate.sh | 4 +-
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
.../base/core/res/res/values/config.xml | 1 -
sepolicy/file_contexts | 3 -
6 files changed, 93 insertions(+), 14 deletions(-)
6 files changed, 92 insertions(+), 16 deletions(-)
create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
diff --git a/base-pre.mk b/base-pre.mk
@@ -30,7 +30,7 @@ index 6a317e4..e69de29 100644
-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
index d3a0a20..b6c1d25 100644
--- a/base.mk
+++ b/base.mk
@@ -8,12 +8,14 @@ PRODUCT_COPY_FILES := \
@@ -68,16 +68,24 @@ index 73abbab..057ad0c 100644
#VNDK config files
PRODUCT_COPY_FILES += \
diff --git a/generate.sh b/generate.sh
index 352fe12..7e4f137 100644
index fac8208..2160786 100644
--- a/generate.sh
+++ b/generate.sh
@@ -65,6 +65,9 @@ for part in a ab;do
@@ -54,7 +54,7 @@ for part in a ab;do
su_suffix='N'
if [ "$su" == "yes" ];then
su_suffix='S'
- extra_packages+=' phh-su me.phh.superuser'
+ extra_packages+=' phh-su me.phh.superuser su'
fi
target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
+ if [ "$1" == "lineage" ];then
+ target="lineage_${target}"
+ fi
part_suffix='a'
@@ -64,7 +64,7 @@ for part in a ab;do
optional_base='$(call inherit-product, device/phh/treble/base-sas.mk)'
fi
- target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
+ target="lineage_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
baseArch="$arch"
if [ "$arch" = "a64" ];then
@@ -169,7 +177,7 @@ index 0000000..8df673a
+ <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
index 0bc3350..045f4b3 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -22,7 +22,6 @@
@@ -195,5 +203,5 @@ index 999ff97..11dd447 100644
/sec_storage(/.*)? u:object_r:teecd_data_file:s0
--
2.25.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 7ebb3f6332087fb5243955bb28c656e14a411660 Mon Sep 17 00:00:00 2001
From 061dfa999de1fef818ec82a9d7b3b97c151f8995 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 09:29:32 +0000
Subject: [PATCH 2/4] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
Subject: [PATCH 2/9] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
Change-Id: I725443154fabde548d2e6c1b072d34c27596c421
---
@@ -19,5 +19,5 @@ index 1ddacaf..e363dd5 100644
+
+BOARD_EXT4_SHARE_DUP_BLOCKS := true
--
2.25.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 56c20273ac8c3c34de36f80edc2e94fc5f60b78a Mon Sep 17 00:00:00 2001
From 08c5d49779061a407875159591a564ef8f5fcc0b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 20 Oct 2021 11:30:25 +0000
Subject: [PATCH 3/4] treble: Set TARGET_NO_KERNEL_OVERRIDE
Subject: [PATCH 3/9] treble: Set TARGET_NO_KERNEL_OVERRIDE
Taken from Lineage generic targets - skips building kernel cleanly
@@ -21,5 +21,5 @@ index e363dd5..3900f97 100644
+
+TARGET_NO_KERNEL_OVERRIDE := true
--
2.25.1
2.34.1

View File

@@ -0,0 +1,24 @@
From 5befcded0b6af0c0141f368544fc802815a5821d Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Wed, 9 Feb 2022 12:34:47 +0000
Subject: [PATCH 4/9] treble: Set OTA JSON URL
Change-Id: I8f817b90d42629c208ceb45598daf5293850b953
---
lineage.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lineage.mk b/lineage.mk
index 172bb01..68b57f4 100644
--- a/lineage.mk
+++ b/lineage.mk
@@ -1,3 +1,6 @@
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
-include vendor/lineage/build/core/config.mk
-include vendor/lineage/build/core/apicheck.mk
+
+PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+ ro.system.ota.json_url=https://downloads.sourceforge.net/project/andyyan-gsi/lineage-19.x/ota.json
--
2.34.1

View File

@@ -0,0 +1,40 @@
From aae7db89b8e8c2898a9c34adc6dde18bd8a61445 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 11 Oct 2022 11:29:02 +0000
Subject: [PATCH 5/9] treble: Enable call recording
Change-Id: I57ca3604363547419a566b37b5151b6b30c46d28
---
.../dialer/callrecord/res/values/config.xml | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
diff --git a/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
new file mode 100644
index 0000000..4cacde5
--- /dev/null
+++ b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2021 The LineageOS Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <bool name="call_recording_enabled">true</bool>
+ <integer name="call_recording_audio_source">4</integer>
+</resources>
--
2.34.1

View File

@@ -0,0 +1,36 @@
From 878d2b2112f37bfca6da9cee0b5b4d17ae1ee9ab Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 22 Nov 2022 00:36:15 +0000
Subject: [PATCH 6/9] treble: Stop securing ADB
Seems to kill USB Debugging altogether on certain devices,
and unrelated to SN anyway
Build-time macro coupled with vendor/lineage might do better...
Change-Id: I0215b3ed970dd53a124f48e30ca2cf4b0c6d2899
---
rw-system.sh | 4 ----
1 file changed, 4 deletions(-)
diff --git a/rw-system.sh b/rw-system.sh
index 5f324b3..33b3591 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -764,14 +764,10 @@ if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
resetprop_phh ro.boot.veritymode enforcing
resetprop_phh ro.boot.warranty_bit 0
resetprop_phh ro.warranty_bit 0
- resetprop_phh ro.debuggable 0
resetprop_phh ro.secure 1
resetprop_phh ro.build.type user
resetprop_phh ro.build.selinux 0
- resetprop_phh ro.adb.secure 1
- setprop ctl.restart adbd
-
# Hide system/xbin/su
mount /mnt/phh/empty_dir /system/xbin
mount /mnt/phh/empty_dir /system/app/me.phh.superuser
--
2.34.1

View File

@@ -0,0 +1,48 @@
From 184de8e7227f21de180bb36916abcb316e2986c9 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 29 Dec 2022 15:12:03 +0000
Subject: [PATCH 7/9] treble: Securize on-demand
Status is stored in /metadata and controlled by persist prop
Change-Id: I8069b6f471ad87ab34c18b743689ab3584cee35b
---
phh-prop-handler.sh | 14 ++++++++++++++
vndk.rc | 2 ++
2 files changed, 16 insertions(+)
diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh
index 4371632..a8cea3f 100644
--- a/phh-prop-handler.sh
+++ b/phh-prop-handler.sh
@@ -210,3 +210,17 @@ if [ "$1" == "persist.sys.phh.disable_soundvolume_effect" ];then
restartAudio
exit
fi
+
+if [ "$1" == "persist.sys.phh.securize" ];then
+ if [[ "$prop_value" != "true" && "$prop_value" != "false" ]]; then
+ exit 1
+ fi
+
+ if [[ "$prop_value" == "true" ]]; then
+ mkdir /metadata/phh
+ touch /metadata/phh/secure
+ else
+ rm /metadata/phh/secure
+ fi
+ exit
+fi
diff --git a/vndk.rc b/vndk.rc
index c150ace..74402a8 100644
--- a/vndk.rc
+++ b/vndk.rc
@@ -83,3 +83,5 @@ on property:sys.phh.uninstall-ota=true
on property:ro.vendor.radio.default_network=*
setprop ro.telephony.default_network ${ro.vendor.radio.default_network}
+on property:persist.sys.phh.securize=*
+ exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.securize"
--
2.34.1

View File

@@ -0,0 +1,46 @@
From 5301dd1c023179e5db95be2e7eed56a64b947da2 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 22 Mar 2023 23:37:05 +0000
Subject: [PATCH 8/9] treble: Also use /data/adb for securize status
Change-Id: I778f2be5407ae0a548a098c72031cce9be83cf96
---
phh-prop-handler.sh | 5 ++++-
rw-system.sh | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh
index a8cea3f..3739eb4 100644
--- a/phh-prop-handler.sh
+++ b/phh-prop-handler.sh
@@ -217,10 +217,13 @@ if [ "$1" == "persist.sys.phh.securize" ];then
fi
if [[ "$prop_value" == "true" ]]; then
- mkdir /metadata/phh
+ mkdir -p /metadata/phh
touch /metadata/phh/secure
+ mkdir -p /data/adb/phh
+ touch /data/adb/phh/secure
else
rm /metadata/phh/secure
+ rm /data/adb/phh/secure
fi
exit
fi
diff --git a/rw-system.sh b/rw-system.sh
index 33b3591..3812b12 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -727,7 +727,7 @@ copyprop() {
resetprop_phh "$1" "$(getprop "$2")"
fi
}
-if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
+if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ] || [ -f /data/adb/phh/secure ];then
copyprop ro.build.device ro.vendor.build.device
copyprop ro.system.build.fingerprint ro.vendor.build.fingerprint
copyprop ro.bootimage.build.fingerprint ro.vendor.build.fingerprint
--
2.34.1

View File

@@ -1,7 +1,7 @@
From 39c3d994822d367cad58827e6cfa8dcd7e13b519 Mon Sep 17 00:00:00 2001
From 273e01312171fa003667343330ce08d6d127597f Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Tue, 15 Sep 2020 21:26:45 -0400
Subject: [PATCH 4/4] add offline charger sepolicy
Subject: [PATCH 9/9] add offline charger sepolicy
---
sepolicy/gsicharger.te | 1 +
@@ -16,5 +16,5 @@ index 0000000..91cfb5c
@@ -0,0 +1 @@
+permissive charger;
--
2.25.1
2.34.1

View File

@@ -1,9 +1,9 @@
From 291265e4179a03a9407ed2e7a7f898be0eb25e00 Mon Sep 17 00:00:00 2001
From 5e9668c16e8cd71526cb2b451c9a072ed14f12dc Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 6 Nov 2021 05:43:23 +0000
Date: Sun, 13 Mar 2022 11:06:37 +0000
Subject: [PATCH 1/4] Revert "init: Add vendor-specific initialization hooks."
This reverts commit e2dc41bcfb140e0119e0f7e34eccfb2335ae7f89.
This reverts commit 99ef051a7d0d34103babf5f2297dd2747c28570c.
---
init/Android.bp | 9 ---------
init/NOTICE | 26 --------------------------
@@ -15,7 +15,7 @@ This reverts commit e2dc41bcfb140e0119e0f7e34eccfb2335ae7f89.
delete mode 100644 init/vendor_init.h
diff --git a/init/Android.bp b/init/Android.bp
index 69f8815ed..7eeafa24b 100644
index 00ac6a752..a57f3a407 100644
--- a/init/Android.bp
+++ b/init/Android.bp
@@ -89,14 +89,6 @@ init_host_sources = [
@@ -30,10 +30,10 @@ index 69f8815ed..7eeafa24b 100644
- ],
-}
-
cc_defaults {
name: "init_defaults",
sanitize: {
@@ -190,7 +182,6 @@ cc_library_static {
soong_config_module_type {
name: "libinit_cc_defaults",
module_type: "cc_defaults",
@@ -211,7 +203,6 @@ cc_library_static {
defaults: [
"init_defaults",
"selinux_policy_version",
@@ -76,7 +76,7 @@ index 383d0f541..c5b1efa7a 100644
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/init/property_service.cpp b/init/property_service.cpp
index bc9a29dea..5974065f5 100644
index 1600744ff..49500428e 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -73,7 +73,6 @@
@@ -87,7 +87,7 @@ index bc9a29dea..5974065f5 100644
using namespace std::literals;
@@ -1097,9 +1096,6 @@ void PropertyLoadBootDefaults() {
@@ -1102,9 +1101,6 @@ void PropertyLoadBootDefaults() {
}
}

View File

@@ -1,4 +1,4 @@
From 0263909a309cbc35efd586b4aec14e46ed23e2d7 Mon Sep 17 00:00:00 2001
From 4007d7537bdff0aa9ee444731c57a5a9b2b84256 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 4 Sep 2019 21:11:48 +0200
Subject: [PATCH 2/4] Panic into recovery rather than bootloader

View File

@@ -1,4 +1,4 @@
From e2392f1b2f4afbf783fd6b1b25c2d905828c71f1 Mon Sep 17 00:00:00 2001
From 7b79958277c40838fdbbcd7c9324cb9543318290 Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Wed, 3 Mar 2021 06:31:17 -0500
Subject: [PATCH 3/4] Restore /sbin for Magisk compatibility

View File

@@ -1,4 +1,4 @@
From 1c13959077f9616c050b4ee92420f561b3af6121 Mon Sep 17 00:00:00 2001
From e3589c745007dbc2f9c983dd68f0fc82fdd56244 Mon Sep 17 00:00:00 2001
From: Victor Bo <bvoid@yandex.ru>
Date: Wed, 26 Feb 2020 07:23:44 +0200
Subject: [PATCH 4/4] fix offline charger v7
@@ -9,7 +9,7 @@ Subject: [PATCH 4/4] fix offline charger v7
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 376a678a8..6434d06bf 100644
index 5116c0fea..76f2bf60e 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -11,6 +11,11 @@ import /vendor/etc/init/hw/init.${ro.hardware}.rc
@@ -24,7 +24,7 @@ index 376a678a8..6434d06bf 100644
# Cgroups are mounted right before early-init using list from /etc/cgroups.json
on early-init
# Disable sysrq from keyboard
@@ -452,7 +457,7 @@ on init
@@ -456,7 +461,7 @@ on init
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
@@ -33,7 +33,7 @@ index 376a678a8..6434d06bf 100644
trigger late-init
on load_persist_props_action
@@ -1090,8 +1095,12 @@ on nonencrypted
@@ -1108,8 +1113,12 @@ on nonencrypted
on property:sys.init_log_level=*
loglevel ${sys.init_log_level}

View File

@@ -0,0 +1,99 @@
From 66534cd4c678494e0aa0e74197a39fcee57e313a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 29 Dec 2022 15:08:49 +0000
Subject: [PATCH] Simplify Securize to CheckBoxPreference and persist prop
For "Securize on-demand"
---
app/src/main/java/me/phh/treble/app/Misc.kt | 5 +++
.../java/me/phh/treble/app/MiscSettings.kt | 33 -------------------
app/src/main/res/xml/pref_misc.xml | 7 ++--
3 files changed, 10 insertions(+), 35 deletions(-)
diff --git a/app/src/main/java/me/phh/treble/app/Misc.kt b/app/src/main/java/me/phh/treble/app/Misc.kt
index a56b460..8861d51 100644
--- a/app/src/main/java/me/phh/treble/app/Misc.kt
+++ b/app/src/main/java/me/phh/treble/app/Misc.kt
@@ -302,6 +302,10 @@ object Misc: EntryStartup {
val value = sp.getString(key, "0")
SystemProperties.set("persist.sys.bt.esco_transport_unit_size", value)
}
+ MiscSettings.securize -> {
+ val value = sp.getBoolean(key, false)
+ SystemProperties.set("persist.sys.phh.securize", if (value) "true" else "false")
+ }
}
}
@@ -328,5 +332,6 @@ object Misc: EntryStartup {
spListener.onSharedPreferenceChanged(sp, MiscSettings.noHwcomposer)
spListener.onSharedPreferenceChanged(sp, MiscSettings.storageFUSE)
spListener.onSharedPreferenceChanged(sp, MiscSettings.dt2w)
+ spListener.onSharedPreferenceChanged(sp, MiscSettings.securize)
}
}
diff --git a/app/src/main/java/me/phh/treble/app/MiscSettings.kt b/app/src/main/java/me/phh/treble/app/MiscSettings.kt
index e3b5312..5fe481f 100644
--- a/app/src/main/java/me/phh/treble/app/MiscSettings.kt
+++ b/app/src/main/java/me/phh/treble/app/MiscSettings.kt
@@ -56,39 +56,6 @@ class MiscSettingsFragment : SettingsFragment() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
super.onCreatePreferences(savedInstanceState, rootKey)
- val securizePref = findPreference<Preference>(MiscSettings.securize)
- securizePref!!.setOnPreferenceClickListener {
- val builder = AlertDialog.Builder( this.getActivity() )
- builder.setTitle(getString(R.string.remove_root))
- builder.setMessage(getString(R.string.continue_question))
-
- builder.setPositiveButton(android.R.string.yes) { dialog, which ->
-
- var cmds = listOf(
- arrayOf("/sbin/su", "-c", "/system/bin/phh-securize.sh"),
- arrayOf("/system/xbin/su", "-c", "/system/bin/phh-securize.sh"),
- arrayOf("/system/xbin/phh-su", "-c", "/system/bin/phh-securize.sh"),
- arrayOf("/sbin/su", "0", "/system/bin/phh-securize.sh"),
- arrayOf("/system/xbin/su", "0", "/system/bin/phh-securize.sh"),
- arrayOf("/system/xbin/phh-su", "0", "/system/bin/phh-securize.sh")
- )
- for (cmd in cmds) {
- try {
- Runtime.getRuntime().exec(cmd).waitFor()
- break
- } catch (t: Throwable) {
- Log.d("PHH", "Failed to exec \"" + cmd.joinToString(separator = " ") + "\", skipping")
- }
- }
- }
-
- builder.setNegativeButton(android.R.string.no) { dialog, which ->
- }
-
- builder.show()
- return@setOnPreferenceClickListener true
- }
-
val removeTelephonyPref = findPreference<Preference>(MiscSettings.removeTelephony)
removeTelephonyPref!!.setOnPreferenceClickListener {
diff --git a/app/src/main/res/xml/pref_misc.xml b/app/src/main/res/xml/pref_misc.xml
index e41659d..bdf1147 100644
--- a/app/src/main/res/xml/pref_misc.xml
+++ b/app/src/main/res/xml/pref_misc.xml
@@ -193,8 +193,11 @@
android:entryValues="@array/pref_misc_fod_color_values"
android:key="key_misc_fod_color"
android:title="Under-display fp color" />
- <Preference android:title="Securize"
- android:key="key_misc_securize" />
+ <CheckBoxPreference
+ android:defaultValue="false"
+ android:key="key_misc_securize"
+ android:title="Spoof system properties"
+ android:summary="For better chances of passing SafetyNet\nMight cause bootloop on some devices" />
</PreferenceCategory>
<PreferenceCategory android:title="Debugging">
<Preference android:title="Debug Sensors">
--
2.34.1

View File

@@ -1,4 +1,4 @@
From d457d9a320d5b87cb994b2e0d09fc1ef35fad1fc Mon Sep 17 00:00:00 2001
From f5d96e6f5fdbabb924c2a190eaf9edb86d016267 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 22 Jun 2021 13:38:31 +0000
Subject: [PATCH 1/4] Add Meizu 18 vibrator support
@@ -27,10 +27,10 @@ Change-Id: Iecf12cd814e8773abfd78a19f98e31125a73761a
create mode 100644 hal/meizu-vibrator/service.cpp
diff --git a/base.mk b/base.mk
index 057ad0c..7e1cdc9 100644
index afdd295..2c24a3c 100644
--- a/base.mk
+++ b/base.mk
@@ -221,6 +221,9 @@ PRODUCT_COPY_FILES += \
@@ -225,7 +225,10 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += phh-ota
PRODUCT_PACKAGES += \
@@ -40,7 +40,8 @@ index 057ad0c..7e1cdc9 100644
+PRODUCT_PACKAGES += \
+ android.hardware.vibrator@1.3-service.meizu
include build/make/target/product/gsi_release.mk
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:system/etc/a2dp_audio_policy_configuration_7_0.xml \
diff --git a/framework_manifest.xml b/framework_manifest.xml
index cb37b49..1b45b4a 100644
--- a/framework_manifest.xml

View File

@@ -1,4 +1,4 @@
From 72db86f75fae20fef140c4760383acf21902002a Mon Sep 17 00:00:00 2001
From ae0883d10f159e042b31b7e6093a7116e2756c5d Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 27 Jun 2021 05:21:38 +0000
Subject: [PATCH 2/4] Only use meizu-vibrator on Meizu 18
@@ -76,10 +76,10 @@ index 0000000..b34a10b
+<manifest version="1.0" type="framework">
+</manifest>
diff --git a/rw-system.sh b/rw-system.sh
index 5e275af..e8bd30b 100644
index fe760b1..ec12d09 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -355,6 +355,12 @@ if [ "$foundFingerprint" = false ];then
@@ -360,6 +360,12 @@ if [ "$foundFingerprint" = false ];then
mount -o bind system/phh/empty /system/etc/permissions/android.hardware.fingerprint.xml
fi

View File

@@ -1,4 +1,4 @@
From a13abcf3906e73f9a7a1310cbab867488e7627d5 Mon Sep 17 00:00:00 2001
From d61a0dd958f92114656cb9858f8370c392489034 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 28 Oct 2021 01:51:27 +0000
Subject: [PATCH 3/4] Revert "Include sim toolkit app"
@@ -11,7 +11,7 @@ Change-Id: I1eb7f4bb070eea649b4cea6280299e629d1edb3d
1 file changed, 3 deletions(-)
diff --git a/base.mk b/base.mk
index 7e1cdc9..09952c8 100644
index 2c24a3c..2a4c2a3 100644
--- a/base.mk
+++ b/base.mk
@@ -157,9 +157,6 @@ PRODUCT_PACKAGES += \

View File

@@ -1,4 +1,4 @@
From 43e4d35bd355a04b3e1692f03400fe853b581ee5 Mon Sep 17 00:00:00 2001
From 3d0f38a661c87c283d1310c74074844f44437899 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 8 Aug 2021 09:31:01 +0000
Subject: [PATCH 4/4] Revert "treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS

View File

@@ -1,7 +1,7 @@
From 9c440d31d462e558ba6961e8cd42c91411299826 Mon Sep 17 00:00:00 2001
From 4557ae177f6ba40eb5c359a332d8325a333ddb7e Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 27 Oct 2021 14:39:29 -0400
Subject: [PATCH] Disable vndklite handling
Subject: [PATCH 1/2] Disable vndklite handling
Change-Id: Ic4474cf80fc4b45a9a2760dd51e2ca29c4d961e2
---
@@ -9,7 +9,7 @@ Change-Id: Ic4474cf80fc4b45a9a2760dd51e2ca29c4d961e2
1 file changed, 5 deletions(-)
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 3488f5cc7..c32ea8484 100644
index 4a4969192..c375a0551 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -93,7 +93,6 @@ static uint64_t g_module_unload_counter = 0;
@@ -20,7 +20,7 @@ index 3488f5cc7..c32ea8484 100644
static const char* const kLdGeneratedConfigFilePath = "/linkerconfig/ld.config.txt";
@@ -3368,10 +3367,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
@@ -3439,10 +3438,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
}
static std::string get_ld_config_file_vndk_path() {
@@ -32,5 +32,5 @@ index 3488f5cc7..c32ea8484 100644
size_t insert_pos = ld_config_file_vndk.find_last_of('.');
if (insert_pos == std::string::npos) {
--
2.29.2
2.25.1

View File

@@ -0,0 +1,78 @@
From 2dc2ed499505821a535319138e70e64af56ddc87 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 2/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.25.1

View File

@@ -1,7 +1,7 @@
From 2109e8f28ad6b0dd9ed1e6aea80d8f96bcfc6856 Mon Sep 17 00:00:00 2001
From de2f00281f2cd8030ae7f0fdf49ecaf488ec321a Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 5 Aug 2019 18:09:50 +0200
Subject: [PATCH 01/19] Fix BT in-call on CAF devices
Subject: [PATCH 01/24] Fix BT in-call on CAF devices
See https://github.com/phhusson/treble_experimentations/issues/374

View File

@@ -1,7 +1,7 @@
From efb1576f000a7bf89e53381c5863dbe5e407f77e Mon Sep 17 00:00:00 2001
From 345ff1e615bc8c23376df155980bd18778601b89 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 1 Oct 2019 13:35:49 +0200
Subject: [PATCH 02/19] Add (partial, cam id is hardcoded) support for Asus ZF6
Subject: [PATCH 02/24] Add (partial, cam id is hardcoded) support for Asus ZF6
motor camera
Change-Id: Iea6e1370780a1d16f728748d1d948d092532d8fe
@@ -11,7 +11,7 @@ Change-Id: Iea6e1370780a1d16f728748d1d948d092532d8fe
2 files changed, 29 insertions(+)
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 04b56048e0..24b022226f 100644
index b53aec100e..c24ff726ea 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -26,6 +26,7 @@
@@ -30,7 +30,7 @@ index 04b56048e0..24b022226f 100644
mEventLog(DEFAULT_EVENT_LOG_LENGTH),
mNumberOfCameras(0),
mNumberOfCamerasWithoutSystemCamera(0),
@@ -1874,6 +1876,7 @@ Status CameraService::connectHelper(const sp<CALLBACK>& cameraCb, const String8&
@@ -1883,6 +1885,7 @@ Status CameraService::connectHelper(const sp<CALLBACK>& cameraCb, const String8&
mServiceLock.lock();
} else {
// Otherwise, add client to active clients list
@@ -38,7 +38,7 @@ index 04b56048e0..24b022226f 100644
finishConnectLocked(client, partial, oomScoreOffset);
}
@@ -1963,6 +1966,27 @@ status_t CameraService::addOfflineClient(String8 cameraId, sp<BasicClient> offli
@@ -1972,6 +1975,27 @@ status_t CameraService::addOfflineClient(String8 cameraId, sp<BasicClient> offli
return OK;
}
@@ -66,7 +66,7 @@ index 04b56048e0..24b022226f 100644
Status CameraService::setTorchMode(const String16& cameraId, bool enabled,
const sp<IBinder>& clientBinder) {
Mutex::Autolock lock(mServiceLock);
@@ -3054,6 +3078,8 @@ binder::Status CameraService::BasicClient::disconnect() {
@@ -3060,6 +3084,8 @@ binder::Status CameraService::BasicClient::disconnect() {
}
mDisconnected = true;
@@ -76,10 +76,10 @@ index 04b56048e0..24b022226f 100644
sCameraService->logDisconnected(mCameraIdStr, mClientPid, String8(mClientPackageName));
sCameraService->mCameraProviderManager->removeRef(CameraProviderManager::DeviceMode::CAMERA,
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index bc2e3479bc..b58c41e115 100644
index 69e753b95f..13bc96e7c8 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -211,6 +211,9 @@ public:
@@ -219,6 +219,9 @@ public:
// Register an offline client for a given active camera id
status_t addOfflineClient(String8 cameraId, sp<BasicClient> offlineClient);

View File

@@ -1,7 +1,7 @@
From 9f19a75cd2c476e071f61bea35d8f082943c3522 Mon Sep 17 00:00:00 2001
From 1e48cf484b9ececa76323bcd13a9f0f986027372 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Thu, 23 Jan 2020 11:13:43 +0800
Subject: [PATCH 03/19] audiopolicy: try again with trimmed audio port name if
Subject: [PATCH 03/24] audiopolicy: try again with trimmed audio port name if
not found
* In Spreadtrum BSP, some audio routes may contain ports with extra

View File

@@ -1,7 +1,7 @@
From 94c8075354ae12fabd2c7c3cef2a3623bb38813f Mon Sep 17 00:00:00 2001
From af22350663170928ac20fe94768259a53c2c5fcb Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 13 Apr 2020 21:01:16 +0200
Subject: [PATCH 04/19] There are three SCO devices. Fallback from one to the
Subject: [PATCH 04/24] There are three SCO devices. Fallback from one to the
others if needed
Change-Id: I414dcb6b154855c00cb8520b23dc1069827864b2

View File

@@ -1,7 +1,7 @@
From d729bbcff505ed46d6e8251475d5662a4207d935 Mon Sep 17 00:00:00 2001
From 6ab932708ab326229ddc6062b1f9023144566638 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 14 May 2020 19:54:55 +0200
Subject: [PATCH 05/19] Add persist.sys.phh.samsung.camera_ids property to
Subject: [PATCH 05/24] Add persist.sys.phh.samsung.camera_ids property to
access hidden Samsung cameras
Change-Id: I2c7bf535272acc28ed2277e96c78ddd28a0b4593
@@ -11,10 +11,10 @@ Change-Id: I2c7bf535272acc28ed2277e96c78ddd28a0b4593
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp
index 26562e0426..e940c33845 100644
index 6e83132874..2a0007964b 100644
--- a/services/camera/libcameraservice/Android.bp
+++ b/services/camera/libcameraservice/Android.bp
@@ -154,6 +154,7 @@ cc_library_shared {
@@ -157,6 +157,7 @@ cc_library_shared {
"android.hardware.camera.device@3.5",
"android.hardware.camera.device@3.6",
"android.hardware.camera.device@3.7",
@@ -23,7 +23,7 @@ index 26562e0426..e940c33845 100644
],
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
index 4f2b878d26..d11ad8d766 100644
index 0cce2cad91..52c78a4695 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
@@ -21,6 +21,7 @@
@@ -34,7 +34,7 @@ index 4f2b878d26..d11ad8d766 100644
#include <algorithm>
#include <chrono>
@@ -1371,6 +1372,7 @@ status_t CameraProviderManager::ProviderInfo::initialize(
@@ -1380,6 +1381,7 @@ status_t CameraProviderManager::ProviderInfo::initialize(
mMinorVersion = 6;
}
}
@@ -42,7 +42,7 @@ index 4f2b878d26..d11ad8d766 100644
// We need to check again since cast2_6.isOk() succeeds even if the provider
// version isn't actually 2.6.
if (interface2_6 == nullptr){
@@ -1407,6 +1409,9 @@ status_t CameraProviderManager::ProviderInfo::initialize(
@@ -1416,6 +1418,9 @@ status_t CameraProviderManager::ProviderInfo::initialize(
return mapToStatusT(status);
}
@@ -52,7 +52,7 @@ index 4f2b878d26..d11ad8d766 100644
hardware::Return<bool> linked = interface->linkToDeath(this, /*cookie*/ mId);
if (!linked.isOk()) {
ALOGE("%s: Transaction error in linking to camera provider '%s' death: %s",
@@ -1437,7 +1442,7 @@ status_t CameraProviderManager::ProviderInfo::initialize(
@@ -1446,7 +1451,7 @@ status_t CameraProviderManager::ProviderInfo::initialize(
// Get initial list of camera devices, if any
std::vector<std::string> devices;
@@ -61,7 +61,7 @@ index 4f2b878d26..d11ad8d766 100644
Status idStatus,
const hardware::hidl_vec<hardware::hidl_string>& cameraDeviceNames) {
status = idStatus;
@@ -1454,7 +1459,12 @@ status_t CameraProviderManager::ProviderInfo::initialize(
@@ -1463,7 +1468,12 @@ status_t CameraProviderManager::ProviderInfo::initialize(
mProviderPublicCameraIds.push_back(id);
}
}

View File

@@ -1,7 +1,7 @@
From 7ff037ed35bbb81e8834b762248fea580e1f7dea Mon Sep 17 00:00:00 2001
From 14d8348ba2c0fd64cbe82de034bd7d0e370f36f3 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 19 May 2020 14:01:14 +0200
Subject: [PATCH 06/19] Add a property to force camera timestamp source
Subject: [PATCH 06/24] Add a property to force camera timestamp source
Some devices wrongly report their timesource
Camera's timesource can either be CLOCK_MONOTONIC, or CLOCK_BOOTTIME
@@ -18,10 +18,10 @@ timestamp source.
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp
index 87c1c750ed..b4a58ec749 100644
index 8f080bec87..4b972a48a2 100644
--- a/services/camera/libcameraservice/device3/Camera3Device.cpp
+++ b/services/camera/libcameraservice/device3/Camera3Device.cpp
@@ -346,8 +346,16 @@ status_t Camera3Device::initializeCommonLocked() {
@@ -347,8 +347,16 @@ status_t Camera3Device::initializeCommonLocked() {
// Measure the clock domain offset between camera and video/hw_composer
camera_metadata_entry timestampSource =
mDeviceInfo.find(ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE);

View File

@@ -1,7 +1,7 @@
From 39f279a2575ea4bf23672224c9b7b37dbe199007 Mon Sep 17 00:00:00 2001
From aeb9e61dadaa2067c98713586bff282df6298686 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 24 Apr 2018 00:14:28 +0200
Subject: [PATCH 07/19] FIH devices: Fix "Earpiece" audio output
Subject: [PATCH 07/24] FIH devices: Fix "Earpiece" audio output
On some FIH devices (confirmed on Razer, and probably on Aquos SS2),
Earpiece is not listed in attachedDevices, and devicePort's profile

View File

@@ -1,7 +1,7 @@
From 47acdf3a578d5d55c98b0f59906c4728248e6687 Mon Sep 17 00:00:00 2001
From b263e2acb5d03232ebf7c673774b15652a35b3a0 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 12 Sep 2020 12:32:50 +0200
Subject: [PATCH 08/19] No longer make re-assigning legacy audio groups fatal.
Subject: [PATCH 08/24] No longer make re-assigning legacy audio groups fatal.
Mi9 declares AUDIO_STREAM_PATCH and AUDIO_STREAM_REROUTING which is defined
by framework too

View File

@@ -1,7 +1,7 @@
From 1bb61eb2a2777c127b191599d796b5476a26c807 Mon Sep 17 00:00:00 2001
From f8d302e38f77e02b443eab76c1a0a58141877217 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 25 May 2020 21:26:54 +0200
Subject: [PATCH 09/19] Add persist.sys.phh.disable_a2dp_offload property to
Subject: [PATCH 09/24] Add persist.sys.phh.disable_a2dp_offload property to
force a2dp offload
Change-Id: Id474540c33c594cc4010a1a398d82bff8aadaeea
@@ -12,7 +12,7 @@ Change-Id: Id474540c33c594cc4010a1a398d82bff8aadaeea
3 files changed, 197 insertions(+), 7 deletions(-)
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 1e64538d89..2923575327 100644
index 2c8d8de226..46cd6e47a0 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1183,6 +1183,9 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
@@ -309,7 +309,7 @@ index abc54ccc24..c6db471c8c 100644
if (status != OK) config->clear();
return status;
diff --git a/services/audiopolicy/enginedefault/src/Engine.cpp b/services/audiopolicy/enginedefault/src/Engine.cpp
index c73c17d1e4..314de7889b 100644
index 8305c9ecd0..489e924b07 100644
--- a/services/audiopolicy/enginedefault/src/Engine.cpp
+++ b/services/audiopolicy/enginedefault/src/Engine.cpp
@@ -52,7 +52,7 @@ static const std::vector<legacy_strategy_map>& getLegacyStrategy() {

View File

@@ -1,7 +1,7 @@
From bba858703aee4bcfaaa38ad9f2da7be018fffc17 Mon Sep 17 00:00:00 2001
From 95da18470679086b435f5d48961e7e6e96d19808 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 21 Dec 2020 20:19:11 +0100
Subject: [PATCH 10/19] Make camera IDs filter-out optional
Subject: [PATCH 10/24] Make camera IDs filter-out optional
Nowadays most people have Camera 2 apps, and would like to have all
cameras, rather than limit which cameras are available.
@@ -11,7 +11,7 @@ Add a property for that.
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
index d11ad8d766..ab5ddd12d0 100644
index 52c78a4695..5158655d33 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
@@ -183,7 +183,9 @@ std::vector<std::string> CameraProviderManager::getAPI1CompatibleCameraDeviceIds

Some files were not shown because too many files have changed in this diff Show More