Initial unified commit for Android 12, syncing up to v400.a
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
From d91222a9f7ea6a6455695f6d40adc8566153a1e5 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 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
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From 746c3238391f709acd19f24bdf7ecc97e03621a4 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 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 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!--
|
||||
-/*
|
||||
-** Copyright 2017, The Android Open Source Project
|
||||
-**
|
||||
-** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-** you may not use this file except in compliance with the License.
|
||||
-** You may obtain a copy of the License at
|
||||
-**
|
||||
-** http://www.apache.org/licenses/LICENSE-2.0
|
||||
-**
|
||||
-** Unless required by applicable law or agreed to in writing, software
|
||||
-** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-** See the License for the specific language governing permissions and
|
||||
-** limitations under the License.
|
||||
-*/
|
||||
--->
|
||||
-
|
||||
-<!-- These resources are around just to allow their values to be customized
|
||||
- for different hardware and product builds. -->
|
||||
-<resources>
|
||||
- <!-- Nav bar button default ordering/layout -->
|
||||
- <string name="config_navBarLayout" translatable="false">left[.25W],back[.5WC];home;recent[.5WC],right[.25W]</string>
|
||||
-</resources>
|
||||
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||
index d274c917c26d..14276754e450 100644
|
||||
--- a/packages/SystemUI/res/values/config.xml
|
||||
+++ b/packages/SystemUI/res/values/config.xml
|
||||
@@ -350,7 +350,7 @@
|
||||
</string-array>
|
||||
|
||||
<!-- Nav bar button default ordering/layout -->
|
||||
- <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
|
||||
+ <string name="config_navBarLayout" translatable="false">left[.6W],back[1WC];home;recent[1WC],right[.6W]</string>
|
||||
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;contextual[1.7WC]</string>
|
||||
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From d7f67355ac41dec8b9d9cff29c8ea21e1d3f9a22 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Fri, 9 Mar 2018 15:41:26 +0800
|
||||
Subject: [PATCH 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
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 1a080754144e0c84b03df538ed9c0ffaaf7e3a0d 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 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 @@
|
||||
<string name="config_customMediaSessionPolicyProvider"></string>
|
||||
|
||||
<!-- The max scale for the wallpaper when it's zoomed in -->
|
||||
- <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
|
||||
+ <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
|
||||
|
||||
<!-- Package name that will receive an explicit manifest broadcast for
|
||||
android.os.action.POWER_SAVE_MODE_CHANGED. -->
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From de435b6de11fb025d7003998b87884f5c85cf0ca Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 3 Jun 2020 01:31:34 +0000
|
||||
Subject: [PATCH 05/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 name="status_bar_height">@dimen/status_bar_height_portrait</dimen>
|
||||
<!-- Height of the status bar in portrait. The height should be
|
||||
Max((status bar content height + waterfall top size), top cutout size) -->
|
||||
- <dimen name="status_bar_height_portrait">24dp</dimen>
|
||||
+ <dimen name="status_bar_height_portrait">28dp</dimen>
|
||||
<!-- Height of the status bar in landscape. The height should be
|
||||
Max((status bar content height + waterfall top size), top cutout size) -->
|
||||
<dimen name="status_bar_height_landscape">@dimen/status_bar_height_portrait</dimen>
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
From 66fb1d5dbfcb671e779108af3af7d2063423e7db 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 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
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
From ed4137c747881e1db53edaaf7c8e937367eebc77 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 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 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!--
|
||||
- ~ Copyright (C) 2015 The Android Open Source Project
|
||||
- ~
|
||||
- ~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- ~ you may not use this file except in compliance with the License.
|
||||
- ~ You may obtain a copy of the License at
|
||||
- ~
|
||||
- ~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
- ~
|
||||
- ~ Unless required by applicable law or agreed to in writing, software
|
||||
- ~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- ~ See the License for the specific language governing permissions and
|
||||
- ~ limitations under the License
|
||||
- -->
|
||||
-<resources>
|
||||
- <integer name="config_dockedStackDividerSnapMode">2</integer>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
|
||||
index 34b6a54be493..3921c9edfeac 100644
|
||||
--- a/core/res/res/values-sw600dp/config.xml
|
||||
+++ b/core/res/res/values-sw600dp/config.xml
|
||||
@@ -3,16 +3,16 @@
|
||||
/*
|
||||
** Copyright 2009, The Android Open Source Project
|
||||
**
|
||||
-** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-** you may not use this file except in compliance with the License.
|
||||
-** You may obtain a copy of the License at
|
||||
+** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+** you may not use this file except in compliance with the License.
|
||||
+** You may obtain a copy of the License at
|
||||
**
|
||||
-** http://www.apache.org/licenses/LICENSE-2.0
|
||||
+** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
-** Unless required by applicable law or agreed to in writing, software
|
||||
-** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-** See the License for the specific language governing permissions and
|
||||
+** Unless required by applicable law or agreed to in writing, software
|
||||
+** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
@@ -40,8 +40,6 @@
|
||||
<!-- Use a larger scaling span for larger screen devices. -->
|
||||
<dimen name="config_minScalingSpan">32mm</dimen>
|
||||
|
||||
- <integer name="config_dockedStackDividerSnapMode">1</integer>
|
||||
-
|
||||
<!-- Controls whether the nav bar can move from the bottom to the side in landscape.
|
||||
Only applies if the device display is not square. -->
|
||||
<bool name="config_navBarCanMove">false</bool>
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index 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
|
||||
-->
|
||||
- <integer name="config_dockedStackDividerSnapMode">0</integer>
|
||||
+ <integer name="config_dockedStackDividerSnapMode">1</integer>
|
||||
|
||||
<!-- The maximum aspect ratio (longerSide/shorterSide) that is treated as close-to-square. The
|
||||
orientation requests from apps would be ignored if the display is close-to-square. -->
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 79a42cc701c4d0f7a0e2f53d89bb9ec76ae1102a Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 15:45:24 +0000
|
||||
Subject: [PATCH 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
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 6b97dfc8e8230f118ebfc0b2c6b827b4d8ed2678 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From f0dcef06bd03714d7bd2c681ab632e4b15d8b828 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
From af4b8268484150b18acdf3acb8362f196b365c68 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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 @@
|
||||
<color name="accessibility_floating_menu_background">#B3000000</color> <!-- 70% -->
|
||||
|
||||
<color name="people_tile_background">@android:color/system_accent2_800</color>
|
||||
+
|
||||
+ <!-- Colors for Power Menu Lite -->
|
||||
+ <color name="global_actions_lite_background">@*android:color/primary_device_default_dark</color>
|
||||
+ <color name="global_actions_lite_button_background">@*android:color/surface_dark</color>
|
||||
+ <color name="global_actions_lite_text">@*android:color/foreground_device_default_dark</color>
|
||||
+ <color name="global_actions_lite_emergency_background">@*android:color/surface_dark</color>
|
||||
+ <color name="global_actions_lite_emergency_icon">@*android:color/accent_device_default_dark</color>
|
||||
</resources>
|
||||
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
|
||||
index 2260d2175268..87523686bb2a 100644
|
||||
--- a/packages/SystemUI/res/values/colors.xml
|
||||
+++ b/packages/SystemUI/res/values/colors.xml
|
||||
@@ -53,11 +53,11 @@
|
||||
<color name="global_actions_emergency_text">@color/GM2_grey_100</color>
|
||||
|
||||
<!-- Colors for Power Menu Lite -->
|
||||
- <color name="global_actions_lite_background">#191C18</color>
|
||||
- <color name="global_actions_lite_button_background">#303030</color>
|
||||
- <color name="global_actions_lite_text">#F0F0F0</color>
|
||||
- <color name="global_actions_lite_emergency_background">#F85D4D</color>
|
||||
- <color name="global_actions_lite_emergency_icon">@color/GM2_grey_900</color>
|
||||
+ <color name="global_actions_lite_background">@*android:color/primary_device_default_light</color>
|
||||
+ <color name="global_actions_lite_button_background">@*android:color/surface_light</color>
|
||||
+ <color name="global_actions_lite_text">@*android:color/foreground_device_default_light</color>
|
||||
+ <color name="global_actions_lite_emergency_background">@*android:color/surface_light</color>
|
||||
+ <color name="global_actions_lite_emergency_icon">@*android:color/accent_device_default_light</color>
|
||||
|
||||
<color name="global_actions_shutdown_ui_text">@color/control_primary_text</color>
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From 2eb0c2c90aa31dea5f17bdd32f00ca6ac5b576d3 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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">
|
||||
|
||||
<com.android.systemui.statusbar.policy.Clock
|
||||
android:id="@+id/clock"
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index 51eabf60385e..504a06cfd9ba 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -395,7 +395,7 @@
|
||||
<item name="*android:dotColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
- <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault">
|
||||
+ <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
||||
<item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
<item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
<item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
@@ -484,7 +484,7 @@
|
||||
<item name="singleToneColor">@color/dark_mode_qs_icon_color_single_tone</item>
|
||||
</style>
|
||||
|
||||
- <style name="Theme.SystemUI.QuickSettings.Header">
|
||||
+ <style name="QSHeaderTheme" parent="@style/Theme.SystemUI">
|
||||
<item name="lightIconTheme">@style/DualToneLightTheme</item>
|
||||
<item name="darkIconTheme">@style/QSHeaderDarkTheme</item>
|
||||
</style>
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 611cf88dc0844c91728f5ee1d5f73488f308701f Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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
|
||||
|
||||
@@ -0,0 +1,262 @@
|
||||
From a36b9e02358ad6f3dd12f1a51ca8780e70155573 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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">
|
||||
<shape>
|
||||
<size android:height="@dimen/rounded_slider_height" />
|
||||
- <solid android:color="?priv-android:attr/colorAccentPrimary" />
|
||||
+ <solid android:color="?android:attr/colorAccent" />
|
||||
<corners android:radius="@dimen/rounded_slider_corner_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
diff --git a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
||||
index 9076da795e71..3aefc95a98b5 100644
|
||||
--- a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
||||
+++ b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
||||
@@ -28,13 +28,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
- <solid android:color="?attr/underSurfaceColor"/>
|
||||
- <corners android:radius="@dimen/qs_footer_action_corner_radius"/>
|
||||
- </shape>
|
||||
- </item>
|
||||
- <item>
|
||||
- <shape android:shape="rectangle">
|
||||
- <stroke android:width="1dp" android:color="?android:attr/colorBackground"/>
|
||||
+ <solid android:color="?attr/offStateColor"/>
|
||||
<corners android:radius="@dimen/qs_footer_action_corner_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
diff --git a/packages/SystemUI/res/drawable/qs_security_footer_background.xml b/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
||||
index 860d23b11439..8f12b95ed4f6 100644
|
||||
--- a/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
||||
+++ b/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
||||
@@ -28,8 +28,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
- <stroke android:width="1dp"
|
||||
- android:color="?android:attr/colorBackground"/>
|
||||
+ <solid android:color="?attr/offStateColor"/>
|
||||
<corners android:radius="@dimen/qs_security_footer_corner_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml
|
||||
index 461505f12ce6..c1d2ca23de31 100644
|
||||
--- a/packages/SystemUI/res/values-night/styles.xml
|
||||
+++ b/packages/SystemUI/res/values-night/styles.xml
|
||||
@@ -24,6 +24,18 @@
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
</style>
|
||||
|
||||
+ <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
||||
+ <item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
+ <item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
+ <item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
+ <item name="android:windowIsFloating">true</item>
|
||||
+ <item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
||||
+ <item name="offStateColor">@android:color/system_neutral1_800</item>
|
||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_900</item>
|
||||
+ <item name="android:colorBackground">@android:color/system_neutral1_900</item>
|
||||
+ <item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
+ </style>
|
||||
+
|
||||
<style name="TextAppearance.QS.Status" parent="TextAppearance.QS.TileLabel.Secondary">
|
||||
<item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index 504a06cfd9ba..5d230e522636 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -398,12 +398,12 @@
|
||||
<style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
||||
<item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
<item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
- <item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
+ <item name="android:colorError">@*android:color/error_color_material_light</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
||||
- <item name="offStateColor">@android:color/system_neutral1_800</item>
|
||||
- <item name="underSurfaceColor">@android:color/system_neutral1_1000</item>
|
||||
- <item name="android:colorBackground">@android:color/system_neutral1_900</item>
|
||||
+ <item name="offStateColor">@*android:color/surface_light</item>
|
||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_50</item>
|
||||
+ <item name="android:colorBackground">@android:color/system_neutral1_50</item>
|
||||
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
</style>
|
||||
|
||||
@@ -617,7 +617,7 @@
|
||||
|
||||
<style name="QSCustomizeToolbar" parent="@*android:style/Widget.DeviceDefault.Toolbar">
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
- <item name="android:elevation">10dp</item>
|
||||
+ <item name="android:elevation">0dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Media controls always have light background -->
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
index 9cd97ff8e343..461f67935a11 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
@@ -90,8 +90,8 @@ class OngoingPrivacyChip @JvmOverloads constructor(
|
||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_margin)
|
||||
iconSize = context.resources
|
||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_size)
|
||||
- iconColor =
|
||||
- Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.colorPrimary)
|
||||
+ iconColor = context.resources
|
||||
+ .getColor(android.R.color.system_neutral1_900)
|
||||
|
||||
val padding = context.resources
|
||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_side_padding)
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
index 222539d49526..da7c63ff15a3 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
@@ -70,7 +70,7 @@ open class QSTileViewImpl @JvmOverloads constructor(
|
||||
override var heightOverride: Int = HeightOverrideable.NO_OVERRIDE
|
||||
|
||||
private val colorActive = Utils.getColorAttrDefaultColor(context,
|
||||
- com.android.internal.R.attr.colorAccentPrimary)
|
||||
+ android.R.attr.colorAccent)
|
||||
private val colorInactive = Utils.getColorAttrDefaultColor(context, R.attr.offStateColor)
|
||||
private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
index 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
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 20c9d29922a48beaa2a5294659a764426e47714d Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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<Icon> iconSupplier;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
From 864e73e5348f9fbb70e81797e874587723b96a7d Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright (C) 2021 The Android Open Source Project
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+ You may obtain a copy of the License at
|
||||
+
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+
|
||||
+ Unless required by applicable law or agreed to in writing, software
|
||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ See the License for the specific language governing permissions and
|
||||
+ limitations under the License.
|
||||
+-->
|
||||
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <item android:color="@color/system_neutral1_500" android:lStar="5" />
|
||||
+</selector>
|
||||
diff --git a/core/res/res/values-night/values.xml b/core/res/res/values-night/values.xml
|
||||
index 1571fab66a5b..0683c20a4a4c 100644
|
||||
--- a/core/res/res/values-night/values.xml
|
||||
+++ b/core/res/res/values-night/values.xml
|
||||
@@ -22,6 +22,7 @@
|
||||
<item name="colorSecondary">@color/secondary_device_default_settings</item>
|
||||
<item name="colorAccent">@color/accent_device_default_dark</item>
|
||||
<item name="colorError">@color/error_color_device_default_dark</item>
|
||||
+ <item name="colorSurfaceHeader">@color/surface_header_dark_sysui</item>
|
||||
<item name="colorControlNormal">?attr/textColorPrimary</item>
|
||||
<item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item>
|
||||
<item name="forceDarkAllowed">false</item>
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index 5d230e522636..a03e9ea89342 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -402,7 +402,7 @@
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
||||
<item name="offStateColor">@*android:color/surface_light</item>
|
||||
- <item name="underSurfaceColor">@android:color/system_neutral1_50</item>
|
||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_100</item>
|
||||
<item name="android:colorBackground">@android:color/system_neutral1_50</item>
|
||||
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
</style>
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
index 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
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 9e456e96992024257f6eb7f4bad5fa5aed626ad8 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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" />
|
||||
</com.android.keyguard.AlphaOptimizedLinearLayout>
|
||||
|
||||
- <View
|
||||
- android:id="@+id/nav_bar_background"
|
||||
- android:layout_width="match_parent"
|
||||
- android:layout_height="@dimen/navigation_bar_size"
|
||||
- android:layout_gravity="bottom"
|
||||
- android:background="#ff000000" />
|
||||
</merge>
|
||||
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
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From c843d3ca03875d6b9d0bf9add9b59fbdcb1d8a42 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 5 Oct 2021 21:01:50 -0700
|
||||
Subject: [PATCH 18/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
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 41ed8b60f340207cdeddf7fd4ad53c625be32534 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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 @@
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.QS.Status" parent="TextAppearance.QS.TileLabel.Secondary">
|
||||
- <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
|
||||
+ <item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From dce279f20b8973aa0660d98864c9ad8d56b56514 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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 @@
|
||||
|
||||
<!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
|
||||
<string name="quick_settings_tiles_stock" translatable="false">
|
||||
- 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
|
||||
</string>
|
||||
|
||||
<!-- The tiles to display in QuickSettings -->
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
From 0cd11d9386e398392716883c6bdadab65777c8ce Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
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<SignalState> {
|
||||
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<SignalState> {
|
||||
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<MobileState, Mobile
|
||||
IconState qsIcon = null;
|
||||
CharSequence description = null;
|
||||
// Only send data sim callbacks to QS.
|
||||
- if (mCurrentState.dataSim && mCurrentState.isDefault) {
|
||||
+ if (mCurrentState.dataSim) {
|
||||
qsTypeIcon =
|
||||
(showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0;
|
||||
qsIcon = new IconState(mCurrentState.enabled
|
||||
@@ -420,7 +420,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile
|
||||
statusIcon, qsIcon, typeIcon, qsTypeIcon,
|
||||
activityIn, activityOut, dataContentDescription, dataContentDescriptionHtml,
|
||||
description, icons.isWide, mSubscriptionInfo.getSubscriptionId(),
|
||||
- mCurrentState.roaming, showTriangle);
|
||||
+ mCurrentState.roaming, showTriangle, mCurrentState.isDefault);
|
||||
callback.setMobileDataIndicators(mobileDataIndicators);
|
||||
} else {
|
||||
boolean showDataIcon = mCurrentState.dataConnected || dataDisabled;
|
||||
@@ -431,25 +431,13 @@ public class MobileSignalController extends SignalController<MobileState, Mobile
|
||||
int qsTypeIcon = 0;
|
||||
IconState qsIcon = null;
|
||||
CharSequence description = null;
|
||||
- // Only send data sim callbacks to QS.
|
||||
- if (mProviderModelSetting) {
|
||||
- if (mCurrentState.dataSim && mCurrentState.isDefault) {
|
||||
- qsTypeIcon =
|
||||
- (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0;
|
||||
- qsIcon = new IconState(
|
||||
- mCurrentState.enabled && !mCurrentState.isEmergency,
|
||||
- getQsCurrentIconId(), contentDescription);
|
||||
- description = mCurrentState.isEmergency ? null : mCurrentState.networkName;
|
||||
- }
|
||||
- } else {
|
||||
- if (mCurrentState.dataSim) {
|
||||
- qsTypeIcon =
|
||||
- (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0;
|
||||
- qsIcon = new IconState(
|
||||
- mCurrentState.enabled && !mCurrentState.isEmergency,
|
||||
- getQsCurrentIconId(), contentDescription);
|
||||
- description = mCurrentState.isEmergency ? null : mCurrentState.networkName;
|
||||
- }
|
||||
+ if (mCurrentState.dataSim) {
|
||||
+ qsTypeIcon =
|
||||
+ (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0;
|
||||
+ qsIcon = new IconState(
|
||||
+ mCurrentState.enabled && !mCurrentState.isEmergency,
|
||||
+ getQsCurrentIconId(), contentDescription);
|
||||
+ description = mCurrentState.isEmergency ? null : mCurrentState.networkName;
|
||||
}
|
||||
|
||||
boolean activityIn = mCurrentState.dataConnected
|
||||
@@ -465,7 +453,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile
|
||||
statusIcon, qsIcon, typeIcon, qsTypeIcon,
|
||||
activityIn, activityOut, dataContentDescription, dataContentDescriptionHtml,
|
||||
description, icons.isWide, mSubscriptionInfo.getSubscriptionId(),
|
||||
- mCurrentState.roaming, showTriangle);
|
||||
+ mCurrentState.roaming, showTriangle, mCurrentState.isDefault);
|
||||
callback.setMobileDataIndicators(mobileDataIndicators);
|
||||
}
|
||||
}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
|
||||
index ef2ca985858d..39fa68cab281 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
|
||||
@@ -58,10 +58,11 @@ public interface NetworkController extends CallbackController<SignalCallback>, 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<SignalCallback>, D
|
||||
this.description = description;
|
||||
this.isTransient = isTransient;
|
||||
this.statusLabel = statusLabel;
|
||||
+ this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,6 +85,7 @@ public interface NetworkController extends CallbackController<SignalCallback>, 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<SignalCallback>, 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<SignalCallback>, D
|
||||
this.subId = subId;
|
||||
this.roaming = roaming;
|
||||
this.showTriangle = showTriangle;
|
||||
+ this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,6 +146,7 @@ public interface NetworkController extends CallbackController<SignalCallback>, 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
|
||||
|
||||
Reference in New Issue
Block a user