commit 796726eb0938be20d6adff01e9fb0cd834d5b6a3 Author: Andy CrossGate Yan Date: Wed Oct 20 14:54:55 2021 +0000 Initial unified commit for Android 12, syncing up to v400.a diff --git a/patches_device/frameworks_base/placeholder b/patches_device/frameworks_base/placeholder new file mode 100644 index 0000000..e69de29 diff --git a/patches_device_personal/frameworks_base/placeholder b/patches_device_personal/frameworks_base/placeholder new file mode 100644 index 0000000..e69de29 diff --git a/patches_platform/build_make/0001-build-Remove-llkd.patch b/patches_platform/build_make/0001-build-Remove-llkd.patch new file mode 100644 index 0000000..e2217d5 --- /dev/null +++ b/patches_platform/build_make/0001-build-Remove-llkd.patch @@ -0,0 +1,27 @@ +From 90eaa68455703e85c5f97d0b13945bd04351e24c Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Thu, 14 Oct 2021 12:20:52 +0000 +Subject: [PATCH] build: Remove llkd + +...until someone figures out why Genshin Impact fails it + +Change-Id: I29384a820a0c07b29d3f11d7039bed40eeaee926 +--- + target/product/base_system.mk | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/target/product/base_system.mk b/target/product/base_system.mk +index b5b41f3be..c18a6dc03 100644 +--- a/target/product/base_system.mk ++++ b/target/product/base_system.mk +@@ -195,7 +195,6 @@ PRODUCT_PACKAGES += \ + libwilhelm \ + linker \ + linkerconfig \ +- llkd \ + lmkd \ + LocalTransport \ + locksettings \ +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0001-Disable-vendor-mismatch-warning.patch b/patches_platform/frameworks_base/0001-Disable-vendor-mismatch-warning.patch new file mode 100644 index 0000000..d8fcd4d --- /dev/null +++ b/patches_platform/frameworks_base/0001-Disable-vendor-mismatch-warning.patch @@ -0,0 +1,40 @@ +From d91222a9f7ea6a6455695f6d40adc8566153a1e5 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Thu, 5 Apr 2018 10:01:19 +0800 +Subject: [PATCH 01/21] Disable vendor mismatch warning + +Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b +--- + .../server/wm/ActivityTaskManagerService.java | 16 ++-------------- + 1 file changed, 2 insertions(+), 14 deletions(-) + +diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +index f3ba56a03aef..f831b10f0ddc 100644 +--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java ++++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +@@ -5493,20 +5493,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { + } + + if (!Build.isBuildConsistent()) { +- Slog.e(TAG, "Build fingerprint is not consistent, warning user"); +- mUiHandler.post(() -> { +- if (mShowDialogs) { +- AlertDialog d = new BaseErrorDialog(mUiContext); +- d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR); +- d.setCancelable(false); +- d.setTitle(mUiContext.getText(R.string.android_system_label)); +- d.setMessage(mUiContext.getText(R.string.system_error_manufacturer)); +- d.setButton(DialogInterface.BUTTON_POSITIVE, +- mUiContext.getText(R.string.ok), +- mUiHandler.obtainMessage(DISMISS_DIALOG_UI_MSG, d)); +- d.show(); +- } +- }); ++ Slog.e(TAG, "Build fingerprint is not consistent"); ++ // Do not emit warning about vendor mismatch + } + } + } +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0002-UI-Adjust-default-navbar-layouts.patch b/patches_platform/frameworks_base/0002-UI-Adjust-default-navbar-layouts.patch new file mode 100644 index 0000000..6d4323b --- /dev/null +++ b/patches_platform/frameworks_base/0002-UI-Adjust-default-navbar-layouts.patch @@ -0,0 +1,62 @@ +From 746c3238391f709acd19f24bdf7ecc97e03621a4 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sat, 16 Oct 2021 02:23:48 +0000 +Subject: [PATCH 02/21] UI: Adjust default navbar layouts + +- Slightly tighten nodpi layout +- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify + +Change-Id: Ia32f5d92e6c9e36560c53e7dffce7d2c29a81fe5 +--- + .../SystemUI/res/values-sw372dp/config.xml | 25 ------------------- + packages/SystemUI/res/values/config.xml | 2 +- + 2 files changed, 1 insertion(+), 26 deletions(-) + delete mode 100644 packages/SystemUI/res/values-sw372dp/config.xml + +diff --git a/packages/SystemUI/res/values-sw372dp/config.xml b/packages/SystemUI/res/values-sw372dp/config.xml +deleted file mode 100644 +index 07b797a32428..000000000000 +--- a/packages/SystemUI/res/values-sw372dp/config.xml ++++ /dev/null +@@ -1,25 +0,0 @@ +- +- +- +- +- +- +- left[.25W],back[.5WC];home;recent[.5WC],right[.25W] +- +diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml +index d274c917c26d..14276754e450 100644 +--- a/packages/SystemUI/res/values/config.xml ++++ b/packages/SystemUI/res/values/config.xml +@@ -350,7 +350,7 @@ + + + +- left[.5W],back[1WC];home;recent[1WC],right[.5W] ++ left[.6W],back[1WC];home;recent[1WC],right[.6W] + back[1.7WC];home;contextual[1.7WC] + back[70AC];home_handle;ime_switcher[70AC] + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0003-UI-Disable-left-seascape-navigation-bar-optionally.patch b/patches_platform/frameworks_base/0003-UI-Disable-left-seascape-navigation-bar-optionally.patch new file mode 100644 index 0000000..6e74178 --- /dev/null +++ b/patches_platform/frameworks_base/0003-UI-Disable-left-seascape-navigation-bar-optionally.patch @@ -0,0 +1,66 @@ +From d7f67355ac41dec8b9d9cff29c8ea21e1d3f9a22 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Fri, 9 Mar 2018 15:41:26 +0800 +Subject: [PATCH 03/21] UI: Disable left (seascape) navigation bar optionally + +Toggle this behaviour with property "persist.ui.seascape.disable" + +Change-Id: Ieb58efa4b59feeb0c4ac70e497f4c59aa04210d6 +--- + .../navigationbar/buttons/ReverseLinearLayout.java | 8 +++++++- + .../core/java/com/android/server/wm/DisplayPolicy.java | 5 +++-- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java +index f1e1366404a2..f43bef8532b8 100644 +--- a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java ++++ b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java +@@ -16,6 +16,7 @@ package com.android.systemui.navigationbar.buttons; + + import android.annotation.Nullable; + import android.content.Context; ++import android.os.SystemProperties; + import android.util.AttributeSet; + import android.view.Gravity; + import android.view.View; +@@ -86,6 +87,11 @@ public class ReverseLinearLayout extends LinearLayout { + boolean isLayoutRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL; + boolean isLayoutReverse = isLayoutRtl ^ mIsAlternativeOrder; + ++ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false); ++ if (isSeascapeDisabled) { ++ isLayoutReverse = isLayoutRtl ^ true; ++ } ++ + if (mIsLayoutReverse != isLayoutReverse) { + // reversity changed, swap the order of all views. + int childCount = getChildCount(); +@@ -154,7 +160,7 @@ public class ReverseLinearLayout extends LinearLayout { + if (getGravity() != gravityToApply) setGravity(gravityToApply); + } + } +- ++ + private static void reverseGroup(ViewGroup group, boolean isLayoutReverse) { + for (int i = 0; i < group.getChildCount(); i++) { + final View child = group.getChildAt(i); +diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java +index 73d31bf7e0c8..a070942cc76a 100644 +--- a/services/core/java/com/android/server/wm/DisplayPolicy.java ++++ b/services/core/java/com/android/server/wm/DisplayPolicy.java +@@ -2334,9 +2334,10 @@ public class DisplayPolicy { + @NavigationBarPosition + int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) { + if (navigationBarCanMove() && displayWidth > displayHeight) { +- if (displayRotation == Surface.ROTATION_270) { ++ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false); ++ if (displayRotation == Surface.ROTATION_270 && !isSeascapeDisabled) { + return NAV_BAR_LEFT; +- } else if (displayRotation == Surface.ROTATION_90) { ++ } else { + return NAV_BAR_RIGHT; + } + } +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0004-UI-Disable-wallpaper-zoom.patch b/patches_platform/frameworks_base/0004-UI-Disable-wallpaper-zoom.patch new file mode 100644 index 0000000..433a09d --- /dev/null +++ b/patches_platform/frameworks_base/0004-UI-Disable-wallpaper-zoom.patch @@ -0,0 +1,28 @@ +From 1a080754144e0c84b03df538ed9c0ffaaf7e3a0d Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sun, 10 Jan 2021 11:44:29 +0000 +Subject: [PATCH 04/21] UI: Disable wallpaper zoom + +It does little more than inducing motion sickness + +Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0 +--- + core/res/res/values/config.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml +index db43b5b31e7e..60890561308d 100644 +--- a/core/res/res/values/config.xml ++++ b/core/res/res/values/config.xml +@@ -4740,7 +4740,7 @@ + + + +- 1.10 ++ 1 + + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0005-UI-Increase-default-status-bar-height.patch b/patches_platform/frameworks_base/0005-UI-Increase-default-status-bar-height.patch new file mode 100644 index 0000000..b1f9a24 --- /dev/null +++ b/patches_platform/frameworks_base/0005-UI-Increase-default-status-bar-height.patch @@ -0,0 +1,26 @@ +From de435b6de11fb025d7003998b87884f5c85cf0ca Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Wed, 3 Jun 2020 01:31:34 +0000 +Subject: [PATCH 05/21] UI: Increase default status bar height + +Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07 +--- + core/res/res/values/dimens.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml +index de7a1175b4a3..8d56e94458db 100644 +--- a/core/res/res/values/dimens.xml ++++ b/core/res/res/values/dimens.xml +@@ -43,7 +43,7 @@ + @dimen/status_bar_height_portrait + +- 24dp ++ 28dp + + @dimen/status_bar_height_portrait +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0006-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch b/patches_platform/frameworks_base/0006-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch new file mode 100644 index 0000000..27d7e69 --- /dev/null +++ b/patches_platform/frameworks_base/0006-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch @@ -0,0 +1,83 @@ +From 66fb1d5dbfcb671e779108af3af7d2063423e7db Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Tue, 6 Oct 2020 01:41:16 +0000 +Subject: [PATCH 06/21] UI: Revive navbar layout tuning via sysui_nav_bar + tunable + +Google keeps fixing what ain't broken. + +Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352 +--- + .../NavigationBarInflaterView.java | 30 ++++++++++++++++++- + 1 file changed, 29 insertions(+), 1 deletion(-) + +diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java +index 4d9175b8db68..293ebb374241 100644 +--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java ++++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java +@@ -43,12 +43,13 @@ import com.android.systemui.navigationbar.buttons.ReverseLinearLayout; + import com.android.systemui.navigationbar.buttons.ReverseLinearLayout.ReverseRelativeLayout; + import com.android.systemui.recents.OverviewProxyService; + import com.android.systemui.shared.system.QuickStepContract; ++import com.android.systemui.tuner.TunerService; + + import java.io.PrintWriter; + import java.util.Objects; + + public class NavigationBarInflaterView extends FrameLayout +- implements NavigationModeController.ModeChangedListener { ++ implements NavigationModeController.ModeChangedListener, TunerService.Tunable { + + private static final String TAG = "NavBarInflater"; + +@@ -102,6 +103,8 @@ public class NavigationBarInflaterView extends FrameLayout + private OverviewProxyService mOverviewProxyService; + private int mNavBarMode = NAV_BAR_MODE_3BUTTON; + ++ private boolean mUsingCustomLayout; ++ + public NavigationBarInflaterView(Context context, AttributeSet attrs) { + super(context, attrs); + createInflaters(); +@@ -151,13 +154,38 @@ public class NavigationBarInflaterView extends FrameLayout + mNavBarMode = mode; + } + ++ @Override ++ protected void onAttachedToWindow() { ++ super.onAttachedToWindow(); ++ Dependency.get(TunerService.class).addTunable(this, NAV_BAR_VIEWS); ++ } ++ + @Override + protected void onDetachedFromWindow() { + Dependency.get(NavigationModeController.class).removeListener(this); ++ Dependency.get(TunerService.class).removeTunable(this); + super.onDetachedFromWindow(); + } + ++ @Override ++ public void onTuningChanged(String key, String newValue) { ++ if (NAV_BAR_VIEWS.equals(key)) { ++ setNavigationBarLayout(newValue); ++ } ++ } ++ ++ public void setNavigationBarLayout(String layoutValue) { ++ if (!Objects.equals(mCurrentLayout, layoutValue)) { ++ mUsingCustomLayout = layoutValue != null; ++ clearViews(); ++ inflateLayout(layoutValue); ++ } ++ } ++ + public void onLikelyDefaultLayoutChange() { ++ // Don't override custom layouts ++ if (mUsingCustomLayout) return; ++ + // Reevaluate new layout + final String newValue = getDefaultLayout(); + if (!Objects.equals(mCurrentLayout, newValue)) { +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0007-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch b/patches_platform/frameworks_base/0007-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch new file mode 100644 index 0000000..7be7ba3 --- /dev/null +++ b/patches_platform/frameworks_base/0007-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch @@ -0,0 +1,95 @@ +From ed4137c747881e1db53edaaf7c8e937367eebc77 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sun, 26 Apr 2020 08:56:13 +0000 +Subject: [PATCH 07/21] UI: Use SNAP_FIXED_RATIO for multi-window globally + +Enables multiple snap targets under landscape for phone UI + +Change-Id: I36e08f1e277dca0b0f9f99418671026e61b01496 +--- + core/res/res/values-land/config.xml | 19 ------------------- + core/res/res/values-sw600dp/config.xml | 18 ++++++++---------- + core/res/res/values/config.xml | 2 +- + 3 files changed, 9 insertions(+), 30 deletions(-) + delete mode 100644 core/res/res/values-land/config.xml + +diff --git a/core/res/res/values-land/config.xml b/core/res/res/values-land/config.xml +deleted file mode 100644 +index 7308dc5882c1..000000000000 +--- a/core/res/res/values-land/config.xml ++++ /dev/null +@@ -1,19 +0,0 @@ +- +- +- +- 2 +- +\ No newline at end of file +diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml +index 34b6a54be493..3921c9edfeac 100644 +--- a/core/res/res/values-sw600dp/config.xml ++++ b/core/res/res/values-sw600dp/config.xml +@@ -3,16 +3,16 @@ + /* + ** Copyright 2009, The Android Open Source Project + ** +-** Licensed under the Apache License, Version 2.0 (the "License"); +-** you may not use this file except in compliance with the License. +-** You may obtain a copy of the License at ++** Licensed under the Apache License, Version 2.0 (the "License"); ++** you may not use this file except in compliance with the License. ++** You may obtain a copy of the License at + ** +-** http://www.apache.org/licenses/LICENSE-2.0 ++** http://www.apache.org/licenses/LICENSE-2.0 + ** +-** Unless required by applicable law or agreed to in writing, software +-** distributed under the License is distributed on an "AS IS" BASIS, +-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-** See the License for the specific language governing permissions and ++** Unless required by applicable law or agreed to in writing, software ++** distributed under the License is distributed on an "AS IS" BASIS, ++** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++** See the License for the specific language governing permissions and + ** limitations under the License. + */ + --> +@@ -40,8 +40,6 @@ + + 32mm + +- 1 +- + + false +diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml +index 60890561308d..6479e5ed5eed 100644 +--- a/core/res/res/values/config.xml ++++ b/core/res/res/values/config.xml +@@ -3515,7 +3515,7 @@ + 1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio) + 2 - 1 snap target: 1:1 + --> +- 0 ++ 1 + + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0008-UI-Unblock-alarm-status-bar-icon.patch b/patches_platform/frameworks_base/0008-UI-Unblock-alarm-status-bar-icon.patch new file mode 100644 index 0000000..35295d3 --- /dev/null +++ b/patches_platform/frameworks_base/0008-UI-Unblock-alarm-status-bar-icon.patch @@ -0,0 +1,40 @@ +From 79a42cc701c4d0f7a0e2f53d89bb9ec76ae1102a Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Thu, 14 Oct 2021 15:45:24 +0000 +Subject: [PATCH 08/21] UI: Unblock alarm status bar icon + +That's very Zen of you, Google... + +Change-Id: I2c9f91f47bb1e324a20c13d588dcdbbca91dc12e +--- + .../systemui/statusbar/phone/CollapsedStatusBarFragment.java | 1 - + .../android/systemui/statusbar/phone/KeyguardStatusBarView.java | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java +index 6a171ceff1ed..2c1321f1c013 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java +@@ -158,7 +158,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue + } + mDarkIconManager = new DarkIconManager(view.findViewById(R.id.statusIcons), mFeatureFlags); + mDarkIconManager.setShouldLog(true); +- mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_alarm_clock)); + mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_call_strength)); + mDarkIconManager.setBlockList(mBlockedIcons); + mStatusBarIconController.addIconGroup(mDarkIconManager); +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java +index 6a37890bc59f..c79991314318 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java +@@ -207,7 +207,6 @@ public class KeyguardStatusBarView extends RelativeLayout implements + // Set hidden status bar items + private void loadBlockList() { + Resources r = getResources(); +- mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_alarm_clock)); + mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_call_strength)); + } + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0009-core-Remove-default-aspect-ratio-limit-for-old-apps.patch b/patches_platform/frameworks_base/0009-core-Remove-default-aspect-ratio-limit-for-old-apps.patch new file mode 100644 index 0000000..c977c0b --- /dev/null +++ b/patches_platform/frameworks_base/0009-core-Remove-default-aspect-ratio-limit-for-old-apps.patch @@ -0,0 +1,60 @@ +From 6b97dfc8e8230f118ebfc0b2c6b827b4d8ed2678 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Tue, 3 Nov 2020 22:38:49 -0800 +Subject: [PATCH 09/21] core: Remove default aspect ratio limit for old apps +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +I have never encountered a single app that this aspect ratio limit is +actually helpful for. Most legacy apps are able to cope with longer +aspect ratios fine — perhaps not optimally, but it looks better than +having a big black box at the bottom of the screen. + +Instead of limiting older apps' screen space unconditionally or exposing +it in Settings, remove the limit entirely so the user doesn't have to go +through the trouble to begin with. Note that apps explicitly declaring a +shorter aspect ratio will still get their constraint satisfied. + +Change-Id: Ic415288b24129a634476b5cc01a6f202588f4b89 +--- + core/java/android/content/pm/PackageParser.java | 6 ++---- + .../android/content/pm/parsing/ParsingPackageUtils.java | 5 ++--- + 2 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java +index 4ff26242dab2..d674b8865f3a 100644 +--- a/core/java/android/content/pm/PackageParser.java ++++ b/core/java/android/content/pm/PackageParser.java +@@ -4663,10 +4663,8 @@ public class PackageParser { + * ratio set. + */ + private void setMaxAspectRatio(Package owner) { +- // Default to (1.86) 16.7:9 aspect ratio for pre-O apps and unset for O and greater. +- // NOTE: 16.7:9 was the max aspect ratio Android devices can support pre-O per the CDD. +- float maxAspectRatio = owner.applicationInfo.targetSdkVersion < O +- ? DEFAULT_PRE_O_MAX_ASPECT_RATIO : 0; ++ // Start at an unlimited aspect ratio unless we get a more restrictive one ++ float maxAspectRatio = 0; + + if (owner.applicationInfo.maxAspectRatio != 0) { + // Use the application max aspect ration as default if set. +diff --git a/core/java/android/content/pm/parsing/ParsingPackageUtils.java b/core/java/android/content/pm/parsing/ParsingPackageUtils.java +index dce242c9d87c..5ea07db54eb7 100644 +--- a/core/java/android/content/pm/parsing/ParsingPackageUtils.java ++++ b/core/java/android/content/pm/parsing/ParsingPackageUtils.java +@@ -2584,9 +2584,8 @@ public class ParsingPackageUtils { + * ratio set. + */ + private static void setMaxAspectRatio(ParsingPackage pkg) { +- // Default to (1.86) 16.7:9 aspect ratio for pre-O apps and unset for O and greater. +- // NOTE: 16.7:9 was the max aspect ratio Android devices can support pre-O per the CDD. +- float maxAspectRatio = pkg.getTargetSdkVersion() < O ? DEFAULT_PRE_O_MAX_ASPECT_RATIO : 0; ++ // Start at an unlimited aspect ratio unless we get a more restrictive one ++ float maxAspectRatio = 0; + + float packageMaxAspectRatio = pkg.getMaxAspectRatio(); + if (packageMaxAspectRatio != 0) { +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0010-SystemUI-Always-refresh-power-menu-on-UI-mode-change.patch b/patches_platform/frameworks_base/0010-SystemUI-Always-refresh-power-menu-on-UI-mode-change.patch new file mode 100644 index 0000000..c9aee78 --- /dev/null +++ b/patches_platform/frameworks_base/0010-SystemUI-Always-refresh-power-menu-on-UI-mode-change.patch @@ -0,0 +1,32 @@ +From f0dcef06bd03714d7bd2c681ab632e4b15d8b828 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Tue, 5 Oct 2021 21:01:15 -0700 +Subject: [PATCH 10/21] SystemUI: Always refresh power menu on UI mode change + +This is necessary for reliably theming the global actions dialog with +dynamic colors and adapting it to light/dark themes. + +Demo screenshots (with color overlays applied): +https://twitter.com/kdrag0n/status/1445960685427433473 + +Change-Id: Id6f6623096ed231e841ca3794b47f8a0ab54dae6 +--- + .../android/systemui/globalactions/GlobalActionsDialogLite.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java +index 06e74821869e..b0333f3c4463 100644 +--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java ++++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java +@@ -689,7 +689,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene + @Override + public void onUiModeChanged() { + mContext.getTheme().applyStyle(mContext.getThemeResId(), true); +- if (mDialog != null && mDialog.isShowing()) { ++ if (mDialog != null) { + mDialog.refreshDialog(); + } + } +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0011-SystemUI-Use-Monet-colors-for-power-menu.patch b/patches_platform/frameworks_base/0011-SystemUI-Use-Monet-colors-for-power-menu.patch new file mode 100644 index 0000000..42cdcd1 --- /dev/null +++ b/patches_platform/frameworks_base/0011-SystemUI-Use-Monet-colors-for-power-menu.patch @@ -0,0 +1,55 @@ +From af4b8268484150b18acdf3acb8362f196b365c68 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Sat, 9 Oct 2021 14:39:38 -0700 +Subject: [PATCH 11/21] SystemUI: Use Monet colors for power menu + +It's odd that the power menu doesn't use Monet colors, unlike most of +System UI. This makes it feel more integrated with the rest of the +system. + +Change-Id: Iaffb178fe2c09a33925cb40e89d78640fab2b23c +--- + packages/SystemUI/res/values-night/colors.xml | 7 +++++++ + packages/SystemUI/res/values/colors.xml | 10 +++++----- + 2 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml +index b98694e2fae7..3a6b62dfe1c8 100644 +--- a/packages/SystemUI/res/values-night/colors.xml ++++ b/packages/SystemUI/res/values-night/colors.xml +@@ -99,4 +99,11 @@ + #B3000000 + + @android:color/system_accent2_800 ++ ++ ++ @*android:color/primary_device_default_dark ++ @*android:color/surface_dark ++ @*android:color/foreground_device_default_dark ++ @*android:color/surface_dark ++ @*android:color/accent_device_default_dark + +diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml +index 2260d2175268..87523686bb2a 100644 +--- a/packages/SystemUI/res/values/colors.xml ++++ b/packages/SystemUI/res/values/colors.xml +@@ -53,11 +53,11 @@ + @color/GM2_grey_100 + + +- #191C18 +- #303030 +- #F0F0F0 +- #F85D4D +- @color/GM2_grey_900 ++ @*android:color/primary_device_default_light ++ @*android:color/surface_light ++ @*android:color/foreground_device_default_light ++ @*android:color/surface_light ++ @*android:color/accent_device_default_light + + @color/control_primary_text + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0012-Revert-Make-QS-always-use-dark-theme-colors.patch b/patches_platform/frameworks_base/0012-Revert-Make-QS-always-use-dark-theme-colors.patch new file mode 100644 index 0000000..d2cd0a3 --- /dev/null +++ b/patches_platform/frameworks_base/0012-Revert-Make-QS-always-use-dark-theme-colors.patch @@ -0,0 +1,54 @@ +From 2eb0c2c90aa31dea5f17bdd32f00ca6ac5b576d3 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Wed, 6 Oct 2021 18:40:30 -0700 +Subject: [PATCH 12/21] Revert "Make QS always use dark theme colors" + +This reverts commit d62f7249f9e3222da95ecf6816601c408aac6be5. + +This is a prerequisite for making the QS panel follow the light system +theme setting. + +Change-Id: Iac4c96ccb3845812ca3df820bf27dc533816f72e +--- + packages/SystemUI/res/layout/quick_qs_status_icons.xml | 2 +- + packages/SystemUI/res/values/styles.xml | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml +index 5b9ca1b26158..bbd3e47a568f 100644 +--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml ++++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml +@@ -24,7 +24,7 @@ + android:minHeight="48dp" + android:clickable="false" + android:focusable="true" +- android:theme="@style/Theme.SystemUI.QuickSettings.Header"> ++ android:theme="@style/QSHeaderTheme"> + + ?android:attr/textColorSecondary + + +- + +- +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0013-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch b/patches_platform/frameworks_base/0013-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch new file mode 100644 index 0000000..e1ede8d --- /dev/null +++ b/patches_platform/frameworks_base/0013-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch @@ -0,0 +1,33 @@ +From 611cf88dc0844c91728f5ee1d5f73488f308701f Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Wed, 6 Oct 2021 18:41:11 -0700 +Subject: [PATCH 13/21] Revert "Do not re-inflate QS and SB when + CONFIG_UI_MODE" + +This reverts commit 8a40ff855b86bc86e23367017002289920855a4e. + +This is a prerequisite for making the QS panel follow the light system +mode setting. + +Change-Id: Ibad399ece587505559cc73febdda2f2d8558e94d +--- + .../com/android/systemui/fragments/FragmentHostManager.java | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java +index b45dc52585ad..87d90adceba5 100644 +--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java ++++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java +@@ -54,7 +54,8 @@ public class FragmentHostManager { + private final View mRootView; + private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges( + ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE +- | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS); ++ | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS ++ | ActivityInfo.CONFIG_UI_MODE); + private final FragmentService mManager; + private final ExtensionFragmentManager mPlugins = new ExtensionFragmentManager(); + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0014-SystemUI-Follow-light-dark-theme-in-quick-settings.patch b/patches_platform/frameworks_base/0014-SystemUI-Follow-light-dark-theme-in-quick-settings.patch new file mode 100644 index 0000000..9b193dd --- /dev/null +++ b/patches_platform/frameworks_base/0014-SystemUI-Follow-light-dark-theme-in-quick-settings.patch @@ -0,0 +1,262 @@ +From a36b9e02358ad6f3dd12f1a51ca8780e70155573 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Mon, 11 Oct 2021 19:24:58 -0700 +Subject: [PATCH 14/21] SystemUI: Follow light/dark theme in quick settings + +Android 12's dual-tone style where the quick settings panel is always +dark makes the light theme look like a second-class citizen. Pure black +also looks out-of-place next to QS tiles and the notification panel +because dynamic themes don't affect it at all. + +Revert to the ~Beta 1 style where quick settings used the same theme as +the notification shade. + +- colorAccentPrimary has been replaced with colorAccent for contrast in + light mode, because colorAccentPrimary is system_accent1_100 (dark + accent color) +- Footer chips have been converted to surfaces (similar to QS tiles and + notifications), which makes more sense with the new style +- The QS background is now the same as the notification shade background + in both light and dark modes + +Demo screenshots (with dual-tone commit): +https://twitter.com/kdrag0n/status/1445922541218922496 + +Change-Id: I3d45b72f0f119e100505409d178ab8f698993881 +--- + .../brightness_progress_full_drawable.xml | 2 +- + .../qs_footer_action_chip_background.xml | 8 +------- + .../qs_security_footer_background.xml | 3 +-- + packages/SystemUI/res/values-night/styles.xml | 12 +++++++++++ + packages/SystemUI/res/values/styles.xml | 10 +++++----- + .../systemui/privacy/OngoingPrivacyChip.kt | 4 ++-- + .../systemui/qs/tileimpl/QSTileViewImpl.kt | 2 +- + .../statusbar/phone/ScrimController.java | 2 +- + .../systemui/statusbar/phone/ScrimState.java | 20 +++++++++---------- + 9 files changed, 34 insertions(+), 29 deletions(-) + +diff --git a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml +index 4d9188c40822..1eae667c6e79 100644 +--- a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml ++++ b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml +@@ -22,7 +22,7 @@ + android:height="@dimen/rounded_slider_height"> + + +- ++ + + + +diff --git a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml +index 9076da795e71..3aefc95a98b5 100644 +--- a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml ++++ b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml +@@ -28,13 +28,7 @@ + + + +- +- +- +- +- +- +- ++ + + + +diff --git a/packages/SystemUI/res/drawable/qs_security_footer_background.xml b/packages/SystemUI/res/drawable/qs_security_footer_background.xml +index 860d23b11439..8f12b95ed4f6 100644 +--- a/packages/SystemUI/res/drawable/qs_security_footer_background.xml ++++ b/packages/SystemUI/res/drawable/qs_security_footer_background.xml +@@ -28,8 +28,7 @@ + + + +- ++ + + + +diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml +index 461505f12ce6..c1d2ca23de31 100644 +--- a/packages/SystemUI/res/values-night/styles.xml ++++ b/packages/SystemUI/res/values-night/styles.xml +@@ -24,6 +24,18 @@ + true + + ++ ++ + + +@@ -617,7 +617,7 @@ + + + + +diff --git a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt +index 9cd97ff8e343..461f67935a11 100644 +--- a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt ++++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt +@@ -90,8 +90,8 @@ class OngoingPrivacyChip @JvmOverloads constructor( + .getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_margin) + iconSize = context.resources + .getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_size) +- iconColor = +- Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.colorPrimary) ++ iconColor = context.resources ++ .getColor(android.R.color.system_neutral1_900) + + val padding = context.resources + .getDimensionPixelSize(R.dimen.ongoing_appops_chip_side_padding) +diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +index 222539d49526..da7c63ff15a3 100644 +--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt ++++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +@@ -70,7 +70,7 @@ open class QSTileViewImpl @JvmOverloads constructor( + override var heightOverride: Int = HeightOverrideable.NO_OVERRIDE + + private val colorActive = Utils.getColorAttrDefaultColor(context, +- com.android.internal.R.attr.colorAccentPrimary) ++ android.R.attr.colorAccent) + private val colorInactive = Utils.getColorAttrDefaultColor(context, R.attr.offStateColor) + private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive) + +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +index cfcea9684c3b..4c394c0b631d 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +@@ -675,7 +675,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump + mNotificationsAlpha = behindAlpha; + mNotificationsTint = behindTint; + mBehindAlpha = 1; +- mBehindTint = Color.BLACK; ++ mBehindTint = Color.TRANSPARENT; + } else { + mBehindAlpha = behindAlpha; + if (mState == ScrimState.SHADE_LOCKED) { +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +index 06811932ac0c..044f12e9d544 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +@@ -88,7 +88,7 @@ public enum ScrimState { + mNotifAlpha = mClipQsScrim ? mScrimBehindAlphaKeyguard : 0; + mBubbleAlpha = 0; + if (mClipQsScrim) { +- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); ++ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT); + } + } + }, +@@ -114,7 +114,7 @@ public enum ScrimState { + @Override + public void prepare(ScrimState previousState) { + mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha; +- mBehindTint = mClipQsScrim ? Color.BLACK : Color.TRANSPARENT; ++ mBehindTint = Color.TRANSPARENT; + mNotifAlpha = mClipQsScrim ? mDefaultScrimAlpha : 0; + mNotifTint = Color.TRANSPARENT; + mFrontAlpha = 0f; +@@ -141,17 +141,17 @@ public enum ScrimState { + mNotifAlpha = 1f; + mBubbleAlpha = 0f; + mFrontAlpha = 0f; +- mBehindTint = Color.BLACK; ++ mBehindTint = Color.TRANSPARENT; + + if (mClipQsScrim) { +- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); ++ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT); + } + } + + // to make sure correct color is returned before "prepare" is called + @Override + public int getBehindTint() { +- return Color.BLACK; ++ return Color.TRANSPARENT; + } + }, + +@@ -247,27 +247,27 @@ public enum ScrimState { + mAnimateChange = !mLaunchingAffordanceWithPreview; + + mFrontTint = Color.TRANSPARENT; +- mBehindTint = Color.BLACK; ++ mBehindTint = Color.TRANSPARENT; + mBubbleTint = Color.TRANSPARENT; + mBlankScreen = false; + + if (previousState == ScrimState.AOD) { + // Set all scrims black, before they fade transparent. + updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */); +- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */); ++ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT /* tint */); + if (mScrimForBubble != null) { + updateScrimColor(mScrimForBubble, 1f /* alpha */, Color.BLACK /* tint */); + } + + // Scrims should still be black at the end of the transition. + mFrontTint = Color.BLACK; +- mBehindTint = Color.BLACK; ++ mBehindTint = Color.TRANSPARENT; + mBubbleTint = Color.BLACK; + mBlankScreen = true; + } + + if (mClipQsScrim) { +- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); ++ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT); + } + } + }, +@@ -441,4 +441,4 @@ public enum ScrimState { + public void setClipQsScrim(boolean clipsQsScrim) { + mClipQsScrim = clipsQsScrim; + } +-} +\ No newline at end of file ++} +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0015-SystemUI-Initialize-QS-tiles-in-inactive-state.patch b/patches_platform/frameworks_base/0015-SystemUI-Initialize-QS-tiles-in-inactive-state.patch new file mode 100644 index 0000000..af34691 --- /dev/null +++ b/patches_platform/frameworks_base/0015-SystemUI-Initialize-QS-tiles-in-inactive-state.patch @@ -0,0 +1,34 @@ +From 20c9d29922a48beaa2a5294659a764426e47714d Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Mon, 11 Oct 2021 19:25:02 -0700 +Subject: [PATCH 15/21] SystemUI: Initialize QS tiles in inactive state + +Now that the QS fragment is recreated when changing the UI mode (so that +it follows light/dark themes), all tiles flash with active color briefly +because the new views become visible before states are refreshed. + +Initializing tiles in the inactive state is much less disruptive, and +the effect is very hard to see as compared to the active color because +the background color is much less prominent. + +Change-Id: I048171d503f5533e91bab486b8805ac15c329f31 +--- + .../plugin/src/com/android/systemui/plugins/qs/QSTile.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java +index 77018d736163..9e02b140175b 100644 +--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java ++++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java +@@ -148,7 +148,7 @@ public interface QSTile { + @ProvidesInterface(version = State.VERSION) + public static class State { + public static final int VERSION = 1; +- public static final int DEFAULT_STATE = Tile.STATE_ACTIVE; ++ public static final int DEFAULT_STATE = Tile.STATE_INACTIVE; + + public Icon icon; + public Supplier iconSupplier; +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0016-SystemUI-Add-dual-tone-light-and-dark-themes-for-QS.patch b/patches_platform/frameworks_base/0016-SystemUI-Add-dual-tone-light-and-dark-themes-for-QS.patch new file mode 100644 index 0000000..3064f48 --- /dev/null +++ b/patches_platform/frameworks_base/0016-SystemUI-Add-dual-tone-light-and-dark-themes-for-QS.patch @@ -0,0 +1,147 @@ +From 864e73e5348f9fbb70e81797e874587723b96a7d Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Mon, 11 Oct 2021 19:25:08 -0700 +Subject: [PATCH 16/21] SystemUI: Add dual-tone light and dark themes for QS + +Google's dual-tone QS design where the notification panel has a +semantically higher elevation adds depth to the notification+QS shade, +and we don't necessarily have to give it up just because our QS has +light and dark themes. + +To preserve the dual-tone effect, use a darker background color for the +QS section: + +Light: + Notifications: neutral1 20 (surface_light) + Notification panel: neutral1 50 (light BG) + QS background: neutral1 100 (darker light BG / surface_header_light) + Inactive QS tiles: neutral1 20 (surface_light) + +Dark: + Notifications: neutral1 800 (surface_dark) + Notification panel: neutral1 900 (dark BG) + QS background: neutral1 950 (surface_header_dark_sysui modulated to L* 5) + Inactive QS tiles: neutral1 800 (surface_dark) + +The dark QS background could be neutral1 0 (black) like it was before, +but I don't think it looks as good because it can't be tinted based on +the active wallpaper and thus stands out from other colors. + +Unfortunately, Google's current CAM16-based modulation causes hue shifts +in extreme light and dark shades (e.g. L* = 98 / 5), but we'll fix this +by generating and overlaying modulated surface colors in our +ThemeOverlayController implementation. + +Demo screenshots: https://twitter.com/kdrag0n/status/1445922541218922496 + +Change-Id: Icdc4957ecb4e0201377351f1a3e1c6928d6b3955 +--- + .../res/color/surface_header_dark_sysui.xml | 18 ++++++++++++++++++ + core/res/res/values-night/values.xml | 1 + + packages/SystemUI/res/values/styles.xml | 2 +- + .../statusbar/phone/ScrimController.java | 13 ++++++++++++- + 4 files changed, 32 insertions(+), 2 deletions(-) + create mode 100644 core/res/res/color/surface_header_dark_sysui.xml + +diff --git a/core/res/res/color/surface_header_dark_sysui.xml b/core/res/res/color/surface_header_dark_sysui.xml +new file mode 100644 +index 000000000000..ec070c96f91a +--- /dev/null ++++ b/core/res/res/color/surface_header_dark_sysui.xml +@@ -0,0 +1,18 @@ ++ ++ ++ ++ ++ +diff --git a/core/res/res/values-night/values.xml b/core/res/res/values-night/values.xml +index 1571fab66a5b..0683c20a4a4c 100644 +--- a/core/res/res/values-night/values.xml ++++ b/core/res/res/values-night/values.xml +@@ -22,6 +22,7 @@ + @color/secondary_device_default_settings + @color/accent_device_default_dark + @color/error_color_device_default_dark ++ @color/surface_header_dark_sysui + ?attr/textColorPrimary + @style/Theme.DeviceDefault.Dialog.Alert + false +diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml +index 5d230e522636..a03e9ea89342 100644 +--- a/packages/SystemUI/res/values/styles.xml ++++ b/packages/SystemUI/res/values/styles.xml +@@ -402,7 +402,7 @@ + true + @drawable/ic_arrow_back + @*android:color/surface_light +- @android:color/system_neutral1_50 ++ @android:color/system_neutral1_100 + @android:color/system_neutral1_50 + @style/Control.MenuItem + +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +index 4c394c0b631d..afcb940a72ae 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +@@ -172,6 +172,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump + private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; + + private GradientColors mColors; ++ private GradientColors mBehindColors; + private boolean mNeedsDrawableColorUpdate; + + private float mScrimBehindAlphaKeyguard = KEYGUARD_SCRIM_ALPHA; +@@ -270,6 +271,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump + }); + + mColors = new GradientColors(); ++ mBehindColors = new GradientColors(); + } + + /** +@@ -829,7 +831,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump + && !mBlankScreen; + + mScrimInFront.setColors(mColors, animateScrimInFront); +- mScrimBehind.setColors(mColors, animateBehindScrim); ++ mScrimBehind.setColors(mBehindColors, animateBehindScrim); + mNotificationsScrim.setColors(mColors, animateScrimNotifications); + + dispatchBackScrimState(mScrimBehind.getViewAlpha()); +@@ -1185,11 +1187,20 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump + if (mScrimBehind == null) return; + int background = Utils.getColorAttr(mScrimBehind.getContext(), + android.R.attr.colorBackgroundFloating).getDefaultColor(); ++ int surfaceBackground = Utils.getColorAttr(mScrimBehind.getContext(), ++ com.android.internal.R.attr.colorSurfaceHeader).getDefaultColor(); + int accent = Utils.getColorAccent(mScrimBehind.getContext()).getDefaultColor(); ++ + mColors.setMainColor(background); + mColors.setSecondaryColor(accent); + mColors.setSupportsDarkText( + ColorUtils.calculateContrast(mColors.getMainColor(), Color.WHITE) > 4.5); ++ ++ mBehindColors.setMainColor(surfaceBackground); ++ mBehindColors.setSecondaryColor(accent); ++ mBehindColors.setSupportsDarkText( ++ ColorUtils.calculateContrast(mBehindColors.getMainColor(), Color.WHITE) > 4.5); ++ + mNeedsDrawableColorUpdate = true; + } + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0017-SystemUI-Remove-nav-bar-background-in-QS-customizer.patch b/patches_platform/frameworks_base/0017-SystemUI-Remove-nav-bar-background-in-QS-customizer.patch new file mode 100644 index 0000000..5d95b22 --- /dev/null +++ b/patches_platform/frameworks_base/0017-SystemUI-Remove-nav-bar-background-in-QS-customizer.patch @@ -0,0 +1,48 @@ +From 9e456e96992024257f6eb7f4bad5fa5aed626ad8 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Mon, 11 Oct 2021 19:25:11 -0700 +Subject: [PATCH 17/21] SystemUI: Remove nav bar background in QS customizer + +This looks outdated, since most apps are edge-to-edge nowadays. + +Change-Id: I8c54e61e618a9b5bed1a59753ce76e8fbd69fae2 +--- + packages/SystemUI/res/layout/qs_customize_panel_content.xml | 6 ------ + .../src/com/android/systemui/qs/customize/QSCustomizer.java | 4 ---- + 2 files changed, 10 deletions(-) + +diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml +index 8ca1b8e85634..5f96dacba80e 100644 +--- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml ++++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml +@@ -56,10 +56,4 @@ + android:importantForAccessibility="auto" /> + + +- + +diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java +index 7518b200c7e2..20359b64e4cb 100644 +--- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java ++++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java +@@ -90,12 +90,8 @@ public class QSCustomizer extends LinearLayout { + } + + void updateNavBackDrop(Configuration newConfig, LightBarController lightBarController) { +- View navBackdrop = findViewById(R.id.nav_bar_background); + mIsShowingNavBackdrop = newConfig.smallestScreenWidthDp >= 600 + || newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE; +- if (navBackdrop != null) { +- navBackdrop.setVisibility(mIsShowingNavBackdrop ? View.VISIBLE : View.GONE); +- } + updateNavColors(lightBarController); + } + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0018-Paint-Enable-subpixel-text-positioning-by-default.patch b/patches_platform/frameworks_base/0018-Paint-Enable-subpixel-text-positioning-by-default.patch new file mode 100644 index 0000000..059b4db --- /dev/null +++ b/patches_platform/frameworks_base/0018-Paint-Enable-subpixel-text-positioning-by-default.patch @@ -0,0 +1,41 @@ +From c843d3ca03875d6b9d0bf9add9b59fbdcb1d8a42 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Tue, 5 Oct 2021 21:01:50 -0700 +Subject: [PATCH 18/21] Paint: Enable subpixel text positioning by default + +On desktop Linux, subpixel text positioning is necessary to avoid +kerning issues, and Android is no different. Even though most phone +displays have relatively high DPIs, the lack of subpixel text +positioning is only unnoticeable on high-end devices such as the Pixel 4 +XL (1440x3040 @ 6.3 in => 537 dpi). + +For example, on the Pixel 5 (1080 x 2340 @ 6.0 in => 432 dpi), +horizontally-scrolling labels in QS tiles can be seen "jittering" +slightly upon close observation. This was tested with the Google Sans +font on Google's stock OS. At this lower DPI, there is still a need for +subpixel text positioning (at least in some cases). + +Enable subpixel text positioning by default to fix occasional kerning +issues and jittering when text is in motion. + +Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09 +--- + graphics/java/android/graphics/Paint.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java +index 42e470b7f660..9c0036e5d716 100644 +--- a/graphics/java/android/graphics/Paint.java ++++ b/graphics/java/android/graphics/Paint.java +@@ -252,7 +252,7 @@ public class Paint { + + // These flags are always set on a new/reset paint, even if flags 0 is passed. + static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG +- | FILTER_BITMAP_FLAG; ++ | FILTER_BITMAP_FLAG | SUBPIXEL_TEXT_FLAG; + + /** + * Font hinter option that disables font hinting. +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0019-SystemUI-Fix-QS-status-font-weight-mismatch-in-dark-.patch b/patches_platform/frameworks_base/0019-SystemUI-Fix-QS-status-font-weight-mismatch-in-dark-.patch new file mode 100644 index 0000000..a8c5be7 --- /dev/null +++ b/patches_platform/frameworks_base/0019-SystemUI-Fix-QS-status-font-weight-mismatch-in-dark-.patch @@ -0,0 +1,30 @@ +From 41ed8b60f340207cdeddf7fd4ad53c625be32534 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Tue, 5 Oct 2021 21:02:12 -0700 +Subject: [PATCH 19/21] SystemUI: Fix QS status font weight mismatch in dark + mode + +Text in the QS status bar is medium in light mode and regular in dark +mode. Fix the mismatch. + +Change-Id: Ic6e5dc547d4ded9d231f88f6cac3e1e9f8483d5e +--- + packages/SystemUI/res/values-night/styles.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml +index c1d2ca23de31..5f35afb6c731 100644 +--- a/packages/SystemUI/res/values-night/styles.xml ++++ b/packages/SystemUI/res/values-night/styles.xml +@@ -37,7 +37,7 @@ + + + + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0020-SystemUI-Expose-legacy-Wi-Fi-and-cellular-data-QS-ti.patch b/patches_platform/frameworks_base/0020-SystemUI-Expose-legacy-Wi-Fi-and-cellular-data-QS-ti.patch new file mode 100644 index 0000000..25b5990 --- /dev/null +++ b/patches_platform/frameworks_base/0020-SystemUI-Expose-legacy-Wi-Fi-and-cellular-data-QS-ti.patch @@ -0,0 +1,31 @@ +From dce279f20b8973aa0660d98864c9ad8d56b56514 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Sat, 16 Oct 2021 03:27:23 -0700 +Subject: [PATCH 20/21] SystemUI: Expose legacy Wi-Fi and cellular data QS + tiles + +We'll still use Android 12's unified internet settings and the Internet +tile by default, but expose the legacy Wi-Fi and cellular data tiles so +that users can add them with the QS customizer. + +Change-Id: I65902b38c99f61782bd9aa0ea604848fbd068bda +--- + packages/SystemUI/res/values/config.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml +index 14276754e450..c99ab8bf5e9a 100644 +--- a/packages/SystemUI/res/values/config.xml ++++ b/packages/SystemUI/res/values/config.xml +@@ -107,7 +107,7 @@ + + + +- internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness ++ internet,wifi,cell,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness + + + +-- +2.25.1 + diff --git a/patches_platform/frameworks_base/0021-SystemUI-Allow-Wi-Fi-cell-tiles-to-co-exist-with-pro.patch b/patches_platform/frameworks_base/0021-SystemUI-Allow-Wi-Fi-cell-tiles-to-co-exist-with-pro.patch new file mode 100644 index 0000000..769cb58 --- /dev/null +++ b/patches_platform/frameworks_base/0021-SystemUI-Allow-Wi-Fi-cell-tiles-to-co-exist-with-pro.patch @@ -0,0 +1,245 @@ +From 0cd11d9386e398392716883c6bdadab65777c8ce Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Mon, 25 Oct 2021 19:32:33 -0700 +Subject: [PATCH 21/21] SystemUI: Allow Wi-Fi/cell tiles to co-exist with + provider model + +The dedicated Wi-Fi/cellular data QS tiles are partially working now +that we've exposed them in the list of tile options, but they're very +buggy and somewhat broken when the provider model (unified internet) is +enabled. + +Allow the tiles to co-exist with InternetTile and the provider model +(including both settings_provider_model and combined signal icons) by +always including QS icons in Wi-Fi/data indicator callbacks, and add +a new flag to indicate whether they should be shown in the internet +tile. + +Change-Id: I10af134b35dfabdb9275f1aca8ca8512e1db6d27 +--- + .../systemui/qs/tiles/InternetTile.java | 4 +- + .../policy/MobileSignalController.java | 32 ++++-------- + .../statusbar/policy/NetworkController.java | 10 +++- + .../policy/WifiSignalController.java | 49 +++++++------------ + 4 files changed, 37 insertions(+), 58 deletions(-) + +diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java +index 7cb1421e3f0f..aa917d9ec397 100644 +--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java ++++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java +@@ -245,7 +245,7 @@ public class InternetTile extends QSTileImpl { + Log.d(TAG, "setWifiIndicators: " + indicators); + } + mWifiInfo.mEnabled = indicators.enabled; +- if (indicators.qsIcon == null) { ++ if (indicators.qsIcon == null || !indicators.isDefault) { + return; + } + mWifiInfo.mConnected = indicators.qsIcon.visible; +@@ -265,7 +265,7 @@ public class InternetTile extends QSTileImpl { + if (DEBUG) { + Log.d(TAG, "setMobileDataIndicators: " + indicators); + } +- if (indicators.qsIcon == null) { ++ if (indicators.qsIcon == null || !indicators.isDefault) { + // Not data sim, don't display. + return; + } +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +index 43781f3941ba..cf89cabf6ab9 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +@@ -397,7 +397,7 @@ public class MobileSignalController extends SignalController, D + public String description; + public boolean isTransient; + public String statusLabel; ++ public boolean isDefault; + + public WifiIndicators(boolean enabled, IconState statusIcon, IconState qsIcon, + boolean activityIn, boolean activityOut, String description, +- boolean isTransient, String statusLabel) { ++ boolean isTransient, String statusLabel, boolean isDefault) { + this.enabled = enabled; + this.statusIcon = statusIcon; + this.qsIcon = qsIcon; +@@ -70,6 +71,7 @@ public interface NetworkController extends CallbackController, D + this.description = description; + this.isTransient = isTransient; + this.statusLabel = statusLabel; ++ this.isDefault = isDefault; + } + + @Override +@@ -83,6 +85,7 @@ public interface NetworkController extends CallbackController, D + .append(",description=").append(description) + .append(",isTransient=").append(isTransient) + .append(",statusLabel=").append(statusLabel) ++ .append(",isDefault=").append(isDefault) + .append(']').toString(); + } + } +@@ -104,12 +107,13 @@ public interface NetworkController extends CallbackController, D + public int subId; + public boolean roaming; + public boolean showTriangle; ++ public boolean isDefault; + + public MobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType, + int qsType, boolean activityIn, boolean activityOut, + CharSequence typeContentDescription, CharSequence typeContentDescriptionHtml, + CharSequence description, boolean isWide, int subId, boolean roaming, +- boolean showTriangle) { ++ boolean showTriangle, boolean isDefault) { + this.statusIcon = statusIcon; + this.qsIcon = qsIcon; + this.statusType = statusType; +@@ -123,6 +127,7 @@ public interface NetworkController extends CallbackController, D + this.subId = subId; + this.roaming = roaming; + this.showTriangle = showTriangle; ++ this.isDefault = isDefault; + } + + @Override +@@ -141,6 +146,7 @@ public interface NetworkController extends CallbackController, D + .append(",subId=").append(subId) + .append(",roaming=").append(roaming) + .append(",showTriangle=").append(showTriangle) ++ .append(",isDefault=").append(isDefault) + .append(']').toString(); + } + } +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java +index f8e36476c4a6..1513544eb22b 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java +@@ -112,37 +112,21 @@ public class WifiSignalController extends + if (mCurrentState.inetCondition == 0) { + contentDescription += ("," + mContext.getString(R.string.data_connection_no_internet)); + } +- if (mProviderModelSetting) { +- IconState statusIcon = new IconState( +- wifiVisible, getCurrentIconId(), contentDescription); +- IconState qsIcon = null; +- if (mCurrentState.isDefault || (!mNetworkController.isRadioOn() +- && !mNetworkController.isEthernetDefault())) { +- qsIcon = new IconState(mCurrentState.connected, +- mWifiTracker.isCaptivePortal ? R.drawable.ic_qs_wifi_disconnected +- : getQsCurrentIconId(), contentDescription); +- } +- WifiIndicators wifiIndicators = new WifiIndicators( +- mCurrentState.enabled, statusIcon, qsIcon, +- ssidPresent && mCurrentState.activityIn, +- ssidPresent && mCurrentState.activityOut, +- wifiDesc, mCurrentState.isTransient, mCurrentState.statusLabel +- ); +- callback.setWifiIndicators(wifiIndicators); +- } else { +- IconState statusIcon = new IconState( +- wifiVisible, getCurrentIconId(), contentDescription); +- IconState qsIcon = new IconState(mCurrentState.connected, +- mWifiTracker.isCaptivePortal ? R.drawable.ic_qs_wifi_disconnected +- : getQsCurrentIconId(), contentDescription); +- WifiIndicators wifiIndicators = new WifiIndicators( +- mCurrentState.enabled, statusIcon, qsIcon, +- ssidPresent && mCurrentState.activityIn, +- ssidPresent && mCurrentState.activityOut, +- wifiDesc, mCurrentState.isTransient, mCurrentState.statusLabel +- ); +- callback.setWifiIndicators(wifiIndicators); +- } ++ IconState statusIcon = new IconState( ++ wifiVisible, getCurrentIconId(), contentDescription); ++ IconState qsIcon = new IconState(mCurrentState.connected, ++ mWifiTracker.isCaptivePortal ? R.drawable.ic_qs_wifi_disconnected ++ : getQsCurrentIconId(), contentDescription); ++ boolean isDefault = mCurrentState.isDefault || ++ (!mNetworkController.isRadioOn() && !mNetworkController.isEthernetDefault()); ++ WifiIndicators wifiIndicators = new WifiIndicators( ++ mCurrentState.enabled, statusIcon, qsIcon, ++ ssidPresent && mCurrentState.activityIn, ++ ssidPresent && mCurrentState.activityOut, ++ wifiDesc, mCurrentState.isTransient, mCurrentState.statusLabel, ++ isDefault ++ ); ++ callback.setWifiIndicators(wifiIndicators); + } + + private void notifyListenersForCarrierWifi(SignalCallback callback) { +@@ -173,7 +157,8 @@ public class WifiSignalController extends + statusIcon, qsIcon, typeIcon, qsTypeIcon, + mCurrentState.activityIn, mCurrentState.activityOut, dataContentDescription, + dataContentDescriptionHtml, description, icons.isWide, +- mCurrentState.subId, /* roaming= */ false, /* showTriangle= */ true ++ mCurrentState.subId, /* roaming= */ false, /* showTriangle= */ true, ++ /* isDefault= */ qsIcon != null + ); + callback.setMobileDataIndicators(mobileDataIndicators); + } +-- +2.25.1 + diff --git a/patches_platform/packages_apps_Gallery2/9999-TEMP-Build-fixes-for-Android-12.patch b/patches_platform/packages_apps_Gallery2/9999-TEMP-Build-fixes-for-Android-12.patch new file mode 100644 index 0000000..fbe2181 --- /dev/null +++ b/patches_platform/packages_apps_Gallery2/9999-TEMP-Build-fixes-for-Android-12.patch @@ -0,0 +1,33 @@ +From a7c48516ef7fddb7c71566299daf2bdab72e3bcd Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Tue, 26 Oct 2021 08:16:00 +0000 +Subject: [PATCH] [TEMP] Build fixes for Android 12 + +--- + Android.mk | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Android.mk b/Android.mk +index d5b099a2f..efc60d309 100644 +--- a/Android.mk ++++ b/Android.mk +@@ -51,12 +51,14 @@ LOCAL_SHARED_LIBRARIES += \ + libjni_trueportrait \ + libjni_filtergenerator + +-LOCAL_REQUIRED_MODULES := libts_detected_face_jni libts_face_beautify_jni +- + LOCAL_PROGUARD_FLAG_FILES := proguard.flags + + LOCAL_JAVA_LIBRARIES += org.apache.http.legacy + ++LOCAL_OPTIONAL_USES_LIBRARIES := \ ++ com.google.android.media.effects \ ++ org.apache.http.legacy ++ + LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt + + include $(BUILD_PACKAGE) +-- +2.25.1 + diff --git a/patches_platform/packages_apps_Jelly/0001-Jelly-MainActivity-Restore-applyThemeColor.patch b/patches_platform/packages_apps_Jelly/0001-Jelly-MainActivity-Restore-applyThemeColor.patch new file mode 100644 index 0000000..0e64b7d --- /dev/null +++ b/patches_platform/packages_apps_Jelly/0001-Jelly-MainActivity-Restore-applyThemeColor.patch @@ -0,0 +1,34 @@ +From 6f9026e0548bd82e7b728ef29dd7d14db93b2105 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sat, 26 Jun 2021 14:23:09 +0000 +Subject: [PATCH] Jelly: MainActivity: Restore applyThemeColor + +Fixes black statusbar on start + +Change-Id: I6816f5b1dcb3c7bcaee2736a9e2a3ecd63217bc6 +--- + app/src/main/java/org/lineageos/jelly/MainActivity.kt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/app/src/main/java/org/lineageos/jelly/MainActivity.kt b/app/src/main/java/org/lineageos/jelly/MainActivity.kt +index 2902b0a..9ff74ed 100644 +--- a/app/src/main/java/org/lineageos/jelly/MainActivity.kt ++++ b/app/src/main/java/org/lineageos/jelly/MainActivity.kt +@@ -193,6 +193,7 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener, + findViewById(R.id.search_menu_cancel), + this) + setUiMode() ++ applyThemeColor(mThemeColor) + try { + val httpCacheDir = File(cacheDir, "suggestion_responses") + val httpCacheSize = 1024 * 1024.toLong() // 1 MiB +@@ -763,4 +764,4 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener, + private const val STORAGE_PERM_REQ = 423 + private const val LOCATION_PERM_REQ = 424 + } +-} +\ No newline at end of file ++} +-- +2.25.1 + diff --git a/patches_platform/packages_apps_Messaging/0001-Messaging-Add-Mark-as-read-quick-action-for-message-.patch b/patches_platform/packages_apps_Messaging/0001-Messaging-Add-Mark-as-read-quick-action-for-message-.patch new file mode 100644 index 0000000..a02dfeb --- /dev/null +++ b/patches_platform/packages_apps_Messaging/0001-Messaging-Add-Mark-as-read-quick-action-for-message-.patch @@ -0,0 +1,223 @@ +From 3f7f3f9546f9f23d66381f7dff887cd562285ce6 Mon Sep 17 00:00:00 2001 +From: Paul Keith +Date: Tue, 30 Oct 2018 15:46:18 +0100 +Subject: [PATCH] Messaging: Add "Mark as read" quick action for message + notifications + +Change-Id: I7194dca022e5062926fa35709de282721ca64320 +--- + res/drawable/ic_wear_read.xml | 9 +++++++++ + res/values/cm_strings.xml | 3 +++ + .../messaging/datamodel/BugleNotifications.java | 14 ++++++++++++++ + .../datamodel/MessageNotificationState.java | 8 ++++++++ + .../messaging/datamodel/NotificationState.java | 12 +++++++++++- + .../messaging/receiver/NotificationReceiver.java | 12 +++++++++++- + src/com/android/messaging/ui/UIIntents.java | 11 +++++++++++ + src/com/android/messaging/ui/UIIntentsImpl.java | 14 ++++++++++++++ + 8 files changed, 81 insertions(+), 2 deletions(-) + create mode 100644 res/drawable/ic_wear_read.xml + +diff --git a/res/drawable/ic_wear_read.xml b/res/drawable/ic_wear_read.xml +new file mode 100644 +index 0000000..9d017e6 +--- /dev/null ++++ b/res/drawable/ic_wear_read.xml +@@ -0,0 +1,9 @@ ++ ++ ++ +diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml +index f285555..858f093 100644 +--- a/res/values/cm_strings.xml ++++ b/res/values/cm_strings.xml +@@ -23,6 +23,9 @@ + Emoticons access + Show the emoticons key on the keyboard + ++ ++ Mark as read ++ + + Messages + +diff --git a/src/com/android/messaging/datamodel/BugleNotifications.java b/src/com/android/messaging/datamodel/BugleNotifications.java +index 6df9e88..dbe86ff 100644 +--- a/src/com/android/messaging/datamodel/BugleNotifications.java ++++ b/src/com/android/messaging/datamodel/BugleNotifications.java +@@ -789,6 +789,7 @@ public class BugleNotifications { + (MultiMessageNotificationState) notificationState); + addDownloadMmsAction(notifBuilder, wearableExtender, notificationState); + addWearableVoiceReplyAction(notifBuilder, wearableExtender, notificationState); ++ addReadAction(notifBuilder, wearableExtender, notificationState); + } + + // Apply the wearable options and build & post the notification +@@ -876,6 +877,19 @@ public class BugleNotifications { + wearableExtender.addAction(wearActionBuilder.build()); + } + ++ private static void addReadAction(final NotificationCompat.Builder notifBuilder, ++ final WearableExtender wearableExtender, final NotificationState notificationState) { ++ final Context context = Factory.get().getApplicationContext(); ++ final PendingIntent readPendingIntent = notificationState.getReadIntent(); ++ final NotificationCompat.Action.Builder readActionBuilder = ++ new NotificationCompat.Action.Builder(R.drawable.ic_wear_read, ++ context.getString(R.string.notification_mark_as_read), readPendingIntent); ++ notifBuilder.addAction(readActionBuilder.build()); ++ ++ // Support the action on a wearable device as well ++ wearableExtender.addAction(readActionBuilder.build()); ++ } ++ + private static void addDownloadMmsAction(final NotificationCompat.Builder notifBuilder, + final WearableExtender wearableExtender, final NotificationState notificationState) { + if (!(notificationState instanceof MultiMessageNotificationState)) { +diff --git a/src/com/android/messaging/datamodel/MessageNotificationState.java b/src/com/android/messaging/datamodel/MessageNotificationState.java +index 4a4bfd5..7555d97 100644 +--- a/src/com/android/messaging/datamodel/MessageNotificationState.java ++++ b/src/com/android/messaging/datamodel/MessageNotificationState.java +@@ -334,6 +334,14 @@ public abstract class MessageNotificationState extends NotificationState { + getClearIntentRequestCode()); + } + ++ @Override ++ public PendingIntent getReadIntent() { ++ return UIIntents.get().getPendingIntentForMarkingAsRead( ++ Factory.get().getApplicationContext(), ++ mConversationIds, ++ getReadIntentRequestCode()); ++ } ++ + /** + * Notification for multiple messages in at least 2 different conversations. + */ +diff --git a/src/com/android/messaging/datamodel/NotificationState.java b/src/com/android/messaging/datamodel/NotificationState.java +index 144f0fe..4c11537 100644 +--- a/src/com/android/messaging/datamodel/NotificationState.java ++++ b/src/com/android/messaging/datamodel/NotificationState.java +@@ -43,7 +43,8 @@ import java.util.HashSet; + public abstract class NotificationState { + private static final int CONTENT_INTENT_REQUEST_CODE_OFFSET = 0; + private static final int CLEAR_INTENT_REQUEST_CODE_OFFSET = 1; +- private static final int NUM_REQUEST_CODES_NEEDED = 2; ++ private static final int READ_INTENT_REQUEST_CODE_OFFSET = 2; ++ private static final int NUM_REQUEST_CODES_NEEDED = 3; + + public interface FailedMessageQuery { + static final String FAILED_MESSAGES_WHERE_CLAUSE = +@@ -78,6 +79,11 @@ public abstract class NotificationState { + */ + public abstract PendingIntent getClearIntent(); + ++ /** ++ * The intent to be triggered when mark as read is pressed. ++ */ ++ public abstract PendingIntent getReadIntent(); ++ + protected Uri getAttachmentUri() { + return null; + } +@@ -116,6 +122,10 @@ public abstract class NotificationState { + return mBaseRequestCode + CLEAR_INTENT_REQUEST_CODE_OFFSET; + } + ++ public int getReadIntentRequestCode() { ++ return mBaseRequestCode + READ_INTENT_REQUEST_CODE_OFFSET; ++ } ++ + /** + * Gets the appropriate icon needed for notifications. + */ +diff --git a/src/com/android/messaging/receiver/NotificationReceiver.java b/src/com/android/messaging/receiver/NotificationReceiver.java +index bbb847d..f87779c 100644 +--- a/src/com/android/messaging/receiver/NotificationReceiver.java ++++ b/src/com/android/messaging/receiver/NotificationReceiver.java +@@ -20,6 +20,7 @@ import android.content.Context; + import android.content.Intent; + + import com.android.messaging.datamodel.BugleNotifications; ++import com.android.messaging.datamodel.action.MarkAsReadAction; + import com.android.messaging.datamodel.action.MarkAsSeenAction; + import com.android.messaging.ui.UIIntents; + import com.android.messaging.util.ConversationIdSet; +@@ -52,6 +53,15 @@ public class NotificationReceiver extends BroadcastReceiver { + BugleNotifications.resetLastMessageDing(conversationId); + } + } ++ } else if (intent.getAction().equals(UIIntents.ACTION_MARK_AS_READ)) { ++ final String conversationIdSetString = ++ intent.getStringExtra(UIIntents.UI_INTENT_EXTRA_CONVERSATION_ID_SET); ++ if (conversationIdSetString != null) { ++ for (final String conversationId : ++ ConversationIdSet.createSet(conversationIdSetString)) { ++ MarkAsReadAction.markAsRead(conversationId); ++ } ++ } + } + } +-} +\ No newline at end of file ++} +diff --git a/src/com/android/messaging/ui/UIIntents.java b/src/com/android/messaging/ui/UIIntents.java +index 2d10527..144e831 100644 +--- a/src/com/android/messaging/ui/UIIntents.java ++++ b/src/com/android/messaging/ui/UIIntents.java +@@ -69,6 +69,9 @@ public abstract class UIIntents { + public static final String ACTION_RESET_NOTIFICATIONS = + "com.android.messaging.reset_notifications"; + ++ public static final String ACTION_MARK_AS_READ = ++ "com.android.messaging.mark_as_read"; ++ + // Sending VCard uri to VCard detail activity + public static final String UI_INTENT_EXTRA_VCARD_URI = "vcard_uri"; + +@@ -323,6 +326,14 @@ public abstract class UIIntents { + final int updateTargets, final ConversationIdSet conversationIdSet, + final int requestCode); + ++ /** ++ * Get a PendingIntent for marking a conversation as read. ++ * ++ *

