Compare commits

..

10 Commits

Author SHA1 Message Date
cde527ad48 added navbar and apn patch 2023-12-15 15:04:40 -05:00
Andy CrossGate Yan
3c41d0d3d3 Changes for November 2023 2023-11-20 22:41:09 +08:00
Andy CrossGate Yan
17dc085b51 Changes for October 2023, syncing up to 20230905 2023-10-18 08:08:56 +08:00
Andy CrossGate Yan
12b2241d24 Changes for August 2023 2023-08-15 22:44:13 +08:00
Andy CrossGate Yan
bc2bbb0906 Changes for July 2023, syncing up to 20230706 2023-07-16 18:26:00 +08:00
Andy CrossGate Yan
1a0d724bf1 Changes for June 2023, syncing up to 20230614 2023-06-22 07:49:58 +08:00
Andy CrossGate Yan
3a82192c9d Changes for May 2023, syncing up to 20230429 2023-05-07 14:42:57 +00:00
Andy CrossGate Yan
148c5438de Changes for April 2023, syncing up to 20230417 2023-04-18 12:48:46 +00:00
Andy CrossGate Yan
4cd163c62b Changes for March 2023, syncing up to 20230315 2023-03-25 11:06:31 +00:00
Andy CrossGate Yan
4ce6305950 Changes for February 2023, syncing up to 20230131 2023-02-19 02:08:43 +00:00
211 changed files with 80547 additions and 115371 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/patches_treble_personal/vendor_hardware_overlay

View File

@ -1,126 +0,0 @@
From ae74e74a16845c786042581f0fae8c8685ee5be7 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 13 Jan 2022 14:22:24 +0000
Subject: [PATCH 01/14] Add SPenPointerOverlay
Toggle this overlay with property "persist.ui.spen.pointer"
Change-Id: I21f7e05cf8ebd74c950dfb20cf7eee99bfe22988
---
packages/overlays/Android.mk | 1 +
.../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, 57 insertions(+)
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 69641e69a9f2..36ec11af3068 100644
--- a/packages/overlays/Android.mk
+++ b/packages/overlays/Android.mk
@@ -31,6 +31,7 @@ LOCAL_REQUIRED_MODULES := \
NavigationBarModeGesturalOverlayNarrowBack \
NavigationBarModeGesturalOverlayWideBack \
NavigationBarModeGesturalOverlayExtraWideBack \
+ 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 4e591984e8f533e0ad305caf8aa03c60cd9314d0 Mon Sep 17 00:00:00 2001
From fdfbffda2815c0ac2270eae0efd0c31eb19e2dda Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Fri, 22 Mar 2019 00:41:20 +0800
Subject: [PATCH 02/14] Disable FP lockouts optionally
Subject: [PATCH 01/22] Disable FP lockouts optionally
Both timed and permanent lockouts - GET THE FUCK OUT
Now targeting LockoutFramework, introduced in Android 12
@ -72,5 +72,5 @@ index a0befea8e085..48c4ded9f5ca 100644
return LOCKOUT_NONE;
}
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 3b4a0dc39f8d03ddac9c45fd3e7fc4577334a645 Mon Sep 17 00:00:00 2001
From f48a8e1bb482cde1c1e0a628aea218796586130a 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 03/14] Disable vendor mismatch warning
Subject: [PATCH 02/22] 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 01490f029e97..6199267cac0b 100644
index ca45e087b60c..1d1da07f2942 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -5856,20 +5856,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
@@ -5875,20 +5875,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
}
if (!Build.isBuildConsistent()) {
@ -36,5 +36,5 @@ index 01490f029e97..6199267cac0b 100644
}
}
--
2.25.1
2.34.1

View File

