Initial unified commit for Android 12, syncing up to v400.a
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
From 90eaa68455703e85c5f97d0b13945bd04351e24c Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
+66
@@ -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
|
||||
|
||||
+83
@@ -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
|
||||
|
||||
+95
@@ -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
|
||||
|
||||
+60
@@ -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
|
||||
|
||||
+32
@@ -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
|
||||
|
||||
+54
@@ -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
|
||||
|
||||
+33
@@ -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
|
||||
|
||||
+262
@@ -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
|
||||
|
||||
+34
@@ -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
|
||||
|
||||
+147
@@ -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
|
||||
|
||||
+48
@@ -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
|
||||
|
||||
+41
@@ -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
|
||||
|
||||
+30
@@ -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
|
||||
|
||||
+31
@@ -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
|
||||
|
||||
+245
@@ -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
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From a7c48516ef7fddb7c71566299daf2bdab72e3bcd Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 26 Oct 2021 08:16:00 +0000
|
||||
Subject: [PATCH] [TEMP] Build fixes for Android 12
|
||||
|
||||
---
|
||||
Android.mk | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index d5b099a2f..efc60d309 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -51,12 +51,14 @@ LOCAL_SHARED_LIBRARIES += \
|
||||
libjni_trueportrait \
|
||||
libjni_filtergenerator
|
||||
|
||||
-LOCAL_REQUIRED_MODULES := libts_detected_face_jni libts_face_beautify_jni
|
||||
-
|
||||
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
|
||||
|
||||
LOCAL_JAVA_LIBRARIES += org.apache.http.legacy
|
||||
|
||||
+LOCAL_OPTIONAL_USES_LIBRARIES := \
|
||||
+ com.google.android.media.effects \
|
||||
+ org.apache.http.legacy
|
||||
+
|
||||
LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
From 6f9026e0548bd82e7b728ef29dd7d14db93b2105 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 26 Jun 2021 14:23:09 +0000
|
||||
Subject: [PATCH] Jelly: MainActivity: Restore applyThemeColor
|
||||
|
||||
Fixes black statusbar on start
|
||||
|
||||
Change-Id: I6816f5b1dcb3c7bcaee2736a9e2a3ecd63217bc6
|
||||
---
|
||||
app/src/main/java/org/lineageos/jelly/MainActivity.kt | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/src/main/java/org/lineageos/jelly/MainActivity.kt b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
||||
index 2902b0a..9ff74ed 100644
|
||||
--- a/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
||||
+++ b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
||||
@@ -193,6 +193,7 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
|
||||
findViewById(R.id.search_menu_cancel),
|
||||
this)
|
||||
setUiMode()
|
||||
+ applyThemeColor(mThemeColor)
|
||||
try {
|
||||
val httpCacheDir = File(cacheDir, "suggestion_responses")
|
||||
val httpCacheSize = 1024 * 1024.toLong() // 1 MiB
|
||||
@@ -763,4 +764,4 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
|
||||
private const val STORAGE_PERM_REQ = 423
|
||||
private const val LOCATION_PERM_REQ = 424
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
From 3f7f3f9546f9f23d66381f7dff887cd562285ce6 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Keith <javelinanddart@gmail.com>
|
||||
Date: Tue, 30 Oct 2018 15:46:18 +0100
|
||||
Subject: [PATCH] Messaging: Add "Mark as read" quick action for message
|
||||
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 @@
|
||||
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ android:height="24dp"
|
||||
+ android:width="24dp"
|
||||
+ android:viewportWidth="24"
|
||||
+ android:viewportHeight="24">
|
||||
+ <path
|
||||
+ android:fillColor="#ffffff"
|
||||
+ android:pathData="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z" />
|
||||
+</vector>
|
||||
diff --git a/res/values/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 @@
|
||||
<string name="show_emoticons_pref_title">Emoticons access</string>
|
||||
<string name="show_emoticons_pref_summary">Show the emoticons key on the keyboard</string>
|
||||
|
||||
+ <!-- Mark message as read -->
|
||||
+ <string name="notification_mark_as_read">Mark as read</string>
|
||||
+
|
||||
<!-- Notification channel -->
|
||||
<string name="notification_channel_messages_title">Messages</string>
|
||||
</resources>
|
||||
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.
|
||||
+ *
|
||||
+ * <p>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
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
From 29dda55886a296b913d358f292e67ac6d149830e Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
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 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:lineage="http://schemas.android.com/apk/res/lineageos.platform"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="display_settings_screen"
|
||||
android:title="@string/display_settings"
|
||||
@@ -85,6 +86,10 @@
|
||||
<PreferenceCategory
|
||||
android:title="@string/category_name_color">
|
||||
|
||||
+ <org.lineageos.internal.lineageparts.LineagePartsPreference
|
||||
+ android:key="livedisplay"
|
||||
+ lineage:requiresConfig="@*lineageos.platform:bool/config_enableLiveDisplay" />
|
||||
+
|
||||
<com.android.settings.widget.PrimarySwitchPreference
|
||||
android:key="night_display"
|
||||
android:title="@string/night_display_title"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+357
@@ -0,0 +1,357 @@
|
||||
From 0fdc4088295718c69121443e5b0fee5d213babd2 Mon Sep 17 00:00:00 2001
|
||||
From: Vachounet <vachounet@live.fr>
|
||||
Date: Mon, 26 Oct 2020 17:05:18 +0100
|
||||
Subject: [PATCH] Trebuchet: Move clear all button to actions view
|
||||
|
||||
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 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!--
|
||||
- Copyright (C) 2018 The Android Open Source Project
|
||||
+<!-- Copyright (C) 2020 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,12 +12,10 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
-<com.android.quickstep.views.ClearAllButton
|
||||
- xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
- android:id="@+id/clear_all"
|
||||
- android:layout_width="wrap_content"
|
||||
- android:layout_height="wrap_content"
|
||||
- android:text="@string/recents_clear_all"
|
||||
- android:textColor="?android:attr/textColorPrimary"
|
||||
- android:textSize="14sp" />
|
||||
\ No newline at end of file
|
||||
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ android:height="24dp"
|
||||
+ android:width="24dp"
|
||||
+ android:viewportWidth="24"
|
||||
+ android:viewportHeight="24">
|
||||
+ <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" />
|
||||
+</vector>
|
||||
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
|
||||
index b652252ce1..f12cad6875 100644
|
||||
--- 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" />
|
||||
|
||||
+ <Button
|
||||
+ style="@style/OverviewActionButton"
|
||||
+ android:id="@+id/clear_all"
|
||||
+ android:layout_width="wrap_content"
|
||||
+ android:layout_height="wrap_content"
|
||||
+ android:text="@string/recents_clear_all"
|
||||
+ android:theme="@style/ThemeControlHighlightWorkspaceColor"
|
||||
+ android:drawableStart="@drawable/ic_clear_all_recents"
|
||||
+ />
|
||||
+
|
||||
+ <Space
|
||||
+ android:layout_width="0dp"
|
||||
+ android:layout_height="1dp"
|
||||
+ android:layout_weight="1" />
|
||||
+
|
||||
<Button
|
||||
android:id="@+id/action_share"
|
||||
style="@style/OverviewActionButton"
|
||||
@@ -64,4 +79,4 @@
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
-</com.android.quickstep.views.OverviewActionsView>
|
||||
\ No newline at end of file
|
||||
+</com.android.quickstep.views.OverviewActionsView>
|
||||
diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||
index 996d36aadc..459a2c77f1 100644
|
||||
--- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||
+++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||
@@ -40,7 +40,6 @@ import com.android.launcher3.anim.PendingAnimation;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.states.StateAnimationConfig;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
-import com.android.quickstep.views.ClearAllButton;
|
||||
import com.android.quickstep.views.LauncherRecentsView;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
|
||||
@@ -103,9 +102,6 @@ public final class RecentsViewStateController extends
|
||||
|
||||
private void setAlphas(PropertySetter propertySetter, StateAnimationConfig config,
|
||||
LauncherState state) {
|
||||
- float clearAllButtonAlpha = state.areElementsVisible(mLauncher, CLEAR_ALL_BUTTON) ? 1 : 0;
|
||||
- propertySetter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
|
||||
- clearAllButtonAlpha, LINEAR);
|
||||
float overviewButtonAlpha = state.areElementsVisible(mLauncher, OVERVIEW_ACTIONS)
|
||||
&& mRecentsView.shouldShowOverviewActionsForState(state) ? 1 : 0;
|
||||
propertySetter.setFloat(mLauncher.getActionsView().getVisibilityAlpha(),
|
||||
diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||
index f0364eb410..7c60d9f5af 100644
|
||||
--- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||
+++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||
@@ -36,7 +36,6 @@ import com.android.launcher3.statemanager.StateManager.StateHandler;
|
||||
import com.android.launcher3.states.StateAnimationConfig;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
import com.android.quickstep.RecentsActivity;
|
||||
-import com.android.quickstep.views.ClearAllButton;
|
||||
|
||||
/**
|
||||
* State controller for fallback recents activity
|
||||
@@ -74,9 +73,6 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
|
||||
|
||||
private void setProperties(RecentsState state, StateAnimationConfig config,
|
||||
PropertySetter setter) {
|
||||
- float clearAllButtonAlpha = state.hasClearAllButton() ? 1 : 0;
|
||||
- setter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
|
||||
- clearAllButtonAlpha, LINEAR);
|
||||
float overviewButtonAlpha =
|
||||
state.hasOverviewActions() && mRecentsView.shouldShowOverviewActionsForState(state)
|
||||
? 1 : 0;
|
||||
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
index ce79125be1..b447166d6e 100644
|
||||
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
@@ -96,6 +96,7 @@ import android.view.ViewTreeObserver.OnScrollChangedListener;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.view.animation.Interpolator;
|
||||
+import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.OverScroller;
|
||||
@@ -378,8 +379,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
private final RecentsModel mModel;
|
||||
private final int mRowSpacing;
|
||||
private final int mGridSideMargin;
|
||||
- private final ClearAllButton mClearAllButton;
|
||||
- private final Rect mClearAllButtonDeadZoneRect = new Rect();
|
||||
+ private Button mClearAllButton;
|
||||
private final Rect mTaskViewDeadZoneRect = new Rect();
|
||||
/**
|
||||
* Reflects if Recents is currently in the middle of a gesture
|
||||
@@ -593,9 +593,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mModel = RecentsModel.INSTANCE.get(context);
|
||||
mIdp = InvariantDeviceProfile.INSTANCE.get(context);
|
||||
|
||||
- mClearAllButton = (ClearAllButton) LayoutInflater.from(context)
|
||||
- .inflate(R.layout.overview_clear_all_button, this, false);
|
||||
- mClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||
mTaskViewPool = new ViewPool<>(context, this, R.layout.task, 20 /* max size */,
|
||||
10 /* initial size */);
|
||||
|
||||
@@ -769,6 +766,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mActionsView = actionsView;
|
||||
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
|
||||
mSplitPlaceholderView = splitPlaceholderView;
|
||||
+ mClearAllButton = (Button) mActionsView.findViewById(R.id.clear_all);
|
||||
+ mClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||
}
|
||||
|
||||
public SplitPlaceholderView getSplitPlaceholder() {
|
||||
@@ -910,7 +909,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
|
||||
private void updateTaskStartIndex(View affectingView) {
|
||||
- if (!(affectingView instanceof TaskView) && !(affectingView instanceof ClearAllButton)) {
|
||||
+ if (!(affectingView instanceof TaskView)) {
|
||||
int childCount = getChildCount();
|
||||
|
||||
mTaskViewStartIndex = 0;
|
||||
@@ -975,7 +974,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
* button fully visible, center page is Clear All button.
|
||||
*/
|
||||
public boolean isClearAllHidden() {
|
||||
- return mClearAllButton.getAlpha() != 1f;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1044,11 +1043,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mTouchDownToStartHome = true;
|
||||
} else {
|
||||
updateDeadZoneRects();
|
||||
- final boolean clearAllButtonDeadZoneConsumed =
|
||||
- mClearAllButton.getAlpha() == 1
|
||||
- && mClearAllButtonDeadZoneRect.contains(x, y);
|
||||
final boolean cameFromNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
|
||||
- if (!clearAllButtonDeadZoneConsumed && !cameFromNavBar
|
||||
+ if (!cameFromNavBar
|
||||
&& !mTaskViewDeadZoneRect.contains(x + getScrollX(), y)) {
|
||||
mTouchDownToStartHome = true;
|
||||
}
|
||||
@@ -1123,18 +1119,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
|
||||
final int requiredTaskCount = tasks.size();
|
||||
if (getTaskViewCount() != requiredTaskCount) {
|
||||
- if (indexOfChild(mClearAllButton) != -1) {
|
||||
- removeView(mClearAllButton);
|
||||
- }
|
||||
for (int i = getTaskViewCount(); i < requiredTaskCount; i++) {
|
||||
addView(mTaskViewPool.getView());
|
||||
}
|
||||
while (getTaskViewCount() > requiredTaskCount) {
|
||||
removeView(getChildAt(getChildCount() - 1));
|
||||
}
|
||||
- if (requiredTaskCount > 0) {
|
||||
- addView(mClearAllButton);
|
||||
- }
|
||||
}
|
||||
|
||||
// Rebind and reset all task views
|
||||
@@ -1184,16 +1174,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
for (int i = getTaskViewCount() - 1; i >= 0; i--) {
|
||||
removeView(getTaskViewAt(i));
|
||||
}
|
||||
- if (indexOfChild(mClearAllButton) != -1) {
|
||||
- removeView(mClearAllButton);
|
||||
- }
|
||||
}
|
||||
|
||||
public int getTaskViewCount() {
|
||||
int taskViewCount = getChildCount() - mTaskViewStartIndex;
|
||||
- if (indexOfChild(mClearAllButton) != -1) {
|
||||
- taskViewCount--;
|
||||
- }
|
||||
return taskViewCount;
|
||||
}
|
||||
|
||||
@@ -1249,7 +1233,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
for (int i = 0; i < taskCount; i++) {
|
||||
getTaskViewAt(i).setFullscreenProgress(mFullscreenProgress);
|
||||
}
|
||||
- mClearAllButton.setFullscreenProgress(fullscreenProgress);
|
||||
|
||||
// Fade out the actions view quickly (0.1 range)
|
||||
mActionsView.getFullscreenAlpha().setValue(
|
||||
@@ -1298,10 +1281,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
setLayoutDirection(mIsRtl
|
||||
? View.LAYOUT_DIRECTION_RTL
|
||||
: View.LAYOUT_DIRECTION_LTR);
|
||||
- mClearAllButton.setLayoutDirection(mIsRtl
|
||||
- ? View.LAYOUT_DIRECTION_LTR
|
||||
- : View.LAYOUT_DIRECTION_RTL);
|
||||
- mClearAllButton.setRotation(mOrientationHandler.getDegreesRotated());
|
||||
|
||||
if (forceRecreateDragLayerControllers
|
||||
|| !mOrientationHandler.equals(oldOrientationHandler)) {
|
||||
@@ -1390,8 +1369,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
accumulatedTranslationX += mIsRtl ? widthDiff : -widthDiff;
|
||||
}
|
||||
|
||||
- mClearAllButton.setFullscreenTranslationPrimary(accumulatedTranslationX);
|
||||
-
|
||||
updateGridProperties();
|
||||
}
|
||||
|
||||
@@ -1473,7 +1450,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
return;
|
||||
}
|
||||
int scroll = mOrientationHandler.getPrimaryScroll(this);
|
||||
- mClearAllButton.onRecentsViewScroll(scroll, mOverviewGridEnabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1819,9 +1795,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
// Add an empty view for now until the task plan is loaded and applied
|
||||
final TaskView taskView = mTaskViewPool.getView();
|
||||
addView(taskView, mTaskViewStartIndex);
|
||||
- if (wasEmpty) {
|
||||
- addView(mClearAllButton);
|
||||
- }
|
||||
// The temporary running task is only used for the duration between the start of the
|
||||
// gesture and the task list is loaded and applied
|
||||
mTmpRunningTask = Task.from(new TaskKey(runningTaskInfo), runningTaskInfo, false);
|
||||
@@ -2152,12 +2125,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
}
|
||||
|
||||
- mClearAllButton.setGridTranslationPrimary(
|
||||
- clearAllTotalTranslationX - snappedTaskGridTranslationX);
|
||||
- mClearAllButton.setGridScrollOffset(
|
||||
- mIsRtl ? mLastComputedTaskSize.left - mLastComputedGridSize.left
|
||||
- : mLastComputedTaskSize.right - mLastComputedGridSize.right);
|
||||
-
|
||||
setGridProgress(mGridProgress);
|
||||
}
|
||||
|
||||
@@ -2190,7 +2157,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
for (int i = 0; i < taskCount; i++) {
|
||||
getTaskViewAt(i).setGridProgress(gridProgress);
|
||||
}
|
||||
- mClearAllButton.setGridProgress(gridProgress);
|
||||
}
|
||||
|
||||
private void enableLayoutTransitions() {
|
||||
@@ -2452,7 +2418,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
removeViewInLayout(taskView);
|
||||
|
||||
if (getTaskViewCount() == 0) {
|
||||
- removeViewInLayout(mClearAllButton);
|
||||
startHome();
|
||||
} else {
|
||||
snapToPageImmediately(pageToSnapTo);
|
||||
@@ -2661,7 +2626,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
child.setStableAlpha(alpha);
|
||||
}
|
||||
}
|
||||
- mClearAllButton.setContentAlpha(mContentAlpha);
|
||||
int alphaInt = Math.round(alpha * 255);
|
||||
mEmptyMessagePaint.setAlpha(alphaInt);
|
||||
mEmptyIcon.setAlpha(alphaInt);
|
||||
@@ -3132,15 +3096,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
|
||||
private void updateDeadZoneRects() {
|
||||
- // Get the deadzone rect surrounding the clear all button to not dismiss overview to home
|
||||
- mClearAllButtonDeadZoneRect.setEmpty();
|
||||
- if (mClearAllButton.getWidth() > 0) {
|
||||
- int verticalMargin = getResources()
|
||||
- .getDimensionPixelSize(R.dimen.recents_clear_all_deadzone_vertical_margin);
|
||||
- mClearAllButton.getHitRect(mClearAllButtonDeadZoneRect);
|
||||
- mClearAllButtonDeadZoneRect.inset(-getPaddingRight() / 2, -verticalMargin);
|
||||
- }
|
||||
-
|
||||
// Get the deadzone rect between the task views
|
||||
mTaskViewDeadZoneRect.setEmpty();
|
||||
int count = getTaskViewCount();
|
||||
@@ -3548,7 +3503,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
if (layoutChildren) {
|
||||
int clearAllWidthDiff = mOrientationHandler.getPrimaryValue(mTaskWidth, mTaskHeight)
|
||||
- mOrientationHandler.getPrimarySize(mClearAllButton);
|
||||
- mClearAllButton.setScrollOffsetPrimary(mIsRtl ? clearAllWidthDiff : -clearAllWidthDiff);
|
||||
}
|
||||
|
||||
boolean pageScrollChanged = false;
|
||||
@@ -3596,10 +3550,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
showAsFullscreen()));
|
||||
}
|
||||
|
||||
- public ClearAllButton getClearAllButton() {
|
||||
- return mClearAllButton;
|
||||
- }
|
||||
-
|
||||
/**
|
||||
* @return How many pixels the running task is offset on the currently laid out dominant axis.
|
||||
*/
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
From 7a633a53d8e20e2d976597a332bf5ba855ec1f75 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 5 Sep 2019 02:08:22 +0000
|
||||
Subject: [PATCH] vendor_lineage: Log privapp-permissions whitelist violations
|
||||
instead
|
||||
|
||||
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
|
||||
---
|
||||
config/common.mk | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/config/common.mk b/config/common.mk
|
||||
index 2fe9cb01..7d971bba 100644
|
||||
--- a/config/common.mk
|
||||
+++ b/config/common.mk
|
||||
@@ -70,9 +70,9 @@ PRODUCT_COPY_FILES += \
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/org.lineageos.android.xml
|
||||
|
||||
-# Enforce privapp-permissions whitelist
|
||||
+# Log privapp-permissions whitelist violations
|
||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||
- ro.control_privapp_permissions=enforce
|
||||
+ ro.control_privapp_permissions=log
|
||||
|
||||
# Include AOSP audio files
|
||||
include vendor/lineage/config/aosp_audio.mk
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Reference in New Issue
Block a user