This is intended to be used by notifications. ++ */ ++ public abstract PendingIntent getPendingIntentForMarkingAsRead(final Context context, ++ final ConversationIdSet conversationIdSet, final int requestCode); ++ + /** + * Get a PendingIntent for showing low storage notifications. + */ +diff --git a/src/com/android/messaging/ui/UIIntentsImpl.java b/src/com/android/messaging/ui/UIIntentsImpl.java +index d64082d..9281899 100644 +--- a/src/com/android/messaging/ui/UIIntentsImpl.java ++++ b/src/com/android/messaging/ui/UIIntentsImpl.java +@@ -430,6 +430,20 @@ public class UIIntentsImpl extends UIIntents { + PendingIntent.FLAG_UPDATE_CURRENT); + } + ++ @Override ++ public PendingIntent getPendingIntentForMarkingAsRead(final Context context, ++ final ConversationIdSet conversationIdSet, final int requestCode) { ++ final Intent intent = new Intent(context, NotificationReceiver.class); ++ intent.setAction(ACTION_MARK_AS_READ); ++ if (conversationIdSet != null) { ++ intent.putExtra(UI_INTENT_EXTRA_CONVERSATION_ID_SET, ++ conversationIdSet.getDelimitedString()); ++ } ++ return PendingIntent.getBroadcast(context, ++ requestCode, intent, ++ PendingIntent.FLAG_UPDATE_CURRENT); ++ } ++ + /** + * Gets a PendingIntent associated with an Intent to start an Activity. All notifications + * that starts an Activity must use this method to get a PendingIntent, which achieves two +-- +2.25.1 + diff --git a/patches_platform/packages_apps_Settings/9999-TEMP-Settings-Hack-in-LiveDisplay-entrypoint.patch b/patches_platform/packages_apps_Settings/9999-TEMP-Settings-Hack-in-LiveDisplay-entrypoint.patch new file mode 100644 index 0000000..680ad4c --- /dev/null +++ b/patches_platform/packages_apps_Settings/9999-TEMP-Settings-Hack-in-LiveDisplay-entrypoint.patch @@ -0,0 +1,36 @@ +From 29dda55886a296b913d358f292e67ac6d149830e Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Tue, 26 Oct 2021 08:03:39 +0000 +Subject: [PATCH] [TEMP] Settings: Hack in LiveDisplay entrypoint + +Change-Id: Icec153e3d9203bba8bb5b000ecf537397058b349 +--- + res/xml/display_settings.xml | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml +index c48dcbcaef..fa5d3cc77e 100644 +--- a/res/xml/display_settings.xml ++++ b/res/xml/display_settings.xml +@@ -16,6 +16,7 @@ + + + ++ ++ + +Date: Mon, 26 Oct 2020 17:05:18 +0100 +Subject: [PATCH] Trebuchet: Move clear all button to actions view + +Change-Id: I7a0b2729c163169f7606ad4644870d07d5165e8e +--- + .../ic_clear_all_recents.xml} | 20 +++--- + .../res/layout/overview_actions_container.xml | 17 ++++- + .../RecentsViewStateController.java | 4 -- + .../FallbackRecentsStateController.java | 4 -- + .../android/quickstep/views/RecentsView.java | 64 ++----------------- + 5 files changed, 31 insertions(+), 78 deletions(-) + rename quickstep/res/{layout/overview_clear_all_button.xml => drawable/ic_clear_all_recents.xml} (52%) + +diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/drawable/ic_clear_all_recents.xml +similarity index 52% +rename from quickstep/res/layout/overview_clear_all_button.xml +rename to quickstep/res/drawable/ic_clear_all_recents.xml +index 1ee726e62e..7cba0220b0 100644 +--- a/quickstep/res/layout/overview_clear_all_button.xml ++++ b/quickstep/res/drawable/ic_clear_all_recents.xml +@@ -1,6 +1,4 @@ +- +- +- +\ No newline at end of file ++ ++ ++ +diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml +index b652252ce1..f12cad6875 100644 +--- a/quickstep/res/layout/overview_actions_container.xml ++++ b/quickstep/res/layout/overview_actions_container.xml +@@ -46,6 +46,21 @@ + android:layout_height="1dp" + android:layout_weight="1" /> + ++