@ -0,0 +1,47 @@
From d8dea7b3e03976fa4ab292f3d6fdcae84e039196 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 17 Jan 2023 17:19:19 +0000
Subject: [PATCH 03/22] Keyguard: Fix colors of slices not updating on doze
Slices were invisible (black) in doze when using light wallpapers
Introduced in https://github.com/LineageOS/android_frameworks_base/commit/a19e59d717ec6d573c11c7e8277bba3c4de189c2
Change-Id: I06abd8bf2e28655cc9e6d81366fd82a13454ec5a
---
.../com/android/keyguard/KeyguardStatusViewController.java | 7 +++++++
.../systemui/shade/NotificationPanelViewController.java | 1 +
2 files changed, 8 insertions(+)
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
index f4c581552bc4..c0f983551877 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
@@ -97,6 +97,13 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
mKeyguardSliceViewController.refresh();
}
+ /**
+ * The amount we're in doze.
+ */
+ public void setDarkAmount(float darkAmount) {
+ mView.setDarkAmount(darkAmount);
+ }
+
/**
* Set which clock should be displayed on the keyguard. The other one will be automatically
* hidden.
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 1394c68ceeb7..6cb1da129b60 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -4422,6 +4422,7 @@ public final class NotificationPanelViewController implements Dumpable {
public void onDozeAmountChanged(float linearAmount, float amount) {
mInterpolatedDarkAmount = amount;
mLinearDarkAmount = linearAmount;
+ mKeyguardStatusViewController.setDarkAmount(mInterpolatedDarkAmount);
positionClockAndNotifications();
}
}
--
2.34.1

View File

@ -1,7 +1,7 @@
From becd4bf809789b1d0d53956539d3d452e9f20e5a Mon Sep 17 00:00:00 2001
From b92f1ca708133033601f8f0e70a872c5a30052df 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 04/14] UI: Adjust default navbar layouts
Subject: [PATCH 04/22] 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,7 +45,7 @@ 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 d7d88cea2dbc..8a2b88d3cf9a 100644
index 99f21ed21d15..4c386f78a27a 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -301,7 +301,7 @@
@ -54,9 +54,9 @@ index d7d88cea2dbc..8a2b88d3cf9a 100644
<!-- Nav bar button default ordering/layout -->
- <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
+ <string name="config_navBarLayout" translatable="false">left[.6W],back[1WC];home;recent[1WC],right[.6W]</string>
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;contextual[1.7WC]</string>
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;menu_ime[1.7WC]</string>
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 1d9cba70b8a820933b6e54afef69a72e7e1ab85e Mon Sep 17 00:00:00 2001
From 09662a87b7db9b520aa5f996c5b837717fadfdec 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/14] UI: Disable wallpaper zoom
Subject: [PATCH 05/22] 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 659d0f37bf05..272df37188bf 100644
index f015b485dfa6..77045ea11775 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -5104,7 +5104,7 @@
@@ -5206,7 +5206,7 @@
<item name="config_wallpaperMinScale" format="float" type="dimen">1</item>
<!-- The max scale for the wallpaper when it's zoomed in -->
@ -24,5 +24,5 @@ index 659d0f37bf05..272df37188bf 100644
<!-- If true, the wallpaper will scale regardless of the value of shouldZoomOutWallpaper() -->
<bool name="config_alwaysScaleWallpaper">false</bool>
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 4c3587987591a1c4545322b0855ea138e7fd26ce Mon Sep 17 00:00:00 2001
From 6662339ff0a5507899d0f8bca883dbef8f748f1b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 25 Sep 2022 02:20:52 +0000
Subject: [PATCH 06/14] UI: Follow Monet and light/dark theme in user 1 icon
Subject: [PATCH 06/22] UI: Follow Monet and light/dark theme in user 1 icon
Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8
---
@ -22,10 +22,10 @@ index ffaccd3ddc57..e2a955b89c77 100644
<color name="user_icon_6">#ff4ecde6</color><!-- cyan -->
<color name="user_icon_7">#fffbbc04</color><!-- yellow -->
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index d5875f547e91..c7711ed3e493 100644
index b83d3b4ea298..7586684ea936 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -174,7 +174,7 @@
@@ -176,7 +176,7 @@
<color name="system_notification_accent_color">#00000000</color>
<!-- Default user icon colors -->
@ -35,5 +35,5 @@ index d5875f547e91..c7711ed3e493 100644
<color name="user_icon_3">#ff4c8df6</color><!-- blue -->
<color name="user_icon_4">#fff439a0</color><!-- pink -->
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From cd200004d3b59dcb33187a3228a4bdab6b16619b Mon Sep 17 00:00:00 2001
From 2249465d16cea6251df69dd13d331ed2fae270f0 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 3 Jun 2020 01:31:34 +0000
Subject: [PATCH 07/14] UI: Increase default status bar height
Subject: [PATCH 07/22] UI: Increase default status bar height
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
---
@ -31,5 +31,5 @@ index 2542268a153a..099a6badc034 100644
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
--
2.25.1
2.34.1

View File

@ -1,32 +1,25 @@
From 6bc225de6c671c50ed045eef9575b0aa2ab5835f Mon Sep 17 00:00:00 2001
From 380d8dff252dcde3b490cc3080bd56d2e3d21ec4 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 25 Sep 2022 02:20:20 +0000
Subject: [PATCH 08/14] UI: Remove QS footer background
Subject: [PATCH 08/22] UI: Remove QS footer background
Change-Id: I68e82e0c5e3eddb2d3f767fe792b1436eae506ef
---
packages/SystemUI/res-keyguard/layout/footer_actions.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
packages/SystemUI/res-keyguard/layout/footer_actions.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/packages/SystemUI/res-keyguard/layout/footer_actions.xml b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
index a101c64a48e0..028ab29b8643 100644
index 544d0299060d..d45744961f59 100644
--- a/packages/SystemUI/res-keyguard/layout/footer_actions.xml
+++ b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
@@ -25,7 +25,6 @@
@@ -23,7 +23,6 @@
android:elevation="@dimen/qs_panel_elevation"
android:paddingTop="@dimen/qs_footer_actions_top_padding"
android:paddingBottom="@dimen/qs_footer_actions_bottom_padding"
- android:background="@drawable/qs_footer_actions_background"
android:gravity="center_vertical|end"
android:layout_gravity="bottom"
>
@@ -98,4 +97,4 @@
android:tint="?androidprv:attr/textColorPrimaryInverse" />
</LinearLayout>
-</com.android.systemui.qs.FooterActionsView>
\ No newline at end of file
+</com.android.systemui.qs.FooterActionsView>
/>
--
2.25.1
2.34.1

View File

@ -1,41 +1,71 @@
From b421fc2bb853966ede836e09203718dfc8d0cb56 Mon Sep 17 00:00:00 2001
From 9f047b03021034b2cb21e7b8c2845eb8dfd577d1 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 19 Mar 2022 09:22:24 +0000
Subject: [PATCH 09/14] UI: Restore split-screen divider to pre-Sv2 looks
Subject: [PATCH 09/22] UI: Restore split-screen divider to pre-Sv2 looks
- Kill rounded corners - where two rectangles collide should be perfectly straight
- Make it black again - taskbar should mind its own business
Change-Id: I240b627793b615c82bd07ebd77638cde180ef80f
---
.../Shell/res/color/split_divider_background.xml | 4 ++--
.../wm/shell/common/split/SplitLayout.java | 15 +--------------
2 files changed, 3 insertions(+), 16 deletions(-)
.../Shell/res/values-sw600dp/colors.xml | 21 +++++++++++++++++++
.../WindowManager/Shell/res/values/colors.xml | 2 +-
.../wm/shell/common/split/SplitLayout.java | 19 ++---------------
3 files changed, 24 insertions(+), 18 deletions(-)
create mode 100644 libs/WindowManager/Shell/res/values-sw600dp/colors.xml
diff --git a/libs/WindowManager/Shell/res/color/split_divider_background.xml b/libs/WindowManager/Shell/res/color/split_divider_background.xml
index 049980803ee3..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.
diff --git a/libs/WindowManager/Shell/res/values-sw600dp/colors.xml b/libs/WindowManager/Shell/res/values-sw600dp/colors.xml
new file mode 100644
index 000000000000..79db59cad3c2
--- /dev/null
+++ b/libs/WindowManager/Shell/res/values-sw600dp/colors.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2020, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+ <color name="split_divider_background">@color/taskbar_background</color>
+</resources>
diff --git a/libs/WindowManager/Shell/res/values/colors.xml b/libs/WindowManager/Shell/res/values/colors.xml
index 6fb70006e67f..906dc71d623a 100644
--- a/libs/WindowManager/Shell/res/values/colors.xml
+++ b/libs/WindowManager/Shell/res/values/colors.xml
@@ -18,7 +18,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_500" android:lStar="15" />
-</selector>
\ No newline at end of file
+ <item android:color="@android:color/black" />
+</selector>
<resources>
<color name="docked_divider_handle">#000000</color>
- <color name="split_divider_background">@color/taskbar_background</color>
+ <color name="split_divider_background">@android:color/black</color>
<drawable name="forced_resizable_background">#59000000</drawable>
<color name="minimize_dock_shadow_start">#60000000</color>
<color name="minimize_dock_shadow_end">#00000000</color>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
index 419e62daf586..229844e42a49 100644
index ffc56b6f6106..fa7d70e34dd1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
@@ -152,20 +152,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
@@ -154,23 +154,8 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
}
private int getDividerInsets(Resources resources, Display display) {
private void updateDividerConfig(Context context) {
- final Resources resources = context.getResources();
- final Display display = context.getDisplay();
- final int dividerInset = resources.getDimensionPixelSize(
- com.android.internal.R.dimen.docked_stack_divider_insets);
-
- int radius = 0;
- RoundedCorner corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
@ -46,11 +76,14 @@ index 419e62daf586..229844e42a49 100644
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
-
- return Math.max(dividerInset, radius);
+ return 0;
- mDividerInsets = Math.max(dividerInset, radius);
- mDividerSize = resources.getDimensionPixelSize(R.dimen.split_divider_bar_width);
- mDividerWindowWidth = mDividerSize + 2 * mDividerInsets;
+ mDividerWindowWidth = context.getResources().getDimensionPixelSize(
+ R.dimen.split_divider_bar_width);
}
/** Gets bounds of the primary split with screen based coordinate. */
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 03ed62fb9ce9ce4da4f666f24a9c9c65cc5b9c03 Mon Sep 17 00:00:00 2001
From 31f4647fa3e8662e372a3dacb08a64765f29915f 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 10/14] UI: Revive navbar layout tuning via sysui_nav_bar
Subject: [PATCH 10/22] UI: Revive navbar layout tuning via sysui_nav_bar
tunable
Google keeps fixing what ain't broken.
@ -60,5 +60,5 @@ index 51feed875337..5f0f9a220c31 100644
final String newValue = getDefaultLayout();
if (!Objects.equals(mCurrentLayout, newValue)) {
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 69581c7e2ab9106877b8c8951244c63c14ea97e4 Mon Sep 17 00:00:00 2001
From d81745ad081c1e8bbabd346deb3fa5cb3b3a1017 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 26 Apr 2020 08:56:13 +0000
Subject: [PATCH 11/14] UI: Use SNAP_FIXED_RATIO for multi-window globally
Subject: [PATCH 11/22] UI: Use SNAP_FIXED_RATIO for multi-window globally
Enables multiple snap targets under landscape for phone UI
@ -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 272df37188bf..58cd819b9404 100644
index 77045ea11775..5c9cad656654 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3790,7 +3790,7 @@
@@ -3885,7 +3885,7 @@
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
2 - 1 snap target: 1:1
-->
@ -91,5 +91,5 @@ index 272df37188bf..58cd819b9404 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,7 +1,7 @@
From 5dd8363ed108cb2443fad9e7cd25a3ad54e020b9 Mon Sep 17 00:00:00 2001
From a1b87f1cc52bd1d906554b94657634976b9fb776 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 3 Nov 2020 22:43:12 -0800
Subject: [PATCH 12/14] core: Remove old app target SDK dialog
Subject: [PATCH 12/22] core: Remove old app target SDK dialog
If an app is old, users should already know that, and there's usually no
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 84e2133ee773923f221a9b9754e4b1ce6bcf5e1a Mon Sep 17 00:00:00 2001
From 8b17b1dc3b1f373a0ae8a44d16a8adec599915b3 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 5 Oct 2021 21:01:50 -0700
Subject: [PATCH 13/14] Paint: Enable subpixel text positioning by default
Subject: [PATCH 13/22] Paint: Enable subpixel text positioning by default
On desktop Linux, subpixel text positioning is necessary to avoid
kerning issues, and Android is no different. Even though most phone
@ -24,10 +24,10 @@ Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index 451b99ea7550..e60d506a171b 100644
index f438a03b1434..6621d1f23166 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -253,7 +253,7 @@ public class Paint {
@@ -260,7 +260,7 @@ public class Paint {
// These flags are always set on a new/reset paint, even if flags 0 is passed.
static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
@ -37,5 +37,5 @@ index 451b99ea7550..e60d506a171b 100644
/**
* Font hinter option that disables font hinting.
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 8fc6fb99d86c4e4887d49d7bbff571b50b76c73f Mon Sep 17 00:00:00 2001
From 482d15491c36aeb11a0e8b5c9a5205d389507034 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Sat, 16 Oct 2021 05:27:57 -0700
Subject: [PATCH 14/14] Add support for app signature spoofing
Subject: [PATCH 14/22] Add support for app signature spoofing
This is needed by microG GmsCore to pretend to be the official Google
Play Services package, because client apps check the package signature
@ -38,7 +38,7 @@ Change-Id: Ied7d6ce0b83a2d2345c3abba0429998d86494a88
4 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/core/api/current.txt b/core/api/current.txt
index c8a43db2f9c2..277183036c60 100644
index 487e57d114c9..04e69741b9fd 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -87,6 +87,7 @@ package android {
@ -58,10 +58,10 @@ index c8a43db2f9c2..277183036c60 100644
field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
field public static final String NEARBY_DEVICES = "android.permission-group.NEARBY_DEVICES";
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 1b90803404f7..d1cb6c3241f2 100644
index bbc3a7369423..af04d9d18fbd 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3542,6 +3542,21 @@
@@ -3577,6 +3577,21 @@
android:description="@string/permdesc_getPackageSize"
android:protectionLevel="normal" />
@ -84,10 +84,10 @@ index 1b90803404f7..d1cb6c3241f2 100644
{@link android.content.pm.PackageManager#addPackageToPreferred}
for details. -->
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 5763345aba4d..8ffdbdd6f15b 100644
index 2091c0502b6f..6888edcf7d3c 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -974,6 +974,18 @@
@@ -982,6 +982,18 @@
<!-- Permissions -->
@ -159,5 +159,5 @@ index 46b7460dff1b..40549962436f 100644
if (packageInfo == null) {
return null;
--
2.25.1
2.34.1

View File

@ -0,0 +1,113 @@
From db27d27f48658841c6a74e55f543f417ddb16e76 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Mon, 11 Oct 2021 19:59:51 -0700
Subject: [PATCH 15/22] Spoof product name for Google Play Services
NB: This code is under the gmscompat package, but it does not depend on
any code from gmscompat.
Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a
---
core/java/android/app/Instrumentation.java | 4 ++
.../internal/gmscompat/AttestationHooks.java | 60 +++++++++++++++++++
2 files changed, 64 insertions(+)
create mode 100644 core/java/com/android/internal/gmscompat/AttestationHooks.java
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index 556058b567f9..44449588bbab 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -57,6 +57,8 @@ import android.view.WindowManagerGlobal;
import com.android.internal.content.ReferrerIntent;
+import com.android.internal.gmscompat.AttestationHooks;
+
import java.io.File;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -1242,6 +1244,7 @@ public class Instrumentation {
Application app = getFactory(context.getPackageName())
.instantiateApplication(cl, className);
app.attach(context);
+ AttestationHooks.initApplicationBeforeOnCreate(app);
return app;
}
@@ -1259,6 +1262,7 @@ public class Instrumentation {
ClassNotFoundException {
Application app = (Application)clazz.newInstance();
app.attach(context);
+ AttestationHooks.initApplicationBeforeOnCreate(app);
return app;
}
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
new file mode 100644
index 000000000000..55db97dc28a1
--- /dev/null
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.gmscompat;
+
+import android.app.Application;
+import android.os.Build;
+import android.os.SystemProperties;
+import android.util.Log;
+
+import java.lang.reflect.Field;
+
+/** @hide */
+public final class AttestationHooks {
+ private static final String TAG = "GmsCompat/Attestation";
+
+ private static final String PACKAGE_GMS = "com.google.android.gms";
+
+ private AttestationHooks() { }
+
+ private static void setBuildField(String key, String value) {
+ try {
+ // Unlock
+ Field field = Build.class.getDeclaredField(key);
+ field.setAccessible(true);
+
+ // Edit
+ field.set(null, value);
+
+ // Lock
+ field.setAccessible(false);
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ Log.e(TAG, "Failed to spoof Build." + key, e);
+ }
+ }
+
+ private static void spoofBuildGms() {
+ // Alter model name to avoid hardware attestation enforcement
+ setBuildField("MODEL", "Pixel 5a");
+ }
+
+ public static void initApplicationBeforeOnCreate(Application app) {
+ if (PACKAGE_GMS.equals(app.getPackageName())) {
+ spoofBuildGms();
+ }
+ }
+}
--
2.34.1

View File

@ -0,0 +1,93 @@
From dc4bd0f140c6946e01e0a3c31bfc71c884138981 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Mon, 11 Oct 2021 20:00:44 -0700
Subject: [PATCH 16/22] keystore: Block key attestation for SafetyNet
SafetyNet (part of Google Play Services) opportunistically uses
hardware-backed key attestation via KeyStore as a strong integrity
check. This causes SafetyNet to fail on custom ROMs because the verified
boot key and bootloader unlock state can be detected from attestation
certificates.
As a workaround, we can take advantage of the fact that SafetyNet's
usage of key attestation is opportunistic (i.e. falls back to basic
integrity checks if it fails) and prevent it from getting the
attestation certificate chain from KeyStore. This is done by checking
the stack for DroidGuard, which is the codename for SafetyNet, and
pretending that the device doesn't support key attestation.
Key attestation has only been blocked for SafetyNet specifically, as
Google Play Services and other apps have many valid reasons to use it.
For example, it appears to be involved in Google's mobile security key
ferature.
Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
---
.../internal/gmscompat/AttestationHooks.java | 15 +++++++++++++++
.../security/keystore2/AndroidKeyStoreSpi.java | 3 +++
2 files changed, 18 insertions(+)
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
index 55db97dc28a1..f2c85c82821f 100644
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
@@ -22,12 +22,14 @@ import android.os.SystemProperties;
import android.util.Log;
import java.lang.reflect.Field;
+import java.util.Arrays;
/** @hide */
public final class AttestationHooks {
private static final String TAG = "GmsCompat/Attestation";
private static final String PACKAGE_GMS = "com.google.android.gms";
+ private static volatile boolean sIsGms = false;
private AttestationHooks() { }
@@ -54,7 +56,20 @@ public final class AttestationHooks {
public static void initApplicationBeforeOnCreate(Application app) {
if (PACKAGE_GMS.equals(app.getPackageName())) {
+ sIsGms = true;
spoofBuildGms();
}
}
+
+ private static boolean isCallerSafetyNet() {
+ return Arrays.stream(Thread.currentThread().getStackTrace())
+ .anyMatch(elem -> elem.getClassName().contains("DroidGuard"));
+ }
+
+ public static void onEngineGetCertificateChain() {
+ // Check stack for SafetyNet
+ if (sIsGms && isCallerSafetyNet()) {
+ throw new UnsupportedOperationException();
+ }
+ }
}
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
index 33411e1ec5b9..133a4094d434 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
@@ -42,6 +42,7 @@ import android.system.keystore2.ResponseCode;
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.gmscompat.AttestationHooks;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -164,6 +165,8 @@ public class AndroidKeyStoreSpi extends KeyStoreSpi {
@Override
public Certificate[] engineGetCertificateChain(String alias) {
+ AttestationHooks.onEngineGetCertificateChain();
+
KeyEntryResponse response = getKeyMetadata(alias);
if (response == null || response.metadata.certificate == null) {
--
2.34.1

View File

@ -0,0 +1,42 @@
From 05bc5fa10b4e2ebc539c32db04abbc995906ff05 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Mon, 1 Nov 2021 20:06:48 -0700
Subject: [PATCH 17/22] Limit SafetyNet workarounds to unstable GMS process
The unstable process is where SafetyNet attestation actually runs, so
we only need to spoof the model in that process. Leaving other processes
fixes various issues caused by model detection and flag provisioning,
including screen-off Voice Match in Google Assistant, broken At a Glance
weather and settings on Android 12, and more.
Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
---
.../com/android/internal/gmscompat/AttestationHooks.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
index f2c85c82821f..37ce8c946de6 100644
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
@@ -29,6 +29,8 @@ public final class AttestationHooks {
private static final String TAG = "GmsCompat/Attestation";
private static final String PACKAGE_GMS = "com.google.android.gms";
+ private static final String PROCESS_UNSTABLE = "com.google.android.gms.unstable";
+
private static volatile boolean sIsGms = false;
private AttestationHooks() { }
@@ -55,7 +57,8 @@ public final class AttestationHooks {
}
public static void initApplicationBeforeOnCreate(Application app) {
- if (PACKAGE_GMS.equals(app.getPackageName())) {
+ if (PACKAGE_GMS.equals(app.getPackageName()) &&
+ PROCESS_UNSTABLE.equals(Application.getProcessName())) {
sIsGms = true;
spoofBuildGms();
}
--
2.34.1

View File

@ -0,0 +1,59 @@
From ace6036332743c6f1a5614b2fd573464ddbffef7 Mon Sep 17 00:00:00 2001
From: Dyneteve <dyneteve@hentaios.com>
Date: Tue, 23 Aug 2022 18:57:05 +0200
Subject: [PATCH 18/22] gmscompat: Apply the SafetyNet workaround to Play Store
aswell
Play Store is used for the new Play Integrity API, extend the hack
to it aswell
Test: Device Integrity and Basic Integrity passes.
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
---
.../android/internal/gmscompat/AttestationHooks.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
index 37ce8c946de6..65469239a0c6 100644
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
@@ -29,9 +29,11 @@ public final class AttestationHooks {
private static final String TAG = "GmsCompat/Attestation";
private static final String PACKAGE_GMS = "com.google.android.gms";
+ private static final String PACKAGE_FINSKY = "com.android.vending";
private static final String PROCESS_UNSTABLE = "com.google.android.gms.unstable";
private static volatile boolean sIsGms = false;
+ private static volatile boolean sIsFinsky = false;
private AttestationHooks() { }
@@ -62,6 +64,11 @@ public final class AttestationHooks {
sIsGms = true;
spoofBuildGms();
}
+
+ if (PACKAGE_FINSKY.equals(app.getPackageName())) {
+ sIsFinsky = true;
+ spoofBuildGms();
+ }
}
private static boolean isCallerSafetyNet() {
@@ -74,5 +81,10 @@ public final class AttestationHooks {
if (sIsGms && isCallerSafetyNet()) {
throw new UnsupportedOperationException();
}
+
+ // Check stack for PlayIntegrity
+ if (sIsFinsky) {
+ throw new UnsupportedOperationException();
+ }
}
}
--
2.34.1

View File

@ -0,0 +1,46 @@
From d67897a23c6e182294d6a6d137d7ccc430a1abe0 Mon Sep 17 00:00:00 2001
From: Dyneteve <dyneteve@hentaios.com>
Date: Thu, 8 Sep 2022 14:39:52 +0200
Subject: [PATCH 19/22] gmscompat: Use Nexus 6P fingerprint for CTS/Integrity
Google seems to have patched the KM block to Play Store in record time,
but is still not enforced for anything under android N.
Since we moved to angler FP we don't need to spoof model to Play Store
anymore, however the KM block is still needed.
Test: Run Play Intregrity Attestation
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1
---
.../com/android/internal/gmscompat/AttestationHooks.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
index 65469239a0c6..328d9777b2a2 100644
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
@@ -54,8 +54,9 @@ public final class AttestationHooks {
}
private static void spoofBuildGms() {
- // Alter model name to avoid hardware attestation enforcement
- setBuildField("MODEL", "Pixel 5a");
+ // Alter model name and fingerprint to avoid hardware attestation enforcement
+ setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
+ setBuildField("MODEL", "Nexus 6P");
}
public static void initApplicationBeforeOnCreate(Application app) {
@@ -67,7 +68,6 @@ public final class AttestationHooks {
if (PACKAGE_FINSKY.equals(app.getPackageName())) {
sIsFinsky = true;
- spoofBuildGms();
}
}
--
2.34.1

View File

@ -0,0 +1,27 @@
From 7893f246007a1989420583ab8728a5ced89e944d Mon Sep 17 00:00:00 2001
From: Dyneteve <dyneteve@hentaios.com>
Date: Tue, 6 Dec 2022 15:59:08 +0100
Subject: [PATCH 20/22] gmscompat: Use actual device model name
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6
---
core/java/com/android/internal/gmscompat/AttestationHooks.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
index 328d9777b2a2..7649bb6533da 100644
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
@@ -56,7 +56,7 @@ public final class AttestationHooks {
private static void spoofBuildGms() {
// Alter model name and fingerprint to avoid hardware attestation enforcement
setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
- setBuildField("MODEL", "Nexus 6P");
+ setBuildField("MODEL", Build.MODEL + "\u200b");
}
public static void initApplicationBeforeOnCreate(Application app) {
--
2.34.1

View File

@ -0,0 +1,57 @@
From dd5e4484df6868958941773ac310396b281e5ceb Mon Sep 17 00:00:00 2001
From: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date: Wed, 4 Jan 2023 18:20:56 +0000
Subject: [PATCH 21/22] gmscompat: Set shipping level to 32 for devices >=33
If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
setting it to 32 allows for software attestation and passing CTS
Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
---
.../internal/gmscompat/AttestationHooks.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
index 7649bb6533da..d2b1d2879c9c 100644
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
@@ -18,6 +18,7 @@ package com.android.internal.gmscompat;
import android.app.Application;
import android.os.Build;
+import android.os.Build.VERSION;
import android.os.SystemProperties;
import android.util.Log;
@@ -53,10 +54,27 @@ public final class AttestationHooks {
}
}
+ private static void setVersionField(String key, Integer value) {
+ try {
+ // Unlock
+ Field field = Build.VERSION.class.getDeclaredField(key);
+ field.setAccessible(true);
+
+ // Edit
+ field.set(null, value);
+
+ // Lock
+ field.setAccessible(false);
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ Log.e(TAG, "Failed to spoof Build." + key, e);
+ }
+ }
+
private static void spoofBuildGms() {
// Alter model name and fingerprint to avoid hardware attestation enforcement
setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
setBuildField("MODEL", Build.MODEL + "\u200b");
+ setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.S);
}
public static void initApplicationBeforeOnCreate(Application app) {
--
2.34.1

View File

@ -0,0 +1,65 @@
From 4ffed064b21d9662631ee70d20dfd8441fcec574 Mon Sep 17 00:00:00 2001
From: Dyneteve <dyneteve@hentaios.com>
Date: Wed, 8 Feb 2023 15:21:01 +0000
Subject: [PATCH 22/22] gmscompat: Make CTS/Play Integrity pass again
The logic behind CTS and Play Integrity has been updated today it now
checks the product and model names against the fingerprint and if
they do not match the CTS profile will fail.
Also while we are at it use a newer FP from Pixel XL and add logging
for key attestation blocking for debugging.
Test: Boot, check for CTS and Play Integrity
Change-Id: I089d5ef935bba40338e10c795ea7d181103ffd15
Signed-off-by: Dyneteve <dyneteve@hentaios.com>
---
.../internal/gmscompat/AttestationHooks.java | 20 +++++++++----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/core/java/com/android/internal/gmscompat/AttestationHooks.java b/core/java/com/android/internal/gmscompat/AttestationHooks.java
index d2b1d2879c9c..ef7a308a25bc 100644
--- a/core/java/com/android/internal/gmscompat/AttestationHooks.java
+++ b/core/java/com/android/internal/gmscompat/AttestationHooks.java
@@ -72,9 +72,11 @@ public final class AttestationHooks {
private static void spoofBuildGms() {
// Alter model name and fingerprint to avoid hardware attestation enforcement
- setBuildField("FINGERPRINT", "google/angler/angler:6.0/MDB08L/2343525:user/release-keys");
- setBuildField("MODEL", Build.MODEL + "\u200b");
- setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.S);
+ setBuildField("FINGERPRINT", "google/marlin/marlin:7.1.2/NJH47F/4146041:user/release-keys");
+ setBuildField("PRODUCT", "marlin");
+ setBuildField("DEVICE", "marlin");
+ setBuildField("MODEL", "Pixel XL");
+ setVersionField("DEVICE_INITIAL_SDK_INT", Build.VERSION_CODES.N_MR1);
}
public static void initApplicationBeforeOnCreate(Application app) {
@@ -90,18 +92,14 @@ public final class AttestationHooks {
}
private static boolean isCallerSafetyNet() {
- return Arrays.stream(Thread.currentThread().getStackTrace())
+ return sIsGms && Arrays.stream(Thread.currentThread().getStackTrace())
.anyMatch(elem -> elem.getClassName().contains("DroidGuard"));
}
public static void onEngineGetCertificateChain() {
- // Check stack for SafetyNet
- if (sIsGms && isCallerSafetyNet()) {
- throw new UnsupportedOperationException();
- }
-
- // Check stack for PlayIntegrity
- if (sIsFinsky) {
+ // Check stack for SafetyNet or Play Integrity
+ if (isCallerSafetyNet() || sIsFinsky) {
+ Log.i(TAG, "Blocked key attestation sIsGms=" + sIsGms + " sIsFinsky=" + sIsFinsky);
throw new UnsupportedOperationException();
}
}
--
2.34.1

View File

@ -1,34 +0,0 @@
From b63b5c1fb46eaf032270bbb65b9a61fe487c5e46 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 26 Jun 2021 14:23:09 +0000
Subject: [PATCH] Jelly: MainActivity: Restore applyThemeColor
Fixes black statusbar on start
Change-Id: I6816f5b1dcb3c7bcaee2736a9e2a3ecd63217bc6
---
app/src/main/java/org/lineageos/jelly/MainActivity.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/org/lineageos/jelly/MainActivity.kt b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
index 0143957..af7191c 100644
--- a/app/src/main/java/org/lineageos/jelly/MainActivity.kt
+++ b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
@@ -192,6 +192,7 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
findViewById(R.id.search_menu_cancel),
this)
setUiMode()
+ applyThemeColor(mThemeColor)
try {
val httpCacheDir = File(cacheDir, "suggestion_responses")
val httpCacheSize = 1024 * 1024.toLong() // 1 MiB
@@ -726,4 +727,4 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
private const val STATE_KEY_THEME_COLOR = "theme_color"
private const val LOCATION_PERM_REQ = 424
}
-}
\ No newline at end of file
+}
--
2.25.1

View File

@ -1,4 +1,4 @@
From 9ee8209308b775f6cd4a104fe1cd89c9645e4742 Mon Sep 17 00:00:00 2001
From 3dda22bc6cad9da7d937218f157fe762dafb5d7d Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Jan 2019 21:44:48 +0800
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
@ -14,10 +14,10 @@ Change-Id: Icb02c8dfd84882f736e37d6cd92c35e5eb288faa
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/res/layout/long_screen_layout.xml b/res/layout/long_screen_layout.xml
index 40d0938..1119cef 100644
index 3252c10..ed4efd9 100644
--- a/res/layout/long_screen_layout.xml
+++ b/res/layout/long_screen_layout.xml
@@ -36,7 +36,7 @@
@@ -25,7 +25,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
@ -27,10 +27,10 @@ index 40d0938..1119cef 100644
android:visibility="gone" />
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 9340e57..63a4b71 100644
index 9823209..a15a439 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -434,9 +434,9 @@
@@ -456,9 +456,9 @@
<string name="display_rotation_90_title">90 度</string>
<string name="display_rotation_180_title">180 度</string>
<string name="display_rotation_270_title">270 度</string>
@ -44,10 +44,10 @@ index 9340e57..63a4b71 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 9fe4181..998a5f6 100644
index 0358a7e..5996a8f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -567,9 +567,9 @@
@@ -579,9 +579,9 @@
<string name="display_rotation_270_title">270 degrees</string>
<!-- Applications: Long screen -->
@ -61,22 +61,22 @@ index 9fe4181..998a5f6 100644
<!-- Sounds: Charging sounds -->
<string name="charging_sounds_settings_title">Charging sounds</string>
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
index ec947fa..20da90a 100644
index 9a4f7bb..ece52c9 100644
--- a/res/xml/long_screen_prefs.xml
+++ b/res/xml/long_screen_prefs.xml
@@ -18,6 +18,6 @@
@@ -6,6 +6,6 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:lineage="http://schemas.android.com/apk/res/org.lineageos.lineageparts"
android:key="long_screen_settings"
- android:title="@string/long_screen_settings_title">
+ android:title="@string/inverse_long_screen_settings_title">
</PreferenceScreen>
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
index 803b214..6f61e9d 100644
index d6b19c0..6e65a31 100644
--- a/res/xml/parts_catalog.xml
+++ b/res/xml/parts_catalog.xml
@@ -81,8 +81,8 @@
@@ -75,8 +75,8 @@
lineage:xmlRes="@xml/power_menu_settings" />
<part android:key="long_screen_settings"
@ -88,10 +88,10 @@ index 803b214..6f61e9d 100644
lineage:xmlRes="@xml/long_screen_prefs" />
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
index ac04058..50ff8f6 100644
index 7155e12..4b89260 100644
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
@@ -246,7 +246,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
@@ -222,7 +222,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
mApplicationsState.ensureIcon(entry);
holder.icon.setImageDrawable(entry.icon);
holder.state.setTag(entry);
@ -101,5 +101,5 @@ index ac04058..50ff8f6 100644
}
--
2.25.1
2.34.1

View File

@ -1,4 +1,4 @@
From 3f7f3f9546f9f23d66381f7dff887cd562285ce6 Mon Sep 17 00:00:00 2001
From c93f729acb568f290085cea4014fbe384ec40289 Mon Sep 17 00:00:00 2001
From: Paul Keith <javelinanddart@gmail.com>
Date: Tue, 30 Oct 2018 15:46:18 +0100
Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
@ -7,6 +7,7 @@ Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
Change-Id: I7194dca022e5062926fa35709de282721ca64320
---
res/drawable/ic_wear_read.xml | 9 +++++++++
res/values-zh-rCN/cm_strings.xml | 1 +
res/values/cm_strings.xml | 3 +++
.../messaging/datamodel/BugleNotifications.java | 14 ++++++++++++++
.../datamodel/MessageNotificationState.java | 8 ++++++++
@ -14,7 +15,7 @@ Change-Id: I7194dca022e5062926fa35709de282721ca64320
.../messaging/receiver/NotificationReceiver.java | 12 +++++++++++-
src/com/android/messaging/ui/UIIntents.java | 11 +++++++++++
src/com/android/messaging/ui/UIIntentsImpl.java | 14 ++++++++++++++
8 files changed, 81 insertions(+), 2 deletions(-)
9 files changed, 82 insertions(+), 2 deletions(-)
create mode 100644 res/drawable/ic_wear_read.xml
diff --git a/res/drawable/ic_wear_read.xml b/res/drawable/ic_wear_read.xml
@ -32,6 +33,17 @@ index 0000000..9d017e6
+ android:fillColor="#ffffff"
+ android:pathData="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z" />
+</vector>
diff --git a/res/values-zh-rCN/cm_strings.xml b/res/values-zh-rCN/cm_strings.xml
index 3cfebff..f1ffeab 100644
--- a/res/values-zh-rCN/cm_strings.xml
+++ b/res/values-zh-rCN/cm_strings.xml
@@ -19,5 +19,6 @@
<string name="swipe_to_delete_conversation_pref_summary">向右滑动以删除会话</string>
<string name="show_emoticons_pref_title">访问表情符号</string>
<string name="show_emoticons_pref_summary">在键盘上显示表情符号键</string>
+ <string name="notification_mark_as_read">标记为已读</string>
<string name="notification_channel_messages_title">短信</string>
</resources>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index f285555..858f093 100644
--- a/res/values/cm_strings.xml
@ -219,5 +231,5 @@ index d64082d..9281899 100644
* Gets a PendingIntent associated with an Intent to start an Activity. All notifications
* that starts an Activity must use this method to get a PendingIntent, which achieves two
--
2.25.1
2.34.1

View File

@ -1,4 +1,4 @@
From d8f9f479012d522aed7377e5996cf7a5265ea268 Mon Sep 17 00:00:00 2001
From 316e6779dde5db01258fcf5139e1d4a33933b114 Mon Sep 17 00:00:00 2001
From: Vachounet <vachounet@live.fr>
Date: Mon, 26 Oct 2020 17:05:18 +0100
Subject: [PATCH] Trebuchet: Move clear all button to actions view
@ -73,10 +73,10 @@ index 0fda0bf8d4..9a6f5ae062 100644
\ No newline at end of file
+</com.android.quickstep.views.OverviewActionsView>
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
index 223eba5b95..75f8baed6b 100644
index 8b5f091e11..601021b5bf 100644
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
@@ -105,7 +105,7 @@ public class RecentsState implements BaseState<RecentsState> {
@@ -106,7 +106,7 @@ public class RecentsState implements BaseState<RecentsState> {
* For this state, whether clear all button should be shown.
*/
public boolean hasClearAllButton() {
@ -86,7 +86,7 @@ index 223eba5b95..75f8baed6b 100644
/**
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index bb8506d26f..e8c18f1d45 100644
index 6c27587058..dbaf180e68 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -143,8 +143,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher
@ -98,12 +98,12 @@ index bb8506d26f..e8c18f1d45 100644
+ boolean hasClearAllButton = false;
setDisallowScrollToClearAll(!hasClearAllButton);
}
}
if (mActivity.getDesktopVisibilityController() != null) {
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 7ad0e48ccb..e888aa2c74 100644
index 5e645ea917..0dc0b3b62e 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -110,6 +110,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
@@ -117,6 +117,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.Interpolator;
@ -111,7 +111,7 @@ index 7ad0e48ccb..e888aa2c74 100644
import android.widget.ListView;
import android.widget.OverScroller;
import android.widget.Toast;
@@ -464,6 +465,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@@ -472,6 +473,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
private final RecentsModel mModel;
private final int mSplitPlaceholderSize;
private final int mSplitPlaceholderInset;
@ -119,7 +119,7 @@ index 7ad0e48ccb..e888aa2c74 100644
private final ClearAllButton mClearAllButton;
private final Rect mClearAllButtonDeadZoneRect = new Rect();
private final Rect mTaskViewDeadZoneRect = new Rect();
@@ -911,6 +913,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@@ -976,6 +978,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mActionsView = actionsView;
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
mSplitSelectStateController = splitController;
@ -128,7 +128,7 @@ index 7ad0e48ccb..e888aa2c74 100644
}
public SplitSelectStateController getSplitSelectController() {
@@ -1230,7 +1234,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@@ -1342,7 +1346,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
* button fully visible, center page is Clear All button.
*/
public boolean isClearAllHidden() {
@ -138,5 +138,5 @@ index 7ad0e48ccb..e888aa2c74 100644
@Override
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From e330d170e8e64c5c7849d0a0c288fb167ee828a8 Mon Sep 17 00:00:00 2001
From 80d66b7f255176e7cf761ce9c62c436cb729df71 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Sep 2019 02:08:22 +0000
Subject: [PATCH 1/2] vendor_lineage: Log privapp-permissions whitelist
Subject: [PATCH 1/3] vendor_lineage: Log privapp-permissions whitelist
violations instead
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
@ -10,7 +10,7 @@ Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/common.mk b/config/common.mk
index 43c36252..52a4bfd4 100644
index 7048c9cb..9dc5c710 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -74,9 +74,9 @@ PRODUCT_COPY_FILES += \
@ -23,8 +23,8 @@ index 43c36252..52a4bfd4 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

@ -1,7 +1,7 @@
From 77bae190086a8c75bd80800487955bb7577cd374 Mon Sep 17 00:00:00 2001
From 9218670153d5aa40fd05f51d89240fc7859293a2 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 14 Mar 2022 03:44:59 +0000
Subject: [PATCH 2/2] Revert "overlay: Default to night mode"
Subject: [PATCH 2/3] Revert "overlay: Default to night mode"
This reverts commit 4d4e39a845d54e37b20728f1448ae6e3fde4b97d.
@ -11,7 +11,7 @@ Change-Id: I036bdd576e536392cf41e3c536d5ca2eb04e5a0f
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 3b6eedce..fccecf90 100644
index 94687fe1..579b98f7 100644
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
@@ -146,14 +146,6 @@

View File

@ -0,0 +1,25 @@
From 9218670153d5aa40fd05f51d89240fc7859293a2 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 14 Mar 2022 03:44:59 +0000
Subject: [PATCH 5/5] Fix APN on CatS22Flip
This reverts commit I2833bc1764a311eef7ebc170cfa1e25cbefb3737.
Change-Id: I036bdd576e536392cf41e3c536d5ca2eb04e5a02
---
.../prebuild/common/etc/apns-conf.xml | 2 --------
1 file changed, 2 insertion(-)
diff --git a/prebuilt/common/etc/apns-conf.xml b/prebuilt/common/etc/apns-conf.xml
index a7c9e2d8..81716d39 100644
--- a/prebuilt/common/etc/apns-conf.xml
+++ b/prebuilt/common/etc/apns-conf.xml
@@ -22,6 +22,8 @@
<!-- This version must agree with that in apps/common/res/apns.xml -->
<!-- Possible values for auth_type: 0 (None), 1 (PAP), 2 (CHAP), 3 (PAP or CHAP) -->
<apns version="8">
+ <apn carrier="PHH IMS" mcc="310" mnc="240" apn="ims" type="ims" protocol="IPV4V6" roaming_protocol="IPV4V6" />
+ <apn carrier="Boost Mobile" mcc="310" mnc="240" apn="wireless.dish.com" mmsc="http://wholesale.mmsmvno.com/mms/wapenc" protocol="IPV4V6" roaming_protocol="IPV4V6" type="default,admin,fota,mms,supl,hipri,internet,dun" mvno_type="gid" mvno_match_data="6430" />
<apn carrier="Test Internet" mcc="001" mnc="01" apn="VZWINTERNET" type="default,dun,supl" protocol="IPV4V6" roaming_protocol="IPV4V6" />
<apn carrier="Test FOTA" mcc="001" mnc="01" apn="VZWADMIN" type="fota" protocol="IPV4V6" roaming_protocol="IPV4V6" />
<apn carrier="Test IMS" mcc="001" mnc="01" apn="VZWIMS" type="ims" protocol="IPV4V6" roaming_protocol="IPV4V6" />

View File

@ -0,0 +1,52 @@
From 64c0e12dc7a4eb6add7631a84dda17e2012f687c Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 18 Jun 2023 19:33:27 +0800
Subject: [PATCH 01/21] Add keylayout for Backbone One for Android, with AB/XY
keys swapped
Change-Id: Ia057c084099015b544c926cd57c37b4ac314867a
---
data/keyboards/Vendor_358a_Product_0201.kl | 31 ++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 data/keyboards/Vendor_358a_Product_0201.kl
diff --git a/data/keyboards/Vendor_358a_Product_0201.kl b/data/keyboards/Vendor_358a_Product_0201.kl
new file mode 100644
index 000000000000..e15907f9c6f2
--- /dev/null
+++ b/data/keyboards/Vendor_358a_Product_0201.kl
@@ -0,0 +1,31 @@
+#
+# Backbone One for Android
+#
+
+# AB/XY swapped
+key 305 BUTTON_A
+key 304 BUTTON_B
+key 308 BUTTON_X
+key 307 BUTTON_Y
+
+key 310 BUTTON_L1
+key 311 BUTTON_R1
+key 312 BUTTON_L2
+key 313 BUTTON_R2
+
+key 317 BUTTON_THUMBL
+key 318 BUTTON_THUMBR
+
+axis 0x00 X flat 4096
+axis 0x01 Y flat 4096
+axis 0x02 Z flat 4096
+axis 0x05 RZ flat 4096
+
+axis 0x0a LTRIGGER
+axis 0x09 RTRIGGER
+
+axis 0x10 HAT_X
+axis 0x11 HAT_Y
+
+key 315 BUTTON_START
+key 314 BUTTON_SELECT
--
2.34.1

View File

@ -1,7 +1,7 @@
From cfdeeceda335538663684b6a3d7bc7c2ad25eaf9 Mon Sep 17 00:00:00 2001
From 2e9df83d63b2c316a6cec6fcbc253ef0919cf5d3 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 01/21] Add MiuiNavbarOverlay
Subject: [PATCH 02/21] Add MiuiNavbarOverlay
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
---
@ -385,5 +385,5 @@ literal 0
HcmV?d00001
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 8c24a74eb289bdf3abeed57d490ccf1073f14677 Mon Sep 17 00:00:00 2001
From cf35535a94712e9f81d9532fa4a494a8628b4641 Mon Sep 17 00:00:00 2001
From: Hikari-no-Tenshi <kyryljan.serhij@gmail.com>
Date: Thu, 30 Jan 2020 22:20:54 +0200
Subject: [PATCH 02/21] Disable Bluetooth by default
Subject: [PATCH 03/21] Disable Bluetooth by default
Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c
---
@ -9,7 +9,7 @@ Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 7732da40aac2..1d2c343a4514 100644
index 99b15db780dc..cff3e668f053 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -36,7 +36,7 @@
@ -22,5 +22,5 @@ index 7732da40aac2..1d2c343a4514 100644
<bool name="def_install_non_market_apps">false</bool>
<!-- 0 == off, 3 == on -->
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From c15f13abb5819da69fc6906d30f8507fd27f1e4b Mon Sep 17 00:00:00 2001
From 8201fef9ab532374796549c938ea2fc172bf20f5 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/21] Disable cursor drag by default for editable TextViews
Subject: [PATCH 04/21] Disable cursor drag by default for editable TextViews
Requested by @TadiT7
@ -24,5 +24,5 @@ index fb40ee5ec843..c0c6fb6e9431 100644
/**
* Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 89c3645edd918789933549bf9be38ea7a7cd1184 Mon Sep 17 00:00:00 2001
From 0dba3680960846702881fed2b3e716825af92d58 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 3 Jul 2022 00:08:42 +0000
Subject: [PATCH 04/21] Disable "RESTRICTED bucket" toast
Subject: [PATCH 05/21] Disable "RESTRICTED bucket" toast
Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8
---
@ -9,10 +9,10 @@ Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
index 5d9f3357125a..49d3c8de7b80 100644
index b27ff411dd58..5ce49bd98c5c 100644
--- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
+++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java
@@ -1759,25 +1759,7 @@ public class AppStandbyController
@@ -1792,25 +1792,7 @@ public class AppStandbyController
.noteRestrictionAttempt(packageName, userId, elapsedRealtime, reason);
if (isForcedByUser) {
@ -40,5 +40,5 @@ index 5d9f3357125a..49d3c8de7b80 100644
final long timeUntilRestrictPossibleMs = app.lastUsedByUserElapsedTime
+ mInjector.getAutoRestrictedBucketDelayMs() - elapsedRealtime;
--
2.25.1
2.34.1

View File

@ -1,25 +1,90 @@
From 3eb0073c25efb72c691cf8058385ebb74259ccac Mon Sep 17 00:00:00 2001
From c16a1a66b9e311a2dfbf1925d8f17783933571e5 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 2 Sep 2021 16:15:19 +0000
Subject: [PATCH 05/21] Keyguard: Adjust clock style
Subject: [PATCH 06/21] Keyguard: Adjust clock style
Thinner font, less padding and unintrusive colors
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
---
.../customization/res/layout/clock_default_large.xml | 1 +
.../customization/res/layout/clock_default_small.xml | 2 +-
packages/SystemUI/customization/res/values/colors.xml | 5 +++++
.../android/systemui/shared/clocks/AnimatableClockView.kt | 2 +-
.../systemui/shared/clocks/DefaultClockController.kt | 4 ++--
.../SystemUI/res-keyguard/layout/keyguard_slice_view.xml | 2 +-
packages/SystemUI/res-keyguard/values/dimens.xml | 6 +++---
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
packages/SystemUI/res/values/styles.xml | 4 ++--
packages/SystemUI/shared/res/layout/clock_default_large.xml | 1 +
packages/SystemUI/shared/res/layout/clock_default_small.xml | 2 +-
packages/SystemUI/shared/res/values/colors.xml | 5 +++++
.../android/systemui/shared/clocks/AnimatableClockView.kt | 2 +-
.../android/systemui/shared/clocks/DefaultClockProvider.kt | 4 ++--
10 files changed, 17 insertions(+), 13 deletions(-)
create mode 100644 packages/SystemUI/shared/res/values/colors.xml
create mode 100644 packages/SystemUI/customization/res/values/colors.xml
diff --git a/packages/SystemUI/customization/res/layout/clock_default_large.xml b/packages/SystemUI/customization/res/layout/clock_default_large.xml
index 0139d50dcfba..9f5ca7b89213 100644
--- a/packages/SystemUI/customization/res/layout/clock_default_large.xml
+++ b/packages/SystemUI/customization/res/layout/clock_default_large.xml
@@ -26,6 +26,7 @@
android:fontFamily="@*android:string/config_clockFontFamily"
android:typeface="monospace"
android:elegantTextHeight="false"
+ android:fontFeatureSettings="tnum"
chargeAnimationDelay="200"
dozeWeight="200"
lockScreenWeight="400" />
diff --git a/packages/SystemUI/customization/res/layout/clock_default_small.xml b/packages/SystemUI/customization/res/layout/clock_default_small.xml
index ff6d7f9e2240..b63ffce20671 100644
--- a/packages/SystemUI/customization/res/layout/clock_default_small.xml
+++ b/packages/SystemUI/customization/res/layout/clock_default_small.xml
@@ -27,7 +27,7 @@
android:elegantTextHeight="false"
android:ellipsize="none"
android:singleLine="true"
- android:fontFeatureSettings="pnum"
+ android:fontFeatureSettings="tnum"
chargeAnimationDelay="350"
dozeWeight="200"
lockScreenWeight="400" />
diff --git a/packages/SystemUI/customization/res/values/colors.xml b/packages/SystemUI/customization/res/values/colors.xml
new file mode 100644
index 000000000000..f80af4376ff1
--- /dev/null
+++ b/packages/SystemUI/customization/res/values/colors.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="clock_default_color_dark">@*android:color/primary_text_material_dark</color>
+ <color name="clock_default_color_light">@*android:color/primary_text_material_light</color>
+</resources>
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
index 86bd5f2bff5a..b99a8ba487cb 100644
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
@@ -146,7 +146,7 @@ class AnimatableClockView @JvmOverloads constructor(
fun refreshTime() {
time.timeInMillis = timeOverrideInMillis ?: System.currentTimeMillis()
contentDescription = DateFormat.format(descFormat, time)
- val formattedText = DateFormat.format(format, time)
+ val formattedText = DateFormat.format(format, time).toString() + ' '
logBuffer?.log(TAG, DEBUG,
{ str1 = formattedText?.toString() },
{ "refreshTime: new formattedText=$str1" }
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
index 4df7a44d3e1d..447160a8cb63 100644
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
@@ -143,9 +143,9 @@ class DefaultClockController(
if (seedColor != null) {
seedColor!!
} else if (isRegionDark) {
- resources.getColor(android.R.color.system_accent1_100)
+ resources.getColor(R.color.clock_default_color_dark)
} else {
- resources.getColor(android.R.color.system_accent2_600)
+ resources.getColor(R.color.clock_default_color_light)
}
if (currentColor == color) {
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
index 7c5dbc247428..64657547621f 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_slice_view.xml
@ -34,7 +99,7 @@ index 7c5dbc247428..64657547621f 100644
/>
</com.android.keyguard.KeyguardSliceView>
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
index 46f6ab2399d1..6fce16ced94f 100644
index edd6eff92c1c..14df77dc4a4e 100644
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -91,10 +91,10 @@
@ -52,7 +117,7 @@ index 46f6ab2399d1..6fce16ced94f 100644
<!-- 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 a1d12668d27a..955e24e01a9a 100644
index 04dffb6e8c52..c81e018702bb 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -117,8 +117,6 @@
@ -65,10 +130,10 @@ index a1d12668d27a..955e24e01a9a 100644
<style name="TextAppearance.Keyguard.Secondary">
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index d27fa192e741..2480d0189e16 100644
index 8b8594032816..9135e78f3e4c 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -91,7 +91,7 @@
@@ -74,7 +74,7 @@
android:gravity="center_vertical"
android:ellipsize="marquee"
android:textDirection="locale"
@ -78,19 +143,19 @@ index d27fa192e741..2480d0189e16 100644
android:singleLine="true"
systemui:showMissingSim="true"
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index a10878709364..78fd8ab3b324 100644
index 892c2f4caa39..6996e41e08da 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -276,7 +276,7 @@
@@ -302,7 +302,7 @@
<item name="darkIconTheme">@style/DualToneDarkTheme</item>
<item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
- <item name="wallpaperTextColorAccent">@color/material_dynamic_primary90</item>
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_dark</item>
<item name="android:colorError">@*android:color/error_color_material_dark</item>
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
<item name="passwordStyle">@style/PasswordTheme</item>
@@ -292,7 +292,7 @@
<item name="*android:lockPatternStyle">@style/LockPatternViewStyle</item>
<item name="lockPatternStyle">@style/LockPatternContainerStyle</item>
@@ -324,7 +324,7 @@
<style name="Theme.SystemUI.LightWallpaper">
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
@ -99,71 +164,6 @@ index a10878709364..78fd8ab3b324 100644
<item name="android:colorError">@*android:color/error_color_material_light</item>
<item name="shadowRadius">0</item>
diff --git a/packages/SystemUI/shared/res/layout/clock_default_large.xml b/packages/SystemUI/shared/res/layout/clock_default_large.xml
index 0139d50dcfba..9f5ca7b89213 100644
--- a/packages/SystemUI/shared/res/layout/clock_default_large.xml
+++ b/packages/SystemUI/shared/res/layout/clock_default_large.xml
@@ -26,6 +26,7 @@
android:fontFamily="@*android:string/config_clockFontFamily"
android:typeface="monospace"
android:elegantTextHeight="false"
+ android:fontFeatureSettings="tnum"
chargeAnimationDelay="200"
dozeWeight="200"
lockScreenWeight="400" />
diff --git a/packages/SystemUI/shared/res/layout/clock_default_small.xml b/packages/SystemUI/shared/res/layout/clock_default_small.xml
index ff6d7f9e2240..b63ffce20671 100644
--- a/packages/SystemUI/shared/res/layout/clock_default_small.xml
+++ b/packages/SystemUI/shared/res/layout/clock_default_small.xml
@@ -27,7 +27,7 @@
android:elegantTextHeight="false"
android:ellipsize="none"
android:singleLine="true"
- android:fontFeatureSettings="pnum"
+ android:fontFeatureSettings="tnum"
chargeAnimationDelay="350"
dozeWeight="200"
lockScreenWeight="400" />
diff --git a/packages/SystemUI/shared/res/values/colors.xml b/packages/SystemUI/shared/res/values/colors.xml
new file mode 100644
index 000000000000..f80af4376ff1
--- /dev/null
+++ b/packages/SystemUI/shared/res/values/colors.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="clock_default_color_dark">@*android:color/primary_text_material_dark</color>
+ <color name="clock_default_color_light">@*android:color/primary_text_material_light</color>
+</resources>
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/AnimatableClockView.kt b/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
index c2e74456c032..555c20bfed9c 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/AnimatableClockView.kt
@@ -148,7 +148,7 @@ class AnimatableClockView @JvmOverloads constructor(
fun refreshTime() {
time.timeInMillis = timeOverrideInMillis ?: System.currentTimeMillis()
contentDescription = DateFormat.format(descFormat, time)
- val formattedText = DateFormat.format(format, time)
+ val formattedText = DateFormat.format(format, time).toString() + ' '
// Setting text actually triggers a layout pass (because the text view is set to
// wrap_content width and TextView always relayouts for this). Avoid needless
// relayout if the text didn't actually change.
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt b/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
index 19ac2e479bcb..92a05c540f94 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
@@ -230,9 +230,9 @@ class DefaultClock(
private fun updateClockColor(clock: AnimatableClockView, isRegionDark: Boolean) {
val color = if (isRegionDark) {
- resources.getColor(android.R.color.system_accent1_100)
+ resources.getColor(R.color.clock_default_color_dark)
} else {
- resources.getColor(android.R.color.system_accent2_600)
+ resources.getColor(R.color.clock_default_color_light)
}
clock.setColors(DOZE_COLOR, color)
clock.animateAppearOnLockscreen()
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From a75f9906f81debf9940b3e9b54ddb05205d1b5fc Mon Sep 17 00:00:00 2001
From c9d2af70d90a8cf81dae5bfba93d6f59c0373bdb Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 2 Nov 2019 06:41:03 +0000
Subject: [PATCH 06/21] Keyguard: Hide padlock unless UDFPS is in use
Subject: [PATCH 07/21] Keyguard: Hide padlock unless UDFPS is in use
Fair enough Google, but don't give me that otherwise
@ -11,10 +11,10 @@ Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
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 2a3667610f9c..12905c70fc21 100644
index 0887b220dee1..423549dd3ab2 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
@@ -295,20 +295,14 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
return;
}
@ -39,5 +39,5 @@ index 2a3667610f9c..12905c70fc21 100644
// fp icon was shown by UdfpsView, and now we still want to animate the transition
// in this drawable
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 9f0dbda9fb7f965f994a374c2194c81fc2a36c65 Mon Sep 17 00:00:00 2001
From ff1164da64003d5a6d6e57fd75ba1d8684167dd7 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 1 Sep 2021 14:41:53 +0000
Subject: [PATCH 07/21] Keyguard: Never switch to large clock
Subject: [PATCH 08/21] Keyguard: Never switch to large clock
It looks alright actually, but as always breaks under landscape
@ -11,10 +11,10 @@ Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
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 2165099b474e..3b137c932139 100644
index ba217804c96e..ab3391372e2c 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
@@ -376,7 +376,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
@@ -470,7 +470,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
private void updateDoubleLineClock() {
mCanShowDoubleLineClock = mSecureSettings.getIntForUser(
@ -24,5 +24,5 @@ index 2165099b474e..3b137c932139 100644
if (!mCanShowDoubleLineClock) {
--
2.25.1
2.34.1

View File

@ -1,20 +1,20 @@
From 5ccbd8949c23e2d21ff0dc36d1915418803c2d19 Mon Sep 17 00:00:00 2001
From a8a951832a14ed9fb5e718a14c4dc9ec73d24693 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/21] Keyguard: Refine indication text
Subject: [PATCH 09/21] Keyguard: Refine indication text
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
---
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
.../SystemUI/res/layout/keyguard_bottom_area.xml | 1 +
.../SystemUI/res-keyguard/values/styles.xml | 2 --
.../res/layout/keyguard_bottom_area.xml | 1 +
packages/SystemUI/res/values/dimens.xml | 3 +--
.../KeyguardIndicationRotateTextViewController.java | 12 +++++++++++-
.../statusbar/KeyguardIndicationController.java | 7 ++++---
.../statusbar/phone/KeyguardIndicationTextView.java | 2 +-
6 files changed, 18 insertions(+), 9 deletions(-)
...ardIndicationRotateTextViewController.java | 12 ++++++++++-
.../KeyguardIndicationController.java | 21 ++-----------------
.../phone/KeyguardIndicationTextView.java | 2 +-
6 files changed, 16 insertions(+), 25 deletions(-)
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index 955e24e01a9a..58c6919971a1 100644
index c81e018702bb..cc87f9f3d7cf 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -132,8 +132,6 @@
@ -27,7 +27,7 @@ index 955e24e01a9a..58c6919971a1 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 8df8c49ee057..ff616b66790d 100644
index 4048a39344bd..2f884baf0bd5 100644
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
@@ -35,6 +35,7 @@
@ -39,16 +39,16 @@ index 8df8c49ee057..ff616b66790d 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 9c85fbc4b391..44766f3b6a6d 100644
index ceebab2b08ef..e2c65f5542b7 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -760,11 +760,10 @@
@@ -815,11 +815,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">110dp</dimen>
<dimen name="lock_icon_margin_bottom">74dp</dimen>
<dimen name="ambient_indication_margin_bottom">71dp</dimen>
-
@ -56,10 +56,10 @@ index 9c85fbc4b391..44766f3b6a6d 100644
<dimen name="double_tap_slop">32dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
index f84a5e39163f..38baa611cf07 100644
index 0745456b3e43..0fc0b9e29fb7 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
@@ -220,12 +220,22 @@ public class KeyguardIndicationRotateTextViewController extends
@@ -224,12 +224,22 @@ public class KeyguardIndicationRotateTextViewController extends
}
/**
@ -67,7 +67,7 @@ index f84a5e39163f..38baa611cf07 100644
+ * @return true if there are available non-resting indications to show.
*/
public boolean hasIndications() {
+ if (hasIndication(INDICATION_TYPE_RESTING)) {
+ if (hasIndication(INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE)) {
+ return mIndicationMessages.keySet().size() > 1;
+ }
return mIndicationMessages.keySet().size() > 0;
@ -84,39 +84,56 @@ index f84a5e39163f..38baa611cf07 100644
* 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 073ab8b16864..5fb3c05c4a2a 100644
index 2b3444e64acb..b8567d17785a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -267,10 +267,12 @@ public class KeyguardIndicationController {
public void handleMessage(Message msg) {
if (msg.what == MSG_HIDE_TRANSIENT) {
hideTransientIndication();
+ updateLockScreenIndications(false /* animate */, KeyguardUpdateMonitor.getCurrentUser());
} else if (msg.what == MSG_SHOW_ACTION_TO_UNLOCK) {
showActionToUnlock();
} else if (msg.what == MSG_HIDE_BIOMETRIC_MESSAGE) {
hideBiometricMessage();
+ updateLockScreenIndications(false /* animate */, KeyguardUpdateMonitor.getCurrentUser());
} else if (msg.what == MSG_RESET_ERROR_MESSAGE_ON_SCREEN_ON) {
mBiometricErrorMessageToShowOnScreenOn = null;
@@ -407,7 +407,6 @@ public class KeyguardIndicationController {
updateLockScreenDisclosureMsg();
updateLockScreenOwnerInfo();
updateLockScreenBatteryMsg(animate);
- updateLockScreenUserLockedMsg(userId);
updateLockScreenTrustMsg(userId, getTrustGrantedIndication(), getTrustManagedIndication());
updateLockScreenAlignmentMsg();
updateLockScreenLogoutView();
@@ -518,22 +517,6 @@ public class KeyguardIndicationController {
}
@@ -588,12 +590,11 @@ public class KeyguardIndicationController {
}
private void updateLockScreenRestingMsg() {
- if (!TextUtils.isEmpty(mRestingIndication)
- && !mRotateTextViewController.hasIndications()) {
- private void updateLockScreenUserLockedMsg(int userId) {
- if (!mKeyguardUpdateMonitor.isUserUnlocked(userId)
- || mKeyguardUpdateMonitor.isEncryptedOrLockdown(userId)) {
- mRotateTextViewController.updateIndication(
- INDICATION_TYPE_USER_LOCKED,
- new KeyguardIndication.Builder()
- .setMessage(mContext.getResources().getText(
- com.android.internal.R.string.lockscreen_storage_locked))
- .setTextColor(mInitialTextColorState)
- .build(),
- false);
- } else {
- mRotateTextViewController.hideIndication(INDICATION_TYPE_USER_LOCKED);
- }
- }
-
private void updateBiometricMessage() {
if (mDozing) {
updateDeviceEntryIndication(false);
@@ -626,11 +609,11 @@ public class KeyguardIndicationController {
}
private void updateLockScreenPersistentUnlockMsg() {
- if (!TextUtils.isEmpty(mPersistentUnlockMessage)) {
+ if (!mRotateTextViewController.hasIndications()) {
mRotateTextViewController.updateIndication(
INDICATION_TYPE_RESTING,
INDICATION_TYPE_PERSISTENT_UNLOCK_MESSAGE,
new KeyguardIndication.Builder()
- .setMessage(mRestingIndication)
- .setMessage(mPersistentUnlockMessage)
+ .setMessage(mContext.getResources().getString(R.string.keyguard_unlock))
.setTextColor(mInitialTextColorState)
.build(),
false);
true);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
index d24469e8421e..647c766aa0f0 100644
index 9d30cb4c4852..f179194fb0e1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
@@ -46,7 +46,7 @@ public class KeyguardIndicationTextView extends TextView {
@ -129,5 +146,5 @@ index d24469e8421e..647c766aa0f0 100644
private KeyguardIndication mKeyguardIndicationInfo;
--
2.25.1
2.34.1

View File

@ -1,128 +0,0 @@
From cccdc9392402135535e81d35bb1c8d62222f061f Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 29 Dec 2022 02:53:16 +0000
Subject: [PATCH 09/21] Revert "SystemUI: Align QS header with status bar"
This reverts commit 8658042a3c1c662f6a14ea3bf311e1e6b07f785e.
---
.../res/layout/quick_qs_status_icons.xml | 3 +++
.../quick_status_bar_header_date_privacy.xml | 4 +++-
.../systemui/qs/QuickStatusBarHeader.java | 23 ++++++++-----------
3 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
index 9feec09dd52a..7a370d8cbc48 100644
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
@@ -21,6 +21,7 @@
android:layout_height="@*android:dimen/quick_qs_offset_height"
android:clipChildren="false"
android:clipToPadding="false"
+ android:minHeight="@dimen/qs_header_row_min_height"
android:clickable="false"
android:focusable="true"
android:theme="@style/QSHeaderTheme">
@@ -38,6 +39,7 @@
android:id="@+id/clock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
+ 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"
@@ -62,6 +64,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
+ android:minHeight="@dimen/qs_header_row_min_height"
android:minWidth="48dp"
android:layout_marginStart="8dp"
android:layout_gravity="end|center_vertical"
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
index 2220bbbb76a5..60bc3732cde0 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
@@ -25,12 +25,14 @@
android:gravity="center"
android:layout_gravity="top"
android:orientation="horizontal"
- android:clickable="true">
+ android:clickable="true"
+ android:minHeight="48dp">
<FrameLayout
android:id="@+id/date_container"
android:layout_width="0dp"
android:layout_height="match_parent"
+ android:minHeight="48dp"
android:layout_weight="1"
android:gravity="center_vertical|start" >
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index 04ace4dc2f3a..614b0c03c696 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -106,7 +106,6 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private StatusBarContentInsetsProvider mInsetsProvider;
private int mRoundedCornerPadding = 0;
- private int mStatusBarPaddingTop;
private int mWaterfallTopInset;
private int mCutOutPaddingLeft;
private int mCutOutPaddingRight;
@@ -270,20 +269,19 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mRoundedCornerPadding = resources.getDimensionPixelSize(
R.dimen.rounded_corner_content_padding);
- int statusBarHeight = SystemBarUtils.getStatusBarHeight(mContext);
+ int qsOffsetHeight = SystemBarUtils.getQuickQsOffsetHeight(mContext);
- mStatusBarPaddingTop = resources.getDimensionPixelSize(
- R.dimen.status_bar_padding_top);
-
- mDatePrivacyView.getLayoutParams().height = statusBarHeight;
+ mDatePrivacyView.getLayoutParams().height =
+ Math.max(qsOffsetHeight, mDatePrivacyView.getMinimumHeight());
mDatePrivacyView.setLayoutParams(mDatePrivacyView.getLayoutParams());
- mStatusIconsView.getLayoutParams().height = statusBarHeight;
+ mStatusIconsView.getLayoutParams().height =
+ Math.max(qsOffsetHeight, mStatusIconsView.getMinimumHeight());
mStatusIconsView.setLayoutParams(mStatusIconsView.getLayoutParams());
ViewGroup.LayoutParams lp = getLayoutParams();
if (mQsDisabled) {
- lp.height = mStatusIconsView.getLayoutParams().height - mWaterfallTopInset;
+ lp.height = mStatusIconsView.getLayoutParams().height;
} else {
lp.height = WRAP_CONTENT;
}
@@ -307,9 +305,8 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
}
MarginLayoutParams qqsLP = (MarginLayoutParams) mHeaderQsPanel.getLayoutParams();
- qqsLP.topMargin = largeScreenHeaderActive || !mUseCombinedQSHeader
- ? mContext.getResources().getDimensionPixelSize(R.dimen.qqs_layout_margin_top)
- : SystemBarUtils.getQuickQsOffsetHeight(mContext);
+ qqsLP.topMargin = largeScreenHeaderActive || !mUseCombinedQSHeader ? mContext.getResources()
+ .getDimensionPixelSize(R.dimen.qqs_layout_margin_top) : qsOffsetHeight;
mHeaderQsPanel.setLayoutParams(qqsLP);
updateBatteryMode();
@@ -556,11 +553,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
}
mDatePrivacyView.setPadding(paddingLeft,
- mStatusBarPaddingTop,
+ mWaterfallTopInset,
paddingRight,
0);
mStatusIconsView.setPadding(paddingLeft,
- mStatusBarPaddingTop,
+ mWaterfallTopInset,
paddingRight,
0);
}
--
2.25.1

View File

@ -1,10 +1,10 @@
From 790f729ba423a331c05ead93c0baadc0cc3a5eff Mon Sep 17 00:00:00 2001
From 0425dac4b2f22dc37e117b55a0fdefe91f6e2ebb Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 20 Mar 2021 10:35:14 +0000
Subject: [PATCH 10/21] Keyguard/UI: Fix status bar / quick settings margins
and paddings
Last revised on 2022/09/24, targeting T
Last revised on 2023/03/22, targeting T QPR2
The way I think SB/QS margins/paddings should work:
- Devices with left notch: [notch_definition][status_bar_padding_start][content]...[content][status_bar_padding_end][rounded_corner_content_padding]
@ -14,28 +14,37 @@ Key point being:
- Notch definition should only be the notch itself, without additional padding
- Instead, these paddings should be covered by status_bar_padding_{start|end}
As a result, below changes have been made:
- Change keyguard_carrier_text_margin into a padding
- Link keyguard paddings to status_bar_padding_{start|end}
- Change keyguard_carrier_text_margin into a padding and link to status_bar_padding_start
- Add status_bar_padding_{start|end} to quick settings header
- Remove several unnecessary margins and paddings
- Animate padding for new QS clock in s-qpr1
- Remove unnecessary margins and paddings if any
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
---
.../res/layout/keyguard_status_bar.xml | 2 +-
.../res/layout/quick_qs_status_icons.xml | 6 ---
.../quick_status_bar_header_date_privacy.xml | 5 +-
.../SystemUI/res/values-sw600dp/dimens.xml | 3 --
packages/SystemUI/res/layout/combined_qs_header.xml | 2 +-
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
packages/SystemUI/res/values-sw600dp/dimens.xml | 3 ---
packages/SystemUI/res/values/dimens.xml | 2 +-
.../systemui/qs/QuickStatusBarHeader.java | 50 ++++++++++++-------
.../phone/KeyguardStatusBarView.java | 7 ---
7 files changed, 35 insertions(+), 40 deletions(-)
packages/SystemUI/res/xml/qqs_header.xml | 4 ++--
.../android/systemui/shade/ShadeHeaderController.kt | 10 +++++++---
.../statusbar/phone/KeyguardStatusBarView.java | 7 -------
7 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/packages/SystemUI/res/layout/combined_qs_header.xml b/packages/SystemUI/res/layout/combined_qs_header.xml
index 828a4535e656..65c8e52d00ac 100644
--- a/packages/SystemUI/res/layout/combined_qs_header.xml
+++ b/packages/SystemUI/res/layout/combined_qs_header.xml
@@ -151,4 +151,4 @@
</FrameLayout>
-</com.android.systemui.util.NoRemeasureMotionLayout>
\ No newline at end of file
+</com.android.systemui.util.NoRemeasureMotionLayout>
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index 2480d0189e16..5561271d4733 100644
index 9135e78f3e4c..ddaea938c858 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -86,7 +86,7 @@
@@ -69,7 +69,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/status_bar_padding_top"
@ -44,92 +53,25 @@ index 2480d0189e16..5561271d4733 100644
android:layout_toStartOf="@id/system_icons_container"
android:gravity="center_vertical"
android:ellipsize="marquee"
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
index 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="@dimen/qs_header_row_min_height"
android:clickable="false"
android:focusable="true"
android:theme="@style/QSHeaderTheme">
@@ -39,10 +38,7 @@
android:id="@+id/clock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:minHeight="@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"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.QS.Status" />
@@ -50,7 +46,6 @@
android:id="@+id/date_clock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_marginStart="@dimen/status_bar_left_clock_end_padding"
android:gravity="center_vertical|start"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.QS.Status"
@@ -64,7 +59,6 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:minHeight="@dimen/qs_header_row_min_height"
android:minWidth="48dp"
android:layout_marginStart="8dp"
android:layout_gravity="end|center_vertical"
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
index 60bc3732cde0..6ba9382bea94 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
@@ -25,14 +25,12 @@
android:gravity="center"
android:layout_gravity="top"
android:orientation="horizontal"
- android:clickable="true"
- android:minHeight="48dp">
+ android:clickable="true">
<FrameLayout
android:id="@+id/date_container"
android:layout_width="0dp"
android:layout_height="match_parent"
- android:minHeight="48dp"
android:layout_weight="1"
android:gravity="center_vertical|start" >
@@ -64,7 +62,6 @@
android:id="@+id/privacy_container"
android:layout_width="0dp"
android:layout_height="match_parent"
- android:minHeight="48dp"
android:layout_weight="1"
android:gravity="center_vertical|end" >
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 599bf30a5135..f9911fda7dbe 100644
index 59becc69506c..9168a5ce1ced 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -27,9 +27,6 @@
@@ -28,9 +28,6 @@
<!-- The width of user avatar when on Keyguard -->
<dimen name="multi_user_avatar_keyguard_size">30dp</dimen>
- <!-- Margin on the left side of the carrier text on Keyguard -->
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
-
<!-- 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>
<!-- 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 44766f3b6a6d..569926a1e1a0 100644
index e2c65f5542b7..d0a9055e1905 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -736,7 +736,7 @@
@@ -790,7 +790,7 @@
<dimen name="kg_framed_avatar_size">32dp</dimen>
<!-- Margin on the left side of the carrier text on Keyguard -->
@ -138,112 +80,72 @@ index 44766f3b6a6d..569926a1e1a0 100644
<!-- 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 614b0c03c696..55d7336e5c39 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -106,6 +106,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private StatusBarContentInsetsProvider mInsetsProvider;
diff --git a/packages/SystemUI/res/xml/qqs_header.xml b/packages/SystemUI/res/xml/qqs_header.xml
index 00a0444a1c9d..a5c3f8e982ca 100644
--- a/packages/SystemUI/res/xml/qqs_header.xml
+++ b/packages/SystemUI/res/xml/qqs_header.xml
@@ -44,7 +44,7 @@
<Layout
android:layout_width="wrap_content"
android:layout_height="@dimen/new_qs_header_non_clickable_element_height"
- android:layout_marginStart="8dp"
+ android:layout_marginStart="2dp"
app:layout_constrainedWidth="true"
app:layout_constraintStart_toEndOf="@id/clock"
app:layout_constraintEnd_toStartOf="@id/barrier"
@@ -109,4 +109,4 @@
app:layout_constraintHorizontal_bias="1"
/>
</Constraint>
-</ConstraintSet>
\ No newline at end of file
+</ConstraintSet>
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
index a6b88370f836..e7632971d37e 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
@@ -132,6 +132,8 @@ constructor(
private int mRoundedCornerPadding = 0;
+ private int mStatusBarPaddingStart;
+ private int mStatusBarPaddingEnd;
+ private int mHeaderPaddingLeft;
+ private int mHeaderPaddingRight;
private int mWaterfallTopInset;
private int mCutOutPaddingLeft;
private int mCutOutPaddingRight;
@@ -269,6 +273,11 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
mRoundedCornerPadding = resources.getDimensionPixelSize(
R.dimen.rounded_corner_content_padding);
private var roundedCorners = 0
private var cutout: DisplayCutout? = null
+ private var statusBarPaddingStart = 0
+ private var statusBarPaddingEnd = 0
private var lastInsets: WindowInsets? = null
private var textColorPrimary = Color.TRANSPARENT
+ mStatusBarPaddingStart = resources.getDimensionPixelSize(
+ R.dimen.status_bar_padding_start);
+ mStatusBarPaddingEnd = resources.getDimensionPixelSize(
+ R.dimen.status_bar_padding_end);
+
int qsOffsetHeight = SystemBarUtils.getQuickQsOffsetHeight(mContext);
@@ -364,14 +366,17 @@ constructor(
val cutoutLeft = sbInsets.first
val cutoutRight = sbInsets.second
val hasCornerCutout: Boolean = insetsProvider.currentRotationHasCornerCutout()
+ roundedCorners = resources.getDimensionPixelSize(R.dimen.rounded_corner_content_padding)
+ statusBarPaddingStart = resources.getDimensionPixelSize(R.dimen.status_bar_padding_start)
+ statusBarPaddingEnd = resources.getDimensionPixelSize(R.dimen.status_bar_padding_end)
updateQQSPaddings()
// Set these guides as the left/right limits for content that lives in the top row, using
// cutoutLeft and cutoutRight
var changes =
combinedShadeHeadersConstraintManager.edgesGuidelinesConstraints(
- if (view.isLayoutRtl) cutoutRight else cutoutLeft,
+ (if (view.isLayoutRtl) cutoutRight else cutoutLeft) + statusBarPaddingStart,
header.paddingStart,
- if (view.isLayoutRtl) cutoutLeft else cutoutRight,
+ (if (view.isLayoutRtl) cutoutLeft else cutoutRight) + statusBarPaddingEnd,
header.paddingEnd
)
mDatePrivacyView.getLayoutParams().height =
@@ -359,6 +368,9 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
.addFloat(mDateView, "alpha", 0, 0, 1)
.addFloat(mClockDateView, "alpha", 1, 0, 0)
.addFloat(mQSCarriers, "alpha", 0, 1)
+ // Use statusbar paddings when collapsed, align with QS when expanded, and animate translation
+ .addFloat(mClockContainer, "translationX", mHeaderPaddingLeft + mStatusBarPaddingStart, 0)
+ .addFloat(mRightLayout, "translationX", -(mHeaderPaddingRight + mStatusBarPaddingEnd), 0)
.setListener(new TouchAnimator.ListenerAdapter() {
@Override
public void onAnimationAtEnd() {
@@ -466,8 +478,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 =
@@ -531,34 +541,38 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
private void updateHeadersPadding() {
setContentMargins(mDatePrivacyView, 0, 0);
setContentMargins(mStatusIconsView, 0, 0);
- int paddingLeft = 0;
- int paddingRight = 0;
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
+ // Note: these are supposedly notification_side_paddings
int leftMargin = lp.leftMargin;
int rightMargin = lp.rightMargin;
// The clock might collide with cutouts, let's shift it out of the way.
- // We only do that if the inset is bigger than our own padding, since it's nicer to
- // align with
- if (mCutOutPaddingLeft > 0) {
- // if there's a cutout, let's use at least the rounded corner inset
- int cutoutPadding = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding);
- paddingLeft = Math.max(cutoutPadding - leftMargin, 0);
+ // Margin will be the reference point of paddings/translations
+ // and will have to be subtracted from cutout paddings
+ boolean headerPaddingUpdated = false;
+ int headerPaddingLeft = Math.max(mCutOutPaddingLeft, mRoundedCornerPadding) - leftMargin;
+ if (headerPaddingLeft != mHeaderPaddingLeft) {
+ mHeaderPaddingLeft = headerPaddingLeft;
+ headerPaddingUpdated = true;
}
- if (mCutOutPaddingRight > 0) {
- // if there's a cutout, let's use at least the rounded corner inset
- int cutoutPadding = Math.max(mCutOutPaddingRight, mRoundedCornerPadding);
- paddingRight = Math.max(cutoutPadding - rightMargin, 0);
+ int headerPaddingRight = Math.max(mCutOutPaddingRight, mRoundedCornerPadding) - rightMargin;
+ if (headerPaddingRight != mHeaderPaddingRight) {
+ mHeaderPaddingRight = headerPaddingRight;
+ headerPaddingUpdated = true;
}
- mDatePrivacyView.setPadding(paddingLeft,
+ // Update header animator with new paddings
+ if (headerPaddingUpdated) {
+ updateAnimators();
+ }
+ mDatePrivacyView.setPadding(mHeaderPaddingLeft + mStatusBarPaddingStart,
mWaterfallTopInset,
- paddingRight,
+ mHeaderPaddingRight + mStatusBarPaddingEnd,
0);
- mStatusIconsView.setPadding(paddingLeft,
+ mStatusIconsView.setPadding(0,
mWaterfallTopInset,
- paddingRight,
+ 0,
0);
@@ -483,7 +488,6 @@ constructor(
}
private fun updateResources() {
- roundedCorners = resources.getDimensionPixelSize(R.dimen.rounded_corner_content_padding)
val padding = resources.getDimensionPixelSize(R.dimen.qs_panel_padding)
header.setPadding(padding, header.paddingTop, padding, header.paddingBottom)
updateQQSPaddings()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index cc8b2d5c0913..f829fb421fc7 100644
index 7b6fc66a208d..ab919f4c5882 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -157,14 +157,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
@@ -164,14 +164,7 @@ public class KeyguardStatusBarView extends RelativeLayout {
mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
getResources().getDimensionPixelSize(
com.android.internal.R.dimen.text_size_small_material));
@ -259,5 +161,5 @@ index cc8b2d5c0913..f829fb421fc7 100644
}
--
2.25.1
2.34.1

View File

@ -1,26 +0,0 @@
From a8a6e151d39736c5e73394839e476c5b82630d3a 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/21] 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 80fa6013ee77..9410897a24a0 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2390,7 +2390,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">64800000</integer>
<!-- Try-again polling interval in milliseconds, in case the network request failed -->
--
2.25.1

View File

@ -1,7 +1,7 @@
From 2406fad099bf603dd754a0e279210b606517b77d Mon Sep 17 00:00:00 2001
From 4803ddab6f362587e769b2aa5d60a041345d26af Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 31 May 2022 00:00:08 +0000
Subject: [PATCH 12/21] Revert "SystemUI: Add left padding for keyguard slices"
Subject: [PATCH 11/21] Revert "SystemUI: Add left padding for keyguard slices"
This reverts commit 4a7a4426944e28e70a3eca6a696ff6c7599fb896.
---
@ -40,5 +40,5 @@ index 31d22eb38a24..65a71664e245 100644
@Override
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From fba26224a6d73d49389a8eddad477950a729ee59 Mon Sep 17 00:00:00 2001
From f5ad15c1785d0a458bc2be47f0ef2a8d5283ae86 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 13/21] Revert "Update RAT icons to match Silk design"
Subject: [PATCH 12/21] Revert "Update RAT icons to match Silk design"
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
---
@ -269,5 +269,5 @@ index 48faeb22416f..1511659ea42f 100644
+ android:pathData="M14.21,12.81c0.36,-0.16 0.69,-0.36 0.97,-0.61c0.41,-0.38 0.72,-0.83 0.94,-1.37c0.21,-0.54 0.32,-1.14 0.32,-1.79c0,-0.92 -0.16,-1.7 -0.49,-2.33c-0.32,-0.64 -0.79,-1.12 -1.43,-1.45c-0.62,-0.33 -1.4,-0.49 -2.32,-0.49H8.23V19h1.8v-5.76h2.5L15.06,19h1.92v-0.12L14.21,12.81zM10.03,11.71V6.32h2.18c0.59,0 1.06,0.11 1.42,0.34c0.36,0.22 0.62,0.54 0.78,0.95c0.16,0.41 0.24,0.89 0.24,1.44c0,0.49 -0.09,0.93 -0.27,1.34c-0.18,0.4 -0.46,0.73 -0.82,0.97c-0.36,0.23 -0.82,0.35 -1.37,0.35H10.03z"/>
</vector>
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 2760ca8d2b0c8920b60d7d4f9ee8f2ae2cabd8b6 Mon Sep 17 00:00:00 2001
From 15e59be158a3305a17e14cc18883d323d2afc54b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 29 Sep 2022 11:27:57 +0000
Subject: [PATCH 14/21] Revert "Use the default top clock margin on h800
Subject: [PATCH 13/21] Revert "Use the default top clock margin on h800
devices"
This reverts commits 50ba380f4d8d1c2523e0f76295ca556038796bfd
@ -11,7 +11,7 @@ and 2a254b4d479029aec46f79a0ed14ffab6d0424bc.
1 file changed, 3 insertions(+)
diff --git a/packages/SystemUI/res/values-h800dp/dimens.xml b/packages/SystemUI/res/values-h800dp/dimens.xml
index 94fe20955ce6..1d6f279afc66 100644
index 3a71994e07e2..4b9bce0eda99 100644
--- a/packages/SystemUI/res/values-h800dp/dimens.xml
+++ b/packages/SystemUI/res/values-h800dp/dimens.xml
@@ -15,6 +15,9 @@
@ -21,9 +21,9 @@ index 94fe20955ce6..1d6f279afc66 100644
+ <!-- Minimum margin between clock and top of screen or ambient indication -->
+ <dimen name="keyguard_clock_top_margin">38dp</dimen>
+
<!-- Large clock maximum font size (dp is intentional, to prevent any further scaling) -->
<dimen name="large_clock_text_size">200dp</dimen>
<!-- With the large clock, move up slightly from the center -->
<dimen name="keyguard_large_clock_top_margin">-112dp</dimen>
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 8fd984bf1c1a79ed4f7d97ace689f0b6718968bb Mon Sep 17 00:00:00 2001
From 6927e68fa4ec001ec72e9f68e4454a37c8bc7bb5 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 15/21] UI: Always render windows into cutouts
Subject: [PATCH 14/21] UI: Always render windows into cutouts
Eliminates black/white letterboxing
Quick and dirty way to do the latter - wait for proper fix from Google
@ -52,10 +52,10 @@ index 33641f72b2ff..6e201970ac03 100644
}
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index f4cb23d5f369..a4cd2fbcc89f 100644
index 1468360b37b7..a1f70e4c8deb 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -1639,6 +1639,7 @@ public class DisplayPolicy {
@@ -1558,6 +1558,7 @@ public class DisplayPolicy {
displayFrames = win.getDisplayFrames(displayFrames);
final WindowManager.LayoutParams attrs = win.mAttrs.forRotation(displayFrames.mRotation);
@ -64,5 +64,5 @@ index f4cb23d5f369..a4cd2fbcc89f 100644
// If this window has different LayoutParams for rotations, we cannot trust its requested
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 06472eb420c14153266aca7dc2487f33c32f2f44 Mon Sep 17 00:00:00 2001
From 89c565bf1a9ce56a64191059424bf9f5fe04f1d9 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 16/21] UI: Kill rounded corners in notification scrim
Subject: [PATCH 15/21] UI: Kill rounded corners in notification scrim
Rounded corners in S is nicely implemented, but this is one occasion where it looks out of place
@ -11,10 +11,10 @@ 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 569926a1e1a0..09dd8ed9ef9d 100644
index d0a9055e1905..30881992795d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -672,7 +672,7 @@
@@ -726,7 +726,7 @@
<!-- With the large clock, move up slightly from the center -->
<dimen name="keyguard_large_clock_top_margin">-60dp</dimen>
@ -24,5 +24,5 @@ index 569926a1e1a0..09dd8ed9ef9d 100644
<!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
<dimen name="keyguard_min_swipe_amount">110dp</dimen>
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From eef68c9e3faad07776544f152946ad299be23d51 Mon Sep 17 00:00:00 2001
From be2477f3314d044e1d7581905a4d358aa0f0a2a7 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 17/21] UI: Reconfigure power menu items
Subject: [PATCH 16/21] UI: Reconfigure power menu items
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
---
@ -9,10 +9,10 @@ Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 9410897a24a0..a6e437b1efd6 100644
index 87e3ddcf8fdf..64d592b2230b 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3213,13 +3213,10 @@
@@ -3305,13 +3305,10 @@
"logout" = Logout the current user
-->
<string-array translatable="false" name="config_globalActionsList">
@ -28,5 +28,5 @@ index 9410897a24a0..a6e437b1efd6 100644
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From be8f19801ee144b27fdd74ddfa8f7ecb9c60bfaa Mon Sep 17 00:00:00 2001
From f22928416285a9ac0ab6f8cd683c8dd5d95bf15b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 5 Mar 2022 01:43:37 +0000
Subject: [PATCH 18/21] UI: Reconfigure quick settings tiles
Subject: [PATCH 17/21] UI: Reconfigure quick settings tiles
Change-Id: I743f52ef3a95db0ca2c02ae973faa4629e41885d
---
@ -9,7 +9,7 @@ Change-Id: I743f52ef3a95db0ca2c02ae973faa4629e41885d
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index d7d6fa34cce8..61c7613baadc 100644
index 418bbc7c7932..245bde4c543a 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -68,7 +68,7 @@
@ -22,5 +22,5 @@ index d7d6fa34cce8..61c7613baadc 100644
<!-- The class path of the Safety Quick Settings Tile -->
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 6616bcdd57fa5a9f3f482d41ba7667995f083c61 Mon Sep 17 00:00:00 2001
From fe8362152cdb0a17376ffedb37030cc57d14b375 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 19/21] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
Subject: [PATCH 18/21] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
I decide what's good enough for a wallpaper!
@ -11,10 +11,10 @@ Change-Id: I5ccd85b3df12e53746a4ac6cbc37ba8d11f6c336
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
index 067a4c3c047e..a8d3c14e1d9d 100644
index a34a50c4b7b0..028f77fb21b0 100644
--- a/core/java/android/app/WallpaperColors.java
+++ b/core/java/android/app/WallpaperColors.java
@@ -577,7 +577,7 @@ public final class WallpaperColors implements Parcelable {
@@ -580,7 +580,7 @@ public final class WallpaperColors implements Parcelable {
int hints = 0;
double meanLuminance = totalLuminance / pixels.length;
@ -24,5 +24,5 @@ index 067a4c3c047e..a8d3c14e1d9d 100644
}
if (meanLuminance < DARK_THEME_MEAN_LUMINANCE) {
--
2.25.1
2.34.1

View File

@ -1,18 +1,24 @@
From d329a8c0310ece234f68f1bf271e27b6a3ef948c Mon Sep 17 00:00:00 2001
From a0cd4caf1cd92218e44db206ec2f67839ce4dbe8 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 19 Oct 2021 12:09:34 +0000
Subject: [PATCH 20/21] UI: Remove privacy dot padding
Subject: [PATCH 19/21] UI: Remove privacy dot
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
---
packages/SystemUI/res/values/dimens.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
packages/SystemUI/res/values/dimens.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 09dd8ed9ef9d..4515539bb4b4 100644
index 30881992795d..7ead38868815 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1002,7 +1002,7 @@
@@ -1059,12 +1059,12 @@
<dimen name="ongoing_appops_chip_min_width">56dp</dimen>
<!-- Three privacy items. This value must not be exceeded -->
<dimen name="ongoing_appops_chip_max_width">76dp</dimen>
- <dimen name="ongoing_appops_dot_diameter">6dp</dimen>
+ <dimen name="ongoing_appops_dot_diameter">0dp</dimen>
<dimen name="ongoing_appops_chip_min_animation_width">10dp</dimen>
<dimen name="ongoing_appops_chip_animation_in_status_bar_translation_x">15dp</dimen>
<dimen name="ongoing_appops_chip_animation_out_status_bar_translation_x">7dp</dimen>
<!-- Total minimum padding to enforce to ensure that the dot can always show -->
@ -22,5 +28,5 @@ index 09dd8ed9ef9d..4515539bb4b4 100644
<dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen>
--
2.25.1
2.34.1

View File

@ -0,0 +1,35 @@
From 7cacf0df0092432cd2347e0cbae0c1c3d0f5dcf9 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 22 Mar 2023 00:29:13 +0000
Subject: [PATCH 20/21] UI: Restore quick settings fonts to pre-T-QPR2
TODO: Large header clock looks better in Regular - perhaps figure out how to transition smoothly?
Change-Id: If2e57fee61b6bd4b6b7fedc7e3011164cd2cb56f
---
packages/SystemUI/res/values/styles.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 6996e41e08da..5e6d45ac9305 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -134,7 +134,7 @@
<!-- This is hard coded to be sans-serif-condensed to match the icons -->
<style name="TextAppearance.QS.Status">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">14sp</item>
<item name="android:letterSpacing">0.01</item>
@@ -152,6 +152,7 @@
</style>
<style name="TextAppearance.QS.Status.Build">
+ <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
</style>
--
2.34.1

View File

@ -1,4 +1,4 @@
From 12c19b3e96fde96dab5093ac2134ad1453bb59b8 Mon Sep 17 00:00:00 2001
From 9732bf6c88d489f587e62d9f6b382e876295cbd6 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 30 Sep 2022 16:02:16 +0000
Subject: [PATCH 21/21] UI: Revert to HSL luminance for wallpaper dark hints
@ -11,10 +11,10 @@ Change-Id: Ie5663bdf518b4ef93d6deb634e707a32d052ac55
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
index a8d3c14e1d9d..88609f3d7052 100644
index 028f77fb21b0..63ccf961a2d8 100644
--- a/core/java/android/app/WallpaperColors.java
+++ b/core/java/android/app/WallpaperColors.java
@@ -552,15 +552,15 @@ public final class WallpaperColors implements Parcelable {
@@ -555,15 +555,15 @@ public final class WallpaperColors implements Parcelable {
float[] tmpHsl = new float[3];
for (int i = 0; i < pixels.length; i++) {
int pixelColor = pixels[i];
@ -33,7 +33,7 @@ index a8d3c14e1d9d..88609f3d7052 100644
// Make sure we don't have a dark pixel mass that will
// make text illegible.
@@ -572,7 +572,7 @@ public final class WallpaperColors implements Parcelable {
@@ -575,7 +575,7 @@ public final class WallpaperColors implements Parcelable {
pixels[i] = Color.RED;
}
}
@ -43,5 +43,5 @@ index a8d3c14e1d9d..88609f3d7052 100644
int hints = 0;
--
2.25.1
2.34.1

View File

@ -1,37 +1,36 @@
From 02bc17bb2554380d7f7d76e3adffce05a2ba2444 Mon Sep 17 00:00:00 2001
From ef3810b1d55f079278f3ac3ef83f7b5b2eaaa7c1 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 1/3] DeskClock: Remove night mode
Subject: [PATCH 2/4] DeskClock: Remove night mode
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
---
res/xml/screensaver_settings.xml | 8 +-------
res/xml/screensaver_settings.xml | 7 -------
src/com/android/deskclock/Screensaver.java | 5 ++---
src/com/android/deskclock/ScreensaverActivity.java | 2 +-
3 files changed, 4 insertions(+), 11 deletions(-)
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/res/xml/screensaver_settings.xml b/res/xml/screensaver_settings.xml
index 1680aab83..73375dcfa 100644
index 7b8c9764a..908f76fef 100644
--- a/res/xml/screensaver_settings.xml
+++ b/res/xml/screensaver_settings.xml
@@ -24,10 +24,4 @@
android:key="screensaver_clock_style"
android:title="@string/clock_style" />
@@ -26,11 +26,4 @@
android:title="@string/clock_style"
app:iconSpaceReserved="false" />
- <CheckBoxPreference
- android:defaultValue="true"
- android:key="screensaver_night_mode"
- android:summary="@string/night_mode_summary"
- android:title="@string/night_mode_title" />
- android:title="@string/night_mode_title"
- app:iconSpaceReserved="false" />
-
-</PreferenceScreen>
\ No newline at end of file
+</PreferenceScreen>
</PreferenceScreen>
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
index 29cc13ff9..8def22b30 100644
index ad92b1149..f6c03ed0a 100644
--- a/src/com/android/deskclock/Screensaver.java
+++ b/src/com/android/deskclock/Screensaver.java
@@ -141,9 +141,8 @@ public final class Screensaver extends DreamService {
@@ -136,9 +136,8 @@ public final class Screensaver extends DreamService {
private void setClockStyle() {
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
@ -44,10 +43,10 @@ index 29cc13ff9..8def22b30 100644
/**
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
index cf770086b..7a756df7d 100644
index b30f82ee7..90235351f 100644
--- a/src/com/android/deskclock/ScreensaverActivity.java
+++ b/src/com/android/deskclock/ScreensaverActivity.java
@@ -107,7 +107,7 @@ public class ScreensaverActivity extends BaseActivity {
@@ -101,7 +101,7 @@ public class ScreensaverActivity extends BaseActivity {
Utils.setClockIconTypeface(mMainClockView);
Utils.setTimeFormat((TextClock) digitalClock, false);
Utils.setClockStyle(digitalClock, analogClock);
@ -57,5 +56,5 @@ index cf770086b..7a756df7d 100644
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 2a0ca4dab02447bb8fdabb480ed94de15107e22b Mon Sep 17 00:00:00 2001
From 3430de2c592c9d9b4a08c16477fff4ad1a4ca775 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 2/3] DeskClock: Adapt digital clocks to S style
Subject: [PATCH 3/4] DeskClock: Adapt digital clocks to S style
Lollipop is so yesterday...
Bring the layouts of various digital clocks (app, widget, daydream)
@ -13,62 +13,21 @@ Caveats/TODO:
Change-Id: I10c6fa213c89ac2f6e342be13fdd6390f7f787b0
---
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/date_and_next_alarm_time.xml | 53 +++++++------
res/layout/desk_clock_saver.xml | 10 +--
res/layout/digital_widget.xml | 69 ++++++++---------
res/layout/digital_widget_sizer.xml | 77 ++++++++-----------
res/layout/main_clock_frame.xml | 23 +++---
res/layout/main_clock_frame.xml | 36 +++------
res/values/dimens.xml | 12 ++-
res/values/styles.xml | 19 +++++
res/values/styles.xml | 18 +++++
.../alarmclock/DigitalAppWidgetProvider.java | 31 ++++----
src/com/android/deskclock/AlarmUtils.java | 2 +-
10 files changed, 167 insertions(+), 156 deletions(-)
src/com/android/deskclock/ClockFragment.java | 3 -
src/com/android/deskclock/Utils.java | 19 -----
11 files changed, 155 insertions(+), 175 deletions(-)
diff --git a/res/layout-land/main_clock_frame.xml b/res/layout-land/main_clock_frame.xml
index 6abfdddd6..8ad98c0cf 100644
--- a/res/layout-land/main_clock_frame.xml
+++ b/res/layout-land/main_clock_frame.xml
@@ -21,10 +21,11 @@
android:gravity="center_horizontal"
android:orientation="vertical">
- <FrameLayout
+ <LinearLayout
android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:layout_weight="1">
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical|start"
+ android:orientation="vertical">
<com.android.deskclock.AnalogClock
android:id="@+id/analog_clock"
@@ -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:ellipsize="none"
- 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"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"/>
+ </LinearLayout>
</LinearLayout>
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
index 23df1cd3b..b29ffedcf 100644
index 9a0cb9103..b29ffedcf 100644
--- a/res/layout/date_and_next_alarm_time.xml
+++ b/res/layout/date_and_next_alarm_time.xml
@@ -18,36 +18,41 @@
@ -111,9 +70,6 @@ index 23df1cd3b..b29ffedcf 100644
- android:layout_height="wrap_content"
- android:textAllCaps="true"
- tools:text="Mo., 07:00"/>
-
-</LinearLayout>
\ No newline at end of file
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
@ -138,13 +94,13 @@ index 23df1cd3b..b29ffedcf 100644
+ tools:text="Mo., 07:00"/>
+
+ </LinearLayout>
+
+</LinearLayout>
</LinearLayout>
diff --git a/res/layout/desk_clock_saver.xml b/res/layout/desk_clock_saver.xml
index dafabfddf..d24219dbb 100644
index c147bf7cd..d24219dbb 100644
--- a/res/layout/desk_clock_saver.xml
+++ b/res/layout/desk_clock_saver.xml
@@ -42,19 +42,13 @@
@@ -42,16 +42,10 @@
<TextClock
android:id="@+id/digital_clock"
@ -163,13 +119,8 @@ index dafabfddf..d24219dbb 100644
<include layout="@layout/date_and_next_alarm_time" />
</LinearLayout>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
index c5b4837a6..e376a5a7a 100644
index 5cf896a84..e376a5a7a 100644
--- a/res/layout/digital_widget.xml
+++ b/res/layout/digital_widget.xml
@@ -19,58 +19,53 @@
@ -263,13 +214,6 @@ index c5b4837a6..e376a5a7a 100644
</LinearLayout>
@@ -82,4 +77,4 @@
android:layout_marginTop="20dp"
android:divider="@null" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
index f524cf536..b9a28c79f 100644
--- a/res/layout/digital_widget_sizer.xml
@ -374,26 +318,34 @@ index f524cf536..b9a28c79f 100644
</LinearLayout>
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
index 159956f19..d0701eaf0 100644
index c26f61dbd..c2e84eaa3 100644
--- a/res/layout/main_clock_frame.xml
+++ b/res/layout/main_clock_frame.xml
@@ -24,11 +24,11 @@
@@ -26,44 +26,28 @@
android:layout_marginEnd="24dp"
android:orientation="vertical">
- <FrameLayout
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
+ <LinearLayout
android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:layout_weight="1"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- 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"
@@ -42,17 +42,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/circle_margin_top"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintDimensionRatio="1:1"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintWidth_percent="@dimen/analog_clock_width_percent"/>
+ android:layout_marginTop="@dimen/circle_margin_top"/>
<com.android.deskclock.widget.AutoSizingTextClock
android:id="@+id/digital_clock"
@ -407,22 +359,28 @@ index 159956f19..d0701eaf0 100644
android:paddingTop="@dimen/main_clock_digital_padding"
- android:singleLine="true"
- android:textSize="@dimen/main_clock_digital_font_size"
tools:text="01:23" />
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
tools:text="01:23"/>
- </FrameLayout>
- </androidx.constraintlayout.widget.ConstraintLayout>
+ <include layout="@layout/date_and_next_alarm_time" />
+
+ </LinearLayout>
- <include layout="@layout/date_and_next_alarm_time" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
- <include
- layout="@layout/date_and_next_alarm_time"
- android:id="@+id/date_and_next_alarm_time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="start"/>
</LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 856ef8241..3061e27f6 100644
index c136fe25a..58a9fedc0 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -61,7 +61,7 @@
@@ -62,7 +62,7 @@
<dimen name="body_font_padding">4dp</dimen>
<dimen name="alarm_label_size">14sp</dimen>
@ -431,10 +389,10 @@ index 856ef8241..3061e27f6 100644
<dimen name="backspace_icon_size">24dp</dimen>
<dimen name="no_alarms_size">90dp</dimen>
@@ -140,4 +140,14 @@
<dimen name="alarm_clock_expanded_vertical_margin">8dp</dimen>
@@ -144,4 +144,14 @@
<dimen name="settings_padding">4dp</dimen>
<dimen name="analog_clock_width_percent">0.5</dimen>
+
+ <!-- Keyguard dimens, taken from S fwb -->
+ <dimen name="sc_keyguard_clock_text_size">86dp</dimen>
@ -447,10 +405,10 @@ index 856ef8241..3061e27f6 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 f57bab2fa..28b68fd55 100644
index 8c6364344..159f24766 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -201,4 +201,23 @@
@@ -209,4 +209,22 @@
<item name="layout_constraintStart_toStartOf">parent</item>
<item name="layout_constraintTop_toBottomOf">@id/timer_setup_time</item>
</style>
@ -472,13 +430,12 @@ index f57bab2fa..28b68fd55 100644
+ <item name="android:includeFontPadding">false</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
</resources>
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
index 1005f0ac0..e97bb474a 100644
index b54a500c5..fb1b30aa7 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -224,7 +224,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -223,7 +223,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
if (Utils.isWidgetClickable(wm, widgetId)) {
final Intent openApp = new Intent(context, DeskClock.class);
final PendingIntent pi = PendingIntent.getActivity(context, 0, openApp, FLAG_IMMUTABLE);
@ -487,7 +444,7 @@ index 1005f0ac0..e97bb474a 100644
}
// Configure child views of the remote view.
@@ -256,7 +256,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -255,7 +255,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
final int targetWidthPx = portrait ? minWidthPx : maxWidthPx;
final int targetHeightPx = portrait ? maxHeightPx : minHeightPx;
final int largestClockFontSizePx =
@ -496,7 +453,7 @@ index 1005f0ac0..e97bb474a 100644
// Create a size template that describes the widget bounds.
final Sizes template = new Sizes(targetWidthPx, targetHeightPx, largestClockFontSizePx);
@@ -328,13 +328,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -327,13 +327,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
}
// Measure the widget at the largest possible size.
@ -512,7 +469,7 @@ index 1005f0ac0..e97bb474a 100644
if (low.hasViolations()) {
return low;
}
@@ -346,7 +346,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -345,7 +345,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
return low;
}
@ -521,7 +478,7 @@ index 1005f0ac0..e97bb474a 100644
if (midSize.hasViolations()) {
high = midSize;
} else {
@@ -409,7 +409,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -411,7 +411,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
* the offscreen {@code sizer} view. Measure the {@code sizer} view and return the resulting
* size measurements.
*/
@ -530,8 +487,8 @@ index 1005f0ac0..e97bb474a 100644
// Create a copy of the given template sizes.
final Sizes measuredSizes = template.newSize();
@@ -420,13 +420,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
final TextView nextAlarmIcon = (TextView) sizer.findViewById(R.id.nextAlarmIcon);
@@ -422,13 +422,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
final TextView nextAlarmIcon = sizer.findViewById(R.id.nextAlarmIcon);
// Adjust the font sizes.
- measuredSizes.setClockFontSizePx(clockFontSize);
@ -546,7 +503,7 @@ index 1005f0ac0..e97bb474a 100644
// Measure and layout the sizer.
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
@@ -507,12 +507,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -509,12 +509,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
private int getLargestClockFontSizePx() { return mLargestClockFontSizePx; }
private int getSmallestClockFontSizePx() { return mSmallestClockFontSizePx; }
private int getClockFontSizePx() { return mClockFontSizePx; }
@ -570,10 +527,10 @@ index 1005f0ac0..e97bb474a 100644
/**
* @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
index c3739bac8..5b931a46d 100644
--- a/src/com/android/deskclock/AlarmUtils.java
+++ b/src/com/android/deskclock/AlarmUtils.java
@@ -37,7 +37,7 @@ import java.util.Locale;
@@ -38,7 +38,7 @@ import java.util.Locale;
public class AlarmUtils {
public static String getFormattedTime(Context context, Calendar time) {
@ -582,6 +539,72 @@ index db60ace95..43767d313 100644
final String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
return (String) DateFormat.format(pattern, time);
}
--
2.25.1
diff --git a/src/com/android/deskclock/ClockFragment.java b/src/com/android/deskclock/ClockFragment.java
index bf53584e4..7a0e3ae0b 100644
--- a/src/com/android/deskclock/ClockFragment.java
+++ b/src/com/android/deskclock/ClockFragment.java
@@ -123,7 +123,6 @@ public final class ClockFragment extends DeskClockFragment {
Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mClockFrame);
Utils.setClockStyle(mDigitalClock, mAnalogClock);
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
- Utils.updateDateGravity(mClockFrame);
}
// Schedule a runnable to update the date every quarter hour.
@@ -151,7 +150,6 @@ public final class ClockFragment extends DeskClockFragment {
if (mDigitalClock != null && mAnalogClock != null) {
Utils.setClockStyle(mDigitalClock, mAnalogClock);
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
- Utils.updateDateGravity(mClockFrame);
}
final View view = getView();
@@ -493,7 +491,6 @@ public final class ClockFragment extends DeskClockFragment {
Utils.updateDate(dateFormat, dateFormatForAccessibility, itemView);
Utils.setClockStyle(mDigitalClock, mAnalogClock);
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
- Utils.updateDateGravity(itemView);
}
}
}
diff --git a/src/com/android/deskclock/Utils.java b/src/com/android/deskclock/Utils.java
index 4eea6beba..4a5ad5a0a 100644
--- a/src/com/android/deskclock/Utils.java
+++ b/src/com/android/deskclock/Utils.java
@@ -52,9 +52,7 @@ import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan;
import android.text.style.TypefaceSpan;
import android.util.ArraySet;
-import android.view.Gravity;
import android.view.View;
-import android.widget.LinearLayout;
import android.widget.TextClock;
import android.widget.TextView;
@@ -302,23 +300,6 @@ public class Utils {
dateDisplay.setContentDescription(new SimpleDateFormat(descriptionPattern, l).format(now));
}
- public static void updateDateGravity(View clockFrame) {
- View dateAndNextAlarm = clockFrame.findViewById(R.id.date_and_next_alarm_time);
- LinearLayout.LayoutParams lp =
- (LinearLayout.LayoutParams)dateAndNextAlarm.getLayoutParams();
-
- final DataModel.ClockStyle clockStyle = DataModel.getDataModel().getClockStyle();
- switch (clockStyle) {
- case ANALOG:
- lp.gravity = Gravity.CENTER;
- break;
- case DIGITAL:
- lp.gravity = Gravity.START;
- break;
- }
- dateAndNextAlarm.setLayoutParams(lp);
- }
-
/***
* Formats the time in the TextClock according to the Locale with a special
* formatting treatment for the am/pm label.
--
2.34.1

View File

@ -1,7 +1,7 @@
From 8736347a89fc7e15e747ac5267c9f96b05bfaee8 Mon Sep 17 00:00:00 2001
From 169570068c3a78f7294d581b2df864ccd3057579 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 3/3] DeskClock: Wallpaper-based text coloring for digital
Subject: [PATCH 4/4] DeskClock: Wallpaper-based text coloring for digital
clock widget
RemoteViews is such a restrictive PITA
@ -12,10 +12,10 @@ 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 e97bb474a..d52693a1b 100644
index fb1b30aa7..c04528240 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -19,6 +19,8 @@ package com.android.alarmclock;
@@ -38,6 +38,8 @@ import static java.lang.Math.round;
import android.annotation.SuppressLint;
import android.app.AlarmManager;
import android.app.PendingIntent;
@ -24,7 +24,7 @@ index e97bb474a..d52693a1b 100644
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.BroadcastReceiver;
@@ -112,12 +114,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -111,12 +113,40 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
/** Intent used to deliver the {@link #ACTION_ON_DAY_CHANGE} callback. */
private static final Intent DAY_CHANGE_INTENT = new Intent(ACTION_ON_DAY_CHANGE);
@ -65,7 +65,7 @@ index e97bb474a..d52693a1b 100644
}
@Override
@@ -216,6 +246,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -215,6 +245,19 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
*/
private static RemoteViews relayoutWidget(Context context, AppWidgetManager wm, int widgetId,
Bundle options, boolean portrait) {
@ -85,7 +85,7 @@ index e97bb474a..d52693a1b 100644
// Create a remote view for the digital clock.
final String packageName = context.getPackageName();
final RemoteViews rv = new RemoteViews(packageName, R.layout.digital_widget);
@@ -273,6 +316,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -272,6 +315,17 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
rv.setTextViewTextSize(R.id.nextAlarm, COMPLEX_UNIT_PX, sizes.mFontSizePx);
rv.setTextViewTextSize(R.id.clock, COMPLEX_UNIT_PX, sizes.mClockFontSizePx);
@ -103,7 +103,7 @@ index e97bb474a..d52693a1b 100644
final int smallestWorldCityListSizePx =
resources.getDimensionPixelSize(R.dimen.widget_min_world_city_list_size);
if (sizes.getListHeight() <= smallestWorldCityListSizePx) {
@@ -428,6 +482,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
@@ -430,6 +484,9 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
nextAlarmIcon.setTextSize(COMPLEX_UNIT_PX, measuredSizes.mIconFontSizePx);
nextAlarmIcon.setPadding(0, 0, measuredSizes.mIconPaddingPx, 0);
@ -114,5 +114,5 @@ index e97bb474a..d52693a1b 100644
final int widthSize = View.MeasureSpec.getSize(measuredSizes.mTargetWidthPx);
final int heightSize = View.MeasureSpec.getSize(measuredSizes.mTargetHeightPx);
--
2.25.1
2.34.1

View File

@ -1,4 +1,4 @@
From d94a28d2f9f88d3fee4f2a71b2364bca23f4be8b Mon Sep 17 00:00:00 2001
From 4c3fbe18f838dce0c06342016ca4c933cf077a05 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Mar 2022 11:22:48 +0000
Subject: [PATCH] Revert "[DO NOT MERGE] Allow a settings override for
@ -19,10 +19,10 @@ Change-Id: I8b4b1354f23981f6edbe7f3c81ec4f511da3cc1a
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 09d80c8814..8e55b8a4b8 100644
index 62062b5fe8..35a8a39689 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13520,10 +13520,6 @@
@@ -13812,10 +13812,6 @@
<string name="lockscreen_trivial_controls_summary">Control external devices without unlocking your phone or tablet if allowed by the device controls app</string>
<!-- Trivial Device disabled controls summary [CHAR LIMIT=NONE] -->
<string name="lockscreen_trivial_disabled_controls_summary">To use, first turn on \u0022Show device controls\u0022</string>
@ -30,17 +30,17 @@ index 09d80c8814..8e55b8a4b8 100644
- <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>
<!-- Lock screen shortcuts preference [CHAR LIMIT=60] -->
<string name="lockscreen_quick_affordances_title">Shortcuts</string>
<!-- Summary for the lock screen button preference [CHAR LIMIT=60] -->
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
index cb3c69172e..3b3635ac45 100644
index 77a32122ee..b71839fe23 100644
--- a/res/xml/security_lockscreen_settings.xml
+++ b/res/xml/security_lockscreen_settings.xml
@@ -78,12 +78,6 @@
android:title="@string/lockscreen_trivial_controls_setting_toggle"
android:summary="@string/lockscreen_trivial_controls_summary"
settings:controller="com.android.settings.display.ControlsTrivialPrivacyPreferenceController"/>
android:key="customizable_lock_screen_quick_affordances"
android:title="@string/lockscreen_quick_affordances_title"
settings:controller="com.android.settings.display.CustomizableLockScreenQuickAffordancesPreferenceController" />
-
- <SwitchPreference
- android:key="lockscreen_double_line_clock_switch"
@ -223,5 +223,5 @@ index 94f2dc6655..0000000000
- }
-}
--
2.25.1
2.34.1

View File

@ -1,4 +1,4 @@
From 1f218b4e6572822d99ec46c1bfd65e7ff023c0d3 Mon Sep 17 00:00:00 2001
From f32dde0ff88ec58029be1fe4a1b42b94ff1bdbab Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 28 Oct 2021 02:30:59 +0000
Subject: [PATCH 1/2] Trebuchet: Make overview scrim transparent again
@ -7,18 +7,18 @@ Also revert texts/buttons to workspace color
Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
---
quickstep/res/values/styles.xml | 4 ++--
quickstep/res/values/styles.xml | 2 +-
quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +-
res/color-v31/overview_scrim.xml | 2 +-
res/color-v31/overview_scrim_dark.xml | 2 +-
res/color/overview_button.xml | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index 7225220876..59cce932a2 100644
index 8eea37f6c2..623f60f81a 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -142,7 +142,7 @@
@@ -176,7 +176,7 @@
parent="@android:style/Widget.DeviceDefault.Button.Borderless">
<item name="android:textColor">@color/overview_button</item>
<item name="android:drawableTint">@color/overview_button</item>
@ -27,18 +27,11 @@ index 7225220876..59cce932a2 100644
<item name="android:drawablePadding">8dp</item>
<item name="android:textAllCaps">false</item>
</style>
@@ -182,4 +182,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 4a4202ecc6..58e8c2508a 100644
index 9222e456e5..678c0dfd80 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -717,7 +717,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@@ -783,7 +783,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mEmptyIcon.setCallback(this);
mEmptyMessage = context.getText(R.string.recents_empty_message);
mEmptyMessagePaint = new TextPaint();
@ -89,5 +82,5 @@ index aa48b78604..e638ac2d4a 100644
\ No newline at end of file
+</selector>
--
2.25.1
2.34.1

View File

@ -1,4 +1,4 @@
From 3b51af674b9aa916e86fcfe0034ba3dfc0359ae1 Mon Sep 17 00:00:00 2001
From c04fae6b45b624a39d684c4b6cf02440a3fe83b5 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 18 Mar 2022 08:42:18 +0000
Subject: [PATCH 2/2] Trebuchet: Kill haptics in recents
@ -13,14 +13,14 @@ Change-Id: Ie3b0eabe8cc0421e696720740edc492cae2f5153
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 53dc9dd873..c8d89edb97 100644
index 847114a960..eef4be2964 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
@@ -429,14 +429,6 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
@@ -419,14 +419,6 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
nonOverviewAnim.setFloatValues(startProgress, endProgress);
mNonOverviewAnim.dispatchOnStart();
}
- if (targetState == QUICK_SWITCH) {
- if (targetState == QUICK_SWITCH_FROM_HOME) {
- // Navigating to quick switch, add scroll feedback since the first time is not
- // considered a scroll by the RecentsView.
- VibratorWrapper.INSTANCE.get(mLauncher).vibrate(
@ -32,10 +32,10 @@ index 53dc9dd873..c8d89edb97 100644
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 ca7f633bbc..61ee609535 100644
index eddc50c64f..09f253b08d 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>
@@ -369,11 +369,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
velocity * orientationHandler.getSecondaryTranslationDirectionFactor(),
mEndDisplacement, animationDuration);
@ -48,10 +48,10 @@ index ca7f633bbc..61ee609535 100644
private void clearState() {
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 58e8c2508a..786db49be5 100644
index 678c0dfd80..8e75a7c18d 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1339,25 +1339,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@@ -1466,25 +1466,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
}
@ -78,5 +78,5 @@ index 58e8c2508a..786db49be5 100644
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
2.34.1

View File

@ -1,7 +1,7 @@
From 2386227e0541aa061579dd9c34da867174a7d6a2 Mon Sep 17 00:00:00 2001
From 863e8f70e3a4f987938ff4ad01c22822bc38e409 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 20 Jun 2021 09:09:15 +0000
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)
Subject: [PATCH 1/5] build: Integrate prop modifications (2/2)
Change-Id: I076973f902ab20011964e50955e4326c18d5b34e
---
@ -32,5 +32,5 @@ index 28044e2c..c5aa9617 100644
ADDITIONAL_SYSTEM_PROPERTIES += \
ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION)
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 209602b004deebac7846b67def29f3281d864080 Mon Sep 17 00:00:00 2001
From 34f8aa093286970f82014f1dae0e86e4cbeba896 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 16 Oct 2021 00:41:07 +0000
Subject: [PATCH 2/4] build: Remove Stk (2/2)
Subject: [PATCH 2/5] build: Remove Stk (2/2)
Change-Id: I4e1cfacd296e47ef1731f3c32555089a5fca6f0c
---
@ -36,5 +36,5 @@ index 6adf48d9..e63b320d 100644
# Default ringtone
PRODUCT_PRODUCT_PROPERTIES += \
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From d9e352c11ee8738439b73ff5f02429da3f045cc5 Mon Sep 17 00:00:00 2001
From 84b5b23519166701423a324cac955e9110e36eae Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Mon, 1 Jul 2019 07:03:04 +0000
Subject: [PATCH 3/4] vendor_lineage: Ignore neverallows... again
Subject: [PATCH 3/5] vendor_lineage: Ignore neverallows... again
Because unofficial builds are better than no builds!
@ -26,5 +26,5 @@ index f2e595ff..d6d036a9 100644
# Rules for QCOM targets
include $(TOPDIR)vendor/lineage/build/core/qcom_target.mk
--
2.25.1
2.34.1

View File

@ -0,0 +1,24 @@
From 9218670153d5aa40fd05f51d89240fc7859293a2 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 14 Mar 2022 03:44:59 +0000
Subject: [PATCH 5/5] Fix APN on CatS22Flip
This reverts commit I2833bc1764a311eef7ebc170cfa1e25cbefb3737.
Change-Id: I036bdd576e536392cf41e3c536d5ca2eb04e5a02
---
.../prebuild/common/etc/apns-conf.xml | 1 --------
1 file changed, 1 insertion(-)
diff --git a/prebuilt/common/etc/apns-conf.xml b/prebuilt/common/etc/apns-conf.xml
index a7c9e2d8..81716d39 100644
--- a/prebuilt/common/etc/apns-conf.xml
+++ b/prebuilt/common/etc/apns-conf.xml
@@ -22,6 +22,7 @@
<!-- This version must agree with that in apps/common/res/apns.xml -->
<!-- Possible values for auth_type: 0 (None), 1 (PAP), 2 (CHAP), 3 (PAP or CHAP) -->
<apns version="8">
+ <apn carrier="PHH IMS" mcc="310" mnc="240" apn="ims" type="ims" protocol="IPV4V6" roaming_protocol="IPV4V6" />
<apn carrier="Test Internet" mcc="001" mnc="01" apn="VZWINTERNET" type="default,dun,supl" protocol="IPV4V6" roaming_protocol="IPV4V6" />
<apn carrier="Test FOTA" mcc="001" mnc="01" apn="VZWADMIN" type="fota" protocol="IPV4V6" roaming_protocol="IPV4V6" />
<apn carrier="Test IMS" mcc="001" mnc="01" apn="VZWIMS" type="ims" protocol="IPV4V6" roaming_protocol="IPV4V6" />

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
From 53244ebbb4a2da9fbcf02834f40b8083549e3ca7 Mon Sep 17 00:00:00 2001
From 5f607c73f8601349d166c461d2d96237ce2779cf 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/7] 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 2cb5dbc..e493d1c 100644
+
+BOARD_EXT4_SHARE_DUP_BLOCKS := true
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 515176d3ca472dd8ffe122ebf91af4ecc5533c3f Mon Sep 17 00:00:00 2001
From 637b46fa0db205ba2b592e8a081680d3c281c792 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/7] 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 e493d1c..9d1d45e 100644
+
+TARGET_NO_KERNEL_OVERRIDE := true
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 027b59c5b6d68570be7025632f985d8569f6dc85 Mon Sep 17 00:00:00 2001
From 8db167728d498636399cf2ca04cbdd4a3e23b9f9 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 4/7] treble: Enable call recording
Subject: [PATCH 4/9] treble: Enable call recording
Change-Id: I57ca3604363547419a566b37b5151b6b30c46d28
---
@ -36,5 +36,5 @@ index 0000000..4cacde5
+ <integer name="call_recording_audio_source">4</integer>
+</resources>
--
2.25.1
2.34.1

View File

@ -1,26 +1,46 @@
From b77fda8daa3632ef92f3299180506bcbd7c53189 Mon Sep 17 00:00:00 2001
From eec24080edaf13ebf8d4b58815a5ef7c22f88658 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 5 Nov 2022 23:49:11 +0000
Subject: [PATCH 5/7] treble: Switch to MindTheGapps
Subject: [PATCH 5/9] treble: Switch to MindTheGapps
Change-Id: I1b80d4c5176cbf4af21d147c71b0abce6027c7c7
---
generate.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
generate.sh | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/generate.sh b/generate.sh
index 89fa88b..d847430 100644
index 89fa88b..8654eeb 100644
--- a/generate.sh
+++ b/generate.sh
@@ -26,7 +26,7 @@ for part in a ab;do
@@ -24,9 +24,15 @@ for part in a ab;do
extra_packages=""
vndk="vndk.mk"
optional_base=""
+
+ baseArch="$arch"
+ if [ "$arch" = "a64" ];then
+ baseArch="arm"
+ fi
+
if [ "$apps" == "gapps" ];then
apps_suffix="g"
- apps_script='$(call inherit-product, device/phh/treble/gapps.mk)'
+ apps_script='$(call inherit-product, vendor/gapps/arm64/arm64-vendor.mk)'
+ apps_script='$(call inherit-product, vendor/gapps/'$baseArch'/'$baseArch'-vendor.mk)'
apps_name="with GApps"
fi
if [ "$apps" == "gapps-go" ];then
--
2.25.1
@@ -66,11 +72,6 @@ for part in a ab;do
target="lineage_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
- baseArch="$arch"
- if [ "$arch" = "a64" ];then
- baseArch="arm"
- fi
-
zygote=32
if [ "$arch" = "arm64" ];then
zygote=64_32
--
2.34.1

View File

@ -1,7 +1,7 @@
From 2a9382e9a122f3a34adfed4da687e2bf23383d58 Mon Sep 17 00:00:00 2001
From fd621da49491bdb2272a076778c7c0374b3f6d1f 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/7] treble: Stop securing ADB
Subject: [PATCH 6/9] treble: Stop securing ADB
Seems to kill USB Debugging altogether on certain devices,
and unrelated to SN anyway
@ -9,14 +9,14 @@ Build-time macro coupled with vendor/lineage might do better...
Change-Id: I0215b3ed970dd53a124f48e30ca2cf4b0c6d2899
---
rw-system.sh | 4 ----
1 file changed, 4 deletions(-)
rw-system.sh | 3 ---
1 file changed, 3 deletions(-)
diff --git a/rw-system.sh b/rw-system.sh
index 42d315f..798e5e3 100644
index d78d6f2..dfd9305 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -764,14 +764,10 @@ if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
@@ -786,13 +786,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
@ -26,11 +26,10 @@ index 42d315f..798e5e3 100644
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.25.1
2.34.1

View File

@ -1,21 +1,21 @@
From f57a44efd56ca41a593e6d1ebb948f486960f714 Mon Sep 17 00:00:00 2001
From 81f34a4c35c904fdb34fae8f35229dc2f0580df9 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/7] treble: Securize on-demand
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(+)
vndk.rc | 3 +++
2 files changed, 17 insertions(+)
diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh
index 4371632..a8cea3f 100644
index 2d30ab7..92db128 100644
--- a/phh-prop-handler.sh
+++ b/phh-prop-handler.sh
@@ -210,3 +210,17 @@ if [ "$1" == "persist.sys.phh.disable_soundvolume_effect" ];then
@@ -257,3 +257,17 @@ if [ "$1" == "persist.bluetooth.system_audio_hal.enabled" ]; then
restartAudio
exit
fi
@ -34,15 +34,16 @@ index 4371632..a8cea3f 100644
+ exit
+fi
diff --git a/vndk.rc b/vndk.rc
index d1fffde..7db62b7 100644
index 823456a..1ec8ccb 100644
--- a/vndk.rc
+++ b/vndk.rc
@@ -82,3 +82,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}
@@ -90,3 +90,6 @@ service watchdogd-gsi /system/bin/watchdogd 10 20
class core
oneshot
seclabel u:r:watchdogd:s0
+
+on property:persist.sys.phh.securize=*
+ exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.securize"
--
2.25.1
2.34.1

View File

@ -0,0 +1,46 @@
From d67665b77e18082ef9362e4047f99de0a1b0f81f 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 92db128..0b862d1 100644
--- a/phh-prop-handler.sh
+++ b/phh-prop-handler.sh
@@ -264,10 +264,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 dfd9305..a716c9b 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -749,7 +749,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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
From eec24080edaf13ebf8d4b58815a5ef7c22f88658 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 5 Nov 2022 23:49:11 +0000
Subject: [PATCH 5/9] treble: Switch to MindTheGapps
Change-Id: I1b80d4c5176cbf4af21d147c71b0abce6027c7c7
---
system.prop | 2 +++++++------
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system.prop b/system.prop
index f3c0c45..8c22ea3 100644
--- a/system.prop
+++ b/system.prop
@@ -6,7 +6,7 @@ persist.sys.overlay.nightmode=true
#Disable debugging strict mode toasts
persist.sys.strictmode.disable=true
-persist.sys.phh.mainkeys=0
+persist.sys.phh.mainkeys=1
fw.max_users=10
persist.sys.max_profiles=10

View File

@ -1,4 +1,4 @@
From 363c57e1fc2566b3818315ed982ea3a5e976331a Mon Sep 17 00:00:00 2001
From c329331ba9e37c24809afbd026bcc770f7950384 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/3] Add Meizu 18 vibrator support
@ -28,13 +28,13 @@ Change-Id: Iecf12cd814e8773abfd78a19f98e31125a73761a
create mode 100644 meizu-vibrator/service.cpp
diff --git a/base.mk b/base.mk
index 3d59ba6..82cae16 100644
index 49c4da6..3a99248 100644
--- a/base.mk
+++ b/base.mk
@@ -250,3 +250,7 @@ include build/make/target/product/gsi_release.mk
# Protect deskclock from power save
PRODUCT_COPY_FILES += \
device/phh/treble/files/com.android.deskclock_whitelist.xml:system/etc/sysconfig/com.android.deskclock_whitelist.xml
@@ -259,3 +259,7 @@ PRODUCT_PACKAGES += \
# Two-pane layout in Settings
PRODUCT_PACKAGES += \
androidx.window.extensions
+
+# Meizu vibrator
+PRODUCT_PACKAGES += \
@ -427,5 +427,5 @@ index cb44422..280ae2d 100644
+allow hal_vibrator_default vib_strength_sysfs:dir rw_dir_perms;
+allow hal_vibrator_default vib_strength_sysfs:file rw_file_perms;
--
2.25.1
2.34.1

View File

@ -1,4 +1,4 @@
From e7a31e6a0a55d45b56de3d6d99aae143bd20a4a2 Mon Sep 17 00:00:00 2001
From cfc2fd859fb445535d9de131697c56f21d1cee48 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 2/3] Revert "Include sim toolkit app"
@ -11,10 +11,10 @@ Change-Id: I1eb7f4bb070eea649b4cea6280299e629d1edb3d
1 file changed, 3 deletions(-)
diff --git a/base.mk b/base.mk
index 82cae16..225fc0f 100644
index 3a99248..877a408 100644
--- a/base.mk
+++ b/base.mk
@@ -171,9 +171,6 @@ PRODUCT_PACKAGES += \
@@ -172,9 +172,6 @@ PRODUCT_PACKAGES += \
xiaomi-motor \
oneplus-motor
@ -25,5 +25,5 @@ index 82cae16..225fc0f 100644
resetprop_phh
--
2.25.1
2.34.1

View File

@ -1,4 +1,4 @@
From b4a2306f04fa26d24c6f5b6dd4f66a967c62974f Mon Sep 17 00:00:00 2001
From 719b8e8406f6dbb72aac8029c37cdef445339292 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 3/3] Revert "treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS
@ -23,5 +23,5 @@ index 9d1d45e..8cde64f 100644
-
TARGET_NO_KERNEL_OVERRIDE := true
--
2.25.1
2.34.1

View File

@ -1,45 +1,26 @@
From 6ebe8ddd00f9b7bd7aa32e79f7f36e97f60acfa5 Mon Sep 17 00:00:00 2001
From feb3f559b2157de9ca06438038114aedb2cc604e Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 11 Jan 2023 11:56:05 +0000
Date: Thu, 23 Mar 2023 15:28:42 +0000
Subject: [PATCH 1/2] Squashed revert of LOS UDFPS changes
Way less than FOD, but reverting them nonetheless to keep in line with PHH AOSP
- Revert "fixup! udfps: Restore illumination dot for global hbm"
- Revert "udfps: Make pressed udfp view configurable"
- Revert "udfps: Restore illumination dot for global hbm"
- Revert "udfps: Implement default udfps display mode provider"
- Revert "udfps: Change window type to TYPE_DISPLAY_OVERLAY"
---
packages/SystemUI/proguard.flags | 3 -
.../res/drawable-nodpi/udfps_icon_pressed.png | Bin 108 -> 0 bytes
packages/SystemUI/res/layout/udfps_view.xml | 6 -
.../SystemUI/res/values/lineage_config.xml | 6 -
.../SystemUI/res/values/lineage_config.xml | 3 -
.../biometrics/AuthContainerView.java | 2 +-
.../DummyUdfpsDisplayModeProvider.kt | 32 ----
.../systemui/biometrics/UdfpsController.java | 4 +-
.../biometrics/UdfpsControllerOverlay.kt | 2 +-
.../systemui/biometrics/UdfpsSurfaceView.java | 159 ------------------
.../android/systemui/biometrics/UdfpsView.kt | 31 +---
.../systemui/dagger/SystemUIModule.java | 14 +-
11 files changed, 7 insertions(+), 252 deletions(-)
7 files changed, 3 insertions(+), 200 deletions(-)
delete mode 100644 packages/SystemUI/res/drawable-nodpi/udfps_icon_pressed.png
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/DummyUdfpsDisplayModeProvider.kt
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/UdfpsSurfaceView.java
diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags
index b41952b7306b..7538555e1bcd 100644
--- a/packages/SystemUI/proguard.flags
+++ b/packages/SystemUI/proguard.flags
@@ -10,9 +10,6 @@
}
-keep class * extends com.android.systemui.CoreStartable
-keep class * implements com.android.systemui.CoreStartable$Injector
--keep class * implements com.android.systemui.biometrics.UdfpsDisplayModeProvider {
- public <init>(...);
-}
# Needed for builds to properly initialize KeyFrames from xml scene
-keepclassmembers class * extends androidx.constraintlayout.motion.widget.Key {
diff --git a/packages/SystemUI/res/drawable-nodpi/udfps_icon_pressed.png b/packages/SystemUI/res/drawable-nodpi/udfps_icon_pressed.png
deleted file mode 100644
index 4102e28c1300b49323b50625d8cfaa73b006561f..0000000000000000000000000000000000000000
@ -68,16 +49,13 @@ index 0fcbfa161ddf..257d238f5c54 100644
-
</com.android.systemui.biometrics.UdfpsView>
diff --git a/packages/SystemUI/res/values/lineage_config.xml b/packages/SystemUI/res/values/lineage_config.xml
index 7509dfd2dcba..d08c6f19b9a3 100644
index 3b61502f551c..c7a73b79a5ec 100644
--- a/packages/SystemUI/res/values/lineage_config.xml
+++ b/packages/SystemUI/res/values/lineage_config.xml
@@ -25,12 +25,6 @@
causes a poor experience. -->
<bool name="config_fingerprintWakeAndUnlock">true</bool>
@@ -19,9 +19,6 @@
<integer name="config_maxVisibleNotificationIcons">4</integer>
<integer name="config_maxVisibleNotificationIconsOnLock">3</integer>
- <!-- Udfps display mode provider class name -->
- <string name="config_udfpsDisplayModeProviderComponent">com.android.systemui.biometrics.DummyUdfpsDisplayModeProvider</string>
-
- <!-- Color of the UDFPS pressed view -->
- <color name="config_udfpsColor">#ffffffff</color>
-
@ -85,10 +63,10 @@ index 7509dfd2dcba..d08c6f19b9a3 100644
<bool name="doze_double_tap_proximity_check">false</bool>
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
index 2d87da8c2112..8f5cbb76222f 100644
index 699be662dd54..68e1f72d042a 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
@@ -879,7 +879,7 @@ public class AuthContainerView extends LinearLayout
@@ -847,7 +847,7 @@ public class AuthContainerView extends LinearLayout
final WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT,
@ -97,71 +75,11 @@ index 2d87da8c2112..8f5cbb76222f 100644
windowFlags,
PixelFormat.TRANSLUCENT);
lp.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/DummyUdfpsDisplayModeProvider.kt b/packages/SystemUI/src/com/android/systemui/biometrics/DummyUdfpsDisplayModeProvider.kt
deleted file mode 100644
index 380200983114..000000000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/DummyUdfpsDisplayModeProvider.kt
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2022 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.
- */
-
-package com.android.systemui.biometrics
-
-import android.content.Context
-import android.view.Surface
-
-class DummyUdfpsDisplayModeProvider constructor(
- private val context: Context
-): UdfpsDisplayModeProvider {
- override fun enable(onEnabled: Runnable?) {
- onEnabled?.run()
- }
-
- override fun disable(onDisabled: Runnable?) {
- onDisabled?.run()
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
index 70aa6a3aa06e..412dc0577876 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
@@ -594,7 +594,7 @@ public class UdfpsController implements DozeReceiver {
@NonNull VibratorHelper vibrator,
@NonNull UdfpsHapticsSimulator udfpsHapticsSimulator,
@NonNull UdfpsShell udfpsShell,
- @NonNull UdfpsDisplayModeProvider udfpsDisplayMode,
+ @NonNull Optional<UdfpsDisplayModeProvider> udfpsDisplayMode,
@NonNull KeyguardStateController keyguardStateController,
@NonNull DisplayManager displayManager,
@Main Handler mainHandler,
@@ -626,7 +626,7 @@ public class UdfpsController implements DozeReceiver {
mPowerManager = powerManager;
mAccessibilityManager = accessibilityManager;
mLockscreenShadeTransitionController = lockscreenShadeTransitionController;
- mUdfpsDisplayMode = udfpsDisplayMode;
+ mUdfpsDisplayMode = udfpsDisplayMode.orElse(null);
screenLifecycle.addObserver(mScreenObserver);
mScreenOn = screenLifecycle.getScreenState() == ScreenLifecycle.SCREEN_ON;
mConfigurationController = configurationController;
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
index 09a7fb338553..1c62f8a4e508 100644
index 6d1e958e21ad..8db4927ee059 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
@@ -93,7 +93,7 @@ class UdfpsControllerOverlay(
@@ -109,7 +109,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
private var overlayTouchListener: TouchExplorationStateChangeListener? = null
private val coreLayoutParams = WindowManager.LayoutParams(
@ -336,10 +254,10 @@ index 2488132b508b..000000000000
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
index 9dcd2db4d3b4..a15456d46897 100644
index 97590822a3fb..4a8877edfa53 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
@@ -24,7 +24,6 @@ import android.graphics.RectF
@@ -25,7 +25,6 @@ import android.graphics.RectF
import android.util.AttributeSet
import android.util.Log
import android.view.MotionEvent
@ -347,7 +265,7 @@ index 9dcd2db4d3b4..a15456d46897 100644
import android.widget.FrameLayout
import com.android.systemui.R
import com.android.systemui.doze.DozeReceiver
@@ -57,8 +56,6 @@ class UdfpsView(
@@ -61,8 +60,6 @@ class UdfpsView(
a.getFloat(R.styleable.UdfpsView_sensorTouchAreaCoefficient, 0f)
}
@ -356,7 +274,7 @@ index 9dcd2db4d3b4..a15456d46897 100644
/** View controller (can be different for enrollment, BiometricPrompt, Keyguard, etc.). */
var animationViewController: UdfpsAnimationViewController<*>? = null
@@ -85,10 +82,6 @@ class UdfpsView(
@@ -89,10 +86,6 @@ class UdfpsView(
return (animationViewController == null || !animationViewController!!.shouldPauseAuth())
}
@ -367,7 +285,7 @@ index 9dcd2db4d3b4..a15456d46897 100644
override fun dozeTimeTick() {
animationViewController?.dozeTimeTick()
}
@@ -150,34 +143,12 @@ class UdfpsView(
@@ -160,34 +153,12 @@ class UdfpsView(
fun configureDisplay(onDisplayConfigured: Runnable) {
isDisplayConfigured = true
animationViewController?.onDisplayConfiguring()
@ -388,7 +306,7 @@ index 9dcd2db4d3b4..a15456d46897 100644
-
- mUdfpsDisplayMode?.enable {
- onDisplayConfigured?.run()
- ghbmView?.drawIlluminationDot(sensorRect)
- ghbmView?.drawIlluminationDot(RectF(sensorRect))
- }
+ mUdfpsDisplayMode?.enable(onDisplayConfigured)
}
@ -403,38 +321,6 @@ index 9dcd2db4d3b4..a15456d46897 100644
mUdfpsDisplayMode?.disable(null /* onDisabled */)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index bc130894ced1..443d2774f0e0 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -93,7 +93,6 @@ import com.android.systemui.util.time.SystemClock;
import com.android.systemui.util.time.SystemClockImpl;
import com.android.systemui.wallet.dagger.WalletModule;
import com.android.systemui.wmshell.BubblesManager;
-import com.android.systemui.R;
import com.android.wm.shell.bubbles.Bubbles;
import java.util.Optional;
@@ -199,17 +198,8 @@ public abstract class SystemUIModule {
@BindsOptionalOf
abstract CentralSurfaces optionalCentralSurfaces();
- @Provides
- static UdfpsDisplayModeProvider getUdfpsDisplayModeProvider(Context context) {
- String className = context.getString(R.string.config_udfpsDisplayModeProviderComponent);
- try {
- Class<?> clazz = context.getClassLoader().loadClass(className);
- return (UdfpsDisplayModeProvider) clazz.getDeclaredConstructor(
- new Class[] { Context.class }).newInstance(context);
- } catch (Throwable t) {
- throw new RuntimeException("Error loading UdfpsDisplayModeProvider " + className, t);
- }
- }
+ @BindsOptionalOf
+ abstract UdfpsDisplayModeProvider optionalUdfpsDisplayModeProvider();
@BindsOptionalOf
abstract AlternateUdfpsTouchProvider optionalUdfpsTouchProvider();
--
2.25.1
2.34.1

View File

@ -1,4 +1,4 @@
From 435be186e085fa16091e2574ac01f07197e8faf5 Mon Sep 17 00:00:00 2001
From f0b54d18cd3c7382f230bedb198177c68e2bb3b2 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Fri, 10 Jun 2022 21:33:47 +0800
Subject: [PATCH 2/2] Revert "Biometrics: Allow disabling of fingerprint
@ -45,5 +45,5 @@ index 02353bc01c79..c1a86386dfd4 100644
scheduleUpdateActiveUserWithoutHandler(userId);
--
2.25.1
2.34.1

View File

@ -0,0 +1,56 @@
From 23a01464fda098e3ec51ea34aaf040582dd98aaa Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Aug 2023 16:00:17 +0800
Subject: [PATCH] Revert "gd: hci: Allow disabling selected local commands"
This reverts commit 2b932ba1ef8d2cafde548d7efa2c977a21eb0547.
---
system/gd/hci/controller.cc | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc
index 10023e3dd9..18f881369e 100644
--- a/system/gd/hci/controller.cc
+++ b/system/gd/hci/controller.cc
@@ -16,7 +16,6 @@
#include "hci/controller.h"
-#include <android-base/strings.h>
#include <future>
#include <memory>
#include <string>
@@ -26,14 +25,10 @@
#include "hci/hci_layer.h"
#include "hci_controller_generated.h"
#include "os/metrics.h"
-#include "os/system_properties.h"
namespace bluetooth {
namespace hci {
-static const char kPropertyDisabledCommands[] =
- "bluetooth.hci.disabled_commands";
-
using os::Handler;
struct Controller::impl {
@@ -265,15 +260,6 @@ struct Controller::impl {
ErrorCode status = complete_view.GetStatus();
ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str());
local_supported_commands_ = complete_view.GetSupportedCommands();
-
- if (auto disabledCommands = os::GetSystemProperty(kPropertyDisabledCommands)) {
- for (const auto& command : android::base::Split(*disabledCommands, ",")) {
- uint16_t index = std::stoi(command);
- uint16_t byte_index = index / 10;
- uint16_t bit_index = index % 10;
- local_supported_commands_[byte_index] &= ~(1 << bit_index);
- }
- }
}
void read_local_extended_features_complete_handler(std::promise<void> promise, CommandCompleteView view) {
--
2.34.1

View File

@ -1,7 +1,7 @@
From 9d5a7fac46a27db0efe27f902933ded495102458 Mon Sep 17 00:00:00 2001
From 26b9c0d76d940676fc12d7f27c13180a4d4bd8e1 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 1/2] Disable vndklite handling
Subject: [PATCH 1/4] 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 c6588d2cd..545426fd9 100644
index 5df379936..ceaba7d95 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 c6588d2cd..545426fd9 100644
static const char* const kLdGeneratedConfigFilePath = "/linkerconfig/ld.config.txt";
@@ -3365,10 +3364,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
@@ -3436,10 +3435,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 c6588d2cd..545426fd9 100644
size_t insert_pos = ld_config_file_vndk.find_last_of('.');
if (insert_pos == std::string::npos) {
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From fe04ccfd62f79856ffcfe3a10d905f12362c1094 Mon Sep 17 00:00:00 2001
From 3cc1f7f548906eaac5f7347c897494fc10ad6aa9 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
Subject: [PATCH 2/4] Add new mechanism to fake vendor props on a per-process
basis
This reads debug.phh.props.<process name>. If its value is "vendor",
@ -74,5 +74,5 @@ index 1cb15c3df..d6e7e3e68 100644
if (pi != nullptr) {
--
2.25.1
2.34.1

View File

@ -0,0 +1,145 @@
From 8b21b5d2efbe2d2c7966885342ed093a43f74af9 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 19 Jan 2023 16:44:01 -0500
Subject: [PATCH 3/4] Rework property overriding
- Support property read with callback in addition to previous
constant-size property_get
- Add another class of redirect "keymaster", to redirect to AOSP/GSI
props + SPL based on boot.img
---
libc/system_properties/system_properties.cpp | 77 +++++++++++++++-----
1 file changed, 58 insertions(+), 19 deletions(-)
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
index d6e7e3e68..40ff48bad 100644
--- a/libc/system_properties/system_properties.cpp
+++ b/libc/system_properties/system_properties.cpp
@@ -35,6 +35,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <string.h>
#include <fcntl.h>
#include <new>
@@ -60,23 +61,70 @@ static void read_self() {
if(self_ok) return;
self_ok = true;
- int fd = open("/proc/self/comm", O_RDONLY);
+ char cmdline[128];
+ int fd = open("/proc/self/cmdline", O_RDONLY);
if(fd<0) return;
- read(fd, comm, sizeof(comm)-1);
- for(unsigned i=0; i<sizeof(comm); i++)
- if(comm[i] == '\n')
- comm[i] = 0;
+ read(fd, cmdline, sizeof(cmdline)-1);
+ for(unsigned i=0; i<sizeof(cmdline); i++)
+ if(cmdline[i] == '\n')
+ cmdline[i] = 0;
close(fd);
+ // Truncate to last /, we don't want `/` in the prop
+ const char *c = strrchr(cmdline, '/');
+ if (c != nullptr) {
+ c = c+1;
+ } else {
+ c = cmdline;
+ }
+ // Take only the last 16 bytes (prop names max is 32)
+ if(strlen(c) < 15) {
+ strcpy(comm, c);
+ } else {
+ strcpy(comm, c + strlen(c) - 15);
+ }
+
+
//That's calling ourselves but that's fine because we already have self_ok = true
char propName[PROP_NAME_MAX];
memset(propName, 0, PROP_NAME_MAX);
strncpy(propName, "debug.phh.props.", PROP_NAME_MAX - 1);
- strncat(propName, comm, PROP_NAME_MAX - 1);
+ strncat(propName, comm, PROP_NAME_MAX - strlen(propName) - 1);
+ //async_safe_format_log(ANDROID_LOG_WARN, "libc", "Reading debug prop %s", propName);
__system_property_get(propName, comm_override);
}
+static const char* redirectToProp(const char *name) {
+ read_self();
+ /*if(strstr(name, "ro.keymaster") != nullptr || strstr(name, "security_patch") != nullptr || strstr(name, "release") != nullptr) {
+ async_safe_format_log(ANDROID_LOG_WARN, "libc", "Process/comm %s/%s is reading %s", comm, comm_override, name);
+ }*/
+ if(strcmp(comm_override, "vendor") == 0) {
+ if(strcmp(name, "ro.product.device") == 0) {
+ return "ro.product.vendor.device";
+ }
+ if(strcmp(name, "ro.product.manufacturer") == 0) {
+ return "ro.product.vendor.manufacturer";
+ }
+ }
+ if(strcmp(comm_override, "keymaster") == 0) {
+ if(strcmp(name, "ro.product.model") == 0) {
+ return "ro.keymaster.mod";
+ }
+ if(strcmp(name, "ro.product.brand") == 0) {
+ return "ro.keymaster.brn";
+ }
+ if(strcmp(name, "ro.build.version.release") == 0) {
+ return "ro.keymaster.xxx.release";
+ }
+ if(strcmp(name, "ro.build.version.security_patch") == 0) {
+ return "ro.keymaster.xxx.security_patch";
+ }
+ }
+ return name;
+}
+
static bool is_dir(const char* pathname) {
struct stat info;
if (stat(pathname, &info) == -1) {
@@ -150,17 +198,19 @@ uint32_t SystemProperties::AreaSerial() {
}
const prop_info* SystemProperties::Find(const char* name) {
+ const char* newName = redirectToProp(name);
+
if (!initialized_) {
return nullptr;
}
- prop_area* pa = contexts_->GetPropAreaForName(name);
+ prop_area* pa = contexts_->GetPropAreaForName(newName);
if (!pa) {
async_safe_format_log(ANDROID_LOG_WARN, "libc", "Access denied finding property \"%s\"", name);
return nullptr;
}
- return pa->find(name);
+ return pa->find(newName);
}
static bool is_read_only(const char* name) {
@@ -243,17 +293,6 @@ void SystemProperties::ReadCallback(const prop_info* pi,
}
int SystemProperties::Get(const char* name, char* value) {
- read_self();
- if(strcmp(comm_override, "vendor") == 0) {
- if(strcmp(name, "ro.product.device") == 0) {
- int r = Get("ro.product.vendor.device", value);
- if(r>0) return r;
- }
- if(strcmp(name, "ro.product.manufacturer") == 0) {
- int r = Get("ro.product.vendor.manufacturer", value);
- if(r>0) return r;
- }
- }
const prop_info* pi = Find(name);
if (pi != nullptr) {
--
2.34.1

View File

@ -0,0 +1,31 @@
From b9ad9ef613bcc1c7fb7713b5091e98343669d393 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 28 May 2023 16:46:46 -0400
Subject: [PATCH 4/4] Add some properties to fake in "keymaster" prop
replacement mode, to expose unlocked vbmeta state and orange
verifiedbootstate
---
libc/system_properties/system_properties.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
index 40ff48bad..057199318 100644
--- a/libc/system_properties/system_properties.cpp
+++ b/libc/system_properties/system_properties.cpp
@@ -121,6 +121,12 @@ static const char* redirectToProp(const char *name) {
if(strcmp(name, "ro.build.version.security_patch") == 0) {
return "ro.keymaster.xxx.security_patch";
}
+ if(strcmp(name, "ro.boot.vbmeta.device_state") == 0) {
+ return "ro.keymaster.xxx.vbmeta_state";
+ }
+ if(strcmp(name, "ro.boot.verifiedbootstate") == 0) {
+ return "ro.keymaster.xxx.verifiedbootstate";
+ }
}
return name;
}
--
2.34.1

View File

@ -1,8 +1,8 @@
From d9083d41e17a8429dc53a6be9acfb437fd3b982b Mon Sep 17 00:00:00 2001
From afc71434499293e37cfd831f1d7a434c6ab3251f Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 9 Apr 2018 00:19:49 +0200
Subject: [PATCH 1/9] Increase default log_level to get actual selinux error in
kmsg
Subject: [PATCH 01/10] Increase default log_level to get actual selinux error
in kmsg
---
secilc/secilc.c | 2 +-
@ -22,5 +22,5 @@ index 80d3583d..a51630b2 100644
{"help", no_argument, 0, 'h'},
{"verbose", no_argument, 0, 'v'},
--
2.25.1
2.34.1

View File

@ -1,8 +1,8 @@
From 0deb03a6694729e084e8e81d7e840a851d130476 Mon Sep 17 00:00:00 2001
From 440307f9bb3e44d9c4eb8f6fcae4e495e1336d0b Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 9 Sep 2020 22:36:42 +0200
Subject: [PATCH 2/9] Revert "libsepol: Make an unknown permission an error in
CIL"
Subject: [PATCH 02/10] Revert "libsepol: Make an unknown permission an error
in CIL"
This reverts commit dc4e54126bf25dea4d51820922ccd1959be68fbc.
@ -41,5 +41,5 @@ index 69a8a2ed..b63c1359 100644
cil_list_append(*perm_datums, curr->flavor, curr->data);
}
--
2.25.1
2.34.1

View File

@ -1,7 +1,8 @@
From fad09461b0c7ab877b32c5ab402c053335f19f18 Mon Sep 17 00:00:00 2001
From c9a0c6be08c1c5ada6a4b83beefd66946fe4a06c Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 31 Mar 2021 23:32:37 +0200
Subject: [PATCH 3/9] Workaround device/phh/treble conflict with SELinux policy
Subject: [PATCH 03/10] Workaround device/phh/treble conflict with SELinux
policy
device/phh/treble defines the following three types (hostapd,
sysfs_usb_supply, rpmb_device)
@ -111,5 +112,5 @@ index b63c1359..87db4f81 100644
}
--
2.25.1
2.34.1

View File

@ -1,8 +1,8 @@
From 8168537d375afd17235b88f6ee9bc9b2c3db06a3 Mon Sep 17 00:00:00 2001
From e1a6a3213cbb41b7ad04f7b7a685e06a36bf0441 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Fri, 6 Sep 2019 15:07:25 +0200
Subject: [PATCH 4/9] Allow /devices/virtual/block/ genfscon conflict (seen on
Xiaomi Mi 9)
Subject: [PATCH 04/10] Allow /devices/virtual/block/ genfscon conflict (seen
on Xiaomi Mi 9)
Change-Id: I06e4e9d5b82d61a8aeab595b47e2589249675895
---
@ -39,5 +39,5 @@ index 09c02af9..5c0e99c3 100644
int cil_post_netifcon_context_compare(const void *a, const void *b)
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 5d08badc20058b79803197379ca0371b5ae18230 Mon Sep 17 00:00:00 2001
From 0a6fdcf14c157b55a8bd0e7dd82f2236e07dc37e Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 12 Sep 2019 20:37:04 +0200
Subject: [PATCH 5/9] if service is "rcs", accept conflict. Seen on Moto E5
Subject: [PATCH 05/10] if service is "rcs", accept conflict. Seen on Moto E5
Change-Id: I0cc2d0fad83f403f2b5d7458039b1564ce5ed9dd
---
@ -40,5 +40,5 @@ index e52b44d4..3b8a2bd8 100644
selinux_log
(SELINUX_WARNING,
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 1bb417ece7c1709906499a9cdd73c5b37ddd8c71 Mon Sep 17 00:00:00 2001
From c46994a1a9fad0a76e41f0a5efe5238ca3f6b582 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 24 May 2020 17:22:22 +0200
Subject: [PATCH 6/9] Allow mismatches of exfat genfscon
Subject: [PATCH 06/10] Allow mismatches of exfat genfscon
---
libsepol/cil/src/cil_post.c | 4 ++++
@ -23,5 +23,5 @@ index 5c0e99c3..97bf54f8 100644
fprintf(stderr, "Received conflicting %s vs %s but ignore\n", a_genfscon->path_str, b_genfscon->path_str);
return 0;
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 6a0bc65c6bda1576d59bd89225ae4babfc3de6be Mon Sep 17 00:00:00 2001
From 3ec6f5715a4c38ff7506fdb397eaf7077e004014 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Fri, 2 Mar 2018 22:49:55 +0100
Subject: [PATCH 7/9] Enable multipl_decls by default. This is needed because
Subject: [PATCH 07/10] Enable multipl_decls by default. This is needed because
8.0 init doesn't add -m
Change-Id: I43dc661d519f7b8576d72a828d8cbd444592bf5e
@ -23,5 +23,5 @@ index a51630b2..d9841ab0 100644
int preserve_tunables = 0;
int qualified_names = 0;
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 1e5154623b208daf37d20d297f3c8ecaacfb1b28 Mon Sep 17 00:00:00 2001
From 96d937647898b239a0f2cfa10ad7dff3adee7093 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Fri, 25 Oct 2019 13:29:20 +0200
Subject: [PATCH 8/9] Fix boot on Moto devices using unknown class
Subject: [PATCH 08/10] Fix boot on Moto devices using unknown class
vendor sepolicy never contains new class or classorder, and are not
allowed to.
@ -80,5 +80,5 @@ index 90f0fee6..023fd6c7 100644
if (rc != SEPOL_OK) {
goto exit;
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From e0e22c909d3f107f54136921d723f2656d5677ff Mon Sep 17 00:00:00 2001
From 1400000270e7bc96b460ce232425970580c94783 Mon Sep 17 00:00:00 2001
From: ponces <ponces26@gmail.com>
Date: Mon, 7 Nov 2022 16:14:20 +0000
Subject: [PATCH 9/9] Improve SELinux policy workaround on device/phh/treble
Subject: [PATCH 09/10] Improve SELinux policy workaround on device/phh/treble
conflict to exit with SEPOL_OK instead of SEPOL_EEXIST
This fixes boot on many Samsung devices as exiting with SEPOL_EEXIST will prevent them to boot
@ -22,5 +22,5 @@ index 023fd6c7..61c8864b 100644
return SEPOL_OK;
--
2.25.1
2.34.1

View File

@ -0,0 +1,33 @@
From 6e89fce2e98c9d076e28f18031d4ac543b49994f Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 20 Jul 2023 14:21:21 -0400
Subject: [PATCH 10/10] Allow /sys/vm/watermark_scale_factor conflict -- seen
on Freebox Player Pop
---
libsepol/cil/src/cil_post.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c
index 97bf54f8..4cf1f2d3 100644
--- a/libsepol/cil/src/cil_post.c
+++ b/libsepol/cil/src/cil_post.c
@@ -502,6 +502,15 @@ int cil_post_genfscon_context_compare(const void *a, const void *b)
*/
if(strcmp(a_genfscon->path_str, "/devices/virtual/block/") == 0)
bypass = 1;
+ /*
+ * This conflict has been seen on Freebox Player Pop
+ * - AOSP T says (genfscon proc "/sys/vm/watermark_scale_factor" (u object_r proc_watermark_scale_factor ((s0) (s0))))
+ * - stock rom says proc_vm_writable
+ *
+ * Stock ROM uses it only in recovery so it's safe to ignore
+ */
+ if(strcmp(a_genfscon->path_str, "/sys/vm/watermark_scale_factor") == 0)
+ bypass = 1;
if(strcmp(a_genfscon->fs_str, "exfat") == 0 || strcmp(a_genfscon->fs_str, "esdfs") == 0) {
if(strcmp(a_genfscon->path_str, "/") == 0)
bypass = 1;
--
2.34.1

View File

@ -1,7 +1,7 @@
From c3bb65b010f19b31a56b8c5d10ef182b32894fbf Mon Sep 17 00:00:00 2001
From 620a8b0407bb0cdd1889e8491bb17777ecc05121 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Thu, 18 Aug 2022 15:44:46 -0400
Subject: [PATCH 01/26] APM: Restore S, R and Q behavior respectively for
Subject: [PATCH 01/27] APM: Restore S, R and Q behavior respectively for
telephony audio
This conditionally reverts part of b2e5cb (T), 51c9cc (S) and afd4ce (R)
@ -31,12 +31,12 @@ relying on the value of `ro.vndk.version`.
Change-Id: I56d36d2aef4319935cb88a3e4771b23c6d5b2145
---
.../managerdefault/AudioPolicyManager.cpp | 193 +++++++++++++-----
.../managerdefault/AudioPolicyManager.cpp | 197 +++++++++++++-----
.../managerdefault/AudioPolicyManager.h | 3 +
2 files changed, 141 insertions(+), 55 deletions(-)
2 files changed, 143 insertions(+), 57 deletions(-)
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 744609f27b..224dae3820 100644
index f625fdb3be..6c45696005 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -675,6 +675,17 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
@ -148,10 +148,10 @@ index 744609f27b..224dae3820 100644
bool AudioPolicyManager::isDeviceOfModule(
const sp<DeviceDescriptor>& devDesc, const char *moduleId) const {
sp<HwModule> module = mHwModules.getModuleFromName(moduleId);
@@ -4520,76 +4584,95 @@ status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch *
@@ -4550,78 +4614,97 @@ status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch *
// in config XML to reach the sink so that is can be declared as available.
audio_io_handle_t output = AUDIO_IO_HANDLE_NONE;
sp<SwAudioOutputDescriptor> outputDesc = nullptr;
sp<SwAudioOutputDescriptor> outputDesc;
- if (!sourceDesc->isInternal()) {
- // take care of dynamic routing for SwOutput selection,
- audio_attributes_t attributes = sourceDesc->attributes();
@ -180,10 +180,25 @@ index 744609f27b..224dae3820 100644
- ALOGE("%s output is duplicated", __func__);
- return INVALID_OPERATION;
- }
- sourceDesc->setSwOutput(outputDesc);
- bool closeOutput = outputDesc->mDirectOpenCount != 0;
- sourceDesc->setSwOutput(outputDesc, closeOutput);
- } else {
- // Same for "raw patches" aka created from createAudioPatch API
- SortedVector<audio_io_handle_t> outputs =
- getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
- // if the sink device is reachable via an opened output stream, request to
- // go via this output stream by adding a second source to the patch
- // description
- output = selectOutput(outputs);
- if (output == AUDIO_IO_HANDLE_NONE) {
- ALOGE("%s no output available for internal patch sink", __func__);
- return INVALID_OPERATION;
- }
- outputDesc = mOutputs.valueFor(output);
- if (outputDesc->isDuplicated()) {
- ALOGV("%s output for device %s is duplicated",
- __func__, sinkDevice->toString().c_str());
- return INVALID_OPERATION;
+ if (sourceDesc != nullptr) {
+ if (!sourceDesc->isInternal()) {
+ // take care of dynamic routing for SwOutput selection,
@ -213,24 +228,12 @@ index 744609f27b..224dae3820 100644
+ ALOGE("%s output is duplicated", __func__);
+ return INVALID_OPERATION;
+ }
+ sourceDesc->setSwOutput(outputDesc);
+ bool closeOutput = outputDesc->mDirectOpenCount != 0;
+ sourceDesc->setSwOutput(outputDesc, closeOutput);
+ } else {
+ // Same for "raw patches" aka created from createAudioPatch API
+ SortedVector<audio_io_handle_t> outputs =
getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
- // if the sink device is reachable via an opened output stream, request to
- // go via this output stream by adding a second source to the patch
- // description
- output = selectOutput(outputs);
- if (output == AUDIO_IO_HANDLE_NONE) {
- ALOGE("%s no output available for internal patch sink", __func__);
- return INVALID_OPERATION;
- }
- outputDesc = mOutputs.valueFor(output);
- if (outputDesc->isDuplicated()) {
- ALOGV("%s output for device %s is duplicated",
- __func__, sinkDevice->toString().c_str());
- return INVALID_OPERATION;
+ getOutputsForDevices(DeviceVector(sinkDevice), mOutputs);
+ // if the sink device is reachable via an opened output stream, request to
+ // go via this output stream by adding a second source to the patch
+ // description
@ -245,9 +248,9 @@ index 744609f27b..224dae3820 100644
+ __func__, sinkDevice->toString().c_str());
+ return INVALID_OPERATION;
+ }
+ sourceDesc->setSwOutput(outputDesc);
+ sourceDesc->setSwOutput(outputDesc, /* closeOutput= */ false);
}
- sourceDesc->setSwOutput(outputDesc);
- sourceDesc->setSwOutput(outputDesc, /* closeOutput= */ false);
}
// create a software bridge in PatchPanel if:
// - source and sink devices are on different HW modules OR
@ -289,16 +292,17 @@ index 744609f27b..224dae3820 100644
audio_port_config srcMixPortConfig = {};
outputDesc->toAudioPortConfig(&srcMixPortConfig, nullptr);
// for volume control, we may need a valid stream
- srcMixPortConfig.ext.mix.usecase.stream = !sourceDesc->isInternal() ?
+ srcMixPortConfig.ext.mix.usecase.stream = (sourceDesc != nullptr && !sourceDesc->isInternal()) ?
srcMixPortConfig.ext.mix.usecase.stream =
- (!sourceDesc->isInternal() || isCallTxAudioSource(sourceDesc)) ?
+ (sourceDesc != nullptr && (!sourceDesc->isInternal() || isCallTxAudioSource(sourceDesc))) ?
mEngine->getStreamTypeForAttributes(sourceDesc->attributes()) :
AUDIO_STREAM_PATCH;
patchBuilder.addSource(srcMixPortConfig);
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
index db0ee15de8..97fa6f6f81 100644
index a69e08871b..f8762016db 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
@@ -938,6 +938,9 @@ protected:
@@ -944,6 +944,9 @@ protected:
SoundTriggerSessionCollection mSoundTriggerSessions;
@ -309,5 +313,5 @@ index db0ee15de8..97fa6f6f81 100644
SourceClientCollection mAudioSources;
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 9f20882e39d7af72c514669b7611785fa50ae567 Mon Sep 17 00:00:00 2001
From 92225b786a57d5247d5fc536fcc1e98625b7cb23 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 02/26] Fix BT in-call on CAF devices
Subject: [PATCH 02/27] Fix BT in-call on CAF devices
See https://github.com/phhusson/treble_experimentations/issues/374
@ -127,5 +127,5 @@ index d446e9667b..2f0ce75e47 100644
for (const xmlNode *children = cur->xmlChildrenNode; children != NULL;
--
2.25.1
2.34.1

View File

@ -1,7 +1,7 @@
From 76a5783fe2514d7b9d97faa8e221403c02fbcf6a Mon Sep 17 00:00:00 2001
From d5d39a14ce40d2a31bf7e12facfdd5751c180d8c 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 03/26] Add (partial, cam id is hardcoded) support for Asus ZF6
Subject: [PATCH 03/27] 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 80410ab463..b386046c19 100644
index bfd3120f73..653666b15c 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -26,6 +26,7 @@
@ -30,7 +30,7 @@ index 80410ab463..b386046c19 100644
mEventLog(DEFAULT_EVENT_LOG_LENGTH),
mNumberOfCameras(0),
mNumberOfCamerasWithoutSystemCamera(0),
@@ -1945,6 +1947,7 @@ Status CameraService::connectHelper(const sp<CALLBACK>& cameraCb, const String8&
@@ -2044,6 +2046,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 80410ab463..b386046c19 100644
finishConnectLocked(client, partial, oomScoreOffset, systemNativeClient);
}
@@ -2063,6 +2066,27 @@ status_t CameraService::addOfflineClient(String8 cameraId, sp<BasicClient> offli
@@ -2163,6 +2166,27 @@ status_t CameraService::addOfflineClient(String8 cameraId, sp<BasicClient> offli
return OK;
}
@ -66,7 +66,7 @@ index 80410ab463..b386046c19 100644
Status CameraService::turnOnTorchWithStrengthLevel(const String16& cameraId, int32_t torchStrength,
const sp<IBinder>& clientBinder) {
Mutex::Autolock lock(mServiceLock);
@@ -3318,6 +3342,8 @@ binder::Status CameraService::BasicClient::disconnect() {
@@ -3394,6 +3418,8 @@ binder::Status CameraService::BasicClient::disconnect() {
}
mDisconnected = true;
@ -76,10 +76,10 @@ index 80410ab463..b386046c19 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 d96ea008bc..5b77139040 100644
index 70293f4c5b..4ab725230c 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -226,6 +226,9 @@ public:
@@ -227,6 +227,9 @@ public:
// Register an offline client for a given active camera id
status_t addOfflineClient(String8 cameraId, sp<BasicClient> offlineClient);
@ -90,5 +90,5 @@ index d96ea008bc..5b77139040 100644
// Client functionality
--
2.25.1
2.34.1

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