Initial unified commit for Android 12, syncing up to v400.a
This commit is contained in:
commit
796726eb09
0
patches_device/frameworks_base/placeholder
Normal file
0
patches_device/frameworks_base/placeholder
Normal file
0
patches_device_personal/frameworks_base/placeholder
Normal file
0
patches_device_personal/frameworks_base/placeholder
Normal file
27
patches_platform/build_make/0001-build-Remove-llkd.patch
Normal file
27
patches_platform/build_make/0001-build-Remove-llkd.patch
Normal file
@ -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
|
||||
|
@ -0,0 +1,66 @@
|
||||
From d7f67355ac41dec8b9d9cff29c8ea21e1d3f9a22 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Fri, 9 Mar 2018 15:41:26 +0800
|
||||
Subject: [PATCH 03/21] UI: Disable left (seascape) navigation bar optionally
|
||||
|
||||
Toggle this behaviour with property "persist.ui.seascape.disable"
|
||||
|
||||
Change-Id: Ieb58efa4b59feeb0c4ac70e497f4c59aa04210d6
|
||||
---
|
||||
.../navigationbar/buttons/ReverseLinearLayout.java | 8 +++++++-
|
||||
.../core/java/com/android/server/wm/DisplayPolicy.java | 5 +++--
|
||||
2 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
||||
index f1e1366404a2..f43bef8532b8 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ReverseLinearLayout.java
|
||||
@@ -16,6 +16,7 @@ package com.android.systemui.navigationbar.buttons;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.content.Context;
|
||||
+import android.os.SystemProperties;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -86,6 +87,11 @@ public class ReverseLinearLayout extends LinearLayout {
|
||||
boolean isLayoutRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
||||
boolean isLayoutReverse = isLayoutRtl ^ mIsAlternativeOrder;
|
||||
|
||||
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
|
||||
+ if (isSeascapeDisabled) {
|
||||
+ isLayoutReverse = isLayoutRtl ^ true;
|
||||
+ }
|
||||
+
|
||||
if (mIsLayoutReverse != isLayoutReverse) {
|
||||
// reversity changed, swap the order of all views.
|
||||
int childCount = getChildCount();
|
||||
@@ -154,7 +160,7 @@ public class ReverseLinearLayout extends LinearLayout {
|
||||
if (getGravity() != gravityToApply) setGravity(gravityToApply);
|
||||
}
|
||||
}
|
||||
-
|
||||
+
|
||||
private static void reverseGroup(ViewGroup group, boolean isLayoutReverse) {
|
||||
for (int i = 0; i < group.getChildCount(); i++) {
|
||||
final View child = group.getChildAt(i);
|
||||
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||
index 73d31bf7e0c8..a070942cc76a 100644
|
||||
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||
@@ -2334,9 +2334,10 @@ public class DisplayPolicy {
|
||||
@NavigationBarPosition
|
||||
int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) {
|
||||
if (navigationBarCanMove() && displayWidth > displayHeight) {
|
||||
- if (displayRotation == Surface.ROTATION_270) {
|
||||
+ boolean isSeascapeDisabled = SystemProperties.getBoolean("persist.ui.seascape.disable", false);
|
||||
+ if (displayRotation == Surface.ROTATION_270 && !isSeascapeDisabled) {
|
||||
return NAV_BAR_LEFT;
|
||||
- } else if (displayRotation == Surface.ROTATION_90) {
|
||||
+ } else {
|
||||
return NAV_BAR_RIGHT;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 1a080754144e0c84b03df538ed9c0ffaaf7e3a0d Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 10 Jan 2021 11:44:29 +0000
|
||||
Subject: [PATCH 04/21] UI: Disable wallpaper zoom
|
||||
|
||||
It does little more than inducing motion sickness
|
||||
|
||||
Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
|
||||
---
|
||||
core/res/res/values/config.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index db43b5b31e7e..60890561308d 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -4740,7 +4740,7 @@
|
||||
<string name="config_customMediaSessionPolicyProvider"></string>
|
||||
|
||||
<!-- The max scale for the wallpaper when it's zoomed in -->
|
||||
- <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
|
||||
+ <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
|
||||
|
||||
<!-- Package name that will receive an explicit manifest broadcast for
|
||||
android.os.action.POWER_SAVE_MODE_CHANGED. -->
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From de435b6de11fb025d7003998b87884f5c85cf0ca Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 3 Jun 2020 01:31:34 +0000
|
||||
Subject: [PATCH 05/21] UI: Increase default status bar height
|
||||
|
||||
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
|
||||
---
|
||||
core/res/res/values/dimens.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
|
||||
index de7a1175b4a3..8d56e94458db 100644
|
||||
--- a/core/res/res/values/dimens.xml
|
||||
+++ b/core/res/res/values/dimens.xml
|
||||
@@ -43,7 +43,7 @@
|
||||
<dimen name="status_bar_height">@dimen/status_bar_height_portrait</dimen>
|
||||
<!-- Height of the status bar in portrait. The height should be
|
||||
Max((status bar content height + waterfall top size), top cutout size) -->
|
||||
- <dimen name="status_bar_height_portrait">24dp</dimen>
|
||||
+ <dimen name="status_bar_height_portrait">28dp</dimen>
|
||||
<!-- Height of the status bar in landscape. The height should be
|
||||
Max((status bar content height + waterfall top size), top cutout size) -->
|
||||
<dimen name="status_bar_height_landscape">@dimen/status_bar_height_portrait</dimen>
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,83 @@
|
||||
From 66fb1d5dbfcb671e779108af3af7d2063423e7db Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 6 Oct 2020 01:41:16 +0000
|
||||
Subject: [PATCH 06/21] UI: Revive navbar layout tuning via sysui_nav_bar
|
||||
tunable
|
||||
|
||||
Google keeps fixing what ain't broken.
|
||||
|
||||
Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352
|
||||
---
|
||||
.../NavigationBarInflaterView.java | 30 ++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||
index 4d9175b8db68..293ebb374241 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
|
||||
@@ -43,12 +43,13 @@ import com.android.systemui.navigationbar.buttons.ReverseLinearLayout;
|
||||
import com.android.systemui.navigationbar.buttons.ReverseLinearLayout.ReverseRelativeLayout;
|
||||
import com.android.systemui.recents.OverviewProxyService;
|
||||
import com.android.systemui.shared.system.QuickStepContract;
|
||||
+import com.android.systemui.tuner.TunerService;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Objects;
|
||||
|
||||
public class NavigationBarInflaterView extends FrameLayout
|
||||
- implements NavigationModeController.ModeChangedListener {
|
||||
+ implements NavigationModeController.ModeChangedListener, TunerService.Tunable {
|
||||
|
||||
private static final String TAG = "NavBarInflater";
|
||||
|
||||
@@ -102,6 +103,8 @@ public class NavigationBarInflaterView extends FrameLayout
|
||||
private OverviewProxyService mOverviewProxyService;
|
||||
private int mNavBarMode = NAV_BAR_MODE_3BUTTON;
|
||||
|
||||
+ private boolean mUsingCustomLayout;
|
||||
+
|
||||
public NavigationBarInflaterView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
createInflaters();
|
||||
@@ -151,13 +154,38 @@ public class NavigationBarInflaterView extends FrameLayout
|
||||
mNavBarMode = mode;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ protected void onAttachedToWindow() {
|
||||
+ super.onAttachedToWindow();
|
||||
+ Dependency.get(TunerService.class).addTunable(this, NAV_BAR_VIEWS);
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
Dependency.get(NavigationModeController.class).removeListener(this);
|
||||
+ Dependency.get(TunerService.class).removeTunable(this);
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public void onTuningChanged(String key, String newValue) {
|
||||
+ if (NAV_BAR_VIEWS.equals(key)) {
|
||||
+ setNavigationBarLayout(newValue);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void setNavigationBarLayout(String layoutValue) {
|
||||
+ if (!Objects.equals(mCurrentLayout, layoutValue)) {
|
||||
+ mUsingCustomLayout = layoutValue != null;
|
||||
+ clearViews();
|
||||
+ inflateLayout(layoutValue);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public void onLikelyDefaultLayoutChange() {
|
||||
+ // Don't override custom layouts
|
||||
+ if (mUsingCustomLayout) return;
|
||||
+
|
||||
// Reevaluate new layout
|
||||
final String newValue = getDefaultLayout();
|
||||
if (!Objects.equals(mCurrentLayout, newValue)) {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,95 @@
|
||||
From ed4137c747881e1db53edaaf7c8e937367eebc77 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 26 Apr 2020 08:56:13 +0000
|
||||
Subject: [PATCH 07/21] UI: Use SNAP_FIXED_RATIO for multi-window globally
|
||||
|
||||
Enables multiple snap targets under landscape for phone UI
|
||||
|
||||
Change-Id: I36e08f1e277dca0b0f9f99418671026e61b01496
|
||||
---
|
||||
core/res/res/values-land/config.xml | 19 -------------------
|
||||
core/res/res/values-sw600dp/config.xml | 18 ++++++++----------
|
||||
core/res/res/values/config.xml | 2 +-
|
||||
3 files changed, 9 insertions(+), 30 deletions(-)
|
||||
delete mode 100644 core/res/res/values-land/config.xml
|
||||
|
||||
diff --git a/core/res/res/values-land/config.xml b/core/res/res/values-land/config.xml
|
||||
deleted file mode 100644
|
||||
index 7308dc5882c1..000000000000
|
||||
--- a/core/res/res/values-land/config.xml
|
||||
+++ /dev/null
|
||||
@@ -1,19 +0,0 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!--
|
||||
- ~ Copyright (C) 2015 The Android Open Source Project
|
||||
- ~
|
||||
- ~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- ~ you may not use this file except in compliance with the License.
|
||||
- ~ You may obtain a copy of the License at
|
||||
- ~
|
||||
- ~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
- ~
|
||||
- ~ Unless required by applicable law or agreed to in writing, software
|
||||
- ~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- ~ See the License for the specific language governing permissions and
|
||||
- ~ limitations under the License
|
||||
- -->
|
||||
-<resources>
|
||||
- <integer name="config_dockedStackDividerSnapMode">2</integer>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
diff --git a/core/res/res/values-sw600dp/config.xml b/core/res/res/values-sw600dp/config.xml
|
||||
index 34b6a54be493..3921c9edfeac 100644
|
||||
--- a/core/res/res/values-sw600dp/config.xml
|
||||
+++ b/core/res/res/values-sw600dp/config.xml
|
||||
@@ -3,16 +3,16 @@
|
||||
/*
|
||||
** Copyright 2009, The Android Open Source Project
|
||||
**
|
||||
-** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-** you may not use this file except in compliance with the License.
|
||||
-** You may obtain a copy of the License at
|
||||
+** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+** you may not use this file except in compliance with the License.
|
||||
+** You may obtain a copy of the License at
|
||||
**
|
||||
-** http://www.apache.org/licenses/LICENSE-2.0
|
||||
+** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
-** Unless required by applicable law or agreed to in writing, software
|
||||
-** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-** See the License for the specific language governing permissions and
|
||||
+** Unless required by applicable law or agreed to in writing, software
|
||||
+** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
@@ -40,8 +40,6 @@
|
||||
<!-- Use a larger scaling span for larger screen devices. -->
|
||||
<dimen name="config_minScalingSpan">32mm</dimen>
|
||||
|
||||
- <integer name="config_dockedStackDividerSnapMode">1</integer>
|
||||
-
|
||||
<!-- Controls whether the nav bar can move from the bottom to the side in landscape.
|
||||
Only applies if the device display is not square. -->
|
||||
<bool name="config_navBarCanMove">false</bool>
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index 60890561308d..6479e5ed5eed 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -3515,7 +3515,7 @@
|
||||
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
|
||||
2 - 1 snap target: 1:1
|
||||
-->
|
||||
- <integer name="config_dockedStackDividerSnapMode">0</integer>
|
||||
+ <integer name="config_dockedStackDividerSnapMode">1</integer>
|
||||
|
||||
<!-- The maximum aspect ratio (longerSide/shorterSide) that is treated as close-to-square. The
|
||||
orientation requests from apps would be ignored if the display is close-to-square. -->
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,40 @@
|
||||
From 79a42cc701c4d0f7a0e2f53d89bb9ec76ae1102a Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 15:45:24 +0000
|
||||
Subject: [PATCH 08/21] UI: Unblock alarm status bar icon
|
||||
|
||||
That's very Zen of you, Google...
|
||||
|
||||
Change-Id: I2c9f91f47bb1e324a20c13d588dcdbbca91dc12e
|
||||
---
|
||||
.../systemui/statusbar/phone/CollapsedStatusBarFragment.java | 1 -
|
||||
.../android/systemui/statusbar/phone/KeyguardStatusBarView.java | 1 -
|
||||
2 files changed, 2 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
|
||||
index 6a171ceff1ed..2c1321f1c013 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
|
||||
@@ -158,7 +158,6 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
|
||||
}
|
||||
mDarkIconManager = new DarkIconManager(view.findViewById(R.id.statusIcons), mFeatureFlags);
|
||||
mDarkIconManager.setShouldLog(true);
|
||||
- mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_alarm_clock));
|
||||
mBlockedIcons.add(getString(com.android.internal.R.string.status_bar_call_strength));
|
||||
mDarkIconManager.setBlockList(mBlockedIcons);
|
||||
mStatusBarIconController.addIconGroup(mDarkIconManager);
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||
index 6a37890bc59f..c79991314318 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||
@@ -207,7 +207,6 @@ public class KeyguardStatusBarView extends RelativeLayout implements
|
||||
// Set hidden status bar items
|
||||
private void loadBlockList() {
|
||||
Resources r = getResources();
|
||||
- mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_alarm_clock));
|
||||
mBlockedIcons.add(r.getString(com.android.internal.R.string.status_bar_call_strength));
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,60 @@
|
||||
From 6b97dfc8e8230f118ebfc0b2c6b827b4d8ed2678 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 3 Nov 2020 22:38:49 -0800
|
||||
Subject: [PATCH 09/21] core: Remove default aspect ratio limit for old apps
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
I have never encountered a single app that this aspect ratio limit is
|
||||
actually helpful for. Most legacy apps are able to cope with longer
|
||||
aspect ratios fine — perhaps not optimally, but it looks better than
|
||||
having a big black box at the bottom of the screen.
|
||||
|
||||
Instead of limiting older apps' screen space unconditionally or exposing
|
||||
it in Settings, remove the limit entirely so the user doesn't have to go
|
||||
through the trouble to begin with. Note that apps explicitly declaring a
|
||||
shorter aspect ratio will still get their constraint satisfied.
|
||||
|
||||
Change-Id: Ic415288b24129a634476b5cc01a6f202588f4b89
|
||||
---
|
||||
core/java/android/content/pm/PackageParser.java | 6 ++----
|
||||
.../android/content/pm/parsing/ParsingPackageUtils.java | 5 ++---
|
||||
2 files changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
|
||||
index 4ff26242dab2..d674b8865f3a 100644
|
||||
--- a/core/java/android/content/pm/PackageParser.java
|
||||
+++ b/core/java/android/content/pm/PackageParser.java
|
||||
@@ -4663,10 +4663,8 @@ public class PackageParser {
|
||||
* ratio set.
|
||||
*/
|
||||
private void setMaxAspectRatio(Package owner) {
|
||||
- // Default to (1.86) 16.7:9 aspect ratio for pre-O apps and unset for O and greater.
|
||||
- // NOTE: 16.7:9 was the max aspect ratio Android devices can support pre-O per the CDD.
|
||||
- float maxAspectRatio = owner.applicationInfo.targetSdkVersion < O
|
||||
- ? DEFAULT_PRE_O_MAX_ASPECT_RATIO : 0;
|
||||
+ // Start at an unlimited aspect ratio unless we get a more restrictive one
|
||||
+ float maxAspectRatio = 0;
|
||||
|
||||
if (owner.applicationInfo.maxAspectRatio != 0) {
|
||||
// Use the application max aspect ration as default if set.
|
||||
diff --git a/core/java/android/content/pm/parsing/ParsingPackageUtils.java b/core/java/android/content/pm/parsing/ParsingPackageUtils.java
|
||||
index dce242c9d87c..5ea07db54eb7 100644
|
||||
--- a/core/java/android/content/pm/parsing/ParsingPackageUtils.java
|
||||
+++ b/core/java/android/content/pm/parsing/ParsingPackageUtils.java
|
||||
@@ -2584,9 +2584,8 @@ public class ParsingPackageUtils {
|
||||
* ratio set.
|
||||
*/
|
||||
private static void setMaxAspectRatio(ParsingPackage pkg) {
|
||||
- // Default to (1.86) 16.7:9 aspect ratio for pre-O apps and unset for O and greater.
|
||||
- // NOTE: 16.7:9 was the max aspect ratio Android devices can support pre-O per the CDD.
|
||||
- float maxAspectRatio = pkg.getTargetSdkVersion() < O ? DEFAULT_PRE_O_MAX_ASPECT_RATIO : 0;
|
||||
+ // Start at an unlimited aspect ratio unless we get a more restrictive one
|
||||
+ float maxAspectRatio = 0;
|
||||
|
||||
float packageMaxAspectRatio = pkg.getMaxAspectRatio();
|
||||
if (packageMaxAspectRatio != 0) {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,32 @@
|
||||
From f0dcef06bd03714d7bd2c681ab632e4b15d8b828 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 5 Oct 2021 21:01:15 -0700
|
||||
Subject: [PATCH 10/21] SystemUI: Always refresh power menu on UI mode change
|
||||
|
||||
This is necessary for reliably theming the global actions dialog with
|
||||
dynamic colors and adapting it to light/dark themes.
|
||||
|
||||
Demo screenshots (with color overlays applied):
|
||||
https://twitter.com/kdrag0n/status/1445960685427433473
|
||||
|
||||
Change-Id: Id6f6623096ed231e841ca3794b47f8a0ab54dae6
|
||||
---
|
||||
.../android/systemui/globalactions/GlobalActionsDialogLite.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
||||
index 06e74821869e..b0333f3c4463 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
|
||||
@@ -689,7 +689,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
|
||||
@Override
|
||||
public void onUiModeChanged() {
|
||||
mContext.getTheme().applyStyle(mContext.getThemeResId(), true);
|
||||
- if (mDialog != null && mDialog.isShowing()) {
|
||||
+ if (mDialog != null) {
|
||||
mDialog.refreshDialog();
|
||||
}
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,55 @@
|
||||
From af4b8268484150b18acdf3acb8362f196b365c68 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Sat, 9 Oct 2021 14:39:38 -0700
|
||||
Subject: [PATCH 11/21] SystemUI: Use Monet colors for power menu
|
||||
|
||||
It's odd that the power menu doesn't use Monet colors, unlike most of
|
||||
System UI. This makes it feel more integrated with the rest of the
|
||||
system.
|
||||
|
||||
Change-Id: Iaffb178fe2c09a33925cb40e89d78640fab2b23c
|
||||
---
|
||||
packages/SystemUI/res/values-night/colors.xml | 7 +++++++
|
||||
packages/SystemUI/res/values/colors.xml | 10 +++++-----
|
||||
2 files changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml
|
||||
index b98694e2fae7..3a6b62dfe1c8 100644
|
||||
--- a/packages/SystemUI/res/values-night/colors.xml
|
||||
+++ b/packages/SystemUI/res/values-night/colors.xml
|
||||
@@ -99,4 +99,11 @@
|
||||
<color name="accessibility_floating_menu_background">#B3000000</color> <!-- 70% -->
|
||||
|
||||
<color name="people_tile_background">@android:color/system_accent2_800</color>
|
||||
+
|
||||
+ <!-- Colors for Power Menu Lite -->
|
||||
+ <color name="global_actions_lite_background">@*android:color/primary_device_default_dark</color>
|
||||
+ <color name="global_actions_lite_button_background">@*android:color/surface_dark</color>
|
||||
+ <color name="global_actions_lite_text">@*android:color/foreground_device_default_dark</color>
|
||||
+ <color name="global_actions_lite_emergency_background">@*android:color/surface_dark</color>
|
||||
+ <color name="global_actions_lite_emergency_icon">@*android:color/accent_device_default_dark</color>
|
||||
</resources>
|
||||
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
|
||||
index 2260d2175268..87523686bb2a 100644
|
||||
--- a/packages/SystemUI/res/values/colors.xml
|
||||
+++ b/packages/SystemUI/res/values/colors.xml
|
||||
@@ -53,11 +53,11 @@
|
||||
<color name="global_actions_emergency_text">@color/GM2_grey_100</color>
|
||||
|
||||
<!-- Colors for Power Menu Lite -->
|
||||
- <color name="global_actions_lite_background">#191C18</color>
|
||||
- <color name="global_actions_lite_button_background">#303030</color>
|
||||
- <color name="global_actions_lite_text">#F0F0F0</color>
|
||||
- <color name="global_actions_lite_emergency_background">#F85D4D</color>
|
||||
- <color name="global_actions_lite_emergency_icon">@color/GM2_grey_900</color>
|
||||
+ <color name="global_actions_lite_background">@*android:color/primary_device_default_light</color>
|
||||
+ <color name="global_actions_lite_button_background">@*android:color/surface_light</color>
|
||||
+ <color name="global_actions_lite_text">@*android:color/foreground_device_default_light</color>
|
||||
+ <color name="global_actions_lite_emergency_background">@*android:color/surface_light</color>
|
||||
+ <color name="global_actions_lite_emergency_icon">@*android:color/accent_device_default_light</color>
|
||||
|
||||
<color name="global_actions_shutdown_ui_text">@color/control_primary_text</color>
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 2eb0c2c90aa31dea5f17bdd32f00ca6ac5b576d3 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Wed, 6 Oct 2021 18:40:30 -0700
|
||||
Subject: [PATCH 12/21] Revert "Make QS always use dark theme colors"
|
||||
|
||||
This reverts commit d62f7249f9e3222da95ecf6816601c408aac6be5.
|
||||
|
||||
This is a prerequisite for making the QS panel follow the light system
|
||||
theme setting.
|
||||
|
||||
Change-Id: Iac4c96ccb3845812ca3df820bf27dc533816f72e
|
||||
---
|
||||
packages/SystemUI/res/layout/quick_qs_status_icons.xml | 2 +-
|
||||
packages/SystemUI/res/values/styles.xml | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
||||
index 5b9ca1b26158..bbd3e47a568f 100644
|
||||
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
||||
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
||||
@@ -24,7 +24,7 @@
|
||||
android:minHeight="48dp"
|
||||
android:clickable="false"
|
||||
android:focusable="true"
|
||||
- android:theme="@style/Theme.SystemUI.QuickSettings.Header">
|
||||
+ android:theme="@style/QSHeaderTheme">
|
||||
|
||||
<com.android.systemui.statusbar.policy.Clock
|
||||
android:id="@+id/clock"
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index 51eabf60385e..504a06cfd9ba 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -395,7 +395,7 @@
|
||||
<item name="*android:dotColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
- <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault">
|
||||
+ <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
||||
<item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
<item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
<item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
@@ -484,7 +484,7 @@
|
||||
<item name="singleToneColor">@color/dark_mode_qs_icon_color_single_tone</item>
|
||||
</style>
|
||||
|
||||
- <style name="Theme.SystemUI.QuickSettings.Header">
|
||||
+ <style name="QSHeaderTheme" parent="@style/Theme.SystemUI">
|
||||
<item name="lightIconTheme">@style/DualToneLightTheme</item>
|
||||
<item name="darkIconTheme">@style/QSHeaderDarkTheme</item>
|
||||
</style>
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 611cf88dc0844c91728f5ee1d5f73488f308701f Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Wed, 6 Oct 2021 18:41:11 -0700
|
||||
Subject: [PATCH 13/21] Revert "Do not re-inflate QS and SB when
|
||||
CONFIG_UI_MODE"
|
||||
|
||||
This reverts commit 8a40ff855b86bc86e23367017002289920855a4e.
|
||||
|
||||
This is a prerequisite for making the QS panel follow the light system
|
||||
mode setting.
|
||||
|
||||
Change-Id: Ibad399ece587505559cc73febdda2f2d8558e94d
|
||||
---
|
||||
.../com/android/systemui/fragments/FragmentHostManager.java | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
index b45dc52585ad..87d90adceba5 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
|
||||
@@ -54,7 +54,8 @@ public class FragmentHostManager {
|
||||
private final View mRootView;
|
||||
private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
|
||||
ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE
|
||||
- | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS);
|
||||
+ | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS
|
||||
+ | ActivityInfo.CONFIG_UI_MODE);
|
||||
private final FragmentService mManager;
|
||||
private final ExtensionFragmentManager mPlugins = new ExtensionFragmentManager();
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,262 @@
|
||||
From a36b9e02358ad6f3dd12f1a51ca8780e70155573 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Mon, 11 Oct 2021 19:24:58 -0700
|
||||
Subject: [PATCH 14/21] SystemUI: Follow light/dark theme in quick settings
|
||||
|
||||
Android 12's dual-tone style where the quick settings panel is always
|
||||
dark makes the light theme look like a second-class citizen. Pure black
|
||||
also looks out-of-place next to QS tiles and the notification panel
|
||||
because dynamic themes don't affect it at all.
|
||||
|
||||
Revert to the ~Beta 1 style where quick settings used the same theme as
|
||||
the notification shade.
|
||||
|
||||
- colorAccentPrimary has been replaced with colorAccent for contrast in
|
||||
light mode, because colorAccentPrimary is system_accent1_100 (dark
|
||||
accent color)
|
||||
- Footer chips have been converted to surfaces (similar to QS tiles and
|
||||
notifications), which makes more sense with the new style
|
||||
- The QS background is now the same as the notification shade background
|
||||
in both light and dark modes
|
||||
|
||||
Demo screenshots (with dual-tone commit):
|
||||
https://twitter.com/kdrag0n/status/1445922541218922496
|
||||
|
||||
Change-Id: I3d45b72f0f119e100505409d178ab8f698993881
|
||||
---
|
||||
.../brightness_progress_full_drawable.xml | 2 +-
|
||||
.../qs_footer_action_chip_background.xml | 8 +-------
|
||||
.../qs_security_footer_background.xml | 3 +--
|
||||
packages/SystemUI/res/values-night/styles.xml | 12 +++++++++++
|
||||
packages/SystemUI/res/values/styles.xml | 10 +++++-----
|
||||
.../systemui/privacy/OngoingPrivacyChip.kt | 4 ++--
|
||||
.../systemui/qs/tileimpl/QSTileViewImpl.kt | 2 +-
|
||||
.../statusbar/phone/ScrimController.java | 2 +-
|
||||
.../systemui/statusbar/phone/ScrimState.java | 20 +++++++++----------
|
||||
9 files changed, 34 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml
|
||||
index 4d9188c40822..1eae667c6e79 100644
|
||||
--- a/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml
|
||||
+++ b/packages/SystemUI/res/drawable/brightness_progress_full_drawable.xml
|
||||
@@ -22,7 +22,7 @@
|
||||
android:height="@dimen/rounded_slider_height">
|
||||
<shape>
|
||||
<size android:height="@dimen/rounded_slider_height" />
|
||||
- <solid android:color="?priv-android:attr/colorAccentPrimary" />
|
||||
+ <solid android:color="?android:attr/colorAccent" />
|
||||
<corners android:radius="@dimen/rounded_slider_corner_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
diff --git a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
||||
index 9076da795e71..3aefc95a98b5 100644
|
||||
--- a/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
||||
+++ b/packages/SystemUI/res/drawable/qs_footer_action_chip_background.xml
|
||||
@@ -28,13 +28,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
- <solid android:color="?attr/underSurfaceColor"/>
|
||||
- <corners android:radius="@dimen/qs_footer_action_corner_radius"/>
|
||||
- </shape>
|
||||
- </item>
|
||||
- <item>
|
||||
- <shape android:shape="rectangle">
|
||||
- <stroke android:width="1dp" android:color="?android:attr/colorBackground"/>
|
||||
+ <solid android:color="?attr/offStateColor"/>
|
||||
<corners android:radius="@dimen/qs_footer_action_corner_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
diff --git a/packages/SystemUI/res/drawable/qs_security_footer_background.xml b/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
||||
index 860d23b11439..8f12b95ed4f6 100644
|
||||
--- a/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
||||
+++ b/packages/SystemUI/res/drawable/qs_security_footer_background.xml
|
||||
@@ -28,8 +28,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
- <stroke android:width="1dp"
|
||||
- android:color="?android:attr/colorBackground"/>
|
||||
+ <solid android:color="?attr/offStateColor"/>
|
||||
<corners android:radius="@dimen/qs_security_footer_corner_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml
|
||||
index 461505f12ce6..c1d2ca23de31 100644
|
||||
--- a/packages/SystemUI/res/values-night/styles.xml
|
||||
+++ b/packages/SystemUI/res/values-night/styles.xml
|
||||
@@ -24,6 +24,18 @@
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
</style>
|
||||
|
||||
+ <style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
||||
+ <item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
+ <item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
+ <item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
+ <item name="android:windowIsFloating">true</item>
|
||||
+ <item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
||||
+ <item name="offStateColor">@android:color/system_neutral1_800</item>
|
||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_900</item>
|
||||
+ <item name="android:colorBackground">@android:color/system_neutral1_900</item>
|
||||
+ <item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
+ </style>
|
||||
+
|
||||
<style name="TextAppearance.QS.Status" parent="TextAppearance.QS.TileLabel.Secondary">
|
||||
<item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index 504a06cfd9ba..5d230e522636 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -398,12 +398,12 @@
|
||||
<style name="Theme.SystemUI.QuickSettings" parent="@*android:style/Theme.DeviceDefault.SystemUI">
|
||||
<item name="lightIconTheme">@style/QSIconTheme</item>
|
||||
<item name="darkIconTheme">@style/QSIconTheme</item>
|
||||
- <item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
+ <item name="android:colorError">@*android:color/error_color_material_light</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
||||
- <item name="offStateColor">@android:color/system_neutral1_800</item>
|
||||
- <item name="underSurfaceColor">@android:color/system_neutral1_1000</item>
|
||||
- <item name="android:colorBackground">@android:color/system_neutral1_900</item>
|
||||
+ <item name="offStateColor">@*android:color/surface_light</item>
|
||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_50</item>
|
||||
+ <item name="android:colorBackground">@android:color/system_neutral1_50</item>
|
||||
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
</style>
|
||||
|
||||
@@ -617,7 +617,7 @@
|
||||
|
||||
<style name="QSCustomizeToolbar" parent="@*android:style/Widget.DeviceDefault.Toolbar">
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
- <item name="android:elevation">10dp</item>
|
||||
+ <item name="android:elevation">0dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Media controls always have light background -->
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
index 9cd97ff8e343..461f67935a11 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt
|
||||
@@ -90,8 +90,8 @@ class OngoingPrivacyChip @JvmOverloads constructor(
|
||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_margin)
|
||||
iconSize = context.resources
|
||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_size)
|
||||
- iconColor =
|
||||
- Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.colorPrimary)
|
||||
+ iconColor = context.resources
|
||||
+ .getColor(android.R.color.system_neutral1_900)
|
||||
|
||||
val padding = context.resources
|
||||
.getDimensionPixelSize(R.dimen.ongoing_appops_chip_side_padding)
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
index 222539d49526..da7c63ff15a3 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
|
||||
@@ -70,7 +70,7 @@ open class QSTileViewImpl @JvmOverloads constructor(
|
||||
override var heightOverride: Int = HeightOverrideable.NO_OVERRIDE
|
||||
|
||||
private val colorActive = Utils.getColorAttrDefaultColor(context,
|
||||
- com.android.internal.R.attr.colorAccentPrimary)
|
||||
+ android.R.attr.colorAccent)
|
||||
private val colorInactive = Utils.getColorAttrDefaultColor(context, R.attr.offStateColor)
|
||||
private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
index cfcea9684c3b..4c394c0b631d 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
@@ -675,7 +675,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
mNotificationsAlpha = behindAlpha;
|
||||
mNotificationsTint = behindTint;
|
||||
mBehindAlpha = 1;
|
||||
- mBehindTint = Color.BLACK;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
} else {
|
||||
mBehindAlpha = behindAlpha;
|
||||
if (mState == ScrimState.SHADE_LOCKED) {
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
||||
index 06811932ac0c..044f12e9d544 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
|
||||
@@ -88,7 +88,7 @@ public enum ScrimState {
|
||||
mNotifAlpha = mClipQsScrim ? mScrimBehindAlphaKeyguard : 0;
|
||||
mBubbleAlpha = 0;
|
||||
if (mClipQsScrim) {
|
||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -114,7 +114,7 @@ public enum ScrimState {
|
||||
@Override
|
||||
public void prepare(ScrimState previousState) {
|
||||
mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha;
|
||||
- mBehindTint = mClipQsScrim ? Color.BLACK : Color.TRANSPARENT;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
mNotifAlpha = mClipQsScrim ? mDefaultScrimAlpha : 0;
|
||||
mNotifTint = Color.TRANSPARENT;
|
||||
mFrontAlpha = 0f;
|
||||
@@ -141,17 +141,17 @@ public enum ScrimState {
|
||||
mNotifAlpha = 1f;
|
||||
mBubbleAlpha = 0f;
|
||||
mFrontAlpha = 0f;
|
||||
- mBehindTint = Color.BLACK;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
|
||||
if (mClipQsScrim) {
|
||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
|
||||
// to make sure correct color is returned before "prepare" is called
|
||||
@Override
|
||||
public int getBehindTint() {
|
||||
- return Color.BLACK;
|
||||
+ return Color.TRANSPARENT;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -247,27 +247,27 @@ public enum ScrimState {
|
||||
mAnimateChange = !mLaunchingAffordanceWithPreview;
|
||||
|
||||
mFrontTint = Color.TRANSPARENT;
|
||||
- mBehindTint = Color.BLACK;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
mBubbleTint = Color.TRANSPARENT;
|
||||
mBlankScreen = false;
|
||||
|
||||
if (previousState == ScrimState.AOD) {
|
||||
// Set all scrims black, before they fade transparent.
|
||||
updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */);
|
||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */);
|
||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT /* tint */);
|
||||
if (mScrimForBubble != null) {
|
||||
updateScrimColor(mScrimForBubble, 1f /* alpha */, Color.BLACK /* tint */);
|
||||
}
|
||||
|
||||
// Scrims should still be black at the end of the transition.
|
||||
mFrontTint = Color.BLACK;
|
||||
- mBehindTint = Color.BLACK;
|
||||
+ mBehindTint = Color.TRANSPARENT;
|
||||
mBubbleTint = Color.BLACK;
|
||||
mBlankScreen = true;
|
||||
}
|
||||
|
||||
if (mClipQsScrim) {
|
||||
- updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK);
|
||||
+ updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -441,4 +441,4 @@ public enum ScrimState {
|
||||
public void setClipQsScrim(boolean clipsQsScrim) {
|
||||
mClipQsScrim = clipsQsScrim;
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 20c9d29922a48beaa2a5294659a764426e47714d Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Mon, 11 Oct 2021 19:25:02 -0700
|
||||
Subject: [PATCH 15/21] SystemUI: Initialize QS tiles in inactive state
|
||||
|
||||
Now that the QS fragment is recreated when changing the UI mode (so that
|
||||
it follows light/dark themes), all tiles flash with active color briefly
|
||||
because the new views become visible before states are refreshed.
|
||||
|
||||
Initializing tiles in the inactive state is much less disruptive, and
|
||||
the effect is very hard to see as compared to the active color because
|
||||
the background color is much less prominent.
|
||||
|
||||
Change-Id: I048171d503f5533e91bab486b8805ac15c329f31
|
||||
---
|
||||
.../plugin/src/com/android/systemui/plugins/qs/QSTile.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
|
||||
index 77018d736163..9e02b140175b 100644
|
||||
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
|
||||
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
|
||||
@@ -148,7 +148,7 @@ public interface QSTile {
|
||||
@ProvidesInterface(version = State.VERSION)
|
||||
public static class State {
|
||||
public static final int VERSION = 1;
|
||||
- public static final int DEFAULT_STATE = Tile.STATE_ACTIVE;
|
||||
+ public static final int DEFAULT_STATE = Tile.STATE_INACTIVE;
|
||||
|
||||
public Icon icon;
|
||||
public Supplier<Icon> iconSupplier;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,147 @@
|
||||
From 864e73e5348f9fbb70e81797e874587723b96a7d Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Mon, 11 Oct 2021 19:25:08 -0700
|
||||
Subject: [PATCH 16/21] SystemUI: Add dual-tone light and dark themes for QS
|
||||
|
||||
Google's dual-tone QS design where the notification panel has a
|
||||
semantically higher elevation adds depth to the notification+QS shade,
|
||||
and we don't necessarily have to give it up just because our QS has
|
||||
light and dark themes.
|
||||
|
||||
To preserve the dual-tone effect, use a darker background color for the
|
||||
QS section:
|
||||
|
||||
Light:
|
||||
Notifications: neutral1 20 (surface_light)
|
||||
Notification panel: neutral1 50 (light BG)
|
||||
QS background: neutral1 100 (darker light BG / surface_header_light)
|
||||
Inactive QS tiles: neutral1 20 (surface_light)
|
||||
|
||||
Dark:
|
||||
Notifications: neutral1 800 (surface_dark)
|
||||
Notification panel: neutral1 900 (dark BG)
|
||||
QS background: neutral1 950 (surface_header_dark_sysui modulated to L* 5)
|
||||
Inactive QS tiles: neutral1 800 (surface_dark)
|
||||
|
||||
The dark QS background could be neutral1 0 (black) like it was before,
|
||||
but I don't think it looks as good because it can't be tinted based on
|
||||
the active wallpaper and thus stands out from other colors.
|
||||
|
||||
Unfortunately, Google's current CAM16-based modulation causes hue shifts
|
||||
in extreme light and dark shades (e.g. L* = 98 / 5), but we'll fix this
|
||||
by generating and overlaying modulated surface colors in our
|
||||
ThemeOverlayController implementation.
|
||||
|
||||
Demo screenshots: https://twitter.com/kdrag0n/status/1445922541218922496
|
||||
|
||||
Change-Id: Icdc4957ecb4e0201377351f1a3e1c6928d6b3955
|
||||
---
|
||||
.../res/color/surface_header_dark_sysui.xml | 18 ++++++++++++++++++
|
||||
core/res/res/values-night/values.xml | 1 +
|
||||
packages/SystemUI/res/values/styles.xml | 2 +-
|
||||
.../statusbar/phone/ScrimController.java | 13 ++++++++++++-
|
||||
4 files changed, 32 insertions(+), 2 deletions(-)
|
||||
create mode 100644 core/res/res/color/surface_header_dark_sysui.xml
|
||||
|
||||
diff --git a/core/res/res/color/surface_header_dark_sysui.xml b/core/res/res/color/surface_header_dark_sysui.xml
|
||||
new file mode 100644
|
||||
index 000000000000..ec070c96f91a
|
||||
--- /dev/null
|
||||
+++ b/core/res/res/color/surface_header_dark_sysui.xml
|
||||
@@ -0,0 +1,18 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright (C) 2021 The Android Open Source Project
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+ You may obtain a copy of the License at
|
||||
+
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+
|
||||
+ Unless required by applicable law or agreed to in writing, software
|
||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ See the License for the specific language governing permissions and
|
||||
+ limitations under the License.
|
||||
+-->
|
||||
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <item android:color="@color/system_neutral1_500" android:lStar="5" />
|
||||
+</selector>
|
||||
diff --git a/core/res/res/values-night/values.xml b/core/res/res/values-night/values.xml
|
||||
index 1571fab66a5b..0683c20a4a4c 100644
|
||||
--- a/core/res/res/values-night/values.xml
|
||||
+++ b/core/res/res/values-night/values.xml
|
||||
@@ -22,6 +22,7 @@
|
||||
<item name="colorSecondary">@color/secondary_device_default_settings</item>
|
||||
<item name="colorAccent">@color/accent_device_default_dark</item>
|
||||
<item name="colorError">@color/error_color_device_default_dark</item>
|
||||
+ <item name="colorSurfaceHeader">@color/surface_header_dark_sysui</item>
|
||||
<item name="colorControlNormal">?attr/textColorPrimary</item>
|
||||
<item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item>
|
||||
<item name="forceDarkAllowed">false</item>
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index 5d230e522636..a03e9ea89342 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -402,7 +402,7 @@
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item>
|
||||
<item name="offStateColor">@*android:color/surface_light</item>
|
||||
- <item name="underSurfaceColor">@android:color/system_neutral1_50</item>
|
||||
+ <item name="underSurfaceColor">@android:color/system_neutral1_100</item>
|
||||
<item name="android:colorBackground">@android:color/system_neutral1_50</item>
|
||||
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
</style>
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
index 4c394c0b631d..afcb940a72ae 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
|
||||
@@ -172,6 +172,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
||||
|
||||
private GradientColors mColors;
|
||||
+ private GradientColors mBehindColors;
|
||||
private boolean mNeedsDrawableColorUpdate;
|
||||
|
||||
private float mScrimBehindAlphaKeyguard = KEYGUARD_SCRIM_ALPHA;
|
||||
@@ -270,6 +271,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
});
|
||||
|
||||
mColors = new GradientColors();
|
||||
+ mBehindColors = new GradientColors();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -829,7 +831,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
&& !mBlankScreen;
|
||||
|
||||
mScrimInFront.setColors(mColors, animateScrimInFront);
|
||||
- mScrimBehind.setColors(mColors, animateBehindScrim);
|
||||
+ mScrimBehind.setColors(mBehindColors, animateBehindScrim);
|
||||
mNotificationsScrim.setColors(mColors, animateScrimNotifications);
|
||||
|
||||
dispatchBackScrimState(mScrimBehind.getViewAlpha());
|
||||
@@ -1185,11 +1187,20 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
if (mScrimBehind == null) return;
|
||||
int background = Utils.getColorAttr(mScrimBehind.getContext(),
|
||||
android.R.attr.colorBackgroundFloating).getDefaultColor();
|
||||
+ int surfaceBackground = Utils.getColorAttr(mScrimBehind.getContext(),
|
||||
+ com.android.internal.R.attr.colorSurfaceHeader).getDefaultColor();
|
||||
int accent = Utils.getColorAccent(mScrimBehind.getContext()).getDefaultColor();
|
||||
+
|
||||
mColors.setMainColor(background);
|
||||
mColors.setSecondaryColor(accent);
|
||||
mColors.setSupportsDarkText(
|
||||
ColorUtils.calculateContrast(mColors.getMainColor(), Color.WHITE) > 4.5);
|
||||
+
|
||||
+ mBehindColors.setMainColor(surfaceBackground);
|
||||
+ mBehindColors.setSecondaryColor(accent);
|
||||
+ mBehindColors.setSupportsDarkText(
|
||||
+ ColorUtils.calculateContrast(mBehindColors.getMainColor(), Color.WHITE) > 4.5);
|
||||
+
|
||||
mNeedsDrawableColorUpdate = true;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,48 @@
|
||||
From 9e456e96992024257f6eb7f4bad5fa5aed626ad8 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Mon, 11 Oct 2021 19:25:11 -0700
|
||||
Subject: [PATCH 17/21] SystemUI: Remove nav bar background in QS customizer
|
||||
|
||||
This looks outdated, since most apps are edge-to-edge nowadays.
|
||||
|
||||
Change-Id: I8c54e61e618a9b5bed1a59753ce76e8fbd69fae2
|
||||
---
|
||||
packages/SystemUI/res/layout/qs_customize_panel_content.xml | 6 ------
|
||||
.../src/com/android/systemui/qs/customize/QSCustomizer.java | 4 ----
|
||||
2 files changed, 10 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
|
||||
index 8ca1b8e85634..5f96dacba80e 100644
|
||||
--- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml
|
||||
+++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
|
||||
@@ -56,10 +56,4 @@
|
||||
android:importantForAccessibility="auto" />
|
||||
</com.android.keyguard.AlphaOptimizedLinearLayout>
|
||||
|
||||
- <View
|
||||
- android:id="@+id/nav_bar_background"
|
||||
- android:layout_width="match_parent"
|
||||
- android:layout_height="@dimen/navigation_bar_size"
|
||||
- android:layout_gravity="bottom"
|
||||
- android:background="#ff000000" />
|
||||
</merge>
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
|
||||
index 7518b200c7e2..20359b64e4cb 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
|
||||
@@ -90,12 +90,8 @@ public class QSCustomizer extends LinearLayout {
|
||||
}
|
||||
|
||||
void updateNavBackDrop(Configuration newConfig, LightBarController lightBarController) {
|
||||
- View navBackdrop = findViewById(R.id.nav_bar_background);
|
||||
mIsShowingNavBackdrop = newConfig.smallestScreenWidthDp >= 600
|
||||
|| newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE;
|
||||
- if (navBackdrop != null) {
|
||||
- navBackdrop.setVisibility(mIsShowingNavBackdrop ? View.VISIBLE : View.GONE);
|
||||
- }
|
||||
updateNavColors(lightBarController);
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,41 @@
|
||||
From c843d3ca03875d6b9d0bf9add9b59fbdcb1d8a42 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 5 Oct 2021 21:01:50 -0700
|
||||
Subject: [PATCH 18/21] Paint: Enable subpixel text positioning by default
|
||||
|
||||
On desktop Linux, subpixel text positioning is necessary to avoid
|
||||
kerning issues, and Android is no different. Even though most phone
|
||||
displays have relatively high DPIs, the lack of subpixel text
|
||||
positioning is only unnoticeable on high-end devices such as the Pixel 4
|
||||
XL (1440x3040 @ 6.3 in => 537 dpi).
|
||||
|
||||
For example, on the Pixel 5 (1080 x 2340 @ 6.0 in => 432 dpi),
|
||||
horizontally-scrolling labels in QS tiles can be seen "jittering"
|
||||
slightly upon close observation. This was tested with the Google Sans
|
||||
font on Google's stock OS. At this lower DPI, there is still a need for
|
||||
subpixel text positioning (at least in some cases).
|
||||
|
||||
Enable subpixel text positioning by default to fix occasional kerning
|
||||
issues and jittering when text is in motion.
|
||||
|
||||
Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09
|
||||
---
|
||||
graphics/java/android/graphics/Paint.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
|
||||
index 42e470b7f660..9c0036e5d716 100644
|
||||
--- a/graphics/java/android/graphics/Paint.java
|
||||
+++ b/graphics/java/android/graphics/Paint.java
|
||||
@@ -252,7 +252,7 @@ public class Paint {
|
||||
|
||||
// These flags are always set on a new/reset paint, even if flags 0 is passed.
|
||||
static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
|
||||
- | FILTER_BITMAP_FLAG;
|
||||
+ | FILTER_BITMAP_FLAG | SUBPIXEL_TEXT_FLAG;
|
||||
|
||||
/**
|
||||
* Font hinter option that disables font hinting.
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 41ed8b60f340207cdeddf7fd4ad53c625be32534 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Tue, 5 Oct 2021 21:02:12 -0700
|
||||
Subject: [PATCH 19/21] SystemUI: Fix QS status font weight mismatch in dark
|
||||
mode
|
||||
|
||||
Text in the QS status bar is medium in light mode and regular in dark
|
||||
mode. Fix the mismatch.
|
||||
|
||||
Change-Id: Ic6e5dc547d4ded9d231f88f6cac3e1e9f8483d5e
|
||||
---
|
||||
packages/SystemUI/res/values-night/styles.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml
|
||||
index c1d2ca23de31..5f35afb6c731 100644
|
||||
--- a/packages/SystemUI/res/values-night/styles.xml
|
||||
+++ b/packages/SystemUI/res/values-night/styles.xml
|
||||
@@ -37,7 +37,7 @@
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.QS.Status" parent="TextAppearance.QS.TileLabel.Secondary">
|
||||
- <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
|
||||
+ <item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,31 @@
|
||||
From dce279f20b8973aa0660d98864c9ad8d56b56514 Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Sat, 16 Oct 2021 03:27:23 -0700
|
||||
Subject: [PATCH 20/21] SystemUI: Expose legacy Wi-Fi and cellular data QS
|
||||
tiles
|
||||
|
||||
We'll still use Android 12's unified internet settings and the Internet
|
||||
tile by default, but expose the legacy Wi-Fi and cellular data tiles so
|
||||
that users can add them with the QS customizer.
|
||||
|
||||
Change-Id: I65902b38c99f61782bd9aa0ea604848fbd068bda
|
||||
---
|
||||
packages/SystemUI/res/values/config.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||
index 14276754e450..c99ab8bf5e9a 100644
|
||||
--- a/packages/SystemUI/res/values/config.xml
|
||||
+++ b/packages/SystemUI/res/values/config.xml
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
<!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
|
||||
<string name="quick_settings_tiles_stock" translatable="false">
|
||||
- internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness
|
||||
+ internet,wifi,cell,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness
|
||||
</string>
|
||||
|
||||
<!-- The tiles to display in QuickSettings -->
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,245 @@
|
||||
From 0cd11d9386e398392716883c6bdadab65777c8ce Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Mon, 25 Oct 2021 19:32:33 -0700
|
||||
Subject: [PATCH 21/21] SystemUI: Allow Wi-Fi/cell tiles to co-exist with
|
||||
provider model
|
||||
|
||||
The dedicated Wi-Fi/cellular data QS tiles are partially working now
|
||||
that we've exposed them in the list of tile options, but they're very
|
||||
buggy and somewhat broken when the provider model (unified internet) is
|
||||
enabled.
|
||||
|
||||
Allow the tiles to co-exist with InternetTile and the provider model
|
||||
(including both settings_provider_model and combined signal icons) by
|
||||
always including QS icons in Wi-Fi/data indicator callbacks, and add
|
||||
a new flag to indicate whether they should be shown in the internet
|
||||
tile.
|
||||
|
||||
Change-Id: I10af134b35dfabdb9275f1aca8ca8512e1db6d27
|
||||
---
|
||||
.../systemui/qs/tiles/InternetTile.java | 4 +-
|
||||
.../policy/MobileSignalController.java | 32 ++++--------
|
||||
.../statusbar/policy/NetworkController.java | 10 +++-
|
||||
.../policy/WifiSignalController.java | 49 +++++++------------
|
||||
4 files changed, 37 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java
|
||||
index 7cb1421e3f0f..aa917d9ec397 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java
|
||||
@@ -245,7 +245,7 @@ public class InternetTile extends QSTileImpl<SignalState> {
|
||||
Log.d(TAG, "setWifiIndicators: " + indicators);
|
||||
}
|
||||
mWifiInfo.mEnabled = indicators.enabled;
|
||||
- if (indicators.qsIcon == null) {
|
||||
+ if (indicators.qsIcon == null || !indicators.isDefault) {
|
||||
return;
|
||||
}
|
||||
mWifiInfo.mConnected = indicators.qsIcon.visible;
|
||||
@@ -265,7 +265,7 @@ public class InternetTile extends QSTileImpl<SignalState> {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "setMobileDataIndicators: " + indicators);
|
||||
}
|
||||
- if (indicators.qsIcon == null) {
|
||||
+ if (indicators.qsIcon == null || !indicators.isDefault) {
|
||||
// Not data sim, don't display.
|
||||
return;
|
||||
}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
|
||||
index 43781f3941ba..cf89cabf6ab9 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
|
||||
@@ -397,7 +397,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile
|
||||
IconState qsIcon = null;
|
||||
CharSequence description = null;
|
||||
// Only send data sim callbacks to QS.
|
||||
- if (mCurrentState.dataSim && mCurrentState.isDefault) {
|
||||
+ if (mCurrentState.dataSim) {
|
||||
qsTypeIcon =
|
||||
(showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0;
|
||||
qsIcon = new IconState(mCurrentState.enabled
|
||||
@@ -420,7 +420,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile
|
||||
statusIcon, qsIcon, typeIcon, qsTypeIcon,
|
||||
activityIn, activityOut, dataContentDescription, dataContentDescriptionHtml,
|
||||
description, icons.isWide, mSubscriptionInfo.getSubscriptionId(),
|
||||
- mCurrentState.roaming, showTriangle);
|
||||
+ mCurrentState.roaming, showTriangle, mCurrentState.isDefault);
|
||||
callback.setMobileDataIndicators(mobileDataIndicators);
|
||||
} else {
|
||||
boolean showDataIcon = mCurrentState.dataConnected || dataDisabled;
|
||||
@@ -431,25 +431,13 @@ public class MobileSignalController extends SignalController<MobileState, Mobile
|
||||
int qsTypeIcon = 0;
|
||||
IconState qsIcon = null;
|
||||
CharSequence description = null;
|
||||
- // Only send data sim callbacks to QS.
|
||||
- if (mProviderModelSetting) {
|
||||
- if (mCurrentState.dataSim && mCurrentState.isDefault) {
|
||||
- qsTypeIcon =
|
||||
- (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0;
|
||||
- qsIcon = new IconState(
|
||||
- mCurrentState.enabled && !mCurrentState.isEmergency,
|
||||
- getQsCurrentIconId(), contentDescription);
|
||||
- description = mCurrentState.isEmergency ? null : mCurrentState.networkName;
|
||||
- }
|
||||
- } else {
|
||||
- if (mCurrentState.dataSim) {
|
||||
- qsTypeIcon =
|
||||
- (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0;
|
||||
- qsIcon = new IconState(
|
||||
- mCurrentState.enabled && !mCurrentState.isEmergency,
|
||||
- getQsCurrentIconId(), contentDescription);
|
||||
- description = mCurrentState.isEmergency ? null : mCurrentState.networkName;
|
||||
- }
|
||||
+ if (mCurrentState.dataSim) {
|
||||
+ qsTypeIcon =
|
||||
+ (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0;
|
||||
+ qsIcon = new IconState(
|
||||
+ mCurrentState.enabled && !mCurrentState.isEmergency,
|
||||
+ getQsCurrentIconId(), contentDescription);
|
||||
+ description = mCurrentState.isEmergency ? null : mCurrentState.networkName;
|
||||
}
|
||||
|
||||
boolean activityIn = mCurrentState.dataConnected
|
||||
@@ -465,7 +453,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile
|
||||
statusIcon, qsIcon, typeIcon, qsTypeIcon,
|
||||
activityIn, activityOut, dataContentDescription, dataContentDescriptionHtml,
|
||||
description, icons.isWide, mSubscriptionInfo.getSubscriptionId(),
|
||||
- mCurrentState.roaming, showTriangle);
|
||||
+ mCurrentState.roaming, showTriangle, mCurrentState.isDefault);
|
||||
callback.setMobileDataIndicators(mobileDataIndicators);
|
||||
}
|
||||
}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
|
||||
index ef2ca985858d..39fa68cab281 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
|
||||
@@ -58,10 +58,11 @@ public interface NetworkController extends CallbackController<SignalCallback>, D
|
||||
public String description;
|
||||
public boolean isTransient;
|
||||
public String statusLabel;
|
||||
+ public boolean isDefault;
|
||||
|
||||
public WifiIndicators(boolean enabled, IconState statusIcon, IconState qsIcon,
|
||||
boolean activityIn, boolean activityOut, String description,
|
||||
- boolean isTransient, String statusLabel) {
|
||||
+ boolean isTransient, String statusLabel, boolean isDefault) {
|
||||
this.enabled = enabled;
|
||||
this.statusIcon = statusIcon;
|
||||
this.qsIcon = qsIcon;
|
||||
@@ -70,6 +71,7 @@ public interface NetworkController extends CallbackController<SignalCallback>, D
|
||||
this.description = description;
|
||||
this.isTransient = isTransient;
|
||||
this.statusLabel = statusLabel;
|
||||
+ this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,6 +85,7 @@ public interface NetworkController extends CallbackController<SignalCallback>, D
|
||||
.append(",description=").append(description)
|
||||
.append(",isTransient=").append(isTransient)
|
||||
.append(",statusLabel=").append(statusLabel)
|
||||
+ .append(",isDefault=").append(isDefault)
|
||||
.append(']').toString();
|
||||
}
|
||||
}
|
||||
@@ -104,12 +107,13 @@ public interface NetworkController extends CallbackController<SignalCallback>, D
|
||||
public int subId;
|
||||
public boolean roaming;
|
||||
public boolean showTriangle;
|
||||
+ public boolean isDefault;
|
||||
|
||||
public MobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
|
||||
int qsType, boolean activityIn, boolean activityOut,
|
||||
CharSequence typeContentDescription, CharSequence typeContentDescriptionHtml,
|
||||
CharSequence description, boolean isWide, int subId, boolean roaming,
|
||||
- boolean showTriangle) {
|
||||
+ boolean showTriangle, boolean isDefault) {
|
||||
this.statusIcon = statusIcon;
|
||||
this.qsIcon = qsIcon;
|
||||
this.statusType = statusType;
|
||||
@@ -123,6 +127,7 @@ public interface NetworkController extends CallbackController<SignalCallback>, D
|
||||
this.subId = subId;
|
||||
this.roaming = roaming;
|
||||
this.showTriangle = showTriangle;
|
||||
+ this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,6 +146,7 @@ public interface NetworkController extends CallbackController<SignalCallback>, D
|
||||
.append(",subId=").append(subId)
|
||||
.append(",roaming=").append(roaming)
|
||||
.append(",showTriangle=").append(showTriangle)
|
||||
+ .append(",isDefault=").append(isDefault)
|
||||
.append(']').toString();
|
||||
}
|
||||
}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
|
||||
index f8e36476c4a6..1513544eb22b 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
|
||||
@@ -112,37 +112,21 @@ public class WifiSignalController extends
|
||||
if (mCurrentState.inetCondition == 0) {
|
||||
contentDescription += ("," + mContext.getString(R.string.data_connection_no_internet));
|
||||
}
|
||||
- if (mProviderModelSetting) {
|
||||
- IconState statusIcon = new IconState(
|
||||
- wifiVisible, getCurrentIconId(), contentDescription);
|
||||
- IconState qsIcon = null;
|
||||
- if (mCurrentState.isDefault || (!mNetworkController.isRadioOn()
|
||||
- && !mNetworkController.isEthernetDefault())) {
|
||||
- qsIcon = new IconState(mCurrentState.connected,
|
||||
- mWifiTracker.isCaptivePortal ? R.drawable.ic_qs_wifi_disconnected
|
||||
- : getQsCurrentIconId(), contentDescription);
|
||||
- }
|
||||
- WifiIndicators wifiIndicators = new WifiIndicators(
|
||||
- mCurrentState.enabled, statusIcon, qsIcon,
|
||||
- ssidPresent && mCurrentState.activityIn,
|
||||
- ssidPresent && mCurrentState.activityOut,
|
||||
- wifiDesc, mCurrentState.isTransient, mCurrentState.statusLabel
|
||||
- );
|
||||
- callback.setWifiIndicators(wifiIndicators);
|
||||
- } else {
|
||||
- IconState statusIcon = new IconState(
|
||||
- wifiVisible, getCurrentIconId(), contentDescription);
|
||||
- IconState qsIcon = new IconState(mCurrentState.connected,
|
||||
- mWifiTracker.isCaptivePortal ? R.drawable.ic_qs_wifi_disconnected
|
||||
- : getQsCurrentIconId(), contentDescription);
|
||||
- WifiIndicators wifiIndicators = new WifiIndicators(
|
||||
- mCurrentState.enabled, statusIcon, qsIcon,
|
||||
- ssidPresent && mCurrentState.activityIn,
|
||||
- ssidPresent && mCurrentState.activityOut,
|
||||
- wifiDesc, mCurrentState.isTransient, mCurrentState.statusLabel
|
||||
- );
|
||||
- callback.setWifiIndicators(wifiIndicators);
|
||||
- }
|
||||
+ IconState statusIcon = new IconState(
|
||||
+ wifiVisible, getCurrentIconId(), contentDescription);
|
||||
+ IconState qsIcon = new IconState(mCurrentState.connected,
|
||||
+ mWifiTracker.isCaptivePortal ? R.drawable.ic_qs_wifi_disconnected
|
||||
+ : getQsCurrentIconId(), contentDescription);
|
||||
+ boolean isDefault = mCurrentState.isDefault ||
|
||||
+ (!mNetworkController.isRadioOn() && !mNetworkController.isEthernetDefault());
|
||||
+ WifiIndicators wifiIndicators = new WifiIndicators(
|
||||
+ mCurrentState.enabled, statusIcon, qsIcon,
|
||||
+ ssidPresent && mCurrentState.activityIn,
|
||||
+ ssidPresent && mCurrentState.activityOut,
|
||||
+ wifiDesc, mCurrentState.isTransient, mCurrentState.statusLabel,
|
||||
+ isDefault
|
||||
+ );
|
||||
+ callback.setWifiIndicators(wifiIndicators);
|
||||
}
|
||||
|
||||
private void notifyListenersForCarrierWifi(SignalCallback callback) {
|
||||
@@ -173,7 +157,8 @@ public class WifiSignalController extends
|
||||
statusIcon, qsIcon, typeIcon, qsTypeIcon,
|
||||
mCurrentState.activityIn, mCurrentState.activityOut, dataContentDescription,
|
||||
dataContentDescriptionHtml, description, icons.isWide,
|
||||
- mCurrentState.subId, /* roaming= */ false, /* showTriangle= */ true
|
||||
+ mCurrentState.subId, /* roaming= */ false, /* showTriangle= */ true,
|
||||
+ /* isDefault= */ qsIcon != null
|
||||
);
|
||||
callback.setMobileDataIndicators(mobileDataIndicators);
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 996084a373929cf6ba65bdfe5d984328c0448ccc Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 20 Jun 2021 09:08:43 +0000
|
||||
Subject: [PATCH 1/2] build: Integrate prop modifications (1/2)
|
||||
|
||||
Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61
|
||||
---
|
||||
tools/buildinfo.sh | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
|
||||
index f0627a307..032636014 100755
|
||||
--- a/tools/buildinfo.sh
|
||||
+++ b/tools/buildinfo.sh
|
||||
@@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then
|
||||
else
|
||||
echo "ro.build.id=$BUILD_ID"
|
||||
fi
|
||||
-echo "ro.build.display.id=$BUILD_DISPLAY_ID"
|
||||
+echo "ro.build.display.id=$BUILD_ID"
|
||||
echo "ro.build.version.incremental=$BUILD_NUMBER"
|
||||
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
|
||||
echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION"
|
||||
@@ -21,7 +21,7 @@ echo "ro.build.version.release_or_codename=$PLATFORM_VERSION"
|
||||
echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH"
|
||||
echo "ro.build.version.base_os=$PLATFORM_BASE_OS"
|
||||
echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION"
|
||||
-echo "ro.build.date=`$DATE`"
|
||||
+echo "ro.build.date=`$DATE +\"%B %-d, %Y\"`"
|
||||
echo "ro.build.date.utc=`$DATE +%s`"
|
||||
echo "ro.build.type=$TARGET_BUILD_TYPE"
|
||||
echo "ro.build.user=$BUILD_USERNAME"
|
||||
@@ -56,5 +56,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then
|
||||
fi
|
||||
|
||||
echo "ro.lineage.device=$LINEAGE_DEVICE"
|
||||
+echo "ro.lineage.version=LineageOS 19.0 Self-built CGMod"
|
||||
+echo "ro.lineage.display.version=LineageOS 19.0 Self-built CGMod"
|
||||
+echo "ro.modversion=LineageOS 19.0 Self-built CGMod"
|
||||
+
|
||||
+echo "lockscreen.rot_override=true"
|
||||
|
||||
echo "# end build properties"
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,25 @@
|
||||
From c33bf332540e7057d1d9f7491bf345658965aae9 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 16 Oct 2021 00:39:15 +0000
|
||||
Subject: [PATCH 2/2] build: Remove Stk (1/2)
|
||||
|
||||
Change-Id: I24ef17c74c3137a11b463cde96c74d0edc853edd
|
||||
---
|
||||
target/product/generic_system.mk | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
|
||||
index f13c9db4d..a559e244d 100644
|
||||
--- a/target/product/generic_system.mk
|
||||
+++ b/target/product/generic_system.mk
|
||||
@@ -32,7 +32,6 @@ PRODUCT_PACKAGES += \
|
||||
PRODUCT_PACKAGES += \
|
||||
LiveWallpapersPicker \
|
||||
PartnerBookmarksProvider \
|
||||
- Stk \
|
||||
Tag \
|
||||
|
||||
# OTA support
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,173 @@
|
||||
From 34c2595216ffa9d62322f9a46ba89b195d64ce3c Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 27 Oct 2021 14:38:37 +0000
|
||||
Subject: [PATCH 01/16] Add LineageMonetAccentOverlay
|
||||
|
||||
Applies the signature teal of LineageOS (#167C80) when Monet is absent - thanks @kdrag0n
|
||||
|
||||
Change-Id: Ib93b2bc68a08dfe12a7c3f503dcc62cce098b459
|
||||
---
|
||||
packages/overlays/Android.mk | 1 +
|
||||
.../LineageMonetAccentOverlay/Android.bp | 28 ++++++++
|
||||
.../AndroidManifest.xml | 22 ++++++
|
||||
.../res/values/config.xml | 72 +++++++++++++++++++
|
||||
4 files changed, 123 insertions(+)
|
||||
create mode 100644 packages/overlays/LineageMonetAccentOverlay/Android.bp
|
||||
create mode 100644 packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
|
||||
create mode 100644 packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
|
||||
|
||||
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
|
||||
index 928892c60e47..d90aae92e1c5 100644
|
||||
--- a/packages/overlays/Android.mk
|
||||
+++ b/packages/overlays/Android.mk
|
||||
@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \
|
||||
DisplayCutoutEmulationTallOverlay \
|
||||
DisplayCutoutEmulationWaterfallOverlay \
|
||||
FontNotoSerifSourceOverlay \
|
||||
+ LineageMonetAccentOverlay \
|
||||
NavigationBarMode3ButtonOverlay \
|
||||
NavigationBarModeGesturalOverlay \
|
||||
NavigationBarModeGesturalOverlayNarrowBack \
|
||||
diff --git a/packages/overlays/LineageMonetAccentOverlay/Android.bp b/packages/overlays/LineageMonetAccentOverlay/Android.bp
|
||||
new file mode 100644
|
||||
index 000000000000..e4da9231dc7c
|
||||
--- /dev/null
|
||||
+++ b/packages/overlays/LineageMonetAccentOverlay/Android.bp
|
||||
@@ -0,0 +1,28 @@
|
||||
+//
|
||||
+// Copyright 2021, The Android Open Source Project
|
||||
+//
|
||||
+// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+// you may not use this file except in compliance with the License.
|
||||
+// You may obtain a copy of the License at
|
||||
+//
|
||||
+// http://www.apache.org/licenses/LICENSE-2.0
|
||||
+//
|
||||
+// Unless required by applicable law or agreed to in writing, software
|
||||
+// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+// See the License for the specific language governing permissions and
|
||||
+// limitations under the License.
|
||||
+//
|
||||
+package {
|
||||
+ // See: http://go/android-license-faq
|
||||
+ // A large-scale-change added 'default_applicable_licenses' to import
|
||||
+ // all of the 'license_kinds' from "frameworks_base_license"
|
||||
+ // to get the below license kinds:
|
||||
+ // SPDX-license-identifier-Apache-2.0
|
||||
+ default_applicable_licenses: ["frameworks_base_license"],
|
||||
+}
|
||||
+
|
||||
+runtime_resource_overlay {
|
||||
+ name: "LineageMonetAccentOverlay",
|
||||
+ product_specific: true,
|
||||
+}
|
||||
diff --git a/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml b/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
|
||||
new file mode 100644
|
||||
index 000000000000..11062b67bc61
|
||||
--- /dev/null
|
||||
+++ b/packages/overlays/LineageMonetAccentOverlay/AndroidManifest.xml
|
||||
@@ -0,0 +1,22 @@
|
||||
+<!--
|
||||
+ ~ Copyright (C) 2021 The Android Open Source Project
|
||||
+ ~
|
||||
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ ~ you may not use this file except in compliance with the License.
|
||||
+ ~ You may obtain a copy of the License at
|
||||
+ ~
|
||||
+ ~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+ ~
|
||||
+ ~ Unless required by applicable law or agreed to in writing, software
|
||||
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ ~ See the License for the specific language governing permissions and
|
||||
+ ~ limitations under the License.
|
||||
+ -->
|
||||
+
|
||||
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ package="org.lineageos.overlay.accent.monet"
|
||||
+ android:versionCode="1"
|
||||
+ android:versionName="1.0">
|
||||
+ <overlay android:targetPackage="android" android:priority="0" android:isStatic="true"/>
|
||||
+</manifest>
|
||||
diff --git a/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml b/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
|
||||
new file mode 100644
|
||||
index 000000000000..4777409bb587
|
||||
--- /dev/null
|
||||
+++ b/packages/overlays/LineageMonetAccentOverlay/res/values/config.xml
|
||||
@@ -0,0 +1,72 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<resources>
|
||||
+ <color name="system_accent1_0">#FFFFFF</color>
|
||||
+ <color name="system_accent1_10">#EFFFFF</color>
|
||||
+ <color name="system_accent1_50">#B4FDFF</color>
|
||||
+ <color name="system_accent1_100">#6EF6FC</color>
|
||||
+ <color name="system_accent1_200">#4CD9E0</color>
|
||||
+ <color name="system_accent1_300">#1EBDC4</color>
|
||||
+ <color name="system_accent1_400">#00A1A7</color>
|
||||
+ <color name="system_accent1_500">#008388</color>
|
||||
+ <color name="system_accent1_600">#00696E</color>
|
||||
+ <color name="system_accent1_700">#004F53</color>
|
||||
+ <color name="system_accent1_800">#00373A</color>
|
||||
+ <color name="system_accent1_900">#002022</color>
|
||||
+ <color name="system_accent1_1000">#000000</color>
|
||||
+
|
||||
+ <color name="system_accent2_0">#FFFFFF</color>
|
||||
+ <color name="system_accent2_10">#EFFFFF</color>
|
||||
+ <color name="system_accent2_50">#DAF6F7</color>
|
||||
+ <color name="system_accent2_100">#CCE8E8</color>
|
||||
+ <color name="system_accent2_200">#B0CCCC</color>
|
||||
+ <color name="system_accent2_300">#96B0B1</color>
|
||||
+ <color name="system_accent2_400">#7B9697</color>
|
||||
+ <color name="system_accent2_500">#617B7C</color>
|
||||
+ <color name="system_accent2_600">#496364</color>
|
||||
+ <color name="system_accent2_700">#324B4D</color>
|
||||
+ <color name="system_accent2_800">#1B3436</color>
|
||||
+ <color name="system_accent2_900">#051F21</color>
|
||||
+ <color name="system_accent2_1000">#000000</color>
|
||||
+
|
||||
+ <color name="system_accent3_0">#FFFFFF</color>
|
||||
+ <color name="system_accent3_10">#FDFCFF</color>
|
||||
+ <color name="system_accent3_50">#EBF1FF</color>
|
||||
+ <color name="system_accent3_100">#D4E3FF</color>
|
||||
+ <color name="system_accent3_200">#ACC8F7</color>
|
||||
+ <color name="system_accent3_300">#91ACDB</color>
|
||||
+ <color name="system_accent3_400">#7692BE</color>
|
||||
+ <color name="system_accent3_500">#5C77A2</color>
|
||||
+ <color name="system_accent3_600">#445F8A</color>
|
||||
+ <color name="system_accent3_700">#2B4770</color>
|
||||
+ <color name="system_accent3_800">#113158</color>
|
||||
+ <color name="system_accent3_900">#001B3D</color>
|
||||
+ <color name="system_accent3_1000">#000000</color>
|
||||
+
|
||||
+ <color name="system_neutral1_0">#FFFFFF</color>
|
||||
+ <color name="system_neutral1_10">#FAFDFC</color>
|
||||
+ <color name="system_neutral1_50">#EFF1F1</color>
|
||||
+ <color name="system_neutral1_100">#E0E3E2</color>
|
||||
+ <color name="system_neutral1_200">#C4C7C6</color>
|
||||
+ <color name="system_neutral1_300">#A9ACAB</color>
|
||||
+ <color name="system_neutral1_400">#8E9191</color>
|
||||
+ <color name="system_neutral1_500">#737776</color>
|
||||
+ <color name="system_neutral1_600">#5B5F5F</color>
|
||||
+ <color name="system_neutral1_700">#444747</color>
|
||||
+ <color name="system_neutral1_800">#2E3131</color>
|
||||
+ <color name="system_neutral1_900">#191C1C</color>
|
||||
+ <color name="system_neutral1_1000">#000000</color>
|
||||
+
|
||||
+ <color name="system_neutral2_0">#FFFFFF</color>
|
||||
+ <color name="system_neutral2_10">#F4FEFE</color>
|
||||
+ <color name="system_neutral2_50">#E8F3F2</color>
|
||||
+ <color name="system_neutral2_100">#DAE5E4</color>
|
||||
+ <color name="system_neutral2_200">#BEC8C9</color>
|
||||
+ <color name="system_neutral2_300">#A3ADAE</color>
|
||||
+ <color name="system_neutral2_400">#889393</color>
|
||||
+ <color name="system_neutral2_500">#6E7878</color>
|
||||
+ <color name="system_neutral2_600">#566061</color>
|
||||
+ <color name="system_neutral2_700">#3F4949</color>
|
||||
+ <color name="system_neutral2_800">#293232</color>
|
||||
+ <color name="system_neutral2_900">#141D1E</color>
|
||||
+ <color name="system_neutral2_1000">#000000</color>
|
||||
+</resources>
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,396 @@
|
||||
From 7a6b1a77ffc801621c6a5f4dd4eb8d3c158fa877 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 20 Jun 2021 03:39:32 +0000
|
||||
Subject: [PATCH 02/16] Add MiuiNavbarOverlay
|
||||
|
||||
Change-Id: I0e6791abc3c9521d7dc612df2fec2b041affe7e9
|
||||
---
|
||||
packages/overlays/Android.mk | 3 +-
|
||||
.../overlays/MiuiNavbarOverlay/Android.bp | 28 ++++++++++++++++++
|
||||
.../MiuiNavbarOverlay/AndroidManifest.xml | 22 ++++++++++++++
|
||||
.../res/drawable-440dpi-v4/ic_sysbar_back.png | Bin 0 -> 2756 bytes
|
||||
.../ic_sysbar_back_darkmode.png | Bin 0 -> 2547 bytes
|
||||
.../drawable-440dpi-v4/ic_sysbar_docked.png | Bin 0 -> 3642 bytes
|
||||
.../ic_sysbar_docked_darkmode.png | Bin 0 -> 2810 bytes
|
||||
.../res/drawable-440dpi-v4/ic_sysbar_home.png | Bin 0 -> 1362 bytes
|
||||
.../ic_sysbar_home_darkmode.png | Bin 0 -> 980 bytes
|
||||
.../drawable-440dpi-v4/ic_sysbar_recent.png | Bin 0 -> 278 bytes
|
||||
.../ic_sysbar_recent_darkmode.png | Bin 0 -> 205 bytes
|
||||
11 files changed, 52 insertions(+), 1 deletion(-)
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/Android.bp
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back_darkmode.png
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked.png
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked_darkmode.png
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home.png
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home_darkmode.png
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent.png
|
||||
create mode 100644 packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
|
||||
|
||||
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
|
||||
index d90aae92e1c5..2e53fed86f15 100644
|
||||
--- a/packages/overlays/Android.mk
|
||||
+++ b/packages/overlays/Android.mk
|
||||
@@ -27,12 +27,13 @@ LOCAL_REQUIRED_MODULES := \
|
||||
DisplayCutoutEmulationWaterfallOverlay \
|
||||
FontNotoSerifSourceOverlay \
|
||||
LineageMonetAccentOverlay \
|
||||
+ MiuiNavbarOverlay \
|
||||
NavigationBarMode3ButtonOverlay \
|
||||
NavigationBarModeGesturalOverlay \
|
||||
NavigationBarModeGesturalOverlayNarrowBack \
|
||||
NavigationBarModeGesturalOverlayWideBack \
|
||||
NavigationBarModeGesturalOverlayExtraWideBack \
|
||||
- OneHandedModeGesturalOverlay \
|
||||
+ OneHandedModeGesturalOverlay \
|
||||
preinstalled-packages-platform-overlays.xml
|
||||
|
||||
include $(BUILD_PHONY_PACKAGE)
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/Android.bp b/packages/overlays/MiuiNavbarOverlay/Android.bp
|
||||
new file mode 100644
|
||||
index 000000000000..fc724fb7a686
|
||||
--- /dev/null
|
||||
+++ b/packages/overlays/MiuiNavbarOverlay/Android.bp
|
||||
@@ -0,0 +1,28 @@
|
||||
+//
|
||||
+// Copyright 2021, The Android Open Source Project
|
||||
+//
|
||||
+// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+// you may not use this file except in compliance with the License.
|
||||
+// You may obtain a copy of the License at
|
||||
+//
|
||||
+// http://www.apache.org/licenses/LICENSE-2.0
|
||||
+//
|
||||
+// Unless required by applicable law or agreed to in writing, software
|
||||
+// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+// See the License for the specific language governing permissions and
|
||||
+// limitations under the License.
|
||||
+//
|
||||
+package {
|
||||
+ // See: http://go/android-license-faq
|
||||
+ // A large-scale-change added 'default_applicable_licenses' to import
|
||||
+ // all of the 'license_kinds' from "frameworks_base_license"
|
||||
+ // to get the below license kinds:
|
||||
+ // SPDX-license-identifier-Apache-2.0
|
||||
+ default_applicable_licenses: ["frameworks_base_license"],
|
||||
+}
|
||||
+
|
||||
+runtime_resource_overlay {
|
||||
+ name: "MiuiNavbarOverlay",
|
||||
+ product_specific: true,
|
||||
+}
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml b/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
|
||||
new file mode 100644
|
||||
index 000000000000..3f10e2e03675
|
||||
--- /dev/null
|
||||
+++ b/packages/overlays/MiuiNavbarOverlay/AndroidManifest.xml
|
||||
@@ -0,0 +1,22 @@
|
||||
+<!--
|
||||
+ ~ Copyright (C) 2021 The Android Open Source Project
|
||||
+ ~
|
||||
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ ~ you may not use this file except in compliance with the License.
|
||||
+ ~ You may obtain a copy of the License at
|
||||
+ ~
|
||||
+ ~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+ ~
|
||||
+ ~ Unless required by applicable law or agreed to in writing, software
|
||||
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ ~ See the License for the specific language governing permissions and
|
||||
+ ~ limitations under the License.
|
||||
+ -->
|
||||
+
|
||||
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ package="com.miui.systemui.navbar.overlay"
|
||||
+ android:versionCode="1"
|
||||
+ android:versionName="1.0">
|
||||
+ <overlay android:targetPackage="com.android.systemui" android:priority="1337" android:isStatic="true"/>
|
||||
+</manifest>
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back.png
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..be2b145b4c698679bfdfdc3e5834ad12a56724c0
|
||||
GIT binary patch
|
||||
literal 2756
|
||||
zcmcgu3s4hx8V?1-3OZnL5L?tGprz_2n-D@036KXu)CfXOJj=t)?k3rRWWy$qfRADd
|
||||
zhu~RzrHmZ`k!wBAa-g0-rC<@UbSw%?@2-FjLbWI3sc4FiE8=+@UZak6oX*Yd%<lg8
|
||||
z|Nnj8_xql+C5ap3=6k*A#b7YztKyYO^xNUO0Ve${b@zQjzvi0be`{edy!~9a8{=SQ
|
||||
z0E02-I-%KO-J;$gK}jPA!ALF6u^Y`an!$*Swwn<&6Ssm|Tu+#!?7J;(Y>>dD?38dd
|
||||
ztTrof0}-E3;mP?MHE4b&D#qB+QDCH9LMt%hRs^&gvrHC=UCN%+E1}n}Z7v&}gjh4B
|
||||
zY?;d-xJ8`^Do6?k!#P3-<q7y;gqXt<!eYK)HOPl~5nMQe%L{{Go&*+3!o=Y8#ip%M
|
||||
zm`;+UTsv)x{*tl{R;yXU<=SjEjxCHsQhF{=EEaQNK9|pjXar=*Gg%QkWU>U$Xi(x7
|
||||
zlp@Slf;53Hjfj@au}axA(<v8>=2^8S%XFCNfN|}JnaktAE|(^O7&?nH=TKRb#xazO
|
||||
zXW>TNWVO&(-YnK^Ag!duK>mX2+2iL7(4keUXKlQci_ti1!eWihrQMhg$V<@{O`aL&
|
||||
zCgBz`heGk#T$*OE%Nw&qLE(s%q%<U%HIt~s8OoqS;Yy4M3{4?S7-_S-^Nb9xM69@!
|
||||
z&4>9g1PdUZSi=)Z;4q0mv<jvd@Dx-{VuUX5c_<&&z+wr^e-1~N42D>dS0gc0q9Z9I
|
||||
zLVHUX5k1Z|oAhjOHii-fnMG2xNt##Kv->KAB9S6>L>7HuNs5z$s#t}PCl(4JK8H6+
|
||||
zRIQe%OcpC*LUEN+%BCa3AqY&Oi@?J$Ow5Nc1V$i!xIhPKg(wU~XoZ+CLZFL41n7*s
|
||||
zl0<V{`Ja);Xn7tSCgcf3;dFTT0*D_WKq0M&r-igAj_`Ftfmj4%Gx7-(LH8e$^{e%`
|
||||
zy3$oRl6b;Gr!;T6Z<6us=~Wg1PS%P9L0vr{Wuva-<1~Y*ZQ>;ncs&oM<ZT9=R{DyH
|
||||
zn1WeIoz;d=xJ*w+>vf8b`%C;SNbalIzh3@c#{R`3{gu?GBa0dklOCsMDwpkYhU=O>
|
||||
zQ+eUOn6k;UXC~DQoF0F!<?P(0KV~O4ZlYCF^j!XUap^q<!=qTGlxgghcLpzI2I7Hd
|
||||
zop&1=Rb{C=O13WFv&cEW&Z{wW;e<Q&?MZ<+BoVl;U0-vbb#Cc)|K)p_8jp83c{$Qs
|
||||
zf#$i|iq9(c4X9IU6PsEtnf9^*eRi@sPh4r$f7vp`odAP8ZY+*k++U>^ZVLS7lRN7l
|
||||
zGj9J74={mtxg3rG{8<h+`H2sG=lME{3bz&bt`6~VFWeRs6aad7&uwP}ZTX)=m&8A2
|
||||
z<bEDn+B8vnHu!AKy$90a>eHA0^M}}$j0Nn&!DSa(^KN}#w`^tkw+ViJesRq{pPnhb
|
||||
zetNmiJ2qydzrX+F*1FBVSA4B?vU;l?=0D88{Gim=ZOI}|s)%}cdtiN9T3S#2#PE$v
|
||||
z718cb|70_~Q{Hs`<9eWKq`PVjExG8r^3<tQ%iQ<7J^n7e=TLQ9gAX_dsM2>==4BGZ
|
||||
zu@9BzC*uzicE4Tlr0%{ayKp?GGHU1ezBRVdAIpHh4&2tewg0R3&kcRSg@f;(a14JD
|
||||
z;%IJe?&)Lu%KdusfwggQ`!y@ee+~z}x_$Fz9tFJ-BydIo?Z=XjrXSa=w5UAB#>O(j
|
||||
z<zV58Lu-NG6&Ghf2f7AA97RP%U4w&z2~#JMC6U?J&UgKj%FCVaAir0*&`d!05%AN`
|
||||
z6Xp9r+EfCo{X*H>87s@zrIZ0)Md!+|UcGuW!Vv?gBUb@TCNq6?`MS0h3s!SDyZZY2
|
||||
z9$j3!0H`VP6!i`bJ>79kGrqiJxO3lIL!|$1--Gso`c%#%ge8lre(JpULr0I%U$#bW
|
||||
zIM%X1JMeD8uC~_J3ERS0V`Dqkbp*=xJPvp=Jv}o*4|M%4v)=2iT}OILNAQjj?j84j
|
||||
z8PGd?=6!k1y*oPIXJ?iMW%;}j^G$DW@2Z@u>WTcYfbY`x`!@Nw9Y!(i$HsL>eu|!V
|
||||
zYcRuC?!BRE^Qh>?M*&oGYR8%n<c8fu;-D00P960={75z_mFq8Ob;wx?VMSd_P%NO1
|
||||
zy7hNM^|g?aouxE-ASTDg>A84uN0N`?@~s8uMrC^ny2nO(+S2Marz|s+To)apFUHaY
|
||||
zZTxnryk82`26T3Ie(;;xe+-oc)TgyP+{BualgDfAM>p3#ImztsJp1Xt3)YWyuh?7A
|
||||
z?Q}YAnT?mLRr8XQlkd7$5y#_z?e55&j+zZCEEA)HE$`LEg!=D2Ky(yuOO7sB81xtI
|
||||
zX}j~9^U4=wM%vb`2P-Nocld}taaHOcjg{w%KR515?39hZm&k0m>4`VY^SF`@H7YJN
|
||||
h9r{0Z;ER1d?z2;NqUud$cCPC`Qx&^WSufw__%Gd*;i3Ql
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back_darkmode.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_back_darkmode.png
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4873f84ff7f4750fa3adc70428ffb123502c1051
|
||||
GIT binary patch
|
||||
literal 2547
|
||||
zcmb_eeQeZZ81J!-O&ofY7;XsC6~zzi_3L(9o89Ji-N!}lm~(+4Q|z_9t?aJ7wPkn1
|
||||
zfy<Q1N5sVaL5?ZINzkZ#i3x{-Y|2E!v6)~*5ZF)|2|5SPgf9`_?&AVxDjF|o`}Xbc
|
||||
z`8~hq<9%|gOFhMtCrz6KLC|DZ30nr9O~#cn5!}}#n6HD!9l?@?8U)=r#kfq+hSx0+
|
||||
zl=PESUZGdG=Q6w!uyTUp6|Lbw5TGF_Codf2_!?1%y<(LlJCMPT_am?*IFJRIZrmMo
|
||||
ziq%rdGF5zPnWvmzR>RW*l9vnTgc(2(5Ood?2mG?egdNB*F9X)bHip2%5WU8M<Qop*
|
||||
z3U?{&R8$epwAxXgu#s>UZ6)kDP1+uVNu0>S@GOj=P@G_JJ44a%=nnzjRKdrTu|=c4
|
||||
zz?%c9*7YERVWCjS8ltR<T7?lbO=CETkt7Nbs8%oQTo{$LSz`>WsPU>4)FnlR4MxtZ
|
||||
zEY%$dP&yJqAQ-2Wwb3+zgkfPWh!IxY2x%B7@Nrylsp=ngF7TM>7XzZKYXD2cvB7FZ
|
||||
zSF~#7FR0_6Z*c%p>vqR|jH@LOh`Z4A!a5MfXhOzCYvuJp5i1ilWvR-Gg>^vYEF+pA
|
||||
z<5WdXSJZMv@sAa%bWAerbQ*=ph96!a$$}En9=XXzWI0`QAS6!WC~iXux}3;naEh^I
|
||||
z&%wb0AA!0RLGsn#3MKJ!oMv#6!HHX-plbw9=l&5a@QhDU100B13UE~-7L=<HIG#zy
|
||||
zsrVHYI0ovdoA+H#XQ`_ABtQ6|l@%Aju0p4spzU^)v=YN|-EPJuYdR<MqKkDPAU{?~
|
||||
z5*Q!n&BA${LP-(NMrofd3-x+QaO3TnbS6)6w2d6IXBB>_(FJ4nf?>~lMcU3$XeKX^
|
||||
zC{5YCD2-?0C_&PkS0rsbne7|1pQlRT6mtIm%wwEQqkWhXNdtwgA3Z%!iM69EzXT6=
|
||||
z48!rpNpK*%(E_4?jBZQgW#G0V7@-YSi-7cR`eFp8DLy^KsbYQ=$ky$&9`;xIHLmU-
|
||||
z)ZbS9##28|tNuszqsir~Ik`#%!xck}crarOjg$uabJd2w-88bs;9w3K%lH5WFYysB
|
||||
z%79u01Ns?xr3r!(wz}B-^6={er+U|J(JTiqUYb=r=?+)j*+%v?w(NOt*UUFdHlyw5
|
||||
zewov1Kk?#Ly5gAsp5x!BkN<A+KDn+0K~`^eKX8v{`o-)h)=(Ad^0W*NeA2sp*Ojk4
|
||||
z$L0?1Ydf)g%fk2P&)M9vZ04p~Jkiv=$(u4EHNVT8XlYuLk%A}Q>oh-?@@O;MVJ=V2
|
||||
zZ_Ied(gZn6iT@dxz2}l?QDA3<|9p?wU)Pu3XY1=ft6n)i|8!<uZdzmP<ix$ElTc+s
|
||||
z&X<?kZ=C+g`9*BVf<$*jde7^gtX+3yP(4Y{CR>;EFHfs|=cwyc%>Gg==jDv1wXO9i
|
||||
za{teI*@9iE0OJeO(an)d#Rr^kc+Sgp8Md^_6WwXGFTCAS#LdqT`WJT8bcjb9py>9V
|
||||
z!taSzGdVQ34-eK;c_x;P{l0rsHv(uA!uLkoBW)9Ywl{VD0E8S(N1`7@?w$~u*1350
|
||||
zjDo_TCHiipEvYWOv#4eAn@Bi4`cdR=Q^?Y}b9Q=xZ{wuBiIv~RdI<KyqPF)w5A1x}
|
||||
z{Udhp>eZ`{bj;~k=UZ`q^g(3B_1$e%OM2J8Kz2R!scbL0fIMXBobD!GdTald#UE8(
|
||||
z%%i%@UpIy}ys9K^?2aAT$BVOPPc2}7OFfyg_uJTRQ}Qck2Hn=g##NVBpE*@Dm^n1i
|
||||
z(ein)p(WJ>BP)beXRiBBC*{bg2RHarptOq#pB+Ase57IO4mtHcH)B|BJag#6lT>d)
|
||||
z&e!MKYd16)pcy-+T#iQ8NA~PL>UxV>Ywqi@Y)j6S`k$w?tzd_2HABdEi<&LDf&OGl
|
||||
zTMQD)&(DC^16irql!1BVKzD548=h$^kFSKxX^W`?7wW0OL$Ts(m0$Hf=7d(Q+HUb)
|
||||
zZja176mx*WEKzSvUf!OU*cv&PpiG!*8*(2$`^!o+r{-7RHTJTToo?Eeu+BEr?K!7Y
|
||||
z*9^Z;G+Rzj%oUn%d}G_QeqvzVy#Kj5|3$lBneo8k53^T$kGYM%Wv)UGyRG24rau72
|
||||
C-gtlj
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked.png
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..1c88fc5d571d0ec91b735082cb9c512603b9ceec
|
||||
GIT binary patch
|
||||
literal 3642
|
||||
zcmd5<c|4T)AAgXLtU?sZ>`;z1=4ec27}t!mFecWOW6V65n4>u|Nyt(m{I-K4RF+T?
|
||||
zD;v2IE9>Y`v5jG4)vknAtz6k>N?yCa-~O)sYv(o3Jm2U0eSbg4`}_WUW+sK=?xeCt
|
||||
zdkp{pDlX1sDs)ejUW%)s&s4c}i_lGp>+Ht|0A+RQB?IJ~+Xw*ix=b%$fv?*x0-eJ$
|
||||
zqcJ$4pqYrph0p+CWh3I!=#iiR77B(l*+lr{%_caE$sodg%-v9KToM?;bdKSHyJOtF
|
||||
z=rNIWJOgfH4YLvvAOkE=K!b@`QEWazM1;S$OMu4GX(Sx>9wLY&!tJCEVZLq@7>UCJ
|
||||
zVdiEy1RagVz;@ux&^QzxgEfU=Q0N^<)D9$iI|79!pm2okc-Zm_4te7-!U$Bd<FYU4
|
||||
zi3pDn2)G0!GCDfiEPA^chZl}S<MDVT3WLO85D)^vKfo5yL<lxt|Dy#m$fxs|Tmh5A
|
||||
zhDj~bLODVK5e`NAAq5t9#Vnh@OcO*HQbgk-(Pk)VO7DRT`U;LK<VC%A&Y&Z~D3ArR
|
||||
z1$+pLUcquBI06nog7a@ouPpz;0Yt5v+lr4rjfKTpalscj?1$1=Cge}ie6Iss5J?63
|
||||
z93hVmI_!tS)R$(%C6IU^O~B!KaX3*Q4~p_JWEhDgJs1m^kq?v2;6(F{f42uD(*z(9
|
||||
zjzM8i2ox59#(QBf1aor&8v7Z_f`CGOfVy!Q%&-Ih3f)dXLvP$4ppa@9Gy(0uf*Eu|
|
||||
z7>CEAK{+#7v~Uo~WrxFID@+ndoG1<tatuYc{rB@OBoc+k31db<3w)}RJ<P>{ghS(T
|
||||
zI0VKF{XSebH-ZbBFQBpMpbMD@hxjpLG8u$WIxRE|2Z9JRnt?{(vDi=qEewl6phC?-
|
||||
z9NIh-1%hE8_meqvp;QGQ_cQ*_{T@6fRE4ytzidZZn^O4@oSA&+U=J);&u(zv@+gW4
|
||||
zd#@M*jV`SOBAhOj0LXwZPc#2A10T#rM}Uyg|DcNxFg_<t5KZHOcHt0P|BLjHQ2a<~
|
||||
z*?vd``OjItU;AB&e}qGQLpoe(SkS{t%LCa^pW{Idtrjhl4*-g-E@V3|(Ycp-tO$+S
|
||||
z&FxK=+vlxrqVESZoEf;j@ym6`TKrmdN42#hk`pIQVr1+tAak^g?MGujO?qpO{vqvD
|
||||
zHRYZ@)@0Cf=sFkqkax9h%U4c?&Y?!xhLT5C<2_vy<2|I{u6V)m>NPj(CVp9L&g@tS
|
||||
z-yi+VrXX+DW}!c6PoMm!)CSdrdOgZ2*#!7H83!0(B)k6a@^F|sDOZw3F?#K~J^@wF
|
||||
z-woWEO3H4<*{t)OyK%TkFGEo$LH;~E3%OXB=D5_PrGm5vf)gHIkL-&ZkVqCw%gXXP
|
||||
z7(6GeHtRHqU;oL`lc^UCNEiOG3aBz|H*lc>&HK)!vc%hf8|9IHS>9K?O#F+e#yQ2a
|
||||
z4^hXj6f>93=I1vGhg(w)0$33hTO(s#{sJdZv<HSqMn(!od9?>8#BF|lezimlrb^HD
|
||||
z3UjP-P=WGBNkn#Za#B50JUjlTuM+oDU84mS`%rG5&mo`Z^EL1v>(UQ}D<4QtLMSUM
|
||||
z_gNAMahe04n`QTX{r&hib>+y&oSHo*ryuVuI^k)mseHnqR!2uiUR=WhC>jnfmwL-a
|
||||
zEG{rGXH&`W4w2Ph&aQ1@Z||4=jfdvr96V3lnkmT5y;*l~W+GVb&W;%3V@c~?xdaS>
|
||||
z5YsFSG@MEnhJ}SSj!#Yw$(>iR)wWf$)g63kwFU-<o3;dJrXEroHfI6>3JMA{J$LU8
|
||||
ztsUH8+KHK)o3maGdvtS4S$TVmo~;V`n535fe8(;2*Hce#>j2iaES=jlz%nZ<i>+W2
|
||||
z$>aT^1)PfMBVE70c0|#YkT>z#CrWG<STA}dn_w=I)cbqNT#Fg`Hhub5%Vx{{f{RKq
|
||||
z!QHULugb>U<3XYD&8^YSY%NNFQmn}(_q;iuO5fOLTGiFnvB$QRv>&mN0o*T8d|&za
|
||||
z2L#OM5@V`2bDjriTgShP^|0D9G^VAoCRw*$=F*YkP2_7h98Pm#gM+79_}%<PL;_;U
|
||||
zaYJOX?0F%VJCznf!{sh+87!fbdNtq!4F_k;Wc6bu5=nuFheyGSmoFC;Z9hxUs1It+
|
||||
zeZ4WUVfBWfiVLiekdT@2@$pFlbX;Tc87%Q=X=!PEp%OVFXJ1lLQBlPcu~;EdoZ2@0
|
||||
zbrf!1)vZ@kIk_d3nWIxzuBF>vDGcm0Iqljuv?I^`@(F|Ftu80pEbL7*(~8tn$d2BR
|
||||
zGBIbn44-m+RT`HHoif=1p>T1Hu2V_8BAiaAE4cOUi5^;igmz`Es_IP3&BBKbTguYw
|
||||
z^lTp){;*zlUBQ_%KLrN{E>673t|ahk2PF6J-<ONHSbHQ)gtb~yALLsLr=N8fL__Ru
|
||||
zRZGbr!z+o}>1<Dpt)IG3_jsN%0`64lo;ENZZ|biym25ao^UI=%YnbBwm3z#zT#Fv`
|
||||
zQcGWB3+^Jjy1HWd3vXXF$r-^=^ZiqA`lk%1_F5;dsz}ybzf-B=nSMy`gS*73eX^Y)
|
||||
zD7_1Z`_EC-$ZFz+B9D99qI=_VgC{#5_WQ)CcN?@!x1Q?g==g$2Bo-9+{@mkhT7%F`
|
||||
zW2KSd#(r5NRi;iG99)2)Onr;Ojl0|{O*;j;mm;8`a-P-EHhQeR?RzdacV7JT_R*!a
|
||||
zllLi(Un_b}I=Wt855qw!hh=w47UNYK{IAv3%}H8Y$u{-hcTsjfq&KLZA5))FRD}rC
|
||||
zK2rJ1T&J(juHHR*Iy#n$6$t7~ObIThsParcWO<}K@MgxUZ@f)5Aac9oE;FCZ9HB9G
|
||||
z7Ev1^Iu`7<w(m2UjSZTfQ9XM5DFahF_l4{Ii0ZAUT@RI%?RDCA62I;o9Y`1*9j%C-
|
||||
z7?|A&ykHmlFdE#h-~i{NpKN{t`ekie__n8~C(ay&x|gn%Vr&w$B`mJ@$5R>!j|T?_
|
||||
z_1rx?mTpN-0sN;e$<|mqYkP_6`PJ~GilBxV3!_^tEiHXOO<_$sZBuj2{LJK%@ms%d
|
||||
z*b;&~?DI)!3bY3<Jq(PVymE1I@t|X9s!GV>KrNr11#XI??cAxXzI#ypD=(8bhnuLT
|
||||
zngw}ye%R{4W{<0t<-tvj^))rW-a|SUQFrY+;K7BeC*QERb>!96Y_q^8%IHmA^iwAd
|
||||
zJ@(gJzb>4Y&nZS6PBEU8e>~Ejsg)@2l%b24tN7A)=Ozu{>LrhYclKGM&riC|#=c_}
|
||||
zwKW8cNt{dV=$>OQUd%%Z)9*i)TTsx1x3IXO)%<zAb9g+I{KooQaGSh_t4&SucOji+
|
||||
zPZS4zaV9zHZ4jyVxPDhp&%4IUmtRc(fa|P!ZRnA|u)DX~A+Rqyt!>!9cF$vBAkz87
|
||||
zkI$wLbXS=w0}Q{c0DpgK#z@leD-l#+TSF`RHNCyXCp#Dix1F3dP)mtYYFru~9u6j0
|
||||
zT4pAWD85lWjDfmy;fuM8^BE|&>9aR<ux)ojA>PN-MRrjP24m^F@4jQrjEbYXJ4Sgk
|
||||
z-?q2gkkq@)v7Lo7BJ_MoP%UrNY5v!j^C@LzHqHiWXCtt62;EQGZ$G_OX5?z6vBtQ$
|
||||
zv%@%J#J7f(4M1JEy~?zKTKZEBOQ)Dw{&U?s-`?tE1=TIF{PF(ErbLKVt)-Ep7>)Y3
|
||||
zmB;;;C`Ss;J@85~Rzb>^s&u0=Z1)0xudnCjUkeLb#35AXG~LEX`tQ!g!JS-gACmYR
|
||||
D=8d64
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked_darkmode.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_docked_darkmode.png
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..fe51e11921ecb35c5535e7c446769af7f66be893
|
||||
GIT binary patch
|
||||
literal 2810
|
||||
zcmcIm3se(V8jh_}EK8-jfcRpFisopZKuAUc4GBuXuz*;Bl4?jMA>=V}5=f#b5>wH&
|
||||
zNOz?^0L5da^%X&CG(sC#P&iP~WhtQrr3fM-rHFt=DYz3}$L@Bwk8?Wb+_`t|{qFa_
|
||||
z|1$?7BQ`j{x#&#{2II^LWk;j4-aZ^1(Dz?ocNs&cxysNu6$az9z&>VSa`P8rFmskj
|
||||
zVq(>?+>M|BmJ|3wI1wUf<w_Kd!2|?pm3)B|QUi&QSfXHH2g=H^fJDf^Zt>%ixJnk3
|
||||
zBnjPtK$~_%#0Yjs1#}@cC=dwHf+&F;Qu6_=T&7TgS_XE47ev?gZ6X$!fT*PmEYmI!
|
||||
zh~-8CEEs_RKLQmmAp24Pe>#CoCDAFqYXJ(0>`x^56Ujb!5*Z{>K_5CW^<YtHh)@JZ
|
||||
zv)50_LcbW;B(+)z5{Vj(hM@5wz=)Vgrqk&}5`{>i;86r#rBkT+TD(HFe42p`sRW2b
|
||||
zsg}SBz|P1|gj3WEEUM|G33BBOtwJ^BCe&d>Eni6_6G(QGCV)c03{IJX$R>mf1w=>&
|
||||
z$svVWg<{DwSY;BdhE+-M|Dc{Z{)qt8wOsCujGxs-E}s#hQir6XW=uKcXVIz{of0BO
|
||||
zLn=505kMiSsG7^|)+j+10`b)_5(C4s=|DwJs|>JM_Q249)mtPAA*@m1UbzFY`D%!P
|
||||
zrI08jJjoYNrpHhypr0Q|_FY4wfh5u-lnV<bBHe#OeLyk=B>VgXie`<Fujc<ESSSER
|
||||
zFe2xpHcRAuF+@}<#8_a)lOPM0!3ZiC)z0VDeGZEiiNGR>3_VaqZwLlBAuKAHPNm{0
|
||||
z1oDKsTrS8_sMLIg0OGJ2SkylRi9`sBXk?nNfF{5T{i$TU(AO8j(?nD{o=Q)INCJ^R
|
||||
z**8%%eV+{rQtVkUeP8$+@BamnpjF71{caw6ZQ9cZ43((R!0M)|XA`u2Y9*5Z6Bz^Y
|
||||
z1@=l{U<LLRfP~noZOQNUz$C3E2|`K#PhL#IRIo^`;Uf@JjC$+Wq#hB~pJ*@JNmGdb
|
||||
zY30P(D<wV+NBf3-In%JvkC~PSDbPNLpbgCy>ah>)lLii(8Kcebzsuc!V$0GuI>awl
|
||||
zKKQ(mz4v(ayJf{4l_4t~-GU<TTtDl?GrKVT^|zvu@hjKN-ORof>8>}smVR9r8}m<W
|
||||
zh&#{G^<3);?tT+Dw<xTy#!Ty>z@Ih*BLgSu?>&<}_;O%Z&v;M!^X~kild63eWir`*
|
||||
zGgOwo$4p=0m@(U{bhg(=0Q)E~d%oe}e8W3>7oOfF)a7)z%WHFk)pLUZ=6(XxafM^!
|
||||
z%0C9IY)gHK87eL*K^nT^`^L1GfodMj!1yM6m)W$nbg^c*tL1TW(75}hj*rJjmfY$r
|
||||
zvTeq7XE*Iw{$tOoHLNcVEHlLSeQEOwyj+1Sws}~h!|369Wm9ZiT$Ge|b6~rc0~J(V
|
||||
zj;?$Dc3_oP>AoM<wJ+4W4~FMgI+^!eFyARCH@qC~YAe3xInY#^b&c=(EXi0uUMv0X
|
||||
z;D*60o#jA3g?+HtVzHbbD-rMgz&T*wg2J3FMWb0SGvoVarMYj-&9~_HN~O}GhEJ+f
|
||||
z7ZrxsK5B5O=qk+F&=Yqm2bs0?lF71k-qWU?O3#zW#m0V8U4K_&?cnCLof)R94ziRC
|
||||
z(-F}PAb=O9(?xv{hD)zJUVBc1KX0XE%{Me1?i!UEHH7n#<sl3TeWderGQMdwljcWn
|
||||
z&)nb^E0tbTz2FwL^4EK;4K&`x)jNDRuQ{H0Z)agnOHb4(Yw3Gs3!dM(KO8jpeZc$a
|
||||
zWzO42zgd-YvO;_<AjP4)Vra~Ey5aiXHLWpE>fi78tTx79DA|(dPy6s$XBVxwd&HAi
|
||||
zm?k&eR_3_PT4voHm+9SesKd$W{If4^wx3wryjn23Fz2w1bTU5pdO=r4bX|D(S<|1Z
|
||||
z)Xtks*6h}VT?sdt#&h3g@y1Gc+OO`n5jxAqY$aFc>o(^d3Ct{)8Y|#%-0h8h&VwF@
|
||||
z9(#9IJ2&~=$nr=mwt4fa-ncSYc~|=x^-0jS&!xwVl=jY6*PFc$a^hN)9z@B7qpJq<
|
||||
zqU(x28(E*UIrHHn@5P(m9TcP`|6^rArF%Fo-J5Ba4C@SgTdQ-*j>bIov~9z6-*+sy
|
||||
z=fY!Y?kr|0nQh0OxXbUSM@b)v4~M<HdYv;z(Q@Pnx*j!M-(NP!X}LsR@~@|>Hi{Q%
|
||||
zE_%fqMn*<>@j>I(+Fs9&zeU$I>%Kl~YR|~L!a39HaBQd5YK^!x8F%w-lb7~%&XZ=H
|
||||
z+e4|_s$}En<A&Wk=G0ta-akY|gU)+zndjDR#+oaapa%~}2zNN^=T@%st`UdfZsX5K
|
||||
z;<{ab<Ri&aN6nciy)qR^J7axe32}Y2(=D4DaiX-{w61nFQ_KIVYk||nl!UxvxgJ=@
|
||||
zPyXaq(EQZ>``&ENi>7hMdC%_F_+PY^hPRo)r3OWZW=K2MPrcDED2RL!Xt8vkJE)zX
|
||||
z-V~oT)Oux5R;-E33*V;tVNb)yb+5NR>W-2ZRjJp$7KAHI+dUEV4C~Ug_)(`b$H#2-
|
||||
z`bQ_KuDK1jhWpnoWa7F50`&#S+^1N^Ir+wKLF%`c_w_FNG}$;%Q}cLP|G-;sNxL%F
|
||||
zjkdIn7B)5DillcP<S(B8-D*l`w7N#LCG5&?4-_@xs>vH$T>QQN$hPt;8`hqev)+b-
|
||||
VfHkC3x%R(PPDlj%Qt&qYzX3LdVM71_
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home.png
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..20f1d887aedebaadec7f31184bdfe3e662401522
|
||||
GIT binary patch
|
||||
literal 1362
|
||||
zcma)5dsvcZ6eq3COPOfdW%DV^ZrZSmmu5@DVMeK8>Y7WZW@(O;T+M9eB{VT<`aG7k
|
||||
zn)f@oE<`v`G!hdlR3b#c8xe|l8>DE0=1%!ff9^cb_kQR6zW4o|-#O>~uHt;XmYJ+I
|
||||
zK_C#zum>?m;Z6Mb7#YIa&@1aeAQowH-T|Hv{vWHXtnBFM=<e<w92^`Q8&j**TCH|w
|
||||
zW=5ye&3!WP0UQ|_Q79BrskFVly|A!wfjKuf7x4M{d8JaBnwknAkw}F7z<|f&A$<GE
|
||||
z#9}dz$7^nGX0cc_8jVh;L(;OcvZ|`8#>Pg#+uGV-5Af^tdQj5Y*@;G@7g7WV2lw^$
|
||||
z&Cbrcy1D|=)YK%ANCpN5N=ix~<n#IPDIy{wJ3E`nWcKv*3=a<jJ~cJf+S&>ZaQ652
|
||||
zkB^VPe*JoAXb4sSfdMK7NivzNx3?D%jYb1`<#IVVU0q$En!#X*L?S?ds;;h1AP_)}
|
||||
zAPmlOI2^#?IGhE}g|<Kzp-{LW0Lq7!LM=f-K_n8XzP_H#W&;}}s;H>Q%*+JYC=?2V
|
||||
z!GL%y77OKo5-yhu+n_ns)zwrgwWXy6T1_UCp`W0EKp^Dh<v}6PaFC%=sbDCRlamt@
|
||||
z6CeiW0^~4=G>fQ@x1sX<QD1+=qAyI$kd`a0R;^yM1V^rBzv>>;Oz3t0N?$cpk-RL7
|
||||
z-Curq>S*LLrm$bkV3lSj#D<6Y;{swYW|gxi%Zs*{e(6A+T4!*U^3;3jAJaPzMpw75
|
||||
z7$ut5KkB^M^5?QL0f}~RdGFoYzGCL-{5n-sF6Va91!l$rZes=YHif6k(V{Rhzm^#u
|
||||
zalK`;ZDwOVJvHuRU~uxaZ`Dc^TF`p)x#X>!QNDJ?g&SrFgh3=0gAPcLj)}XDS)x}j
|
||||
zQJ<v!mA=U?%l=1~tj%`B)z`KbFE+KKzBz$GdPW=@wWdy+ogj$E`&FZwuZ!Zp<C4}~
|
||||
zVm#p%keE^NFI+55ke}Hcsp&xT<5FtE)tFl*wILQcp5N@wHNu;kTknn!mb^C}u(Xb{
|
||||
zz`fa%H*memyTCaq1Ap2W>D!)vB`lDpEI*IgAvkB_L`bG*pdVVjPYM(XQGXx5K?%)o
|
||||
zLs2>$w}*(t!qJq_*t<Eng8LR58%v)#oqHZo6K-pf@#;>Nf;aRca6{9uQ_PEv<)W-?
|
||||
z(KCaVz2Og5`HT(EW0DOY#`%Z2w?rbt$vWfcc*OArS@cn<@fq^g9Guwf{7Pas%bMNJ
|
||||
zdS?{t^03BBAX+^7!xLN9zWoH>T^@;-lRUM^DZ}5M%WCC|WMSxw>0+B=^sbRM4jZXO
|
||||
z$_Lnf*!02(cHH5lbT?VLt;YvjoU;yD7jgjM%PiY#eFT3yJ0;{s)Z^`kQt+<!k~_Qu
|
||||
zviuCA6KQS^l4A0z$7lHCo-;d7g&3e}+$(1}x<hC;kGbLH_zAlm>$e4s;^kW?4ngm_
|
||||
zE`Q~cX8O<Z(zEsV8qXf?Mb7nT$Cn62o198j$sS3_dA5Umo!g_|H>CWM;Mc75nWk1-
|
||||
zsTCC62DdZ&CLU}r=+K8QH9PflBu(;$$CuS~(S5S#8@}fRZa&GnX#a%YkXXbwx5=MX
|
||||
z``wiJ|MZgXydqYc;eH`$&5TsFXJu)BBv++(-ld-NA|wj=+9rOa!u0;M{>s}ZN=&zg
|
||||
jp|o;zi!=ZHCR`6amaD0~y#7)m{38ggr!VHdM;P%x23q9L
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home_darkmode.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_home_darkmode.png
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..96dc83e4a42d70c1b11ac5a55ea5eb8cd75e1e20
|
||||
GIT binary patch
|
||||
literal 980
|
||||
zcmeAS@N?(olHy`uVBq!ia0vp^O(4v{3?%p7eQ=(EfiWY%C&U%V?H>iS4*_MFJ{MqE
|
||||
zmzM<j1v8iwPFQ>B+}+pje*SoQ_Tb9?Tpg9&|JF;%JijfpWO-*ypo^KYc~ESA_nHsA
|
||||
ztz3e$KC_1!6n_!c@R_*xN!py_HCyTq=gggUaniy|?MuCzA69H^h|Zp|b=B<p2PGc`
|
||||
z0>b30*|@*0n4jWq;gIy|zKGh99kpj}USHgEp;$&A80||uT^vIyZoR$k8h+S8g!O?F
|
||||
zcj^bHLXDPyjKZ$qJ6m_`-hKM-Z=Y)^yB^s@+{vH0dq%aAaitu;AQIT=<@xp3rAvP$
|
||||
zy;7MXy;6S{7k&Q3%$mf?)m#uB5~Fl^!4@93r=m)tT64E<TJ6;MO6v5gt#7SPb6q!g
|
||||
zS=4*(tJ=ib0ZZOj6rVo7V5@I<#(RMk0++cf?<&vlvtrdMVZ3YmE^z(23+e$2<s}SK
|
||||
z3ljnsIEfmhoN8+nY~)&eV1{Nl6Oi%vK#S&VmSrqjKFn8_<*>~VU17l9;(OC(gF?VT
|
||||
zew|sHRA+K^s)$ZwynjDjB9%2Z@o9hj@z9yqKg!oksmhKrP8D1bl-3+)o+@o5{UvQu
|
||||
za+deA^S<)eZhOAF(C5HfE5hn~GjCG+m+o&3f0++AEUdr7$EqdsvefBVI!p9|LmNK}
|
||||
z*BAXVwz%BS@myD^`ADnrrX%|0>yoZt>&?Br{aWc8JyVg;b6@KwX1@Ay&*p-y%_*L#
|
||||
z{^ysm=`T&%{PpeY3#V^a$E?)Zo3}Wqvw!=8=ht19w|5|cm|EtWFQ%k?JmTvKOfn3f
|
||||
Lu6{1-oD!M<_NCyP
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent.png
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4f0d314e2621d018c3cd2e4267cf4cf82a78943f
|
||||
GIT binary patch
|
||||
literal 278
|
||||
zcmeAS@N?(olHy`uVBq!ia0vp^O(4v{3?%p7eQ+K~IR*HHxB_W3aOlvXS731D$dNyP
|
||||
z{`~&^8>ry@`}c3(z6CO@t*tk0+O&D|W?NfZAou_O|I!nsR|8q1B|(0{3``sX!dw~0
|
||||
z&!m6(D0J#1t5jH`B>TrxD!+gV@;qG}Ln>~)y?T=OumO*&<LOWDj(nQ-FWQ&&(?pJ@
|
||||
znOy%Gk7P>$)d4|WP*!pH)Y~Ek3+0ck%$oDNf%ERC$_@LN)Si65+@j0wqw%{iOg5Zz
|
||||
u=kcQOsZZh^l}((KO_)H0lQP7Be}}|<Jmh~yiM-bb33$5txvX<aXaWF$9A~fq
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
diff --git a/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png b/packages/overlays/MiuiNavbarOverlay/res/drawable-440dpi-v4/ic_sysbar_recent_darkmode.png
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f53ec649e615e8491fb6abb63d169ab7e0faa1ce
|
||||
GIT binary patch
|
||||
literal 205
|
||||
zcmeAS@N?(olHy`uVBq!ia0vp^O(4v{3?%p7eQ+K~DF*n2xB}^ZynuIaZ52=vS4ogx
|
||||
zFoXa0-5=lXWwUX~o_?MiC>rSL;uunK>+RLuyayBnTpaC=HT>3}!PR$SSH`j?-mt2r
|
||||
zKs7+%uwa{9mTBst&#^sIIN#?w`Oh@C&bRjEiUzlg7B>c|g@RIyV08!V`R32zx~(4j
|
||||
Q*9XM+boFyt=akR{0CQqV3jhEB
|
||||
|
||||
literal 0
|
||||
HcmV?d00001
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 03ca85ab7a8d6a8eac9006f3f6b4d9dfa27d9e85 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Mon, 27 Sep 2021 16:30:00 +0000
|
||||
Subject: [PATCH 03/16] Disable cursor drag by default for editable TextViews
|
||||
|
||||
Requested by @TadiT7
|
||||
|
||||
Change-Id: Id54e38ee418174af8cde4113c849bc292f5fc96d
|
||||
---
|
||||
core/java/android/widget/WidgetFlags.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/java/android/widget/WidgetFlags.java b/core/java/android/widget/WidgetFlags.java
|
||||
index fb40ee5ec843..c0c6fb6e9431 100644
|
||||
--- a/core/java/android/widget/WidgetFlags.java
|
||||
+++ b/core/java/android/widget/WidgetFlags.java
|
||||
@@ -38,7 +38,7 @@ public final class WidgetFlags {
|
||||
/**
|
||||
* Default value for the flag {@link #ENABLE_CURSOR_DRAG_FROM_ANYWHERE}.
|
||||
*/
|
||||
- public static final boolean ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT = true;
|
||||
+ public static final boolean ENABLE_CURSOR_DRAG_FROM_ANYWHERE_DEFAULT = false;
|
||||
|
||||
/**
|
||||
* Threshold for the direction of a swipe gesture in order for it to be handled as a cursor drag
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,47 @@
|
||||
From deb5aecb8182307e352e82cd5d5484ca1791d42f Mon Sep 17 00:00:00 2001
|
||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||
Date: Fri, 22 Mar 2019 00:41:20 +0800
|
||||
Subject: [PATCH 04/16] Disable FP lockouts
|
||||
|
||||
Both timed and permanent lockouts - GET THE FUCK OUT
|
||||
Now targeting LockoutFramework, introduced in Android 12
|
||||
|
||||
Change-Id: I2d4b091f3546d4d7903bfb4d5585629212dc9915
|
||||
---
|
||||
.../fingerprint/hidl/LockoutFrameworkImpl.java | 17 +----------------
|
||||
1 file changed, 1 insertion(+), 16 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||
index dc5dace98825..386e4f868e8d 100644
|
||||
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java
|
||||
@@ -100,25 +100,10 @@ public class LockoutFrameworkImpl implements LockoutTracker {
|
||||
mLockoutResetCallback.onLockoutReset(userId);
|
||||
}
|
||||
|
||||
- void addFailedAttemptForUser(int userId) {
|
||||
- mFailedAttempts.put(userId, mFailedAttempts.get(userId, 0) + 1);
|
||||
- mTimedLockoutCleared.put(userId, false);
|
||||
-
|
||||
- if (getLockoutModeForUser(userId) != LOCKOUT_NONE) {
|
||||
- scheduleLockoutResetForUser(userId);
|
||||
- }
|
||||
- }
|
||||
+ void addFailedAttemptForUser(int userId) {}
|
||||
|
||||
@Override
|
||||
public @LockoutMode int getLockoutModeForUser(int userId) {
|
||||
- final int failedAttempts = mFailedAttempts.get(userId, 0);
|
||||
- if (failedAttempts >= MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT) {
|
||||
- return LOCKOUT_PERMANENT;
|
||||
- } else if (failedAttempts > 0
|
||||
- && !mTimedLockoutCleared.get(userId, false)
|
||||
- && (failedAttempts % MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED == 0)) {
|
||||
- return LOCKOUT_TIMED;
|
||||
- }
|
||||
return LOCKOUT_NONE;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,112 @@
|
||||
From e8c24265c98c943b220873c85e1607db39cd8142 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 2 Sep 2021 16:15:19 +0000
|
||||
Subject: [PATCH 05/16] Keyguard: Adjust clock style
|
||||
|
||||
Thinner font, less padding and unintrusive colors
|
||||
|
||||
Change-Id: I21e5d5bf37d724e75ebce4cd89349e0cc4dfc910
|
||||
---
|
||||
.../SystemUI/res-keyguard/layout/keyguard_clock_switch.xml | 7 ++++---
|
||||
packages/SystemUI/res-keyguard/values/dimens.xml | 6 +++---
|
||||
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
||||
packages/SystemUI/res/values/styles.xml | 4 ++--
|
||||
.../src/com/android/keyguard/AnimatableClockView.java | 2 +-
|
||||
5 files changed, 10 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
||||
index 28c61663bd4d..84ea2446f9d7 100644
|
||||
--- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
||||
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
|
||||
@@ -38,10 +38,10 @@
|
||||
android:layout_gravity="start"
|
||||
android:gravity="start"
|
||||
android:textSize="@dimen/clock_text_size"
|
||||
- android:fontFamily="@font/clock"
|
||||
+ android:fontFamily="sans-serif-thin"
|
||||
android:elegantTextHeight="false"
|
||||
android:singleLine="true"
|
||||
- android:fontFeatureSettings="pnum"
|
||||
+ android:fontFeatureSettings="tnum"
|
||||
chargeAnimationDelay="350"
|
||||
dozeWeight="200"
|
||||
lockScreenWeight="400"
|
||||
@@ -60,9 +60,10 @@
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="@dimen/large_clock_text_size"
|
||||
- android:fontFamily="@font/clock"
|
||||
+ android:fontFamily="sans-serif-thin"
|
||||
android:typeface="monospace"
|
||||
android:elegantTextHeight="false"
|
||||
+ android:fontFeatureSettings="tnum"
|
||||
chargeAnimationDelay="200"
|
||||
dozeWeight="200"
|
||||
lockScreenWeight="400"
|
||||
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||
index 7e3c87b24f07..58a1734aad22 100644
|
||||
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
|
||||
@@ -94,8 +94,8 @@
|
||||
<dimen name="num_pad_key_margin_end">12dp</dimen>
|
||||
|
||||
<!-- additional offset for clock switch area items -->
|
||||
- <dimen name="clock_padding_start">28dp</dimen>
|
||||
- <dimen name="below_clock_padding_start">32dp</dimen>
|
||||
+ <dimen name="clock_padding_start">22dp</dimen>
|
||||
+ <dimen name="below_clock_padding_start">28dp</dimen>
|
||||
<dimen name="below_clock_padding_end">16dp</dimen>
|
||||
- <dimen name="below_clock_padding_start_icons">28dp</dimen>
|
||||
+ <dimen name="below_clock_padding_start_icons">22dp</dimen>
|
||||
</resources>
|
||||
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||
index 72b027af1bf6..6bfca3ece20e 100644
|
||||
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
||||
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||
@@ -123,8 +123,6 @@
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:maxLines">2</item>
|
||||
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
|
||||
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
|
||||
- <item name="android:shadowRadius">?attr/shadowRadius</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Keyguard.Secondary">
|
||||
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
|
||||
index a03e9ea89342..285dd4766cab 100644
|
||||
--- a/packages/SystemUI/res/values/styles.xml
|
||||
+++ b/packages/SystemUI/res/values/styles.xml
|
||||
@@ -343,7 +343,7 @@
|
||||
<item name="darkIconTheme">@style/DualToneDarkTheme</item>
|
||||
<item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
|
||||
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
|
||||
- <item name="wallpaperTextColorAccent">@*android:color/system_accent1_100</item>
|
||||
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_dark</item>
|
||||
<item name="android:colorError">@*android:color/error_color_material_dark</item>
|
||||
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
|
||||
<item name="passwordStyle">@style/PasswordTheme</item>
|
||||
@@ -359,7 +359,7 @@
|
||||
<style name="Theme.SystemUI.LightWallpaper">
|
||||
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
|
||||
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
|
||||
- <item name="wallpaperTextColorAccent">@*android:color/system_accent2_600</item>
|
||||
+ <item name="wallpaperTextColorAccent">@*android:color/primary_text_material_light</item>
|
||||
<item name="android:colorError">@*android:color/error_color_material_light</item>
|
||||
<item name="shadowRadius">0</item>
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java b/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
|
||||
index ef3104a21708..ec54cdb53f22 100644
|
||||
--- a/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
|
||||
+++ b/packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java
|
||||
@@ -113,7 +113,7 @@ public class AnimatableClockView extends TextView {
|
||||
|
||||
void refreshTime() {
|
||||
mTime.setTimeInMillis(System.currentTimeMillis());
|
||||
- setText(DateFormat.format(mFormat, mTime));
|
||||
+ setText(DateFormat.format(mFormat, mTime).toString() + ' ');
|
||||
setContentDescription(DateFormat.format(mDescFormat, mTime));
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 925a1d857b5a0f9c76d920caed30bf9e7a69033d Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 2 Nov 2019 06:41:03 +0000
|
||||
Subject: [PATCH 06/16] Keyguard: Hide padlock unless UDFPS is in use
|
||||
|
||||
Fair enough Google, but don't give me that otherwise
|
||||
|
||||
Change-Id: Ie91e80ca5c6637a51a8acc72fb28cd6ac2a7abb6
|
||||
---
|
||||
.../keyguard/LockIconViewController.java | 29 +++++--------------
|
||||
1 file changed, 7 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||
index 509ac8a6d9fe..74b91b708433 100644
|
||||
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
|
||||
@@ -232,31 +232,16 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
||||
return;
|
||||
}
|
||||
|
||||
- boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon && !mShowLockIcon;
|
||||
- boolean wasShowingLockIcon = mShowLockIcon;
|
||||
+ boolean wasShowingFpIcon = mUdfpsEnrolled && !mShowUnlockIcon;
|
||||
boolean wasShowingUnlockIcon = mShowUnlockIcon;
|
||||
- mShowLockIcon = !mCanDismissLockScreen && !mUserUnlockedWithBiometric && isLockScreen()
|
||||
- && (!mUdfpsEnrolled || !mRunningFPS);
|
||||
- mShowUnlockIcon = mCanDismissLockScreen && isLockScreen();
|
||||
+ mShowUnlockIcon = mCanDismissLockScreen && isLockScreen() && mUdfpsEnrolled;
|
||||
|
||||
final CharSequence prevContentDescription = mView.getContentDescription();
|
||||
- if (mShowLockIcon) {
|
||||
- mView.setImageDrawable(mLockIcon);
|
||||
- mView.setVisibility(View.VISIBLE);
|
||||
- mView.setContentDescription(mLockedLabel);
|
||||
- } else if (mShowUnlockIcon) {
|
||||
- if (!wasShowingUnlockIcon) {
|
||||
- if (wasShowingFpIcon) {
|
||||
- mView.setImageDrawable(mFpToUnlockIcon);
|
||||
- mFpToUnlockIcon.forceAnimationOnUI();
|
||||
- mFpToUnlockIcon.start();
|
||||
- } else if (wasShowingLockIcon) {
|
||||
- mView.setImageDrawable(mLockToUnlockIcon);
|
||||
- mLockToUnlockIcon.forceAnimationOnUI();
|
||||
- mLockToUnlockIcon.start();
|
||||
- } else {
|
||||
- mView.setImageDrawable(mUnlockIcon);
|
||||
- }
|
||||
+ if (mShowUnlockIcon) {
|
||||
+ if (wasShowingFpIcon) {
|
||||
+ mView.setImageDrawable(mFpToUnlockIcon);
|
||||
+ mFpToUnlockIcon.forceAnimationOnUI();
|
||||
+ mFpToUnlockIcon.start();
|
||||
}
|
||||
mView.setVisibility(View.VISIBLE);
|
||||
mView.setContentDescription(mUnlockedLabel);
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,38 @@
|
||||
From eb1da990af3c66a794a3516fd5da21a177779001 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 1 Sep 2021 14:41:53 +0000
|
||||
Subject: [PATCH 07/16] Keyguard: Never switch to large clock
|
||||
|
||||
It looks alright actually, but as always breaks under landscape
|
||||
|
||||
Change-Id: I434d033ecae597ed2a7b2ed71e96ba1a963e9cc3
|
||||
---
|
||||
.../com/android/keyguard/KeyguardClockSwitch.java | 12 +-----------
|
||||
1 file changed, 1 insertion(+), 11 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
|
||||
index a36a03473e0e..60195bcd23fb 100644
|
||||
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
|
||||
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
|
||||
@@ -280,17 +280,7 @@ public class KeyguardClockSwitch extends RelativeLayout {
|
||||
* the smaller version.
|
||||
*/
|
||||
boolean willSwitchToLargeClock(boolean hasVisibleNotifications) {
|
||||
- if (mHasVisibleNotifications != null
|
||||
- && hasVisibleNotifications == mHasVisibleNotifications) {
|
||||
- return false;
|
||||
- }
|
||||
- boolean landscape = getResources().getConfiguration().orientation
|
||||
- == Configuration.ORIENTATION_LANDSCAPE;
|
||||
- boolean useLargeClock = !hasVisibleNotifications && !landscape;
|
||||
- animateClockChange(useLargeClock);
|
||||
-
|
||||
- mHasVisibleNotifications = hasVisibleNotifications;
|
||||
- return useLargeClock;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
public Paint getPaint() {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,102 @@
|
||||
From 4252dd5be9f193c3f25f6771986b868e065b90e7 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 2 Nov 2019 08:31:36 +0000
|
||||
Subject: [PATCH 08/16] Keyguard: Refine indication text
|
||||
|
||||
Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8
|
||||
---
|
||||
packages/SystemUI/res-keyguard/values/styles.xml | 2 --
|
||||
packages/SystemUI/res/values/dimens.xml | 2 +-
|
||||
.../KeyguardIndicationRotateTextViewController.java | 12 +++++++++++-
|
||||
.../statusbar/KeyguardIndicationController.java | 5 ++---
|
||||
.../statusbar/phone/KeyguardIndicationTextView.java | 2 +-
|
||||
5 files changed, 15 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||
index 6bfca3ece20e..54e5b8511b57 100644
|
||||
--- a/packages/SystemUI/res-keyguard/values/styles.xml
|
||||
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
|
||||
@@ -137,7 +137,5 @@
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:textColor">?attr/wallpaperTextColor</item>
|
||||
- <item name="android:shadowColor">@color/keyguard_shadow_color</item>
|
||||
- <item name="android:shadowRadius">?attr/shadowRadius</item>
|
||||
</style>
|
||||
</resources>
|
||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||
index 6ad9ab9a26ec..661a03aa9671 100644
|
||||
--- a/packages/SystemUI/res/values/dimens.xml
|
||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||
@@ -923,7 +923,7 @@
|
||||
<dimen name="keyguard_lock_width">42dp</dimen>
|
||||
<dimen name="keyguard_lock_padding">20dp</dimen>
|
||||
|
||||
- <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
|
||||
+ <dimen name="keyguard_indication_margin_bottom">16dp</dimen>
|
||||
<dimen name="lock_icon_margin_bottom">98dp</dimen>
|
||||
|
||||
<!-- The text size for battery level -->
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||
index 2d215e0f1f62..0c5870d6b6bf 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java
|
||||
@@ -183,12 +183,22 @@ public class KeyguardIndicationRotateTextViewController extends
|
||||
}
|
||||
|
||||
/**
|
||||
- * @return true if there are available indications to show
|
||||
+ * @return true if there are available non-resting indications to show.
|
||||
*/
|
||||
public boolean hasIndications() {
|
||||
+ if (hasIndication(INDICATION_TYPE_RESTING)) {
|
||||
+ return mIndicationMessages.keySet().size() > 1;
|
||||
+ }
|
||||
return mIndicationMessages.keySet().size() > 0;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * @return true if there is an indication of the following type.
|
||||
+ */
|
||||
+ public boolean hasIndication(@IndicationType int type) {
|
||||
+ return mIndicationMessages.containsKey(type);
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Immediately show the passed indication type and schedule the next indication to show.
|
||||
* Will re-add this indication to be re-shown after all other indications have been
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||
index 503b5c0ee4b0..e49561ff1f45 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
|
||||
@@ -432,12 +432,11 @@ public class KeyguardIndicationController {
|
||||
}
|
||||
|
||||
private void updateResting() {
|
||||
- if (mRestingIndication != null
|
||||
- && !mRotateTextViewController.hasIndications()) {
|
||||
+ if (!mRotateTextViewController.hasIndications()) {
|
||||
mRotateTextViewController.updateIndication(
|
||||
INDICATION_TYPE_RESTING,
|
||||
new KeyguardIndication.Builder()
|
||||
- .setMessage(mRestingIndication)
|
||||
+ .setMessage(mContext.getResources().getString(R.string.keyguard_unlock))
|
||||
.setTextColor(mInitialTextColorState)
|
||||
.build(),
|
||||
false);
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||
index f1cde8a9be7a..10037fc93d75 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java
|
||||
@@ -40,7 +40,7 @@ import java.util.LinkedList;
|
||||
public class KeyguardIndicationTextView extends TextView {
|
||||
private static final long MSG_MIN_DURATION_MILLIS_DEFAULT = 1500;
|
||||
private long mNextAnimationTime = 0;
|
||||
- private boolean mAnimationsEnabled = true;
|
||||
+ private boolean mAnimationsEnabled = false;
|
||||
private LinkedList<CharSequence> mMessages = new LinkedList<>();
|
||||
private LinkedList<KeyguardIndication> mKeyguardIndicationInfo = new LinkedList<>();
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,184 @@
|
||||
From 402e431a1bc55508d9d257b7a9baa21d2271feb3 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 20 Mar 2021 10:35:14 +0000
|
||||
Subject: [PATCH 09/16] Keyguard/UI: Fix status bar / quick settings margins
|
||||
and paddings
|
||||
|
||||
- Change keyguard_carrier_text_margin into a padding
|
||||
- Link keyguard paddings to status_bar_padding_{start|end}
|
||||
- Add status_bar_padding_{start|end} to quick settings header
|
||||
- Remove several unnecessary margins and paddings
|
||||
|
||||
Change-Id: Ic91fa398813e1907297bb0892c444d96405950e7
|
||||
---
|
||||
packages/SystemUI/res/layout/keyguard_status_bar.xml | 2 +-
|
||||
.../SystemUI/res/layout/quick_qs_status_icons.xml | 2 --
|
||||
.../layout/quick_status_bar_header_date_privacy.xml | 6 ++++--
|
||||
packages/SystemUI/res/values-sw600dp/dimens.xml | 6 ------
|
||||
packages/SystemUI/res/values/dimens.xml | 6 +++---
|
||||
.../com/android/systemui/qs/QuickStatusBarHeader.java | 8 +++-----
|
||||
.../statusbar/phone/KeyguardStatusBarView.java | 11 -----------
|
||||
7 files changed, 11 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||
index eb7638233efd..249689f211af 100644
|
||||
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
|
||||
@@ -62,7 +62,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="@dimen/status_bar_padding_top"
|
||||
- android:layout_marginStart="@dimen/keyguard_carrier_text_margin"
|
||||
+ android:paddingStart="@dimen/keyguard_carrier_text_margin"
|
||||
android:layout_toStartOf="@id/system_icons_container"
|
||||
android:gravity="center_vertical"
|
||||
android:ellipsize="marquee"
|
||||
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
||||
index bbd3e47a568f..a9958aac0270 100644
|
||||
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
||||
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
|
||||
@@ -33,8 +33,6 @@
|
||||
android:minWidth="48dp"
|
||||
android:minHeight="48dp"
|
||||
android:gravity="center_vertical|start"
|
||||
- android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
|
||||
- android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.QS.Status" />
|
||||
|
||||
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
||||
index bff93a99258a..43abaa5a4260 100644
|
||||
--- a/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
||||
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_date_privacy.xml
|
||||
@@ -34,7 +34,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="48dp"
|
||||
android:layout_weight="1"
|
||||
- android:gravity="center_vertical|start" >
|
||||
+ android:gravity="center_vertical|start"
|
||||
+ android:paddingStart="@dimen/status_bar_padding_start" >
|
||||
|
||||
<com.android.systemui.statusbar.policy.DateView
|
||||
android:id="@+id/date"
|
||||
@@ -71,7 +72,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="48dp"
|
||||
android:layout_weight="1"
|
||||
- android:gravity="center_vertical|end" >
|
||||
+ android:gravity="center_vertical|end"
|
||||
+ android:paddingEnd="@dimen/status_bar_padding_end" >
|
||||
|
||||
<include layout="@layout/ongoing_privacy_chip" />
|
||||
|
||||
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||
index da80b85b38bf..59a55d3a1197 100644
|
||||
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
|
||||
@@ -53,9 +53,6 @@
|
||||
<!-- end margin for multi user switch in collapsed quick settings -->
|
||||
<dimen name="multi_user_switch_keyguard_margin">6dp</dimen>
|
||||
|
||||
- <!-- Margin on the left side of the carrier text on Keyguard -->
|
||||
- <dimen name="keyguard_carrier_text_margin">24dp</dimen>
|
||||
-
|
||||
<!-- The width/height of the phone/camera/unlock icon on keyguard. -->
|
||||
<dimen name="keyguard_affordance_height">80dp</dimen>
|
||||
<dimen name="keyguard_affordance_width">120dp</dimen>
|
||||
@@ -64,9 +61,6 @@
|
||||
phone hints. -->
|
||||
<dimen name="edge_tap_area_width">80dp</dimen>
|
||||
|
||||
- <!-- Margin on the right side of the system icon group on Keyguard. -->
|
||||
- <dimen name="system_icons_keyguard_padding_end">2dp</dimen>
|
||||
-
|
||||
<!-- Screen pinning request width -->
|
||||
<dimen name="screen_pinning_request_width">400dp</dimen>
|
||||
<!-- Screen pinning request bottom button circle widths -->
|
||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||
index 661a03aa9671..879f20ea8328 100644
|
||||
--- a/packages/SystemUI/res/values/dimens.xml
|
||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||
@@ -450,7 +450,7 @@
|
||||
<dimen name="system_icons_super_container_margin_start">16dp</dimen>
|
||||
|
||||
<!-- Margin end of the system icons super container when the avatar is missing. -->
|
||||
- <dimen name="system_icons_super_container_avatarless_margin_end">6dp</dimen>
|
||||
+ <dimen name="system_icons_super_container_avatarless_margin_end">0dp</dimen>
|
||||
|
||||
<!-- Width for the notification panel and related windows -->
|
||||
<dimen name="match_parent">-1px</dimen>
|
||||
@@ -871,7 +871,7 @@
|
||||
<dimen name="kg_framed_avatar_size">32dp</dimen>
|
||||
|
||||
<!-- Margin on the left side of the carrier text on Keyguard -->
|
||||
- <dimen name="keyguard_carrier_text_margin">16dp</dimen>
|
||||
+ <dimen name="keyguard_carrier_text_margin">@dimen/status_bar_padding_start</dimen>
|
||||
|
||||
<!-- Margin on the left side of the battery % in the header. -->
|
||||
<dimen name="header_battery_margin_expanded">6dp</dimen>
|
||||
@@ -880,7 +880,7 @@
|
||||
<dimen name="header_battery_margin_keyguard">6dp</dimen>
|
||||
|
||||
<!-- Margin on the right side of the system icon group on Keyguard. -->
|
||||
- <dimen name="system_icons_keyguard_padding_end">4dp</dimen>
|
||||
+ <dimen name="system_icons_keyguard_padding_end">@dimen/status_bar_padding_end</dimen>
|
||||
|
||||
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
|
||||
from Keyguard. -->
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
||||
index 8cbfefcb4fea..d8dde9cab7ef 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
||||
@@ -386,7 +386,9 @@ public class QuickStatusBarHeader extends FrameLayout {
|
||||
StatusBarWindowView.paddingNeededForCutoutAndRoundedCorner(
|
||||
cutout, cornerCutoutPadding, -1);
|
||||
mDatePrivacyView.setPadding(padding.first, 0, padding.second, 0);
|
||||
- mClockIconsView.setPadding(padding.first, 0, padding.second, 0);
|
||||
+ if (cutout == null) {
|
||||
+ mDateContainer.setPadding(0, 0, 0, 0);
|
||||
+ }
|
||||
LinearLayout.LayoutParams datePrivacySeparatorLayoutParams =
|
||||
(LinearLayout.LayoutParams) mDatePrivacySeparator.getLayoutParams();
|
||||
LinearLayout.LayoutParams mClockIconsSeparatorLayoutParams =
|
||||
@@ -476,10 +478,6 @@ public class QuickStatusBarHeader extends FrameLayout {
|
||||
mWaterfallTopInset,
|
||||
paddingRight,
|
||||
0);
|
||||
- mClockIconsView.setPadding(paddingLeft,
|
||||
- mWaterfallTopInset,
|
||||
- paddingRight,
|
||||
- 0);
|
||||
}
|
||||
|
||||
public void updateEverything() {
|
||||
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 4d6886714120..2ac8b3fe7bdb 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||
@@ -162,23 +162,12 @@ public class KeyguardStatusBarView extends RelativeLayout implements
|
||||
lp.setMarginStart(getResources().getDimensionPixelSize(
|
||||
R.dimen.system_icons_super_container_margin_start));
|
||||
mSystemIconsContainer.setLayoutParams(lp);
|
||||
- mSystemIconsContainer.setPaddingRelative(mSystemIconsContainer.getPaddingStart(),
|
||||
- mSystemIconsContainer.getPaddingTop(),
|
||||
- getResources().getDimensionPixelSize(R.dimen.system_icons_keyguard_padding_end),
|
||||
- mSystemIconsContainer.getPaddingBottom());
|
||||
|
||||
// Respect font size setting.
|
||||
mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
||||
getResources().getDimensionPixelSize(
|
||||
com.android.internal.R.dimen.text_size_small_material));
|
||||
- lp = (MarginLayoutParams) mCarrierLabel.getLayoutParams();
|
||||
|
||||
- int marginStart = calculateMargin(
|
||||
- getResources().getDimensionPixelSize(R.dimen.keyguard_carrier_text_margin),
|
||||
- mPadding.first);
|
||||
- lp.setMarginStart(marginStart);
|
||||
-
|
||||
- mCarrierLabel.setLayoutParams(lp);
|
||||
updateKeyguardStatusBarHeight();
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,322 @@
|
||||
From ac9ca429fc99fd2e879567617f52fc15d6b6e33b Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 19 Oct 2021 12:11:24 +0000
|
||||
Subject: [PATCH 10/16] Revert "monet: Add support for monet (cam16)"
|
||||
|
||||
This reverts commit f4460c9cb0494ddcc1829b05298d140fa1afc526.
|
||||
---
|
||||
.../com/android/systemui/monet/ColorScheme.kt | 168 ------------------
|
||||
.../com/android/systemui/monet/Shades.java | 19 --
|
||||
.../theme/ThemeOverlayController.java | 55 ++----
|
||||
3 files changed, 10 insertions(+), 232 deletions(-)
|
||||
delete mode 100644 packages/SystemUI/src/com/android/systemui/monet/ColorScheme.kt
|
||||
delete mode 100644 packages/SystemUI/src/com/android/systemui/monet/Shades.java
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/monet/ColorScheme.kt b/packages/SystemUI/src/com/android/systemui/monet/ColorScheme.kt
|
||||
deleted file mode 100644
|
||||
index 56a9c805ca81..000000000000
|
||||
--- a/packages/SystemUI/src/com/android/systemui/monet/ColorScheme.kt
|
||||
+++ /dev/null
|
||||
@@ -1,168 +0,0 @@
|
||||
-package com.android.systemui.monet
|
||||
-
|
||||
-import android.app.WallpaperColors
|
||||
-import android.graphics.Color
|
||||
-import com.android.internal.graphics.ColorUtils
|
||||
-import com.android.internal.graphics.cam.Cam
|
||||
-import com.android.internal.graphics.cam.CamUtils
|
||||
-import kotlin.math.absoluteValue
|
||||
-import kotlin.math.roundToInt
|
||||
-
|
||||
-public class ColorScheme(i: Int, val darkTheme: Boolean) {
|
||||
- val accent1: List<Int>
|
||||
- val accent2: List<Int>
|
||||
- val accent3: List<Int>
|
||||
- val neutral1: List<Int>
|
||||
- val neutral2: List<Int>
|
||||
-
|
||||
- init {
|
||||
- val fromInt = Cam.fromInt(if (i == 0) -14979341 else i)
|
||||
- val hue = fromInt.hue
|
||||
- accent1 = Shades.of(hue, fromInt.chroma.coerceAtLeast(48.0f)).toList()
|
||||
- accent2 = Shades.of(hue, 16.0f).toList()
|
||||
- accent3 = Shades.of(60.0f + hue, 32.0f).toList()
|
||||
- neutral1 = Shades.of(hue, 4.0f).toList()
|
||||
- neutral2 = Shades.of(hue, 8.0f).toList()
|
||||
- }
|
||||
-
|
||||
- val accentColors1: List<Int>
|
||||
- get() {
|
||||
- return accent1
|
||||
- }
|
||||
-
|
||||
- val allAccentColors: List<Int>
|
||||
- get() {
|
||||
- val arrayList = mutableListOf<Int>()
|
||||
- arrayList.addAll(accent1)
|
||||
- arrayList.addAll(accent2)
|
||||
- arrayList.addAll(accent3)
|
||||
- return arrayList
|
||||
- }
|
||||
-
|
||||
- val allNeutralColors: List<Int>
|
||||
- get() {
|
||||
- val arrayList = mutableListOf<Int>()
|
||||
- arrayList.addAll(neutral1)
|
||||
- arrayList.addAll(neutral2)
|
||||
- return arrayList
|
||||
- }
|
||||
-
|
||||
- override fun toString(): String {
|
||||
- return "ColorScheme {\n" +
|
||||
- " neutral1: ${humanReadable(neutral1)}\n" +
|
||||
- " neutral2: ${humanReadable(neutral2)}\n" +
|
||||
- " accent1: ${humanReadable(accent1)}\n" +
|
||||
- " accent2: ${humanReadable(accent2)}\n" +
|
||||
- " accent3: ${humanReadable(accent3)}\n" +
|
||||
- "}"
|
||||
- }
|
||||
-
|
||||
- companion object {
|
||||
- @JvmStatic
|
||||
- fun getSeedColor(wallpaperColors: WallpaperColors): Int {
|
||||
- return getSeedColors(wallpaperColors).first()
|
||||
- }
|
||||
-
|
||||
- @JvmStatic
|
||||
- fun getSeedColors(wallpaperColors: WallpaperColors): List<Int> {
|
||||
- val intValue2 = wallpaperColors.allColors.values.reduce { a, b -> a + b }.toDouble()
|
||||
- val z2 = (intValue2 == 0.0)
|
||||
- if (z2) {
|
||||
- val list2 = wallpaperColors.mainColors.map {
|
||||
- it.toArgb()
|
||||
- }.distinct().filter {
|
||||
- Cam.fromInt(it).chroma >= 15.0f && CamUtils.lstarFromInt(it) >= 10.0f
|
||||
- }.toList()
|
||||
-
|
||||
- if (list2.isEmpty()) {
|
||||
- return listOf(-14979341)
|
||||
- }
|
||||
- return list2
|
||||
- }
|
||||
-
|
||||
- val linkedHashMap = wallpaperColors.allColors.mapValues { it.value.toDouble() / intValue2 }
|
||||
-
|
||||
- val linkedHashMap2 = wallpaperColors.allColors.mapValues { Cam.fromInt(it.key) }
|
||||
-
|
||||
- val huePopulation = huePopulations(linkedHashMap2, linkedHashMap)
|
||||
-
|
||||
- val linkedHashMap3 = wallpaperColors.allColors.mapValues {
|
||||
- val cam = linkedHashMap2[it.key]!!
|
||||
- val i = cam.hue.roundToInt()
|
||||
- val i2 = i - 15
|
||||
- val i3 = i + 15
|
||||
- var d = 0.0
|
||||
- for (a in i2..i3) {
|
||||
- d += huePopulation[wrapDegrees(a)]
|
||||
- }
|
||||
- d
|
||||
- }
|
||||
-
|
||||
- val linkedHashMap4 = linkedHashMap2.filter {
|
||||
- val key4 = it.key
|
||||
- val lstarFromInt = CamUtils.lstarFromInt(key4)
|
||||
- val d2 = linkedHashMap3[key4]!!
|
||||
- it.value.chroma >= 15.0f && lstarFromInt >= 10.0f && (z2 || d2 > 0.01)
|
||||
- }
|
||||
-
|
||||
- val arrayList3 = mutableListOf<Int>()
|
||||
- val linkedHashMap5 = linkedHashMap4.mapValues {
|
||||
- score(it.value, linkedHashMap3[it.key]!!)
|
||||
- }
|
||||
-
|
||||
- val list3 = linkedHashMap5.entries.toMutableList()
|
||||
- list3.sortByDescending { it.value }
|
||||
-
|
||||
- for (entry6 in list3) {
|
||||
- val num2 = entry6.key
|
||||
- val z = arrayList3.find {
|
||||
- val hue1 = linkedHashMap2[num2]!!.hue
|
||||
- val hue2 = linkedHashMap2[it]!!.hue
|
||||
- hueDiff(hue1, hue2) < 15 } != null
|
||||
- if (z) {
|
||||
- continue
|
||||
- }
|
||||
- arrayList3.add(num2)
|
||||
- }
|
||||
-
|
||||
- if (arrayList3.isEmpty()) {
|
||||
- arrayList3.add(-14979341)
|
||||
- }
|
||||
-
|
||||
- return arrayList3;
|
||||
- }
|
||||
-
|
||||
- private fun wrapDegrees(i: Int): Int {
|
||||
- if (i < 0) {
|
||||
- return (i % 360) + 360
|
||||
- }
|
||||
- return if (i >= 360) i % 360 else i
|
||||
- }
|
||||
-
|
||||
- private fun hueDiff(f: Float, f2: Float): Float {
|
||||
- return 180f - ((f - f2).absoluteValue - 180f).absoluteValue
|
||||
- }
|
||||
-
|
||||
- private fun humanReadable(list: List<Int>): String {
|
||||
- return list.joinToString { "#" + Integer.toHexString(it) }
|
||||
- }
|
||||
-
|
||||
- private fun score(cam: Cam, d: Double): Double {
|
||||
- val f = cam.getChroma()
|
||||
- val d2 = if (f < 48.0) 0.1 else 0.3
|
||||
- val d3 = d * 70.0
|
||||
- return ((f - 48.0) * d2) + d3
|
||||
- }
|
||||
-
|
||||
- private fun huePopulations(map: Map<Int, Cam>, map2: Map<Int, Double>): List<Double> {
|
||||
- val arrayList = List(size = 360, init = { 0.0 }).toMutableList()
|
||||
- for (entry in map2.entries) {
|
||||
- val d = map2[entry.key]!!
|
||||
- val cam = map[entry.key]!!
|
||||
- val i2 = cam.hue.roundToInt() % 360
|
||||
- arrayList[i2] = arrayList[i2] + d
|
||||
- }
|
||||
- return arrayList
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/monet/Shades.java b/packages/SystemUI/src/com/android/systemui/monet/Shades.java
|
||||
deleted file mode 100644
|
||||
index 5ab00a1afcb4..000000000000
|
||||
--- a/packages/SystemUI/src/com/android/systemui/monet/Shades.java
|
||||
+++ /dev/null
|
||||
@@ -1,19 +0,0 @@
|
||||
-package com.android.systemui.monet;
|
||||
-
|
||||
-import com.android.internal.annotations.VisibleForTesting;
|
||||
-import com.android.internal.graphics.ColorUtils;
|
||||
-
|
||||
-@VisibleForTesting
|
||||
-public class Shades {
|
||||
- public static int[] of(float f, float f2) {
|
||||
- int[] iArr = new int[12];
|
||||
- iArr[0] = ColorUtils.CAMToColor(f, f2, 99.0f);
|
||||
- iArr[1] = ColorUtils.CAMToColor(f, f2, 95.0f);
|
||||
- int i = 2;
|
||||
- while (i < 12) {
|
||||
- iArr[i] = ColorUtils.CAMToColor(f, f2, i == 6 ? 49.6f : (float) (100 - ((i - 1) * 10)));
|
||||
- i++;
|
||||
- }
|
||||
- return iArr;
|
||||
- }
|
||||
-}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
||||
index 7cd3ae1f8062..81999b534046 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
|
||||
@@ -37,7 +37,6 @@ import android.content.IntentFilter;
|
||||
import android.content.om.FabricatedOverlay;
|
||||
import android.content.om.OverlayIdentifier;
|
||||
import android.content.pm.UserInfo;
|
||||
-import android.content.res.Configuration;
|
||||
import android.database.ContentObserver;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
@@ -48,11 +47,9 @@ import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.Log;
|
||||
-import android.util.TypedValue;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
-import com.android.internal.graphics.ColorUtils;
|
||||
import com.android.systemui.Dumpable;
|
||||
import com.android.systemui.SystemUI;
|
||||
import com.android.systemui.broadcast.BroadcastDispatcher;
|
||||
@@ -62,7 +59,6 @@ import com.android.systemui.dagger.qualifiers.Main;
|
||||
import com.android.systemui.dump.DumpManager;
|
||||
import com.android.systemui.keyguard.WakefulnessLifecycle;
|
||||
import com.android.systemui.settings.UserTracker;
|
||||
-import com.android.systemui.monet.ColorScheme;
|
||||
import com.android.systemui.statusbar.FeatureFlags;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
|
||||
@@ -75,7 +71,6 @@ import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
-import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -408,55 +403,25 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
* Return the main theme color from a given {@link WallpaperColors} instance.
|
||||
*/
|
||||
protected int getNeutralColor(@NonNull WallpaperColors wallpaperColors) {
|
||||
- return ColorScheme.getSeedColor(wallpaperColors);
|
||||
+ return wallpaperColors.getPrimaryColor().toArgb();
|
||||
}
|
||||
|
||||
protected int getAccentColor(@NonNull WallpaperColors wallpaperColors) {
|
||||
- return ColorScheme.getSeedColor(wallpaperColors);
|
||||
- }
|
||||
-
|
||||
- private final boolean inDarkMode() {
|
||||
- return (mContext.getResources().getConfiguration().uiMode
|
||||
- & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
|
||||
+ Color accentCandidate = wallpaperColors.getSecondaryColor();
|
||||
+ if (accentCandidate == null) {
|
||||
+ accentCandidate = wallpaperColors.getTertiaryColor();
|
||||
+ }
|
||||
+ if (accentCandidate == null) {
|
||||
+ accentCandidate = wallpaperColors.getPrimaryColor();
|
||||
+ }
|
||||
+ return accentCandidate.toArgb();
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a color candidate, return an overlay definition.
|
||||
*/
|
||||
protected @Nullable FabricatedOverlay getOverlay(int color, int type) {
|
||||
- ColorScheme colorScheme = new ColorScheme(color, inDarkMode());
|
||||
- List<Integer> colors;
|
||||
- String name;
|
||||
-
|
||||
- if (type == ACCENT) {
|
||||
- colors = colorScheme.getAllAccentColors();
|
||||
- name = "accent";
|
||||
- } else {
|
||||
- colors = colorScheme.getAllNeutralColors();
|
||||
- name = "neutral";
|
||||
- }
|
||||
-
|
||||
- int size = colorScheme.getAccent1().size();
|
||||
- FabricatedOverlay.Builder builder = new FabricatedOverlay.Builder(mContext.getPackageName(), name, "android");
|
||||
-
|
||||
- for (int i = 0; i < colors.size(); i++) {
|
||||
- int lightness = i % size;
|
||||
- int shade = i / size + 1;
|
||||
-
|
||||
- String targetResource;
|
||||
- if (lightness == 0) {
|
||||
- targetResource = "android:color/system_" + name + shade + "_10";
|
||||
- } else if (lightness == 1) {
|
||||
- targetResource = "android:color/system_" + name + shade + "_50";
|
||||
- } else {
|
||||
- targetResource = "android:color/system_" + name + shade + "_" + (lightness - 1) + "00";
|
||||
- }
|
||||
-
|
||||
- builder.setResourceValue(targetResource, TypedValue.TYPE_INT_COLOR_ARGB8,
|
||||
- ColorUtils.setAlphaComponent(colors.get(i).intValue(), 0xFF));
|
||||
- }
|
||||
-
|
||||
- return builder.build();
|
||||
+ return null;
|
||||
}
|
||||
|
||||
private void updateThemeOverlays() {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,273 @@
|
||||
From 7628ee0b937931a503ae11d1b6fb4270afbc9cf6 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 5 Sep 2021 01:20:12 +0000
|
||||
Subject: [PATCH 11/16] Revert "Update RAT icons to match Silk design"
|
||||
|
||||
This reverts commit 084c13c8216f6a899cd3eda04fc1d7acff3d1248.
|
||||
---
|
||||
.../res/drawable/ic_3g_mobiledata.xml | 19 ++++++-----
|
||||
.../res/drawable/ic_4g_mobiledata.xml | 19 ++++++-----
|
||||
.../res/drawable/ic_5g_mobiledata.xml | 20 +++++------
|
||||
.../res/drawable/ic_5g_uc_mobiledata.xml | 33 -------------------
|
||||
.../res/drawable/ic_5g_uw_mobiledata.xml | 33 -------------------
|
||||
.../res/drawable/ic_carrier_wifi.xml | 15 +++++----
|
||||
.../res/drawable/ic_lte_mobiledata.xml | 23 +++++++------
|
||||
.../res/drawable/stat_sys_roaming_large.xml | 10 +++---
|
||||
8 files changed, 59 insertions(+), 113 deletions(-)
|
||||
delete mode 100644 packages/SettingsLib/res/drawable/ic_5g_uc_mobiledata.xml
|
||||
delete mode 100644 packages/SettingsLib/res/drawable/ic_5g_uw_mobiledata.xml
|
||||
|
||||
diff --git a/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
|
||||
index 413a3873f438..0c942bdf993c 100644
|
||||
--- a/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
|
||||
+++ b/packages/SettingsLib/res/drawable/ic_3g_mobiledata.xml
|
||||
@@ -14,14 +14,17 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:width="21dp"
|
||||
- android:height="16dp"
|
||||
- android:viewportWidth="21.0"
|
||||
- android:viewportHeight="16.0">
|
||||
+ android:width="12.35dp"
|
||||
+ android:height="15dp"
|
||||
+ android:viewportWidth="14"
|
||||
+ android:viewportHeight="17">
|
||||
+
|
||||
+ <path
|
||||
+ android:fillColor="#FFFFFFFF"
|
||||
+ android:pathData="M1.9,7.88h0.77c0.5,0,0.88-0.15,1.15-0.46s0.4-0.72,0.4-1.25c0-1.17-0.45-1.75-1.35-1.75c-0.43,0-0.77,0.16-1.02,0.47 S1.49,5.62,1.49,6.13h-1.2c0-0.8,0.24-1.46,0.73-1.97s1.11-0.78,1.86-0.78c0.78,0,1.41,0.25,1.87,0.73S5.43,5.31,5.43,6.2 c0,0.46-0.12,0.89-0.36,1.29S4.52,8.18,4.14,8.37c0.94,0.35,1.41,1.12,1.41,2.33c0,0.89-0.25,1.6-0.74,2.12 c-0.49,0.53-1.14,0.79-1.94,0.79c-0.79,0-1.43-0.25-1.91-0.75c-0.49-0.5-0.73-1.17-0.73-2.01h1.21c0,0.53,0.13,0.95,0.38,1.26 c0.26,0.31,0.6,0.47,1.05,0.47c0.45,0,0.81-0.15,1.08-0.46s0.4-0.77,0.4-1.39c0-1.21-0.57-1.81-1.72-1.81H1.9V7.88z" />
|
||||
<path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M5.29,13.22c-0.57,0 -1.09,-0.11 -1.57,-0.34c-0.47,-0.22 -0.85,-0.54 -1.16,-0.95C2.25,11.52 2.07,11.01 2,10.42l1.47,-0.34c0.07,0.51 0.27,0.92 0.59,1.23c0.32,0.31 0.73,0.46 1.23,0.46c0.52,0 0.94,-0.15 1.26,-0.46c0.33,-0.31 0.49,-0.71 0.49,-1.22c0,-0.51 -0.18,-0.92 -0.53,-1.22c-0.35,-0.31 -0.8,-0.46 -1.36,-0.46H4.37V7.06h0.73c0.47,0 0.86,-0.13 1.18,-0.38c0.32,-0.26 0.48,-0.63 0.48,-1.11c0,-0.42 -0.14,-0.77 -0.41,-1.04C6.08,4.27 5.7,4.14 5.21,4.14c-0.43,0 -0.79,0.13 -1.08,0.38C3.85,4.76 3.67,5.08 3.6,5.48L2.17,5.3C2.23,4.81 2.4,4.38 2.67,4c0.27,-0.38 0.62,-0.69 1.05,-0.91c0.44,-0.22 0.94,-0.34 1.5,-0.34c0.62,0 1.15,0.12 1.6,0.35c0.45,0.23 0.79,0.55 1.04,0.95C8.1,4.46 8.23,4.9 8.23,5.4C8.23,6 8.1,6.48 7.84,6.81C7.58,7.14 7.29,7.4 6.97,7.6v0.08c0.46,0.2 0.84,0.5 1.13,0.91c0.3,0.4 0.45,0.93 0.45,1.58c0,0.58 -0.14,1.1 -0.42,1.55c-0.27,0.46 -0.65,0.82 -1.15,1.09C6.5,13.09 5.93,13.22 5.29,13.22z"/>
|
||||
+ android:fillColor="#FFFFFFFF"
|
||||
+ android:pathData="M13.77,12.24l-0.22,0.27c-0.63,0.73-1.55,1.1-2.76,1.1c-1.08,0-1.92-0.36-2.53-1.07c-0.61-0.71-0.93-1.72-0.94-3.02V7.56 c0-1.39,0.28-2.44,0.84-3.13s1.39-1.04,2.51-1.04c0.95,0,1.69,0.26,2.23,0.79s0.83,1.28,0.89,2.26h-1.25 C12.47,5.82,12.3,5.33,12,4.98s-0.74-0.52-1.34-0.52c-0.72,0-1.24,0.23-1.57,0.7S8.59,6.37,8.58,7.4v2.03c0,1,0.19,1.77,0.57,2.31 c0.38,0.54,0.93,0.8,1.65,0.8c0.67,0,1.19-0.16,1.54-0.49l0.18-0.17V9.59H10.7V8.52h3.07V12.24z" />
|
||||
<path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M14.44,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83c-0.38,-0.79 -0.57,-1.71 -0.57,-2.76c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11L17.3,6.01c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6h-1.41v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.78,13.07 15.17,13.22 14.44,13.22z"/>
|
||||
+ android:pathData="M 0 0 H 14 V 17 H 0 V 0 Z" />
|
||||
</vector>
|
||||
diff --git a/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
|
||||
index 1de7d78ff5f2..535f3589ea6b 100644
|
||||
--- a/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
|
||||
+++ b/packages/SettingsLib/res/drawable/ic_4g_mobiledata.xml
|
||||
@@ -14,14 +14,17 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:width="22dp"
|
||||
- android:height="16dp"
|
||||
- android:viewportWidth="22.0"
|
||||
- android:viewportHeight="16.0">
|
||||
+ android:width="12.35dp"
|
||||
+ android:height="15dp"
|
||||
+ android:viewportWidth="14"
|
||||
+ android:viewportHeight="17">
|
||||
+
|
||||
+ <path
|
||||
+ android:fillColor="#FFFFFFFF"
|
||||
+ android:pathData="M5.07,10.13h1.11v1.03H5.07v2.31H3.86v-2.31H0.1v-0.75l3.7-6.9h1.27V10.13z M1.44,10.13h2.42V5.4L1.44,10.13z" />
|
||||
<path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M2,10.98V9.81l4.28,-6.83h1.6v6.59h1.19v1.41H7.88V13H6.4v-2.02H2zM3.68,9.57H6.4V5.33H6.31L3.68,9.57z"/>
|
||||
+ android:fillColor="#FFFFFFFF"
|
||||
+ android:pathData="M13.9,12.24l-0.22,0.27c-0.63,0.73-1.55,1.1-2.76,1.1c-1.08,0-1.92-0.36-2.53-1.07c-0.61-0.71-0.93-1.72-0.94-3.02V7.56 c0-1.39,0.28-2.44,0.84-3.13s1.39-1.04,2.51-1.04c0.95,0,1.69,0.26,2.23,0.79s0.83,1.28,0.89,2.26h-1.25 c-0.05-0.62-0.22-1.1-0.52-1.45s-0.74-0.52-1.34-0.52c-0.72,0-1.24,0.23-1.57,0.7S8.72,6.37,8.71,7.4v2.03 c0,1,0.19,1.77,0.57,2.31c0.38,0.54,0.93,0.8,1.65,0.8c0.67,0,1.19-0.16,1.54-0.49l0.18-0.17V9.59h-1.82V8.52h3.07V12.24z" />
|
||||
<path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M15,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83c-0.38,-0.79 -0.57,-1.71 -0.57,-2.76c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27c-0.28,0.56 -0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6h-1.41v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C16.34,13.07 15.73,13.22 15,13.22z"/>
|
||||
+ android:pathData="M 0 0 H 14 V 17 H 0 V 0 Z" />
|
||||
</vector>
|
||||
diff --git a/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
|
||||
index d961c6c2266f..2aa6e57f6f82 100644
|
||||
--- a/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
|
||||
+++ b/packages/SettingsLib/res/drawable/ic_5g_mobiledata.xml
|
||||
@@ -14,14 +14,14 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:width="21dp"
|
||||
- android:height="16dp"
|
||||
- android:viewportWidth="21.0"
|
||||
- android:viewportHeight="16.0">
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M5.3,13.22c-0.57,0 -1.1,-0.11 -1.58,-0.34c-0.48,-0.22 -0.87,-0.55 -1.18,-0.98C2.24,11.47 2.06,10.93 2,10.3l1.48,-0.2c0.07,0.5 0.25,0.92 0.56,1.25c0.32,0.32 0.74,0.48 1.26,0.48c0.57,0 1.02,-0.18 1.34,-0.55c0.33,-0.37 0.49,-0.87 0.49,-1.48c0,-0.61 -0.16,-1.09 -0.49,-1.46C6.32,7.96 5.88,7.78 5.32,7.78C5,7.78 4.7,7.85 4.42,8C4.15,8.14 3.93,8.33 3.76,8.56L2.28,7.92l0.6,-4.94h5.26v1.36H4.1L3.72,7.02l0.08,0.03C4,6.87 4.25,6.73 4.55,6.62c0.3,-0.12 0.63,-0.18 1.01,-0.18c0.6,0 1.13,0.14 1.6,0.41C7.62,7.11 7.98,7.5 8.24,8c0.27,0.5 0.41,1.1 0.41,1.79c0,0.66 -0.14,1.26 -0.43,1.78c-0.28,0.51 -0.67,0.92 -1.18,1.22C6.55,13.08 5.97,13.22 5.3,13.22z"/>
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M14.51,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83C10.19,9.95 10,9.03 10,7.99c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6H17.6v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.85,13.07 15.24,13.22 14.51,13.22z"/>
|
||||
+ android:width="14dp"
|
||||
+ android:height="17dp"
|
||||
+ android:viewportWidth="14"
|
||||
+ android:viewportHeight="17">
|
||||
+ <path
|
||||
+ android:fillColor="#FF000000"
|
||||
+ android:pathData="M13.9,12.24l-0.22,0.27c-0.63,0.73 -1.55,1.1 -2.76,1.1c-1.08,0 -1.92,-0.36 -2.53,-1.07s-0.93,-1.72 -0.94,-3.02V7.56c0,-1.39 0.28,-2.44 0.84,-3.13s1.39,-1.04 2.51,-1.04c0.95,0 1.69,0.26 2.23,0.79s0.83,1.28 0.89,2.26h-1.25c-0.05,-0.62 -0.22,-1.1 -0.52,-1.45s-0.74,-0.52 -1.34,-0.52c-0.72,0 -1.24,0.23 -1.57,0.7S8.72,6.37 8.71,7.4v2.03c0,1 0.19,1.77 0.57,2.31c0.38,0.54 0.93,0.8 1.65,0.8c0.67,0 1.19,-0.16 1.54,-0.49l0.18,-0.17V9.59h-1.82V8.52h3.07V12.24z"/>
|
||||
+ <path
|
||||
+ android:fillColor="#FF000000"
|
||||
+ android:pathData="M1.15,8.47l0.43,-4.96h4.33v1.17H2.6L2.37,7.39C2.78,7.1 3.22,6.96 3.69,6.96c0.77,0 1.38,0.3 1.83,0.9s0.66,1.41 0.66,2.43c0,1.03 -0.24,1.84 -0.72,2.43S4.32,13.6 3.48,13.6c-0.75,0 -1.36,-0.24 -1.83,-0.73s-0.74,-1.16 -0.81,-2.02h1.13c0.07,0.57 0.23,1 0.49,1.29c0.26,0.29 0.59,0.43 1.01,0.43c0.47,0 0.84,-0.2 1.1,-0.61c0.26,-0.41 0.4,-0.96 0.4,-1.65c0,-0.65 -0.14,-1.18 -0.43,-1.59S3.88,8.09 3.4,8.09c-0.4,0 -0.72,0.1 -0.96,0.31L2.11,8.73L1.15,8.47z"/>
|
||||
</vector>
|
||||
diff --git a/packages/SettingsLib/res/drawable/ic_5g_uc_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_5g_uc_mobiledata.xml
|
||||
deleted file mode 100644
|
||||
index 93fcad298c3f..000000000000
|
||||
--- a/packages/SettingsLib/res/drawable/ic_5g_uc_mobiledata.xml
|
||||
+++ /dev/null
|
||||
@@ -1,33 +0,0 @@
|
||||
-<!--
|
||||
- Copyright (C) 2021 The Android Open Source Project
|
||||
-
|
||||
- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- you may not use this file except in compliance with the License.
|
||||
- You may obtain a copy of the License at
|
||||
-
|
||||
- http://www.apache.org/licenses/LICENSE-2.0
|
||||
-
|
||||
- Unless required by applicable law or agreed to in writing, software
|
||||
- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- See the License for the specific language governing permissions and
|
||||
- limitations under the License.
|
||||
--->
|
||||
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:width="27dp"
|
||||
- android:height="16dp"
|
||||
- android:viewportWidth="27.0"
|
||||
- android:viewportHeight="16.0">
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M5.3,13.22c-0.57,0 -1.1,-0.11 -1.58,-0.34c-0.48,-0.22 -0.87,-0.55 -1.18,-0.98C2.24,11.47 2.06,10.93 2,10.3l1.48,-0.2c0.07,0.5 0.25,0.92 0.56,1.25c0.32,0.32 0.74,0.48 1.26,0.48c0.57,0 1.02,-0.18 1.34,-0.55c0.33,-0.37 0.49,-0.87 0.49,-1.48c0,-0.61 -0.16,-1.09 -0.49,-1.46C6.32,7.96 5.88,7.78 5.32,7.78C5,7.78 4.7,7.85 4.42,8C4.15,8.14 3.93,8.33 3.76,8.56L2.28,7.92l0.6,-4.94h5.26v1.36H4.1L3.72,7.02l0.08,0.03C4,6.87 4.25,6.73 4.55,6.62c0.3,-0.12 0.63,-0.18 1.01,-0.18c0.6,0 1.13,0.14 1.6,0.41C7.62,7.11 7.98,7.5 8.24,8c0.27,0.5 0.41,1.1 0.41,1.79c0,0.66 -0.14,1.26 -0.43,1.78c-0.28,0.51 -0.67,0.92 -1.18,1.22C6.55,13.08 5.97,13.22 5.3,13.22z"/>
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M14.51,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83C10.19,9.95 10,9.03 10,7.99c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6H17.6v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.85,13.07 15.24,13.22 14.51,13.22z"/>
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M23,7.39c-0.53,0 -0.94,-0.16 -1.25,-0.47C21.45,6.6 21.3,6.16 21.3,5.6V3h0.8v2.66c0,0.3 0.08,0.54 0.23,0.71C22.48,6.54 22.7,6.62 23,6.62c0.3,0 0.52,-0.08 0.67,-0.25c0.15,-0.17 0.23,-0.41 0.23,-0.71V3h0.8v2.6c0,0.36 -0.07,0.67 -0.2,0.94s-0.33,0.48 -0.58,0.62C23.65,7.32 23.35,7.39 23,7.39z"/>
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M22.99,13.1c-0.39,0 -0.73,-0.09 -1.03,-0.28c-0.3,-0.19 -0.53,-0.45 -0.7,-0.79C21.08,11.7 21,11.3 21,10.85c0,-0.46 0.08,-0.85 0.25,-1.19c0.17,-0.34 0.41,-0.6 0.71,-0.78c0.3,-0.18 0.65,-0.28 1.04,-0.28c0.31,0 0.59,0.05 0.86,0.16c0.26,0.11 0.48,0.27 0.65,0.48c0.18,0.21 0.28,0.48 0.32,0.8l-0.83,0.14c-0.06,-0.26 -0.17,-0.46 -0.35,-0.6C23.49,9.44 23.27,9.37 23,9.37c-0.22,0 -0.42,0.06 -0.61,0.17c-0.18,0.11 -0.32,0.28 -0.43,0.5c-0.1,0.22 -0.16,0.49 -0.16,0.81c0,0.32 0.05,0.58 0.16,0.8s0.25,0.39 0.43,0.5c0.18,0.11 0.38,0.17 0.61,0.17c0.26,0 0.47,-0.07 0.65,-0.21c0.18,-0.14 0.3,-0.34 0.35,-0.59l0.85,0.09c-0.06,0.29 -0.17,0.54 -0.32,0.77c-0.15,0.22 -0.36,0.39 -0.61,0.52C23.66,13.03 23.35,13.1 22.99,13.1z"/>
|
||||
-</vector>
|
||||
diff --git a/packages/SettingsLib/res/drawable/ic_5g_uw_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_5g_uw_mobiledata.xml
|
||||
deleted file mode 100644
|
||||
index ca47b6ff2edb..000000000000
|
||||
--- a/packages/SettingsLib/res/drawable/ic_5g_uw_mobiledata.xml
|
||||
+++ /dev/null
|
||||
@@ -1,33 +0,0 @@
|
||||
-<!--
|
||||
- Copyright (C) 2021 The Android Open Source Project
|
||||
-
|
||||
- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- you may not use this file except in compliance with the License.
|
||||
- You may obtain a copy of the License at
|
||||
-
|
||||
- http://www.apache.org/licenses/LICENSE-2.0
|
||||
-
|
||||
- Unless required by applicable law or agreed to in writing, software
|
||||
- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- See the License for the specific language governing permissions and
|
||||
- limitations under the License.
|
||||
--->
|
||||
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:width="27dp"
|
||||
- android:height="16dp"
|
||||
- android:viewportWidth="27.0"
|
||||
- android:viewportHeight="16.0">
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M5.3,13.22c-0.57,0 -1.1,-0.11 -1.58,-0.34c-0.48,-0.22 -0.87,-0.55 -1.18,-0.98C2.24,11.47 2.06,10.93 2,10.3l1.48,-0.2c0.07,0.5 0.25,0.92 0.56,1.25c0.32,0.32 0.74,0.48 1.26,0.48c0.57,0 1.02,-0.18 1.34,-0.55c0.33,-0.37 0.49,-0.87 0.49,-1.48c0,-0.61 -0.16,-1.09 -0.49,-1.46C6.32,7.96 5.88,7.78 5.32,7.78C5,7.78 4.7,7.85 4.42,8C4.15,8.14 3.93,8.33 3.76,8.56L2.28,7.92l0.6,-4.94h5.26v1.36H4.1L3.72,7.02l0.08,0.03C4,6.87 4.25,6.73 4.55,6.62c0.3,-0.12 0.63,-0.18 1.01,-0.18c0.6,0 1.13,0.14 1.6,0.41C7.62,7.11 7.98,7.5 8.24,8c0.27,0.5 0.41,1.1 0.41,1.79c0,0.66 -0.14,1.26 -0.43,1.78c-0.28,0.51 -0.67,0.92 -1.18,1.22C6.55,13.08 5.97,13.22 5.3,13.22z"/>
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M14.51,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83C10.19,9.95 10,9.03 10,7.99c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27s-0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6H17.6v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C15.85,13.07 15.24,13.22 14.51,13.22z"/>
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M23,7.39c-0.53,0 -0.94,-0.16 -1.25,-0.47C21.45,6.6 21.3,6.16 21.3,5.6V3h0.8v2.66c0,0.3 0.08,0.54 0.23,0.71C22.48,6.54 22.7,6.62 23,6.62c0.3,0 0.52,-0.08 0.67,-0.25c0.15,-0.17 0.23,-0.41 0.23,-0.71V3h0.8v2.6c0,0.36 -0.07,0.67 -0.2,0.94s-0.33,0.48 -0.58,0.62C23.65,7.32 23.35,7.39 23,7.39z"/>
|
||||
- <path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M21.41,13L20.3,8.7h0.73l0.64,2.78l0.07,0.38h0.04l0.09,-0.38l0.81,-2.78h0.66l0.79,2.78l0.09,0.37h0.04l0.07,-0.37l0.65,-2.78h0.72L24.59,13H23.9l-0.78,-2.84l-0.1,-0.41h-0.04l-0.1,0.41L22.08,13H21.41z"/>
|
||||
-</vector>
|
||||
diff --git a/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml b/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
|
||||
index 22bcf7b8c8a3..ed9d85e3cbe4 100644
|
||||
--- a/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
|
||||
+++ b/packages/SettingsLib/res/drawable/ic_carrier_wifi.xml
|
||||
@@ -14,14 +14,17 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:width="24dp"
|
||||
- android:height="16dp"
|
||||
- android:viewportWidth="24.0"
|
||||
- android:viewportHeight="16.0">
|
||||
+ android:width="38dp"
|
||||
+ android:height="24dp"
|
||||
+ android:viewportWidth="38.0"
|
||||
+ android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
- android:pathData="M4.59,13L2,2.98h1.69l1.5,6.48l0.17,0.88h0.08l0.21,-0.88l1.89,-6.48h1.54l1.83,6.48l0.21,0.87h0.08l0.15,-0.87l1.51,-6.48h1.68L12.01,13H10.4L8.58,6.36L8.36,5.4H8.27L8.05,6.36L6.16,13H4.59z"/>
|
||||
+ android:pathData="M9.45,14.48h1.8c-0.05,0.98 -0.24,1.82 -0.6,2.53c-0.35,0.7 -0.85,1.24 -1.51,1.62c-0.66,0.38 -1.48,0.57 -2.47,0.57c-0.71,0 -1.35,-0.14 -1.92,-0.42c-0.57,-0.28 -1.06,-0.68 -1.47,-1.2c-0.4,-0.53 -0.71,-1.16 -0.93,-1.89c-0.21,-0.74 -0.32,-1.56 -0.32,-2.48v-2.63c0,-0.91 0.11,-1.74 0.32,-2.47c0.22,-0.74 0.54,-1.36 0.95,-1.88C3.71,5.69 4.21,5.29 4.8,5.01c0.6,-0.28 1.28,-0.42 2.03,-0.42c0.92,0 1.71,0.19 2.34,0.56c0.64,0.36 1.14,0.9 1.48,1.61c0.35,0.7 0.55,1.57 0.59,2.59h-1.8C9.41,8.59 9.29,7.98 9.1,7.52C8.91,7.04 8.63,6.69 8.26,6.47C7.9,6.24 7.42,6.13 6.84,6.13c-0.52,0 -0.97,0.1 -1.36,0.31C5.1,6.65 4.79,6.95 4.54,7.34C4.3,7.72 4.12,8.19 3.99,8.74c-0.12,0.54 -0.18,1.15 -0.18,1.82v2.65c0,0.62 0.05,1.21 0.15,1.75c0.1,0.54 0.27,1.02 0.49,1.43c0.23,0.4 0.52,0.72 0.89,0.95c0.36,0.23 0.81,0.34 1.33,0.34c0.66,0 1.18,-0.11 1.56,-0.32c0.38,-0.21 0.67,-0.56 0.85,-1.03C9.27,15.85 9.39,15.23 9.45,14.48z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
- android:pathData="M15.77,9.85V8.56h2.46V6.1h1.3v2.46H22v1.29h-2.46v2.46h-1.3V9.85H15.77z"/>
|
||||
+ android:pathData="M24.87,4.78l-1.74,9.72l-0.2,1.64l-0.29,-1.44l-2.21,-9.92l-0.2,0l-1.06,0l-0.22,0l-2.28,9.92l-0.28,1.4l-0.18,-1.59l-1.78,-9.73l-1.79,0l2.83,14.22l0.34,0l0.92,0l0.35,0l2.48,-10.36l0.14,-0.84l0.15,0.84l2.36,10.36l0.36,0l0.92,0l0.34,0l2.82,-14.22z"/>
|
||||
+ <path
|
||||
+ android:fillColor="#FF000000"
|
||||
+ android:pathData="M35.72,6.32l0,-1.54l-5.61,0l-0.34,0l-1.45,0l0,14.22l1.79,0l0,-6.28l4.8,0l0,-1.54l-4.8,0l0,-4.86z"/>
|
||||
</vector>
|
||||
diff --git a/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
|
||||
index 739e29d886c2..e6b4fb698242 100644
|
||||
--- a/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
|
||||
+++ b/packages/SettingsLib/res/drawable/ic_lte_mobiledata.xml
|
||||
@@ -14,17 +14,20 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:width="26dp"
|
||||
- android:height="16dp"
|
||||
- android:viewportWidth="26.0"
|
||||
- android:viewportHeight="16.0">
|
||||
+ android:width="15.88dp"
|
||||
+ android:height="15dp"
|
||||
+ android:viewportWidth="18"
|
||||
+ android:viewportHeight="17">
|
||||
+
|
||||
+ <path
|
||||
+ android:fillColor="#FFFFFFFF"
|
||||
+ android:pathData="M1.34,12.4h3.9v1.07H0.08V3.52h1.26V12.4z" />
|
||||
<path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M2,13V2.98h1.53v8.57H8.3V13H2z"/>
|
||||
+ android:fillColor="#FFFFFFFF"
|
||||
+ android:pathData="M11.1,4.6H8.48v8.88H7.23V4.6H4.62V3.52h6.48V4.6z" />
|
||||
<path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M11.24,13V4.43H8.19V2.98h7.63v1.46h-3.05V13H11.24z"/>
|
||||
+ android:fillColor="#FFFFFFFF"
|
||||
+ android:pathData="M17.34,8.88h-3.52v3.53h4.1v1.07h-5.35V3.52h5.28V4.6h-4.03V7.8h3.52V8.88z" />
|
||||
<path
|
||||
- android:fillColor="#FF000000"
|
||||
- android:pathData="M17.41,13V2.98h6.36v1.46h-4.83v2.65h4.4v1.46h-4.4v3.01h4.83V13H17.41z"/>
|
||||
+ android:pathData="M 0 0 H 18 V 17 H 0 V 0 Z" />
|
||||
</vector>
|
||||
diff --git a/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml b/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
|
||||
index 48faeb22416f..1511659ea42f 100644
|
||||
--- a/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
|
||||
+++ b/packages/SystemUI/res/drawable/stat_sys_roaming_large.xml
|
||||
@@ -14,11 +14,11 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:width="16dp"
|
||||
- android:height="16dp"
|
||||
- android:viewportWidth="16.0"
|
||||
- android:viewportHeight="16.0">
|
||||
+ android:width="@dimen/signal_icon_size"
|
||||
+ android:height="@dimen/signal_icon_size"
|
||||
+ android:viewportWidth="24.0"
|
||||
+ android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
- android:pathData="M4.5,13.02V3h3.93c0.97,0 1.75,0.27 2.34,0.81c0.6,0.53 0.9,1.28 0.9,2.25c0,0.63 -0.19,1.2 -0.56,1.74c-0.37,0.53 -0.95,0.91 -1.74,1.12l2.45,4.02v0.08h-1.69L7.75,9.09H6.03v3.93H4.5zM8.46,4.44H6.03v3.23h2.44c0.49,0 0.9,-0.14 1.2,-0.41c0.31,-0.28 0.46,-0.69 0.46,-1.22s-0.15,-0.93 -0.45,-1.2C9.38,4.58 8.98,4.44 8.46,4.44z"/>
|
||||
+ android:pathData="M14.21,12.81c0.36,-0.16 0.69,-0.36 0.97,-0.61c0.41,-0.38 0.72,-0.83 0.94,-1.37c0.21,-0.54 0.32,-1.14 0.32,-1.79c0,-0.92 -0.16,-1.7 -0.49,-2.33c-0.32,-0.64 -0.79,-1.12 -1.43,-1.45c-0.62,-0.33 -1.4,-0.49 -2.32,-0.49H8.23V19h1.8v-5.76h2.5L15.06,19h1.92v-0.12L14.21,12.81zM10.03,11.71V6.32h2.18c0.59,0 1.06,0.11 1.42,0.34c0.36,0.22 0.62,0.54 0.78,0.95c0.16,0.41 0.24,0.89 0.24,1.44c0,0.49 -0.09,0.93 -0.27,1.34c-0.18,0.4 -0.46,0.73 -0.82,0.97c-0.36,0.23 -0.82,0.35 -1.37,0.35H10.03z"/>
|
||||
</vector>
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,72 @@
|
||||
From 1ff9c15ea9fa247beb1320f3cc88d066394d6355 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 7 Oct 2020 14:00:35 +0000
|
||||
Subject: [PATCH 12/16] UI: Always render windows into cutouts
|
||||
|
||||
Eliminates black/white letterboxing
|
||||
Quick and dirty way to do the latter - wait for proper fix from Google
|
||||
|
||||
Change-Id: I4661c7979bfa7de453329fcddbaeefc2009e2da3
|
||||
---
|
||||
.../com/android/server/wm/DisplayFrames.java | 31 +++----------------
|
||||
.../com/android/server/wm/DisplayPolicy.java | 2 +-
|
||||
2 files changed, 5 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/wm/DisplayFrames.java b/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||
index 32e43ca4e56c..18c28ae674f9 100644
|
||||
--- a/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||
+++ b/services/core/java/com/android/server/wm/DisplayFrames.java
|
||||
@@ -98,33 +98,10 @@ public class DisplayFrames {
|
||||
state.setDisplayCutout(cutout);
|
||||
state.setRoundedCorners(roundedCorners);
|
||||
state.setPrivacyIndicatorBounds(indicatorBounds);
|
||||
- if (!cutout.isEmpty()) {
|
||||
- if (cutout.getSafeInsetLeft() > 0) {
|
||||
- safe.left = unrestricted.left + cutout.getSafeInsetLeft();
|
||||
- }
|
||||
- if (cutout.getSafeInsetTop() > 0) {
|
||||
- safe.top = unrestricted.top + cutout.getSafeInsetTop();
|
||||
- }
|
||||
- if (cutout.getSafeInsetRight() > 0) {
|
||||
- safe.right = unrestricted.right - cutout.getSafeInsetRight();
|
||||
- }
|
||||
- if (cutout.getSafeInsetBottom() > 0) {
|
||||
- safe.bottom = unrestricted.bottom - cutout.getSafeInsetBottom();
|
||||
- }
|
||||
- state.getSource(ITYPE_LEFT_DISPLAY_CUTOUT).setFrame(
|
||||
- unrestricted.left, unrestricted.top, safe.left, unrestricted.bottom);
|
||||
- state.getSource(ITYPE_TOP_DISPLAY_CUTOUT).setFrame(
|
||||
- unrestricted.left, unrestricted.top, unrestricted.right, safe.top);
|
||||
- state.getSource(ITYPE_RIGHT_DISPLAY_CUTOUT).setFrame(
|
||||
- safe.right, unrestricted.top, unrestricted.right, unrestricted.bottom);
|
||||
- state.getSource(ITYPE_BOTTOM_DISPLAY_CUTOUT).setFrame(
|
||||
- unrestricted.left, safe.bottom, unrestricted.right, unrestricted.bottom);
|
||||
- } else {
|
||||
- state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
||||
- state.removeSource(ITYPE_TOP_DISPLAY_CUTOUT);
|
||||
- state.removeSource(ITYPE_RIGHT_DISPLAY_CUTOUT);
|
||||
- state.removeSource(ITYPE_BOTTOM_DISPLAY_CUTOUT);
|
||||
- }
|
||||
+ state.removeSource(ITYPE_LEFT_DISPLAY_CUTOUT);
|
||||
+ state.removeSource(ITYPE_TOP_DISPLAY_CUTOUT);
|
||||
+ state.removeSource(ITYPE_RIGHT_DISPLAY_CUTOUT);
|
||||
+ state.removeSource(ITYPE_BOTTOM_DISPLAY_CUTOUT);
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||
index a070942cc76a..32abd1e60714 100644
|
||||
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
|
||||
@@ -1604,7 +1604,7 @@ public class DisplayPolicy {
|
||||
pf.set((fl & FLAG_LAYOUT_IN_SCREEN) == 0 ? attached.getFrame() : df);
|
||||
}
|
||||
|
||||
- final int cutoutMode = attrs.layoutInDisplayCutoutMode;
|
||||
+ final int cutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
|
||||
// Ensure that windows with a DEFAULT or NEVER display cutout mode are laid out in
|
||||
// the cutout safe zone.
|
||||
if (cutoutMode != LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 3e6c3af43dd9f9c780bb678b0af3485f63255f37 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 1 Sep 2021 14:10:50 +0000
|
||||
Subject: [PATCH 13/16] UI: Kill rounded corners in notification scrim
|
||||
|
||||
Rounded corners in S is nicely implemented, but this is one occasion where it looks out of place
|
||||
|
||||
Change-Id: I09ed59e0e658ebd512a9d02a8ef3edfe2c9888da
|
||||
---
|
||||
packages/SystemUI/res/values/dimens.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||
index 879f20ea8328..ad49bf4237b6 100644
|
||||
--- a/packages/SystemUI/res/values/dimens.xml
|
||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||
@@ -760,7 +760,7 @@
|
||||
<item name="keyguard_clock_line_spacing_scale_burmese" type="dimen" format="float">1</item>
|
||||
|
||||
<item name="scrim_behind_alpha" format="float" type="dimen">0.62</item>
|
||||
- <dimen name="notification_scrim_corner_radius">32dp</dimen>
|
||||
+ <dimen name="notification_scrim_corner_radius">0dp</dimen>
|
||||
|
||||
<!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
|
||||
<dimen name="keyguard_min_swipe_amount">110dp</dimen>
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 26e5a2cc1640b3de6881d9e02f910765341c146a Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Mon, 26 Oct 2020 14:06:56 +0000
|
||||
Subject: [PATCH 14/16] UI: Reconfigure power menu items
|
||||
|
||||
Screenshot/airplane are broken as of now
|
||||
|
||||
Change-Id: I32cca6e2c6bb64d891efee959127edf7c0802cbc
|
||||
---
|
||||
core/res/res/values/config.xml | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index 18804e472478..c52fa8427069 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -2947,13 +2947,8 @@
|
||||
"logout" = Logout the current user
|
||||
-->
|
||||
<string-array translatable="false" name="config_globalActionsList">
|
||||
- <item>emergency</item>
|
||||
- <item>lockdown</item>
|
||||
<item>power</item>
|
||||
<item>restart</item>
|
||||
- <item>logout</item>
|
||||
- <item>screenshot</item>
|
||||
- <item>bugreport</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Number of milliseconds to hold a wake lock to ensure that drawing is fully
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From b0b4ff2c65c6eb6e5182134db272d5bdf9d0cef0 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 29 Jun 2021 22:57:01 +0000
|
||||
Subject: [PATCH 15/16] UI: Relax requirement for HINT_SUPPORTS_DARK_TEXT
|
||||
|
||||
I decide what's good enough for a wallpaper!
|
||||
|
||||
Change-Id: I5ccd85b3df12e53746a4ac6cbc37ba8d11f6c336
|
||||
---
|
||||
core/java/android/app/WallpaperColors.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
|
||||
index 7ef0a19ec44c..8dbf94a9caad 100644
|
||||
--- a/core/java/android/app/WallpaperColors.java
|
||||
+++ b/core/java/android/app/WallpaperColors.java
|
||||
@@ -543,7 +543,7 @@ public final class WallpaperColors implements Parcelable {
|
||||
|
||||
int hints = 0;
|
||||
double meanLuminance = totalLuminance / pixels.length;
|
||||
- if (meanLuminance > BRIGHT_IMAGE_MEAN_LUMINANCE && darkPixels < maxDarkPixels) {
|
||||
+ if (meanLuminance > BRIGHT_IMAGE_MEAN_LUMINANCE) {
|
||||
hints |= HINT_SUPPORTS_DARK_TEXT;
|
||||
}
|
||||
if (meanLuminance < DARK_THEME_MEAN_LUMINANCE) {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 14441d096f1442c397d65ee31f962f7a8c861ae3 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 19 Oct 2021 12:09:34 +0000
|
||||
Subject: [PATCH 16/16] UI: Remove privacy dot padding
|
||||
|
||||
Change-Id: I5d2e2b3e36f027b4348a83030d4b4d3c4f0209d1
|
||||
---
|
||||
packages/SystemUI/res/values/dimens.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
|
||||
index ad49bf4237b6..19815aa58acb 100644
|
||||
--- a/packages/SystemUI/res/values/dimens.xml
|
||||
+++ b/packages/SystemUI/res/values/dimens.xml
|
||||
@@ -1271,7 +1271,7 @@
|
||||
<dimen name="ongoing_appops_chip_max_width">76dp</dimen>
|
||||
<dimen name="ongoing_appops_dot_diameter">6dp</dimen>
|
||||
<!-- Total minimum padding to enforce to ensure that the dot can always show -->
|
||||
- <dimen name="ongoing_appops_dot_min_padding">20dp</dimen>
|
||||
+ <dimen name="ongoing_appops_dot_min_padding">0dp</dimen>
|
||||
|
||||
<dimen name="ongoing_appops_dialog_side_margins">@dimen/notification_shade_content_margin_horizontal</dimen>
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,62 @@
|
||||
From f6baebedc09b503e477f7f4f1d83ac494d5028d3 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 8 Jun 2021 12:00:26 +0000
|
||||
Subject: [PATCH] Telephony: Disable SPN retrieval
|
||||
|
||||
Kills "double carrier name" on lock screen
|
||||
Not ideal, but not worth wasting more time on
|
||||
|
||||
Change-Id: I06dd17989194590972e526de85dbacf74eff805e
|
||||
---
|
||||
.../internal/telephony/uicc/IccRecords.java | 25 +++++--------------
|
||||
1 file changed, 6 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/java/com/android/internal/telephony/uicc/IccRecords.java b/src/java/com/android/internal/telephony/uicc/IccRecords.java
|
||||
index b33e899b9..220ed875d 100644
|
||||
--- a/src/java/com/android/internal/telephony/uicc/IccRecords.java
|
||||
+++ b/src/java/com/android/internal/telephony/uicc/IccRecords.java
|
||||
@@ -717,35 +717,22 @@ public abstract class IccRecords extends Handler implements IccConstants {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Return Service Provider Name stored in SIM (EF_SPN=0x6F46) or in RUIM (EF_RUIM_SPN=0x6F41).
|
||||
+ * Return null, disabling Service Provider Name.
|
||||
*
|
||||
- * @return null if SIM is not yet ready or no RUIM entry
|
||||
+ * @return null
|
||||
*/
|
||||
public String getServiceProviderName() {
|
||||
- if (mCarrierTestOverride.isInTestMode()) {
|
||||
- String fakeSpn = mCarrierTestOverride.getFakeSpn();
|
||||
- if (fakeSpn != null) {
|
||||
- return fakeSpn;
|
||||
- }
|
||||
- }
|
||||
- return mSpn;
|
||||
+ return null;
|
||||
}
|
||||
|
||||
/**
|
||||
- * Return Service Provider Name stored in SIM (EF_SPN=0x6F46) or in RUIM (EF_RUIM_SPN=0x6F41) or
|
||||
- * the brand override. The brand override has higher priority than the SPN from SIM.
|
||||
+ * Return null, disabling Service Provider Name.
|
||||
*
|
||||
- * @return service provider name.
|
||||
+ * @return null
|
||||
*/
|
||||
@Nullable
|
||||
public String getServiceProviderNameWithBrandOverride() {
|
||||
- if (mParentApp != null && mParentApp.getUiccProfile() != null) {
|
||||
- String brandOverride = mParentApp.getUiccProfile().getOperatorBrandOverride();
|
||||
- if (!TextUtils.isEmpty(brandOverride)) {
|
||||
- return brandOverride;
|
||||
- }
|
||||
- }
|
||||
- return mSpn;
|
||||
+ return null;
|
||||
}
|
||||
|
||||
protected void setServiceProviderName(String spn) {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 8a3d38d3148713836c12d85f7fc4a6a366cc00e4 Mon Sep 17 00:00:00 2001
|
||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||
Date: Mon, 4 Mar 2019 14:27:56 +0800
|
||||
Subject: [PATCH] sdk: Do not warn about SELinux and build signature status
|
||||
|
||||
Change-Id: I6e1ca9f2c2f7763364a9a370f444dfe8059d0563
|
||||
---
|
||||
.../org/lineageos/platform/internal/TrustInterfaceService.java | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java b/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
|
||||
index 2dcb938..e9f2dca 100644
|
||||
--- a/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
|
||||
+++ b/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
|
||||
@@ -197,15 +197,6 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||
}
|
||||
|
||||
private void runTestInternal() {
|
||||
- int selinuxStatus = getSELinuxStatus();
|
||||
- if (selinuxStatus != TrustInterface.TRUST_FEATURE_LEVEL_GOOD) {
|
||||
- postNotificationForFeatureInternal(TrustInterface.TRUST_WARN_SELINUX);
|
||||
- }
|
||||
-
|
||||
- int keysStatus = getKeysStatus();
|
||||
- if (keysStatus != TrustInterface.TRUST_FEATURE_LEVEL_GOOD) {
|
||||
- postNotificationForFeatureInternal(TrustInterface.TRUST_WARN_PUBLIC_KEY);
|
||||
- }
|
||||
}
|
||||
|
||||
/* Utils */
|
||||
--
|
||||
2.7.4
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,561 @@
|
||||
From 9dbc9d8105c3df1efe714d509622d338e7b9413f Mon Sep 17 00:00:00 2001
|
||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 26 Dec 2018 22:38:54 +0800
|
||||
Subject: [PATCH 2/3] DeskClock: Revert date and clock to Lollipop style
|
||||
|
||||
Also added dynamic date format based on alarm presence
|
||||
|
||||
Change-Id: I04ce41d4817c794edb1579dc3a493a1cf1e8d658
|
||||
---
|
||||
res/layout-land/main_clock_frame.xml | 1 +
|
||||
res/layout/date_and_next_alarm_time.xml | 6 ++----
|
||||
res/layout/digital_widget.xml | 4 ++--
|
||||
res/layout/digital_widget_sizer.xml | 2 --
|
||||
res/layout/main_clock_frame.xml | 1 +
|
||||
res/layout/stopwatch_time.xml | 1 -
|
||||
res/layout/timer_setup_time.xml | 2 +-
|
||||
res/layout/world_clock_remote_list_item.xml | 8 +++----
|
||||
res/values-h560dp/dimens.xml | 2 +-
|
||||
res/values-h650dp/dimens.xml | 2 +-
|
||||
res/values-v21/styles.xml | 8 +++----
|
||||
res/values-v23/styles.xml | 2 --
|
||||
res/values/dimens.xml | 10 ++++-----
|
||||
res/values/styles.xml | 5 +++--
|
||||
.../alarmclock/DigitalAppWidgetProvider.java | 10 +++++++--
|
||||
src/com/android/deskclock/ClockFragment.java | 21 ++++++++++++-------
|
||||
src/com/android/deskclock/Screensaver.java | 8 ++++---
|
||||
.../deskclock/ScreensaverActivity.java | 8 ++++---
|
||||
src/com/android/deskclock/Utils.java | 16 ++++++++++++--
|
||||
19 files changed, 70 insertions(+), 47 deletions(-)
|
||||
|
||||
diff --git a/res/layout-land/main_clock_frame.xml b/res/layout-land/main_clock_frame.xml
|
||||
index b72f62333..a1fa3557d 100644
|
||||
--- a/res/layout-land/main_clock_frame.xml
|
||||
+++ b/res/layout-land/main_clock_frame.xml
|
||||
@@ -38,6 +38,7 @@
|
||||
<com.android.deskclock.widget.AutoSizingTextClock
|
||||
android:id="@+id/digital_clock"
|
||||
style="@style/display_time"
|
||||
+ android:fontFamily="sans-serif-thin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="none"
|
||||
diff --git a/res/layout/date_and_next_alarm_time.xml b/res/layout/date_and_next_alarm_time.xml
|
||||
index ad25502a8..e4edff237 100644
|
||||
--- a/res/layout/date_and_next_alarm_time.xml
|
||||
+++ b/res/layout/date_and_next_alarm_time.xml
|
||||
@@ -25,8 +25,7 @@
|
||||
android:id="@+id/date"
|
||||
style="@style/body"
|
||||
android:layout_width="wrap_content"
|
||||
- android:layout_height="wrap_content"
|
||||
- android:textAllCaps="true" />
|
||||
+ android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nextAlarmIcon"
|
||||
@@ -45,7 +44,6 @@
|
||||
android:id="@+id/nextAlarm"
|
||||
style="@style/body"
|
||||
android:layout_width="wrap_content"
|
||||
- android:layout_height="wrap_content"
|
||||
- android:textAllCaps="true" />
|
||||
+ android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
\ No newline at end of file
|
||||
diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml
|
||||
index c5b4837a6..7e2bae454 100644
|
||||
--- a/res/layout/digital_widget.xml
|
||||
+++ b/res/layout/digital_widget.xml
|
||||
@@ -43,13 +43,13 @@
|
||||
<TextClock
|
||||
android:id="@+id/date"
|
||||
style="@style/widget_label"
|
||||
+ android:fontFamily="sans-serif"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="none"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
- android:textAllCaps="true"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<ImageView
|
||||
@@ -63,13 +63,13 @@
|
||||
<TextView
|
||||
android:id="@+id/nextAlarm"
|
||||
style="@style/widget_label"
|
||||
+ android:fontFamily="sans-serif"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="none"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
- android:textAllCaps="true"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
diff --git a/res/layout/digital_widget_sizer.xml b/res/layout/digital_widget_sizer.xml
|
||||
index f524cf536..7b08ca590 100644
|
||||
--- a/res/layout/digital_widget_sizer.xml
|
||||
+++ b/res/layout/digital_widget_sizer.xml
|
||||
@@ -46,7 +46,6 @@
|
||||
android:includeFontPadding="false"
|
||||
android:ellipsize="none"
|
||||
android:singleLine="true"
|
||||
- android:textAllCaps="true"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<!-- This view is drawn to a Bitmap and sent to the widget as an icon. -->
|
||||
@@ -71,7 +70,6 @@
|
||||
android:includeFontPadding="false"
|
||||
android:ellipsize="none"
|
||||
android:singleLine="true"
|
||||
- android:textAllCaps="true"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
diff --git a/res/layout/main_clock_frame.xml b/res/layout/main_clock_frame.xml
|
||||
index ab960728f..2042c5b04 100644
|
||||
--- a/res/layout/main_clock_frame.xml
|
||||
+++ b/res/layout/main_clock_frame.xml
|
||||
@@ -51,6 +51,7 @@
|
||||
<com.android.deskclock.widget.AutoSizingTextClock
|
||||
android:id="@+id/digital_clock"
|
||||
style="@style/display_time"
|
||||
+ android:fontFamily="sans-serif-thin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="none"
|
||||
diff --git a/res/layout/stopwatch_time.xml b/res/layout/stopwatch_time.xml
|
||||
index c1895b488..71320fcd0 100644
|
||||
--- a/res/layout/stopwatch_time.xml
|
||||
+++ b/res/layout/stopwatch_time.xml
|
||||
@@ -42,7 +42,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:duplicateParentState="true"
|
||||
- android:fontFamily="sans-serif"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingEnd="30dp"
|
||||
android:paddingStart="3dp"
|
||||
diff --git a/res/layout/timer_setup_time.xml b/res/layout/timer_setup_time.xml
|
||||
index 572063fc6..14e9ea3bb 100644
|
||||
--- a/res/layout/timer_setup_time.xml
|
||||
+++ b/res/layout/timer_setup_time.xml
|
||||
@@ -32,7 +32,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="none"
|
||||
- android:fontFamily="sans-serif"
|
||||
+ android:fontFamily="sans-serif-light"
|
||||
android:fontFeatureSettings="tnum"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
diff --git a/res/layout/world_clock_remote_list_item.xml b/res/layout/world_clock_remote_list_item.xml
|
||||
index 9a69cb517..f5f4eaa21 100644
|
||||
--- a/res/layout/world_clock_remote_list_item.xml
|
||||
+++ b/res/layout/world_clock_remote_list_item.xml
|
||||
@@ -58,13 +58,13 @@
|
||||
<TextView
|
||||
android:id="@+id/city_name_left"
|
||||
style="@style/widget_label"
|
||||
+ android:fontFamily="sans-serif"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
- android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/city_widget_name_font_size" />
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
<TextView
|
||||
android:id="@+id/city_day_left"
|
||||
style="@style/widget_label"
|
||||
+ android:fontFamily="sans-serif"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/style_label_space"
|
||||
@@ -81,7 +82,6 @@
|
||||
android:format24Hour="@string/abbrev_wday"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
- android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/city_widget_name_font_size" />
|
||||
|
||||
@@ -120,13 +120,13 @@
|
||||
<TextView
|
||||
android:id="@+id/city_name_right"
|
||||
style="@style/widget_label"
|
||||
+ android:fontFamily="sans-serif"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
- android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/city_widget_name_font_size" />
|
||||
|
||||
@@ -135,6 +135,7 @@
|
||||
<TextView
|
||||
android:id="@+id/city_day_right"
|
||||
style="@style/widget_label"
|
||||
+ android:fontFamily="sans-serif"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/style_label_space"
|
||||
@@ -143,7 +144,6 @@
|
||||
android:format24Hour="@string/abbrev_wday"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
- android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/city_widget_name_font_size" />
|
||||
|
||||
diff --git a/res/values-h560dp/dimens.xml b/res/values-h560dp/dimens.xml
|
||||
index 003a5ad9f..6e25621ab 100644
|
||||
--- a/res/values-h560dp/dimens.xml
|
||||
+++ b/res/values-h560dp/dimens.xml
|
||||
@@ -16,5 +16,5 @@
|
||||
|
||||
<resources>
|
||||
<!-- The maximum size of the font for the time in widgets. -->
|
||||
- <dimen name="widget_max_clock_font_size">96dp</dimen>
|
||||
+ <dimen name="widget_max_clock_font_size">88dp</dimen>
|
||||
</resources>
|
||||
\ No newline at end of file
|
||||
diff --git a/res/values-h650dp/dimens.xml b/res/values-h650dp/dimens.xml
|
||||
index 2cc58cb32..6e25621ab 100644
|
||||
--- a/res/values-h650dp/dimens.xml
|
||||
+++ b/res/values-h650dp/dimens.xml
|
||||
@@ -16,5 +16,5 @@
|
||||
|
||||
<resources>
|
||||
<!-- The maximum size of the font for the time in widgets. -->
|
||||
- <dimen name="widget_max_clock_font_size">100dp</dimen>
|
||||
+ <dimen name="widget_max_clock_font_size">88dp</dimen>
|
||||
</resources>
|
||||
\ No newline at end of file
|
||||
diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml
|
||||
index f1dca16c0..7bc382a4d 100644
|
||||
--- a/res/values-v21/styles.xml
|
||||
+++ b/res/values-v21/styles.xml
|
||||
@@ -18,17 +18,17 @@
|
||||
<resources>
|
||||
|
||||
<style name="body">
|
||||
- <item name="android:textSize">14sp</item>
|
||||
+ <item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
- <item name="android:fontFamily">sans-serif-medium</item>
|
||||
+ <item name="android:fontFamily">sans-serif</item>
|
||||
</style>
|
||||
|
||||
<style name="PrimaryLabelTextAppearance" parent="PrimaryLabelTextParentAppearance">
|
||||
- <item name="android:fontFamily">sans-serif-medium</item>
|
||||
+ <item name="android:fontFamily">sans-serif</item>
|
||||
</style>
|
||||
|
||||
<style name="SecondaryLabelTextAppearance" parent="SecondaryLabelTextParentAppearance">
|
||||
- <item name="android:fontFamily">sans-serif-medium</item>
|
||||
+ <item name="android:fontFamily">sans-serif</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
diff --git a/res/values-v23/styles.xml b/res/values-v23/styles.xml
|
||||
index 34dcf5d73..6bf964256 100644
|
||||
--- a/res/values-v23/styles.xml
|
||||
+++ b/res/values-v23/styles.xml
|
||||
@@ -26,8 +26,6 @@
|
||||
</style>
|
||||
|
||||
<style name="widget_label" parent="label">
|
||||
- <item name="android:textAllCaps">true</item>
|
||||
- <item name="android:letterSpacing">0.15</item>
|
||||
<item name="android:shadowRadius">@dimen/widget_shadow_radius</item>
|
||||
<item name="android:shadowColor">@color/widget_shadow_color</item>
|
||||
<item name="android:shadowDx">@dimen/widget_shadow_dx</item>
|
||||
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
|
||||
index 6a384e94b..442fdb1cc 100644
|
||||
--- a/res/values/dimens.xml
|
||||
+++ b/res/values/dimens.xml
|
||||
@@ -44,7 +44,7 @@
|
||||
<dimen name="alarm_lockscreen_bottom_margin">40dp</dimen>
|
||||
|
||||
<dimen name="main_clock_font_size">64sp</dimen>
|
||||
- <dimen name="main_clock_digital_font_size">90sp</dimen>
|
||||
+ <dimen name="main_clock_digital_font_size">88sp</dimen>
|
||||
<dimen name="main_clock_digital_padding">24dp</dimen>
|
||||
<dimen name="big_font_size">32sp</dimen>
|
||||
<dimen name="label_font_size">16sp</dimen>
|
||||
@@ -93,15 +93,15 @@
|
||||
<dimen name="digital_widget_city_24_medium_font_size">40sp</dimen>
|
||||
|
||||
<!-- The fixed size of the font for the city name / day of week in the city widget. -->
|
||||
- <dimen name="city_widget_name_font_size">10dp</dimen>
|
||||
+ <dimen name="city_widget_name_font_size">12dp</dimen>
|
||||
<!-- The maximum size of the font for the time in widgets. -->
|
||||
<dimen name="widget_max_clock_font_size">88dp</dimen>
|
||||
<dimen name="widget_min_world_city_list_size">80dp</dimen>
|
||||
|
||||
<!-- shadow styles for widget text with drop shadows -->
|
||||
- <item name="widget_shadow_radius" format="float" type="dimen">2.75</item>
|
||||
- <item name="widget_shadow_dx" format="float" type="dimen">2.0</item>
|
||||
- <item name="widget_shadow_dy" format="float" type="dimen">2.0</item>
|
||||
+ <item name="widget_shadow_radius" format="float" type="dimen">0</item>
|
||||
+ <item name="widget_shadow_dx" format="float" type="dimen">0</item>
|
||||
+ <item name="widget_shadow_dy" format="float" type="dimen">0</item>
|
||||
|
||||
<!-- Divider height -->
|
||||
<dimen name="hairline_height">1dp</dimen>
|
||||
diff --git a/res/values/styles.xml b/res/values/styles.xml
|
||||
index fbe62ae3a..ca60e46b8 100644
|
||||
--- a/res/values/styles.xml
|
||||
+++ b/res/values/styles.xml
|
||||
@@ -51,12 +51,13 @@
|
||||
<style name="world_clock_time">
|
||||
<item name="android:textSize">48sp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
- <item name="android:fontFamily">sans-serif-light</item>
|
||||
+ <item name="android:fontFamily">sans-serif-thin</item>
|
||||
</style>
|
||||
|
||||
<style name="body">
|
||||
- <item name="android:textSize">14sp</item>
|
||||
+ <item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
+ <item name="android:fontFamily">sans-serif</item>
|
||||
</style>
|
||||
|
||||
<style name="big_thin">
|
||||
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||
index 3be07eca7..86f1d991e 100644
|
||||
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
|
||||
@@ -453,7 +453,13 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||
*/
|
||||
private static String getDateFormat(Context context) {
|
||||
final Locale locale = Locale.getDefault();
|
||||
- final String skeleton = context.getString(R.string.abbrev_wday_month_day_no_year);
|
||||
+ final String nextAlarmTime = Utils.getNextAlarm(context);
|
||||
+ final String skeleton;
|
||||
+ if (TextUtils.isEmpty(nextAlarmTime)) {
|
||||
+ skeleton = context.getString(R.string.full_wday_month_day_no_year);
|
||||
+ } else {
|
||||
+ skeleton = context.getString(R.string.abbrev_wday_month_day_no_year);
|
||||
+ }
|
||||
return DateFormat.getBestDateTimePattern(locale, skeleton);
|
||||
}
|
||||
|
||||
@@ -495,7 +501,7 @@ public class DigitalAppWidgetProvider extends AppWidgetProvider {
|
||||
private int getClockFontSizePx() { return mClockFontSizePx; }
|
||||
private void setClockFontSizePx(int clockFontSizePx) {
|
||||
mClockFontSizePx = clockFontSizePx;
|
||||
- mFontSizePx = max(1, round(clockFontSizePx / 7.5f));
|
||||
+ mFontSizePx = max(1, round(clockFontSizePx / 5.5f));
|
||||
mIconFontSizePx = (int) (mFontSizePx * 1.4f);
|
||||
mIconPaddingPx = mFontSizePx / 3;
|
||||
}
|
||||
diff --git a/src/com/android/deskclock/ClockFragment.java b/src/com/android/deskclock/ClockFragment.java
|
||||
index b487e52be..1459094ee 100644
|
||||
--- a/src/com/android/deskclock/ClockFragment.java
|
||||
+++ b/src/com/android/deskclock/ClockFragment.java
|
||||
@@ -80,6 +80,7 @@ public final class ClockFragment extends DeskClockFragment {
|
||||
private SelectedCitiesAdapter mCityAdapter;
|
||||
private RecyclerView mCityList;
|
||||
private String mDateFormat;
|
||||
+ private String mDateFormatAlarm;
|
||||
private String mDateFormatForAccessibility;
|
||||
|
||||
/**
|
||||
@@ -103,11 +104,12 @@ public final class ClockFragment extends DeskClockFragment {
|
||||
|
||||
final View fragmentView = inflater.inflate(R.layout.clock_fragment, container, false);
|
||||
|
||||
- mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
|
||||
+ mDateFormat = getString(R.string.full_wday_month_day_no_year);
|
||||
+ mDateFormatAlarm = getString(R.string.abbrev_wday_month_day_no_year);
|
||||
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
|
||||
|
||||
mCityAdapter = new SelectedCitiesAdapter(getActivity(), mDateFormat,
|
||||
- mDateFormatForAccessibility);
|
||||
+ mDateFormatAlarm, mDateFormatForAccessibility);
|
||||
|
||||
mCityList = (RecyclerView) fragmentView.findViewById(R.id.cities);
|
||||
mCityList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
@@ -129,7 +131,7 @@ public final class ClockFragment extends DeskClockFragment {
|
||||
mDigitalClock = (TextClock) mClockFrame.findViewById(R.id.digital_clock);
|
||||
mAnalogClock = (AnalogClock) mClockFrame.findViewById(R.id.analog_clock);
|
||||
Utils.setClockIconTypeface(mClockFrame);
|
||||
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mClockFrame);
|
||||
+ Utils.updateDate(getActivity(), mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mClockFrame);
|
||||
Utils.setClockStyle(mDigitalClock, mAnalogClock);
|
||||
Utils.setClockSecondsEnabled(mDigitalClock, mAnalogClock);
|
||||
}
|
||||
@@ -146,7 +148,8 @@ public final class ClockFragment extends DeskClockFragment {
|
||||
|
||||
final Activity activity = getActivity();
|
||||
|
||||
- mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
|
||||
+ mDateFormat = getString(R.string.full_wday_month_day_no_year);
|
||||
+ mDateFormatAlarm = getString(R.string.abbrev_wday_month_day_no_year);
|
||||
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
|
||||
|
||||
// Watch for system events that effect clock time or format.
|
||||
@@ -348,13 +351,15 @@ public final class ClockFragment extends DeskClockFragment {
|
||||
private final Context mContext;
|
||||
private final boolean mIsPortrait;
|
||||
private final boolean mShowHomeClock;
|
||||
- private final String mDateFormat;
|
||||
- private final String mDateFormatForAccessibility;
|
||||
+ private static String mDateFormat;
|
||||
+ private static String mDateFormatAlarm;
|
||||
+ private static String mDateFormatForAccessibility;
|
||||
|
||||
private SelectedCitiesAdapter(Context context, String dateFormat,
|
||||
- String dateFormatForAccessibility) {
|
||||
+ String dateFormatAlarm, String dateFormatForAccessibility) {
|
||||
mContext = context;
|
||||
mDateFormat = dateFormat;
|
||||
+ mDateFormatAlarm = dateFormatAlarm;
|
||||
mDateFormatForAccessibility = dateFormatForAccessibility;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
mIsPortrait = Utils.isPortrait(context);
|
||||
@@ -541,7 +546,7 @@ public final class ClockFragment extends DeskClockFragment {
|
||||
String dateFormatForAccessibility, boolean showHairline) {
|
||||
Utils.refreshAlarm(context, itemView);
|
||||
|
||||
- Utils.updateDate(dateFormat, dateFormatForAccessibility, itemView);
|
||||
+ Utils.updateDate(context, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, itemView);
|
||||
Utils.setClockStyle(mDigitalClock, mAnalogClock);
|
||||
mHairline.setVisibility(showHairline ? VISIBLE : GONE);
|
||||
|
||||
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
|
||||
index 68899d96e..7f01d880a 100644
|
||||
--- a/src/com/android/deskclock/Screensaver.java
|
||||
+++ b/src/com/android/deskclock/Screensaver.java
|
||||
@@ -43,6 +43,7 @@ public final class Screensaver extends DreamService {
|
||||
private MoveScreensaverRunnable mPositionUpdater;
|
||||
|
||||
private String mDateFormat;
|
||||
+ private String mDateFormatAlarm;
|
||||
private String mDateFormatForAccessibility;
|
||||
|
||||
private View mContentView;
|
||||
@@ -63,7 +64,7 @@ public final class Screensaver extends DreamService {
|
||||
private final Runnable mMidnightUpdater = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mContentView);
|
||||
+ Utils.updateDate(Screensaver.this, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mContentView);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,7 +85,8 @@ public final class Screensaver extends DreamService {
|
||||
setTheme(R.style.Theme_DeskClock);
|
||||
super.onCreate();
|
||||
|
||||
- mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
|
||||
+ mDateFormat = getString(R.string.full_wday_month_day_no_year);
|
||||
+ mDateFormatAlarm = getString(R.string.abbrev_wday_month_day_no_year);
|
||||
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
|
||||
}
|
||||
|
||||
@@ -129,7 +131,7 @@ public final class Screensaver extends DreamService {
|
||||
getContentResolver().registerContentObserver(uri, false, mSettingsContentObserver);
|
||||
}
|
||||
|
||||
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mContentView);
|
||||
+ Utils.updateDate(this, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mContentView);
|
||||
Utils.refreshAlarm(this, mContentView);
|
||||
|
||||
startPositionUpdater();
|
||||
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
|
||||
index c7d54af3f..14c9bab00 100644
|
||||
--- a/src/com/android/deskclock/ScreensaverActivity.java
|
||||
+++ b/src/com/android/deskclock/ScreensaverActivity.java
|
||||
@@ -87,11 +87,12 @@ public class ScreensaverActivity extends BaseActivity {
|
||||
private final Runnable mMidnightUpdater = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mContentView);
|
||||
+ Utils.updateDate(ScreensaverActivity.this, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mContentView);
|
||||
}
|
||||
};
|
||||
|
||||
private String mDateFormat;
|
||||
+ private String mDateFormatAlarm;
|
||||
private String mDateFormatForAccessibility;
|
||||
|
||||
private View mContentView;
|
||||
@@ -103,7 +104,8 @@ public class ScreensaverActivity extends BaseActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
- mDateFormat = getString(R.string.abbrev_wday_month_day_no_year);
|
||||
+ mDateFormat = getString(R.string.full_wday_month_day_no_year);
|
||||
+ mDateFormatAlarm = getString(R.string.abbrev_wday_month_day_no_year);
|
||||
mDateFormatForAccessibility = getString(R.string.full_wday_month_day_no_year);
|
||||
|
||||
setContentView(R.layout.desk_clock_saver);
|
||||
@@ -160,7 +162,7 @@ public class ScreensaverActivity extends BaseActivity {
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
- Utils.updateDate(mDateFormat, mDateFormatForAccessibility, mContentView);
|
||||
+ Utils.updateDate(ScreensaverActivity.this, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, mContentView);
|
||||
Utils.refreshAlarm(ScreensaverActivity.this, mContentView);
|
||||
|
||||
startPositionUpdater();
|
||||
diff --git a/src/com/android/deskclock/Utils.java b/src/com/android/deskclock/Utils.java
|
||||
index 6d97912f7..cba5c0909 100644
|
||||
--- a/src/com/android/deskclock/Utils.java
|
||||
+++ b/src/com/android/deskclock/Utils.java
|
||||
@@ -353,6 +353,11 @@ public class Utils {
|
||||
nextAlarmView.setVisibility(View.GONE);
|
||||
nextAlarmIconView.setVisibility(View.GONE);
|
||||
}
|
||||
+
|
||||
+ String mDateFormat = context.getString(R.string.full_wday_month_day_no_year);
|
||||
+ String mDateFormatAlarm = context.getString(R.string.abbrev_wday_month_day_no_year);
|
||||
+ String mDateFormatForAccessibility = context.getString(R.string.full_wday_month_day_no_year);
|
||||
+ Utils.updateDate(context, mDateFormat, mDateFormatAlarm, mDateFormatForAccessibility, clock);
|
||||
}
|
||||
|
||||
public static void setClockIconTypeface(View clock) {
|
||||
@@ -363,14 +368,21 @@ public class Utils {
|
||||
/**
|
||||
* Clock views can call this to refresh their date.
|
||||
**/
|
||||
- public static void updateDate(String dateSkeleton, String descriptionSkeleton, View clock) {
|
||||
+ public static void updateDate(Context context, String dateSkeleton, String dateSkeletonAlarm, String descriptionSkeleton, View clock) {
|
||||
final TextView dateDisplay = (TextView) clock.findViewById(R.id.date);
|
||||
if (dateDisplay == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final Locale l = Locale.getDefault();
|
||||
- final String datePattern = DateFormat.getBestDateTimePattern(l, dateSkeleton);
|
||||
+ final String datePattern;
|
||||
+ final String alarm = getNextAlarm(context);
|
||||
+ if (!TextUtils.isEmpty(alarm)) {
|
||||
+ datePattern = DateFormat.getBestDateTimePattern(l, dateSkeletonAlarm);
|
||||
+ } else {
|
||||
+ datePattern = DateFormat.getBestDateTimePattern(l, dateSkeleton);
|
||||
+ }
|
||||
+
|
||||
final String descriptionPattern = DateFormat.getBestDateTimePattern(l, descriptionSkeleton);
|
||||
|
||||
final Date now = new Date();
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,61 @@
|
||||
From 5778373cb0bfbf81bfb264930a61435a1c5eda2a Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 5 Sep 2021 00:30:33 +0000
|
||||
Subject: [PATCH 3/3] DeskClock: Remove night mode
|
||||
|
||||
Change-Id: I885f39027e78fcda397f1be59d17bc24bc66671a
|
||||
---
|
||||
res/xml/screensaver_settings.xml | 8 +-------
|
||||
src/com/android/deskclock/Screensaver.java | 5 ++---
|
||||
src/com/android/deskclock/ScreensaverActivity.java | 2 +-
|
||||
3 files changed, 4 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/res/xml/screensaver_settings.xml b/res/xml/screensaver_settings.xml
|
||||
index 1680aab83..73375dcfa 100644
|
||||
--- a/res/xml/screensaver_settings.xml
|
||||
+++ b/res/xml/screensaver_settings.xml
|
||||
@@ -24,10 +24,4 @@
|
||||
android:key="screensaver_clock_style"
|
||||
android:title="@string/clock_style" />
|
||||
|
||||
- <CheckBoxPreference
|
||||
- android:defaultValue="true"
|
||||
- android:key="screensaver_night_mode"
|
||||
- android:summary="@string/night_mode_summary"
|
||||
- android:title="@string/night_mode_title" />
|
||||
-
|
||||
-</PreferenceScreen>
|
||||
\ No newline at end of file
|
||||
+</PreferenceScreen>
|
||||
diff --git a/src/com/android/deskclock/Screensaver.java b/src/com/android/deskclock/Screensaver.java
|
||||
index 7f01d880a..b295d7a77 100644
|
||||
--- a/src/com/android/deskclock/Screensaver.java
|
||||
+++ b/src/com/android/deskclock/Screensaver.java
|
||||
@@ -166,9 +166,8 @@ public final class Screensaver extends DreamService {
|
||||
|
||||
private void setClockStyle() {
|
||||
Utils.setScreensaverClockStyle(mDigitalClock, mAnalogClock);
|
||||
- final boolean dimNightMode = DataModel.getDataModel().getScreensaverNightModeOn();
|
||||
- Utils.dimClockView(dimNightMode, mMainClockView);
|
||||
- setScreenBright(!dimNightMode);
|
||||
+ Utils.dimClockView(false, mMainClockView);
|
||||
+ setScreenBright(true);
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/com/android/deskclock/ScreensaverActivity.java b/src/com/android/deskclock/ScreensaverActivity.java
|
||||
index 14c9bab00..912d59b2c 100644
|
||||
--- a/src/com/android/deskclock/ScreensaverActivity.java
|
||||
+++ b/src/com/android/deskclock/ScreensaverActivity.java
|
||||
@@ -119,7 +119,7 @@ public class ScreensaverActivity extends BaseActivity {
|
||||
Utils.setClockIconTypeface(mMainClockView);
|
||||
Utils.setTimeFormat((TextClock) digitalClock, false);
|
||||
Utils.setClockStyle(digitalClock, analogClock);
|
||||
- Utils.dimClockView(true, mMainClockView);
|
||||
+ Utils.dimClockView(false, mMainClockView);
|
||||
analogClock.enableSeconds(false);
|
||||
|
||||
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
|
||||
--
|
||||
2.25.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,93 @@
|
||||
From deccbf542c72d5e1f78e83b3e895eb1f9480ac75 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 28 Oct 2021 02:30:59 +0000
|
||||
Subject: [PATCH] Trebuchet: Make overview scrim transparent again
|
||||
|
||||
Also revert texts/buttons to workspace color
|
||||
|
||||
Change-Id: I78c84865eb06b8e59c9c271cd2e267ae4cd7cc08
|
||||
---
|
||||
quickstep/res/values/styles.xml | 4 ++--
|
||||
quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +-
|
||||
res/color-v31/overview_scrim.xml | 2 +-
|
||||
res/color-v31/overview_scrim_dark.xml | 2 +-
|
||||
res/color/overview_button.xml | 6 +++---
|
||||
5 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
|
||||
index 07c448df9e..c3a3bb8375 100644
|
||||
--- a/quickstep/res/values/styles.xml
|
||||
+++ b/quickstep/res/values/styles.xml
|
||||
@@ -130,7 +130,7 @@
|
||||
parent="@android:style/Widget.DeviceDefault.Button.Borderless">
|
||||
<item name="android:textColor">@color/overview_button</item>
|
||||
<item name="android:drawableTint">@color/overview_button</item>
|
||||
- <item name="android:tint">?android:attr/textColorPrimary</item>
|
||||
+ <item name="android:tint">?attr/workspaceTextColor</item>
|
||||
<item name="android:drawablePadding">8dp</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
@@ -139,4 +139,4 @@
|
||||
<style name="BaseIcon.Workspace.Taskbar" >
|
||||
<item name="iconDisplay">taskbar</item>
|
||||
</style>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
+</resources>
|
||||
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
index b447166d6e..d94a93a909 100644
|
||||
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
|
||||
@@ -606,7 +606,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mEmptyIcon.setCallback(this);
|
||||
mEmptyMessage = context.getText(R.string.recents_empty_message);
|
||||
mEmptyMessagePaint = new TextPaint();
|
||||
- mEmptyMessagePaint.setColor(Themes.getAttrColor(context, android.R.attr.textColorPrimary));
|
||||
+ mEmptyMessagePaint.setColor(Themes.getAttrColor(context, R.attr.workspaceTextColor));
|
||||
mEmptyMessagePaint.setTextSize(getResources()
|
||||
.getDimension(R.dimen.recents_empty_message_text_size));
|
||||
mEmptyMessagePaint.setTypeface(Typeface.create(Themes.getDefaultBodyFont(context),
|
||||
diff --git a/res/color-v31/overview_scrim.xml b/res/color-v31/overview_scrim.xml
|
||||
index 80799957ff..894997c59a 100644
|
||||
--- a/res/color-v31/overview_scrim.xml
|
||||
+++ b/res/color-v31/overview_scrim.xml
|
||||
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
- <item android:color="@android:color/system_neutral2_500" android:lStar="87" />
|
||||
+ <item android:color="@android:color/transparent" />
|
||||
</selector>
|
||||
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
|
||||
index b8ed7747e0..894997c59a 100644
|
||||
--- a/res/color-v31/overview_scrim_dark.xml
|
||||
+++ b/res/color-v31/overview_scrim_dark.xml
|
||||
@@ -14,5 +14,5 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
- <item android:color="@android:color/system_neutral1_800" />
|
||||
+ <item android:color="@android:color/transparent" />
|
||||
</selector>
|
||||
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml
|
||||
index aa48b78604..e638ac2d4a 100644
|
||||
--- a/res/color/overview_button.xml
|
||||
+++ b/res/color/overview_button.xml
|
||||
@@ -2,10 +2,10 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:alpha="1"
|
||||
- android:color="?android:attr/textColorPrimary"
|
||||
+ android:color="?attr/workspaceTextColor"
|
||||
android:state_enabled="true" />
|
||||
<item
|
||||
android:alpha="?android:disabledAlpha"
|
||||
- android:color="?android:attr/textColorPrimary"
|
||||
+ android:color="?attr/workspaceTextColor"
|
||||
android:state_enabled="false" />
|
||||
-</selector>
|
||||
\ No newline at end of file
|
||||
+</selector>
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,80 @@
|
||||
From 9f56f5ced9534094a72c14d996bd21dd7800a059 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 16 Oct 2021 00:33:15 +0000
|
||||
Subject: [PATCH] Replace captive portal URLs globally
|
||||
|
||||
...so that it works even without a SIM inserted, which is a typical usecase of mine
|
||||
URLs from Chinese OEM UIs are faster and more reliable than g.cn and other int'l ones
|
||||
|
||||
Change-Id: Ic3e124b2b62838a2bcf1dad0d670515f3d056964
|
||||
---
|
||||
res/values-mcc460/config.xml | 24 ------------------------
|
||||
res/values/config.xml | 7 +++----
|
||||
2 files changed, 3 insertions(+), 28 deletions(-)
|
||||
delete mode 100644 res/values-mcc460/config.xml
|
||||
|
||||
diff --git a/res/values-mcc460/config.xml b/res/values-mcc460/config.xml
|
||||
deleted file mode 100644
|
||||
index 2863edd7..00000000
|
||||
--- a/res/values-mcc460/config.xml
|
||||
+++ /dev/null
|
||||
@@ -1,24 +0,0 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<resources>
|
||||
- <!-- Network validation URL configuration for devices using a Chinese SIM (MCC 460).
|
||||
- The below URLs are often whitelisted by captive portals, so they should not be used in the
|
||||
- general case as this could degrade the user experience (portals not detected properly).
|
||||
- However in China the default URLs are not accessible in general. The below alternatives
|
||||
- should allow users to connect to local networks normally. -->
|
||||
- <!-- default_captive_portal_https_url is not configured as overlayable so
|
||||
- OEMs that wish to change captive_portal_https_url configuration must
|
||||
- do so via configuring runtime resource overlay to
|
||||
- config_captive_portal_https_url and *NOT* by changing or overlaying
|
||||
- this resource. It will break if the enforcement of overlayable starts.
|
||||
- -->
|
||||
- <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.com/generate_204</string>
|
||||
- <!-- default_captive_portal_fallback_urls is not configured as overlayable
|
||||
- so OEMs that wish to change captive_portal_fallback_urls configuration
|
||||
- must do so via configuring runtime resource overlay to
|
||||
- config_captive_portal_fallback_urls and *NOT* by changing or overlaying
|
||||
- this resource. It will break if the enforcement of overlayable starts.
|
||||
- -->
|
||||
- <string-array name="default_captive_portal_fallback_urls" translatable="false">
|
||||
- <item>http://www.googleapis.cn/generate_204</item>
|
||||
- </string-array>
|
||||
-</resources>
|
||||
diff --git a/res/values/config.xml b/res/values/config.xml
|
||||
index 805ca041..61297dda 100644
|
||||
--- a/res/values/config.xml
|
||||
+++ b/res/values/config.xml
|
||||
@@ -13,7 +13,7 @@
|
||||
config_captive_portal_http_url and *NOT* by changing or overlaying
|
||||
this resource. It will break if the enforcement of overlayable starts.
|
||||
-->
|
||||
- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string>
|
||||
+ <string name="default_captive_portal_http_url" translatable="false">http://conn4.coloros.com/generate204</string>
|
||||
<!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
|
||||
<!-- default_captive_portal_https_url is not configured as overlayable so
|
||||
OEMs that wish to change captive_portal_https_url configuration must
|
||||
@@ -21,7 +21,7 @@
|
||||
config_captive_portal_https_url and *NOT* by changing or overlaying
|
||||
this resource. It will break if the enforcement of overlayable starts.
|
||||
-->
|
||||
- <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string>
|
||||
+ <string name="default_captive_portal_https_url" translatable="false">https://conn4.coloros.com/generate204</string>
|
||||
|
||||
<!-- List of fallback URLs to use for detecting captive portals. -->
|
||||
<!-- default_captive_portal_fallback_urls is not configured as overlayable
|
||||
@@ -31,8 +31,7 @@
|
||||
this resource. It will break if the enforcement of overlayable starts.
|
||||
-->
|
||||
<string-array name="default_captive_portal_fallback_urls" translatable="false">
|
||||
- <item>http://www.google.com/gen_204</item>
|
||||
- <item>http://play.googleapis.com/generate_204</item>
|
||||
+ <item>http://connect.rom.miui.com/generate_204</item>
|
||||
</string-array>
|
||||
<!-- Configuration hooks for the above settings.
|
||||
Empty by default but may be overridden by RROs. -->
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,36 @@
|
||||
From bd33859aa15ad4ab099716b0d029b333c6300134 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 20 Jun 2021 09:09:15 +0000
|
||||
Subject: [PATCH 1/4] build: Integrate prop modifications (2/2)
|
||||
|
||||
Change-Id: I076973f902ab20011964e50955e4326c18d5b34e
|
||||
---
|
||||
build/core/main_version.mk | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/build/core/main_version.mk b/build/core/main_version.mk
|
||||
index 28044e2c..c5aa9617 100644
|
||||
--- a/build/core/main_version.mk
|
||||
+++ b/build/core/main_version.mk
|
||||
@@ -5,17 +5,12 @@ ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||
endif
|
||||
|
||||
# LineageOS System Version
|
||||
+# Do not set Display Versions here, due to Makefile not playing nice with spaces
|
||||
ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||
- ro.lineage.version=$(LINEAGE_VERSION) \
|
||||
ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) \
|
||||
ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \
|
||||
- ro.modversion=$(LINEAGE_VERSION) \
|
||||
ro.lineagelegal.url=https://lineageos.org/legal
|
||||
|
||||
-# LineageOS Platform Display Version
|
||||
-ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||
- ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION)
|
||||
-
|
||||
# LineageOS Platform SDK Version
|
||||
ADDITIONAL_SYSTEM_PROPERTIES += \
|
||||
ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION)
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,40 @@
|
||||
From e3633d610a46dfa849b01ae66ff233e615efa079 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 16 Oct 2021 00:41:07 +0000
|
||||
Subject: [PATCH 2/4] build: Remove Stk (2/2)
|
||||
|
||||
Change-Id: I4e1cfacd296e47ef1731f3c32555089a5fca6f0c
|
||||
---
|
||||
config/data_only.mk | 4 ----
|
||||
config/telephony.mk | 3 +--
|
||||
2 files changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/config/data_only.mk b/config/data_only.mk
|
||||
index 5ff877c9..ab70301b 100644
|
||||
--- a/config/data_only.mk
|
||||
+++ b/config/data_only.mk
|
||||
@@ -1,7 +1,3 @@
|
||||
# World APN list
|
||||
PRODUCT_PACKAGES += \
|
||||
apns-conf.xml
|
||||
-
|
||||
-# Telephony packages
|
||||
-PRODUCT_PACKAGES += \
|
||||
- Stk
|
||||
diff --git a/config/telephony.mk b/config/telephony.mk
|
||||
index 6adf48d9..e63b320d 100644
|
||||
--- a/config/telephony.mk
|
||||
+++ b/config/telephony.mk
|
||||
@@ -8,8 +8,7 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Telephony packages
|
||||
PRODUCT_PACKAGES += \
|
||||
- messaging \
|
||||
- Stk
|
||||
+ messaging
|
||||
|
||||
# Default ringtone
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,23 @@
|
||||
From ef538d98c3401b7324682ebf96f32f28649dc036 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 27 Oct 2021 13:23:31 +0000
|
||||
Subject: [PATCH 3/4] Revert "overlay: Enable monet"
|
||||
|
||||
This reverts commit 97a1727968a2fca85c3bdc419637e9c02fce9ce7.
|
||||
---
|
||||
.../frameworks/base/packages/SystemUI/res/values/flags.xml | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml b/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
|
||||
index d22d0f23..64c6e78b 100644
|
||||
--- a/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
|
||||
+++ b/overlay/common/frameworks/base/packages/SystemUI/res/values/flags.xml
|
||||
@@ -17,5 +17,4 @@
|
||||
<resources>
|
||||
<bool name="flag_conversations">true</bool>
|
||||
<bool name="flag_charging_ripple">true</bool>
|
||||
- <bool name="flag_monet">true</bool>
|
||||
</resources>
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 89941c7836527978fb1834a14e9ad95cb1c5c9d0 Mon Sep 17 00:00:00 2001
|
||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||
Date: Mon, 1 Jul 2019 07:03:04 +0000
|
||||
Subject: [PATCH 4/4] vendor_lineage: Ignore neverallows... again
|
||||
|
||||
Because unofficial builds are better than no builds!
|
||||
|
||||
Change-Id: I4b19d09b28f79c6f5020bf03fdf8931145bca03a
|
||||
---
|
||||
build/core/config.mk | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/build/core/config.mk b/build/core/config.mk
|
||||
index f2e595ff..d6d036a9 100644
|
||||
--- a/build/core/config.mk
|
||||
+++ b/build/core/config.mk
|
||||
@@ -20,5 +20,10 @@ FRAMEWORK_LINEAGE_PLATFORM_API_FILE := $(TOPDIR)lineage-sdk/api/lineage_current.
|
||||
FRAMEWORK_LINEAGE_PLATFORM_REMOVED_API_FILE := $(TOPDIR)lineage-sdk/api/lineage_removed.txt
|
||||
FRAMEWORK_LINEAGE_API_NEEDS_UPDATE_TEXT := $(TOPDIR)vendor/lineage/build/core/apicheck_msg_current.txt
|
||||
|
||||
+# We modify several neverallows, so let the build proceed
|
||||
+ifneq ($(TARGET_BUILD_VARIANT),user)
|
||||
+SELINUX_IGNORE_NEVERALLOWS := true
|
||||
+endif
|
||||
+
|
||||
# Rules for QCOM targets
|
||||
include $(TOPDIR)vendor/lineage/build/core/qcom_target.mk
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 3b33cbc0f0f6642bcb609a3d88e516452147debe Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Mon, 5 Oct 2020 01:51:46 +0000
|
||||
Subject: [PATCH] build: Don't handle apns-conf
|
||||
|
||||
Leave it to vendor/lineage instead
|
||||
|
||||
Change-Id: I51fb1436ee0ee2e33b20ca0810b69e827f3f34dc
|
||||
---
|
||||
target/product/aosp_product.mk | 7 -------
|
||||
target/product/full_base_telephony.mk | 5 -----
|
||||
2 files changed, 12 deletions(-)
|
||||
|
||||
diff --git a/target/product/aosp_product.mk b/target/product/aosp_product.mk
|
||||
index b41c35fb7..bdaa57aac 100644
|
||||
--- a/target/product/aosp_product.mk
|
||||
+++ b/target/product/aosp_product.mk
|
||||
@@ -37,10 +37,3 @@ PRODUCT_PACKAGES += \
|
||||
PhotoTable \
|
||||
preinstalled-packages-platform-aosp-product.xml \
|
||||
WallpaperPicker \
|
||||
-
|
||||
-# Telephony:
|
||||
-# Provide a APN configuration to GSI product
|
||||
-ifeq ($(LINEAGE_BUILD),)
|
||||
-PRODUCT_COPY_FILES += \
|
||||
- device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml
|
||||
-endif
|
||||
diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk
|
||||
index e4f5a162b..5470ad2be 100644
|
||||
--- a/target/product/full_base_telephony.mk
|
||||
+++ b/target/product/full_base_telephony.mk
|
||||
@@ -26,10 +26,5 @@ PRODUCT_VENDOR_PROPERTIES := \
|
||||
PRODUCT_COPY_FILES := \
|
||||
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
|
||||
|
||||
-ifeq ($(LINEAGE_BUILD),)
|
||||
-PRODUCT_COPY_FILES += \
|
||||
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
||||
-endif
|
||||
-
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)
|
||||
--
|
||||
2.25.1
|
||||
|
192
patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch
Normal file
192
patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch
Normal file
@ -0,0 +1,192 @@
|
||||
From defdefa842a5673bac917c9f5c2508aece8eebb8 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 01:43:40 +0000
|
||||
Subject: [PATCH 1/4] treble: Lineage-ify
|
||||
|
||||
Squash of:
|
||||
- Revert "Update lineage.mk for LineageOS 16.0"
|
||||
- Remove fsck SELinux labels
|
||||
- treble: Add overlay-lineage
|
||||
- treble: Don't specify config_wallpaperCropperPackage
|
||||
- treble: Don't handle apns-conf
|
||||
---
|
||||
base-pre.mk | 3 -
|
||||
base.mk | 16 ++--
|
||||
lineage.mk | 1 +
|
||||
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
|
||||
.../base/core/res/res/values/config.xml | 1 -
|
||||
sepolicy/file_contexts | 3 -
|
||||
6 files changed, 91 insertions(+), 14 deletions(-)
|
||||
create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
||||
|
||||
diff --git a/base-pre.mk b/base-pre.mk
|
||||
index 6a317e4..e69de29 100644
|
||||
--- a/base-pre.mk
|
||||
+++ b/base-pre.mk
|
||||
@@ -1,3 +0,0 @@
|
||||
-#Use a more decent APN config
|
||||
-PRODUCT_COPY_FILES += \
|
||||
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
||||
diff --git a/base.mk b/base.mk
|
||||
index 3697c49..0bd6bf0 100644
|
||||
--- a/base.mk
|
||||
+++ b/base.mk
|
||||
@@ -8,12 +8,14 @@ PRODUCT_COPY_FILES := \
|
||||
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
|
||||
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
|
||||
|
||||
-#Use a more decent APN config
|
||||
-PRODUCT_COPY_FILES += \
|
||||
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
||||
-
|
||||
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/phh/treble/sepolicy
|
||||
-PRODUCT_PACKAGE_OVERLAYS += device/phh/treble/overlay
|
||||
+
|
||||
+PRODUCT_PACKAGE_OVERLAYS += \
|
||||
+ device/phh/treble/overlay \
|
||||
+ device/phh/treble/overlay-lineage
|
||||
+
|
||||
+PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += \
|
||||
+ device/phh/treble/overlay-lineage/lineage-sdk
|
||||
|
||||
$(call inherit-product, vendor/hardware_overlay/overlay.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
||||
@@ -30,11 +32,11 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||
ro.build.version.security_patch=$(PLATFORM_SECURITY_PATCH) \
|
||||
ro.adb.secure=0 \
|
||||
ro.logd.auditd=true
|
||||
-
|
||||
+
|
||||
#Huawei HiSuite (also other OEM custom programs I guess) it's of no use in AOSP builds
|
||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||
persist.sys.usb.config=adb \
|
||||
- ro.cust.cdrom=/dev/null
|
||||
+ ro.cust.cdrom=/dev/null
|
||||
|
||||
#VNDK config files
|
||||
PRODUCT_COPY_FILES += \
|
||||
diff --git a/lineage.mk b/lineage.mk
|
||||
index 172bb01..f6315b9 100644
|
||||
--- a/lineage.mk
|
||||
+++ b/lineage.mk
|
||||
@@ -1,3 +1,4 @@
|
||||
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
|
||||
+$(call inherit-product, device/lineage/sepolicy/common/sepolicy.mk)
|
||||
-include vendor/lineage/build/core/config.mk
|
||||
-include vendor/lineage/build/core/apicheck.mk
|
||||
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
||||
new file mode 100644
|
||||
index 0000000..8df673a
|
||||
--- /dev/null
|
||||
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
||||
@@ -0,0 +1,81 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!--
|
||||
+ Copyright (C) 2015-2016 The CyanogenMod Project
|
||||
+ 2017-2018 The LineageOS Project
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+ You may obtain a copy of the License at
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+ Unless required by applicable law or agreed to in writing, software
|
||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ See the License for the specific language governing permissions and
|
||||
+ limitations under the License.
|
||||
+-->
|
||||
+<resources>
|
||||
+ <!-- Whether device has screen with higher aspect ratio -->
|
||||
+ <bool name="config_haveHigherAspectRatioScreen">true</bool>
|
||||
+
|
||||
+ <!-- All the capabilities of the LEDs on this device, stored as a bit field.
|
||||
+ This integer should equal the sum of the corresponding value for each
|
||||
+ of the following capabilities present:
|
||||
+ // Device has a color adjustable battery light.
|
||||
+ LIGHTS_RGB_NOTIFICATION_LED = 1
|
||||
+ // Device has a color adjustable notification light.
|
||||
+ LIGHTS_RGB_BATTERY_LED = 2
|
||||
+ LIGHTS_MULTIPLE_NOTIFICATION_LED = 4 (deprecated)
|
||||
+ // The notification light has adjustable pulsing capability.
|
||||
+ LIGHTS_PULSATING_LED = 8
|
||||
+ // Device has a multi-segment battery light that is able to
|
||||
+ // use the light brightness value to determine how many
|
||||
+ // segments to show (in order to represent battery level).
|
||||
+ LIGHTS_SEGMENTED_BATTERY_LED = 16
|
||||
+ // The notification light supports HAL adjustable brightness
|
||||
+ // via the alpha channel.
|
||||
+ // Note: if a device notification light supports LIGHTS_RGB_NOTIFICATION_LED
|
||||
+ // then HAL support is not necessary for brightness control. In this case,
|
||||
+ // brightness support will be provided by lineage-sdk through the scaling of
|
||||
+ // RGB color values.
|
||||
+ LIGHTS_ADJUSTABLE_NOTIFICATION_LED_BRIGHTNESS = 32
|
||||
+ // Device has a battery light.
|
||||
+ LIGHTS_BATTERY_LED = 64
|
||||
+ // The battery light supports HAL adjustable brightness via
|
||||
+ // the alpha channel.
|
||||
+ // Note: if a device battery light supports LIGHTS_RGB_BATTERY_LED then HAL
|
||||
+ // support is not necessary for brightness control. In this case,
|
||||
+ // brightness support will be provided by lineage-sdk through the scaling of
|
||||
+ // RGB color values.
|
||||
+ LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS = 128
|
||||
+ For example, a device with notification and battery lights that supports
|
||||
+ pulsating and RGB control would set this config to 75. -->
|
||||
+ <integer name="config_deviceLightCapabilities">255</integer>
|
||||
+
|
||||
+ <!-- Hardware keys present on the device, stored as a bit field.
|
||||
+ This integer should equal the sum of the corresponding value for each
|
||||
+ of the following keys present:
|
||||
+ 1 - Home
|
||||
+ 2 - Back
|
||||
+ 4 - Menu
|
||||
+ 8 - Assistant (search)
|
||||
+ 16 - App switch
|
||||
+ 32 - Camera
|
||||
+ 64 - Volume rocker
|
||||
+ For example, a device with Home, Back and Menu keys would set this
|
||||
+ config to 7. -->
|
||||
+ <integer name="config_deviceHardwareKeys">127</integer>
|
||||
+
|
||||
+ <!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
|
||||
+ This integer should equal the sum of the corresponding value for each
|
||||
+ of the following keys present:
|
||||
+ 1 - Home
|
||||
+ 2 - Back
|
||||
+ 4 - Menu
|
||||
+ 8 - Assistant (search)
|
||||
+ 16 - App switch
|
||||
+ 32 - Camera
|
||||
+ 64 - Volume rocker
|
||||
+ For example, a device with Home, Back and Menu keys would set this
|
||||
+ config to 7. -->
|
||||
+ <integer name="config_deviceHardwareWakeKeys">127</integer>
|
||||
+</resources>
|
||||
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
index 2d5c21e..7a15163 100644
|
||||
--- a/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
@@ -22,7 +22,6 @@
|
||||
<string name="config_icon_mask" translatable="false">"M50 0C77.6 0 100 22.4 100 50C100 77.6 77.6 100 50 100C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0Z"</string>
|
||||
<bool name="config_useRoundIcon">true</bool>
|
||||
|
||||
- <string name="config_wallpaperCropperPackage">com.android.wallpaperpicker</string>
|
||||
<bool name="config_unplugTurnsOnScreen">true</bool>
|
||||
<integer name="config_multiuserMaximumUsers">5</integer>
|
||||
<bool name="config_enableMultiUserUI">true</bool>
|
||||
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
|
||||
index 4ae5095..5e39d5b 100644
|
||||
--- a/sepolicy/file_contexts
|
||||
+++ b/sepolicy/file_contexts
|
||||
@@ -6,9 +6,6 @@
|
||||
/system/bin/phh-on-data.sh u:object_r:phhsu_exec:s0
|
||||
/system/bin/asus-motor u:object_r:phhsu_exec:s0
|
||||
|
||||
-#/system/bin/fsck\.exfat u:object_r:fsck_exec:s0
|
||||
-/system/bin/fsck\.ntfs u:object_r:fsck_exec:s0
|
||||
-
|
||||
/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
|
||||
|
||||
/sec_storage(/.*)? u:object_r:teecd_data_file:s0
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,23 @@
|
||||
From 0edf02638abc9086f1c5b9264e2429c1bd0fc7eb Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 09:29:32 +0000
|
||||
Subject: [PATCH 2/4] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
|
||||
|
||||
Change-Id: I725443154fabde548d2e6c1b072d34c27596c421
|
||||
---
|
||||
board-base.mk | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/board-base.mk b/board-base.mk
|
||||
index 1ddacaf..e363dd5 100644
|
||||
--- a/board-base.mk
|
||||
+++ b/board-base.mk
|
||||
@@ -7,3 +7,5 @@ BOARD_ROOT_EXTRA_FOLDERS += bt_firmware sec_storage efs persist
|
||||
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
||||
|
||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
||||
+
|
||||
+BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 5be43b2a36ba7aefef95e5b3dc624a1d6c8d3e4d Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 20 Oct 2021 11:30:25 +0000
|
||||
Subject: [PATCH 3/4] treble: Set TARGET_NO_KERNEL_OVERRIDE
|
||||
|
||||
Taken from Lineage generic targets - skips building kernel cleanly
|
||||
|
||||
Change-Id: Id71d3a3aed56fd4e815a64ef4191b125fc5026ce
|
||||
---
|
||||
board-base.mk | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/board-base.mk b/board-base.mk
|
||||
index e363dd5..3900f97 100644
|
||||
--- a/board-base.mk
|
||||
+++ b/board-base.mk
|
||||
@@ -9,3 +9,5 @@ BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
||||
|
||||
BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
||||
+
|
||||
+TARGET_NO_KERNEL_OVERRIDE := true
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,20 @@
|
||||
From 4a99143b5d49cf82a20f3057d26e7775de6db7d6 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Bo <bvoid@yandex.ru>
|
||||
Date: Tue, 15 Sep 2020 21:26:45 -0400
|
||||
Subject: [PATCH 4/4] add offline charger sepolicy
|
||||
|
||||
---
|
||||
sepolicy/gsicharger.te | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 sepolicy/gsicharger.te
|
||||
|
||||
diff --git a/sepolicy/gsicharger.te b/sepolicy/gsicharger.te
|
||||
new file mode 100644
|
||||
index 0000000..91cfb5c
|
||||
--- /dev/null
|
||||
+++ b/sepolicy/gsicharger.te
|
||||
@@ -0,0 +1 @@
|
||||
+permissive charger;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,42 @@
|
||||
From 21961afe4adcc0e4d56420afaa28ded058178436 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 01:43:40 +0000
|
||||
Subject: [PATCH] Revert "Add suspend_resume trace events to the atrace 'freq'
|
||||
category."
|
||||
|
||||
This reverts commit 581c22f979af05e48ad4843cdfa9605186d286da.
|
||||
|
||||
Change-Id: I48895242e8567e91418c61d67a51de2b42f1008b
|
||||
---
|
||||
cmds/atrace/atrace.cpp | 1 -
|
||||
cmds/atrace/atrace.rc | 2 --
|
||||
2 files changed, 3 deletions(-)
|
||||
|
||||
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
|
||||
index 783a475829..8feba981da 100644
|
||||
--- a/cmds/atrace/atrace.cpp
|
||||
+++ b/cmds/atrace/atrace.cpp
|
||||
@@ -173,7 +173,6 @@ static const TracingCategory k_categories[] = {
|
||||
{ OPT, "events/clk/clk_disable/enable" },
|
||||
{ OPT, "events/clk/clk_enable/enable" },
|
||||
{ OPT, "events/power/cpu_frequency_limits/enable" },
|
||||
- { OPT, "events/power/suspend_resume/enable" },
|
||||
{ OPT, "events/cpuhp/cpuhp_enter/enable" },
|
||||
{ OPT, "events/cpuhp/cpuhp_exit/enable" },
|
||||
{ OPT, "events/cpuhp/cpuhp_pause/enable" },
|
||||
diff --git a/cmds/atrace/atrace.rc b/cmds/atrace/atrace.rc
|
||||
index e3c4edebbd..94e4796f45 100644
|
||||
--- a/cmds/atrace/atrace.rc
|
||||
+++ b/cmds/atrace/atrace.rc
|
||||
@@ -61,8 +61,6 @@ on late-init
|
||||
chmod 0666 /sys/kernel/tracing/events/cpuhp/cpuhp_pause/enable
|
||||
chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_frequency/enable
|
||||
chmod 0666 /sys/kernel/tracing/events/power/gpu_frequency/enable
|
||||
- chmod 0666 /sys/kernel/debug/tracing/events/power/suspend_resume/enable
|
||||
- chmod 0666 /sys/kernel/tracing/events/power/suspend_resume/enable
|
||||
chmod 0666 /sys/kernel/debug/tracing/events/cpufreq_interactive/enable
|
||||
chmod 0666 /sys/kernel/tracing/events/cpufreq_interactive/enable
|
||||
chmod 0666 /sys/kernel/debug/tracing/events/vmscan/mm_vmscan_direct_reclaim_begin/enable
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,38 @@
|
||||
From ed8e7d31d3d96f9ce4f30aa452038d1eb2e9b561 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 4 Sep 2019 21:11:48 +0200
|
||||
Subject: [PATCH 1/3] Panic into recovery rather than bootloader
|
||||
|
||||
Getting last_kmsg/pstore from bootloader isn't possible for other people
|
||||
than the OEM, but we have TWRP to access last_kmsg/pstore
|
||||
|
||||
Change-Id: If04bb6572dc66677d7b44f7d302b2d69ce526200
|
||||
---
|
||||
init/reboot_utils.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/init/reboot_utils.cpp b/init/reboot_utils.cpp
|
||||
index b3fa9fd3b..03b5a6f0e 100644
|
||||
--- a/init/reboot_utils.cpp
|
||||
+++ b/init/reboot_utils.cpp
|
||||
@@ -36,7 +36,7 @@
|
||||
namespace android {
|
||||
namespace init {
|
||||
|
||||
-static std::string init_fatal_reboot_target = "bootloader";
|
||||
+static std::string init_fatal_reboot_target = "recovery";
|
||||
static bool init_fatal_panic = false;
|
||||
|
||||
// this needs to read the /proc/* files directly because it is called before
|
||||
@@ -73,7 +73,7 @@ void SetFatalRebootTarget(const std::optional<std::string>& reboot_target) {
|
||||
init_fatal_reboot_target = value;
|
||||
}
|
||||
});
|
||||
- // We already default to bootloader if no setting is provided.
|
||||
+ // We already default to recovery if no setting is provided.
|
||||
} else {
|
||||
const std::string kRebootTargetStringPattern = kRebootTargetString + "=";
|
||||
start_pos += sizeof(kRebootTargetStringPattern) - 1;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,87 @@
|
||||
From fd8c95c473df2b62fd22ce3711b8ec7cfd2a337b Mon Sep 17 00:00:00 2001
|
||||
From: Victor Bo <bvoid@yandex.ru>
|
||||
Date: Wed, 3 Mar 2021 06:31:17 -0500
|
||||
Subject: [PATCH 2/3] Restore /sbin for Magisk compatibility
|
||||
|
||||
Squash of:
|
||||
- Revert "Do not create /sbin"
|
||||
- Revert "Remove sbin from fs_config.cpp"
|
||||
- add /sbin to the PATH
|
||||
|
||||
Change-Id: I1224c9b64ce8eb14f7d15c8441c0633a7e6a20de
|
||||
---
|
||||
CleanSpec.mk | 2 --
|
||||
libcutils/fs_config.cpp | 3 +++
|
||||
rootdir/Android.mk | 2 +-
|
||||
rootdir/init.environ.rc.in | 1 +
|
||||
4 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CleanSpec.mk b/CleanSpec.mk
|
||||
index 0a534a2bd..81150a0fa 100644
|
||||
--- a/CleanSpec.mk
|
||||
+++ b/CleanSpec.mk
|
||||
@@ -80,8 +80,6 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/vndksp.libraries.txt)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/sbin/charger)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/sbin/charger)
|
||||
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/sbin)
|
||||
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/sbin)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/product_services)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/product_services.img)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/product_services)
|
||||
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
|
||||
index e9497a806..8661c1684 100644
|
||||
--- a/libcutils/fs_config.cpp
|
||||
+++ b/libcutils/fs_config.cpp
|
||||
@@ -80,6 +80,7 @@ static const struct fs_path_config android_dirs[] = {
|
||||
{ 00771, AID_SYSTEM, AID_SYSTEM, 0, "data" },
|
||||
{ 00755, AID_ROOT, AID_SYSTEM, 0, "mnt" },
|
||||
{ 00751, AID_ROOT, AID_SHELL, 0, "product/bin" },
|
||||
+ { 00750, AID_ROOT, AID_SHELL, 0, "sbin" },
|
||||
{ 00751, AID_ROOT, AID_SHELL, 0, "product/apex/*/bin" },
|
||||
{ 00777, AID_ROOT, AID_ROOT, 0, "sdcard" },
|
||||
{ 00751, AID_ROOT, AID_SDCARD_R, 0, "storage" },
|
||||
@@ -166,6 +167,7 @@ static const struct fs_path_config android_files[] = {
|
||||
{ 00600, AID_ROOT, AID_ROOT, 0, "system_ext/build.prop" },
|
||||
{ 00444, AID_ROOT, AID_ROOT, 0, system_ext_conf_dir + 1 },
|
||||
{ 00444, AID_ROOT, AID_ROOT, 0, system_ext_conf_file + 1 },
|
||||
+ { 00750, AID_ROOT, AID_SHELL, 0, "sbin/fs_mgr" },
|
||||
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump32" },
|
||||
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump64" },
|
||||
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/debuggerd" },
|
||||
@@ -217,6 +219,7 @@ static const struct fs_path_config android_files[] = {
|
||||
{ 00750, AID_ROOT, AID_SHELL, 0, "init*" },
|
||||
{ 00755, AID_ROOT, AID_SHELL, 0, "odm/bin/*" },
|
||||
{ 00755, AID_ROOT, AID_SHELL, 0, "product/bin/*" },
|
||||
+ { 00750, AID_ROOT, AID_SHELL, 0, "sbin/*" },
|
||||
{ 00755, AID_ROOT, AID_SHELL, 0, "product/apex/*bin/*" },
|
||||
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" },
|
||||
{ 00755, AID_ROOT, AID_SHELL, 0, "system/xbin/*" },
|
||||
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
|
||||
index 99d8f9a83..6788d2ebf 100644
|
||||
--- a/rootdir/Android.mk
|
||||
+++ b/rootdir/Android.mk
|
||||
@@ -85,7 +85,7 @@ endif
|
||||
#
|
||||
# create some directories (some are mount points) and symlinks
|
||||
LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
|
||||
- dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \
|
||||
+ sbin dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \
|
||||
linkerconfig second_stage_resources postinstall $(BOARD_ROOT_EXTRA_FOLDERS)); \
|
||||
ln -sf /system/bin $(TARGET_ROOT_OUT)/bin; \
|
||||
ln -sf /system/etc $(TARGET_ROOT_OUT)/etc; \
|
||||
diff --git a/rootdir/init.environ.rc.in b/rootdir/init.environ.rc.in
|
||||
index bf6e986c4..090fa5a78 100644
|
||||
--- a/rootdir/init.environ.rc.in
|
||||
+++ b/rootdir/init.environ.rc.in
|
||||
@@ -10,6 +10,7 @@ on early-init
|
||||
export ANDROID_TZDATA_ROOT /apex/com.android.tzdata
|
||||
export EXTERNAL_STORAGE /sdcard
|
||||
export ASEC_MOUNTPOINT /mnt/asec
|
||||
+ export PATH /sbin:/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin
|
||||
%EXPORT_GLOBAL_ASAN_OPTIONS%
|
||||
%EXPORT_GLOBAL_GCOV_OPTIONS%
|
||||
%EXPORT_GLOBAL_CLANG_COVERAGE_OPTIONS%
|
||||
--
|
||||
2.25.1
|
||||
|
52
patches_treble/system_core/0003-fix-offline-charger-v7.patch
Normal file
52
patches_treble/system_core/0003-fix-offline-charger-v7.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 786f091175fad5b95b27e3806f5dd775f992826b Mon Sep 17 00:00:00 2001
|
||||
From: Victor Bo <bvoid@yandex.ru>
|
||||
Date: Wed, 26 Feb 2020 07:23:44 +0200
|
||||
Subject: [PATCH 3/3] fix offline charger v7
|
||||
|
||||
modified: rootdir/init.rc
|
||||
---
|
||||
rootdir/init.rc | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index 376a678a8..6434d06bf 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -11,6 +11,11 @@ import /vendor/etc/init/hw/init.${ro.hardware}.rc
|
||||
import /system/etc/init/hw/init.usb.configfs.rc
|
||||
import /system/etc/init/hw/init.${ro.zygote}.rc
|
||||
|
||||
+service gsicharger /bin/charger
|
||||
+ class gsicharger
|
||||
+ user system
|
||||
+ group system shell input graphics wakelock
|
||||
+
|
||||
# Cgroups are mounted right before early-init using list from /etc/cgroups.json
|
||||
on early-init
|
||||
# Disable sysrq from keyboard
|
||||
@@ -452,7 +457,7 @@ on init
|
||||
# Healthd can trigger a full boot from charger mode by signaling this
|
||||
# property when the power button is held.
|
||||
on property:sys.boot_from_charger_mode=1
|
||||
- class_stop charger
|
||||
+ class_stop gsicharger
|
||||
trigger late-init
|
||||
|
||||
on load_persist_props_action
|
||||
@@ -1090,8 +1095,12 @@ on nonencrypted
|
||||
on property:sys.init_log_level=*
|
||||
loglevel ${sys.init_log_level}
|
||||
|
||||
+on charger && property:ro.hardware=mt*
|
||||
+ write /sys/class/leds/lcd-backlight/trigger "backlight"
|
||||
+ write /sys/class/android_usb/android0/enable 1
|
||||
+
|
||||
on charger
|
||||
- class_start charger
|
||||
+ class_start gsicharger
|
||||
|
||||
on property:vold.decrypt=trigger_load_persist_props
|
||||
load_persist_props
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,24 @@
|
||||
From 4f035a6b34ee9f42774998de1c5008f6bce30a18 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 01:43:40 +0000
|
||||
Subject: [PATCH] Revert "system_suspend: start early"
|
||||
|
||||
This reverts commit cb732f9b635b5f6f79e447ddaf743ebb800b8535.
|
||||
---
|
||||
suspend/1.0/default/android.system.suspend@1.0-service.rc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/suspend/1.0/default/android.system.suspend@1.0-service.rc b/suspend/1.0/default/android.system.suspend@1.0-service.rc
|
||||
index 965ca16..c5d3869 100644
|
||||
--- a/suspend/1.0/default/android.system.suspend@1.0-service.rc
|
||||
+++ b/suspend/1.0/default/android.system.suspend@1.0-service.rc
|
||||
@@ -1,5 +1,5 @@
|
||||
service system_suspend /system/bin/hw/android.system.suspend@1.0-service
|
||||
- class early_hal
|
||||
+ class hal
|
||||
user system
|
||||
group system wakelock
|
||||
capabilities BLOCK_SUSPEND
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,42 @@
|
||||
From ce636dec0d85d9b74352a4defab35697ceffbf5d Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Mon, 5 Oct 2020 01:29:18 +0000
|
||||
Subject: [PATCH] Revert "sepolicy: Relabel wifi. properties as wifi_prop"
|
||||
|
||||
This reverts commit bf52f194873840546c996c232eb44c8427ddcd5c.
|
||||
|
||||
Change-Id: I0446540331684eb57f7e17bcc3273d6247915854
|
||||
---
|
||||
private/property_contexts | 1 -
|
||||
private/system_server.te | 3 ---
|
||||
2 files changed, 4 deletions(-)
|
||||
|
||||
diff --git a/private/property_contexts b/private/property_contexts
|
||||
index 4cec7348d..349e93141 100644
|
||||
--- a/private/property_contexts
|
||||
+++ b/private/property_contexts
|
||||
@@ -201,7 +201,6 @@ qemu.hw.mainkeys u:object_r:qemu_hw_prop:s0 exact string
|
||||
qemu.sf.lcd_density u:object_r:qemu_sf_lcd_density_prop:s0 exact int
|
||||
|
||||
# Shared between system server and wificond
|
||||
-wifi. u:object_r:wifi_prop:s0
|
||||
wlan. u:object_r:wifi_prop:s0
|
||||
|
||||
# Lowpan properties
|
||||
diff --git a/private/system_server.te b/private/system_server.te
|
||||
index 73301c1e9..befe6814e 100644
|
||||
--- a/private/system_server.te
|
||||
+++ b/private/system_server.te
|
||||
@@ -748,9 +748,6 @@ get_prop(system_server, mock_ota_prop)
|
||||
# Read the property as feature flag for protecting apks with fs-verity.
|
||||
get_prop(system_server, apk_verity_prop)
|
||||
|
||||
-# Read wifi.interface
|
||||
-get_prop(system_server, wifi_prop)
|
||||
-
|
||||
# Read the vendor property that indicates if Incremental features is enabled
|
||||
get_prop(system_server, incremental_prop)
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 4c8b1d00c09fa89e02174db9742e5cd214d0afea Mon Sep 17 00:00:00 2001
|
||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 3 Mar 2019 14:07:33 +0800
|
||||
Subject: [PATCH 1/2] build_soong: Disable generated_kernel_headers
|
||||
|
||||
...but done in a way so that there's no need to remove generated_kernel_headers from individual projects - thanks @ExpressLuke
|
||||
|
||||
Change-Id: I630857cec208f1830e776bf5031d7bb9bc4435d0
|
||||
---
|
||||
build/soong/Android.bp | 12 ------------
|
||||
1 file changed, 12 deletions(-)
|
||||
|
||||
diff --git a/build/soong/Android.bp b/build/soong/Android.bp
|
||||
index ecfa9ac5..d8ad460d 100644
|
||||
--- a/build/soong/Android.bp
|
||||
+++ b/build/soong/Android.bp
|
||||
@@ -20,9 +20,6 @@ bootstrap_go_package {
|
||||
lineage_generator {
|
||||
name: "generated_kernel_includes",
|
||||
|
||||
- // The headers make command
|
||||
- cmd: "$(PATH_OVERRIDE_SOONG) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_SOURCE) O=$(KERNEL_BUILD_OUT_PREFIX)$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install",
|
||||
-
|
||||
// Directories that can be imported by a cc_* module generated_headers property
|
||||
export_include_dirs: [
|
||||
"usr/audio/include/uapi",
|
||||
@@ -31,15 +28,6 @@ lineage_generator {
|
||||
"usr/include/audio/include/uapi",
|
||||
"usr/techpack/audio/include",
|
||||
],
|
||||
-
|
||||
- // Sources for dependency tracking
|
||||
- dep_root: "$(TARGET_KERNEL_SOURCE)",
|
||||
- dep_files: [
|
||||
- "Makefile",
|
||||
- "include/**/*",
|
||||
- "arch/$(KERNEL_ARCH)/include/**/*",
|
||||
- "techpack/audio/include/**/*",
|
||||
- ],
|
||||
}
|
||||
|
||||
cc_library_headers {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 39b514256d6808d950595331e0ba7bc72d860290 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 19 Oct 2021 15:48:43 +0000
|
||||
Subject: [PATCH 2/2] vendor_lineage: Disable ADB authentication
|
||||
|
||||
Change-Id: I4370583ecab1c88ef6f42e29d3eaa52c24d13f09
|
||||
---
|
||||
config/common.mk | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/config/common.mk b/config/common.mk
|
||||
index 55aab3f9..f85a7330 100644
|
||||
--- a/config/common.mk
|
||||
+++ b/config/common.mk
|
||||
@@ -13,16 +13,11 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||
ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
|
||||
endif
|
||||
|
||||
-ifeq ($(TARGET_BUILD_VARIANT),eng)
|
||||
# Disable ADB authentication
|
||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0
|
||||
-else
|
||||
-# Enable ADB authentication
|
||||
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=1
|
||||
|
||||
# Disable extra StrictMode features on all non-engineering builds
|
||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += persist.sys.strictmode.disable=true
|
||||
-endif
|
||||
|
||||
# Backup Tool
|
||||
PRODUCT_COPY_FILES += \
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,431 @@
|
||||
From 52882c890900516ce50dcd09d8f5de9d672191df Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 22 Jun 2021 13:38:31 +0000
|
||||
Subject: [PATCH 1/4] Add Meizu 18 vibrator support
|
||||
|
||||
Thanks to:
|
||||
- @phhusson for guidance
|
||||
- Google for marlin HAL as reference in implementing 1.0
|
||||
- @xingrz for Meizu 16th HAL as reference in implementing 1.3
|
||||
|
||||
Change-Id: Iecf12cd814e8773abfd78a19f98e31125a73761a
|
||||
---
|
||||
base.mk | 3 +
|
||||
framework_manifest.xml | 10 ++
|
||||
hal/meizu-vibrator/Android.bp | 31 ++++
|
||||
hal/meizu-vibrator/Vibrator.cpp | 140 ++++++++++++++++++
|
||||
hal/meizu-vibrator/Vibrator.h | 60 ++++++++
|
||||
...oid.hardware.vibrator@1.3-service.meizu.rc | 4 +
|
||||
hal/meizu-vibrator/service.cpp | 72 +++++++++
|
||||
sepolicy/file_contexts | 1 +
|
||||
sepolicy/hal.te | 11 ++
|
||||
9 files changed, 332 insertions(+)
|
||||
create mode 100644 hal/meizu-vibrator/Android.bp
|
||||
create mode 100644 hal/meizu-vibrator/Vibrator.cpp
|
||||
create mode 100644 hal/meizu-vibrator/Vibrator.h
|
||||
create mode 100644 hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.rc
|
||||
create mode 100644 hal/meizu-vibrator/service.cpp
|
||||
|
||||
diff --git a/base.mk b/base.mk
|
||||
index 0bd6bf0..409bb1d 100644
|
||||
--- a/base.mk
|
||||
+++ b/base.mk
|
||||
@@ -209,4 +209,7 @@ PRODUCT_PACKAGES += \
|
||||
PRODUCT_PACKAGES += \
|
||||
oplus-alert-slider
|
||||
|
||||
+PRODUCT_PACKAGES += \
|
||||
+ android.hardware.vibrator@1.3-service.meizu
|
||||
+
|
||||
include build/make/target/product/gsi_release.mk
|
||||
diff --git a/framework_manifest.xml b/framework_manifest.xml
|
||||
index cb37b49..1b45b4a 100644
|
||||
--- a/framework_manifest.xml
|
||||
+++ b/framework_manifest.xml
|
||||
@@ -19,5 +19,15 @@
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
+
|
||||
+ <hal>
|
||||
+ <name>android.hardware.vibrator</name>
|
||||
+ <transport>hwbinder</transport>
|
||||
+ <version>1.3</version>
|
||||
+ <interface>
|
||||
+ <name>IVibrator</name>
|
||||
+ <instance>default</instance>
|
||||
+ </interface>
|
||||
+ </hal>
|
||||
</manifest>
|
||||
|
||||
diff --git a/hal/meizu-vibrator/Android.bp b/hal/meizu-vibrator/Android.bp
|
||||
new file mode 100644
|
||||
index 0000000..4e3c1b9
|
||||
--- /dev/null
|
||||
+++ b/hal/meizu-vibrator/Android.bp
|
||||
@@ -0,0 +1,31 @@
|
||||
+//
|
||||
+// Copyright (C) 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.
|
||||
+cc_binary {
|
||||
+ name: "android.hardware.vibrator@1.3-service.meizu",
|
||||
+ relative_install_path: "hw",
|
||||
+ init_rc: ["android.hardware.vibrator@1.3-service.meizu.rc"],
|
||||
+ srcs: ["service.cpp", "Vibrator.cpp"],
|
||||
+ cflags: ["-Wall", "-Werror"],
|
||||
+ shared_libs: [
|
||||
+ "libhidlbase",
|
||||
+ "liblog",
|
||||
+ "libutils",
|
||||
+ "libhardware",
|
||||
+ "android.hardware.vibrator@1.0",
|
||||
+ "android.hardware.vibrator@1.1",
|
||||
+ "android.hardware.vibrator@1.2",
|
||||
+ "android.hardware.vibrator@1.3",
|
||||
+ ],
|
||||
+}
|
||||
diff --git a/hal/meizu-vibrator/Vibrator.cpp b/hal/meizu-vibrator/Vibrator.cpp
|
||||
new file mode 100644
|
||||
index 0000000..8f12987
|
||||
--- /dev/null
|
||||
+++ b/hal/meizu-vibrator/Vibrator.cpp
|
||||
@@ -0,0 +1,140 @@
|
||||
+/*
|
||||
+ * Copyright (C) 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.
|
||||
+ */
|
||||
+
|
||||
+#define LOG_TAG "VibratorService"
|
||||
+
|
||||
+#include <log/log.h>
|
||||
+
|
||||
+#include <hardware/hardware.h>
|
||||
+#include <hardware/vibrator.h>
|
||||
+
|
||||
+#include "Vibrator.h"
|
||||
+
|
||||
+#include <cinttypes>
|
||||
+#include <cmath>
|
||||
+#include <iostream>
|
||||
+#include <fstream>
|
||||
+#include <thread>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+namespace android {
|
||||
+namespace hardware {
|
||||
+namespace vibrator {
|
||||
+namespace V1_3 {
|
||||
+namespace implementation {
|
||||
+
|
||||
+Vibrator::Vibrator(std::ofstream&& timeoutAndAmplitude, std::ofstream&& waveNumber, std::ofstream&& effectTrigger) :
|
||||
+ mTimeoutAndAmplitude(std::move(timeoutAndAmplitude)),
|
||||
+ mWaveNumber(std::move(waveNumber)),
|
||||
+ mEffectTrigger(std::move(effectTrigger)) {}
|
||||
+
|
||||
+Return<Status> Vibrator::on(uint32_t timeout_ms) {
|
||||
+ // Wave number 12 for vibrations slightly stronger than stock (13)
|
||||
+ mWaveNumber << 12 << std::endl;
|
||||
+ mTimeoutAndAmplitude << timeout_ms << std::endl;
|
||||
+ if (!mTimeoutAndAmplitude) {
|
||||
+ ALOGE("Failed to turn vibrator on (%d): %s", errno, strerror(errno));
|
||||
+ return Status::UNKNOWN_ERROR;
|
||||
+ }
|
||||
+ return Status::OK;
|
||||
+}
|
||||
+
|
||||
+Return<Status> Vibrator::off() {
|
||||
+ mTimeoutAndAmplitude << 0 << std::endl;
|
||||
+ if (!mTimeoutAndAmplitude) {
|
||||
+ ALOGE("Failed to turn vibrator off (%d): %s", errno, strerror(errno));
|
||||
+ return Status::UNKNOWN_ERROR;
|
||||
+ }
|
||||
+ return Status::OK;
|
||||
+}
|
||||
+
|
||||
+Return<bool> Vibrator::supportsAmplitudeControl() {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+Return<Status> Vibrator::setAmplitude(uint8_t) {
|
||||
+ return Status::UNSUPPORTED_OPERATION;
|
||||
+}
|
||||
+
|
||||
+Return<void> Vibrator::perform(V1_0::Effect effect, EffectStrength strength, perform_cb _hidl_cb) {
|
||||
+ return perform<decltype(effect)>(effect, strength, _hidl_cb);
|
||||
+}
|
||||
+
|
||||
+Return<void> Vibrator::perform_1_1(V1_1::Effect_1_1 effect, EffectStrength strength, perform_cb _hidl_cb) {
|
||||
+ return perform<decltype(effect)>(effect, strength, _hidl_cb);
|
||||
+}
|
||||
+
|
||||
+Return<void> Vibrator::perform_1_2(V1_2::Effect effect, EffectStrength strength, perform_cb _hidl_cb) {
|
||||
+ return perform<decltype(effect)>(effect, strength, _hidl_cb);
|
||||
+}
|
||||
+
|
||||
+Return<void> Vibrator::perform_1_3(Effect effect, EffectStrength strength, perform_cb _hidl_cb) {
|
||||
+ return perform<decltype(effect)>(effect, strength, _hidl_cb);
|
||||
+}
|
||||
+
|
||||
+Return<bool> Vibrator::supportsExternalControl() {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+Return<Status> Vibrator::setExternalControl(bool) {
|
||||
+ return Status::UNSUPPORTED_OPERATION;
|
||||
+}
|
||||
+
|
||||
+Return<void> Vibrator::perform(Effect effect, EffectStrength, perform_cb _hidl_cb) {
|
||||
+ uint32_t id;
|
||||
+ switch (effect) {
|
||||
+ case Effect::CLICK:
|
||||
+ id = 31008;
|
||||
+ break;
|
||||
+ case Effect::DOUBLE_CLICK:
|
||||
+ id = 31003;
|
||||
+ break;
|
||||
+ case Effect::TICK:
|
||||
+ case Effect::TEXTURE_TICK:
|
||||
+ id = 21000;
|
||||
+ break;
|
||||
+ case Effect::THUD:
|
||||
+ id = 30900;
|
||||
+ break;
|
||||
+ case Effect::POP:
|
||||
+ id = 22520;
|
||||
+ break;
|
||||
+ case Effect::HEAVY_CLICK:
|
||||
+ id = 30900;
|
||||
+ break;
|
||||
+ default:
|
||||
+ _hidl_cb(Status::UNSUPPORTED_OPERATION, 0);
|
||||
+ return Void();
|
||||
+ }
|
||||
+ mEffectTrigger << id << std::endl;
|
||||
+ _hidl_cb(Status::OK, 200);
|
||||
+ return Void();
|
||||
+}
|
||||
+
|
||||
+template <typename T> Return<void> Vibrator::perform(T effect, EffectStrength strength, perform_cb _hidl_cb) {
|
||||
+ auto validRange = hidl_enum_range<T>();
|
||||
+ if (effect < *validRange.begin() || effect > *std::prev(validRange.end())) {
|
||||
+ _hidl_cb(Status::UNSUPPORTED_OPERATION, 0);
|
||||
+ return Void();
|
||||
+ }
|
||||
+ return perform(static_cast<Effect>(effect), strength, _hidl_cb);
|
||||
+}
|
||||
+
|
||||
+} // namespace implementation
|
||||
+} // namespace V1_3
|
||||
+} // namespace vibrator
|
||||
+} // namespace hardware
|
||||
+} // namespace android
|
||||
diff --git a/hal/meizu-vibrator/Vibrator.h b/hal/meizu-vibrator/Vibrator.h
|
||||
new file mode 100644
|
||||
index 0000000..df901aa
|
||||
--- /dev/null
|
||||
+++ b/hal/meizu-vibrator/Vibrator.h
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * Copyright (C) 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.
|
||||
+ */
|
||||
+#ifndef ANDROID_HARDWARE_VIBRATOR_V1_3_VIBRATOR_H
|
||||
+#define ANDROID_HARDWARE_VIBRATOR_V1_3_VIBRATOR_H
|
||||
+
|
||||
+#include <android/hardware/vibrator/1.3/IVibrator.h>
|
||||
+#include <hidl/Status.h>
|
||||
+
|
||||
+#include <fstream>
|
||||
+
|
||||
+namespace android {
|
||||
+namespace hardware {
|
||||
+namespace vibrator {
|
||||
+namespace V1_3 {
|
||||
+namespace implementation {
|
||||
+
|
||||
+using android::hardware::vibrator::V1_0::EffectStrength;
|
||||
+using android::hardware::vibrator::V1_0::Status;
|
||||
+
|
||||
+class Vibrator : public IVibrator {
|
||||
+public:
|
||||
+ Vibrator(std::ofstream&& timeoutAndAmplitude, std::ofstream&& waveNumber, std::ofstream&& effectTrigger);
|
||||
+ Return<Status> on(uint32_t timeoutMs) override;
|
||||
+ Return<Status> off() override;
|
||||
+ Return<bool> supportsAmplitudeControl() override;
|
||||
+ Return<Status> setAmplitude(uint8_t amplitude) override;
|
||||
+ Return<void> perform(V1_0::Effect effect, EffectStrength strength, perform_cb _hidl_cb) override;
|
||||
+ Return<void> perform_1_1(V1_1::Effect_1_1 effect, EffectStrength strength, perform_cb _hidl_cb) override;
|
||||
+ Return<void> perform_1_2(V1_2::Effect effect, EffectStrength strength, perform_cb _hidl_cb) override;
|
||||
+ Return<void> perform_1_3(Effect effect, EffectStrength strength, perform_cb _hidl_cb) override;
|
||||
+ Return<bool> supportsExternalControl() override;
|
||||
+ Return<Status> setExternalControl(bool enabled) override;
|
||||
+
|
||||
+private:
|
||||
+ Return<void> perform(Effect effect, EffectStrength strength, perform_cb _hidl_cb);
|
||||
+ template <typename T> Return<void> perform(T effect, EffectStrength strength, perform_cb _hidl_cb);
|
||||
+ std::ofstream mTimeoutAndAmplitude;
|
||||
+ std::ofstream mWaveNumber;
|
||||
+ std::ofstream mEffectTrigger;
|
||||
+};
|
||||
+} // namespace implementation
|
||||
+} // namespace V1_3
|
||||
+} // namespace vibrator
|
||||
+} // namespace hardware
|
||||
+} // namespace android
|
||||
+
|
||||
+#endif // ANDROID_HARDWARE_VIBRATOR_V1_3_VIBRATOR_H
|
||||
diff --git a/hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.rc b/hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.rc
|
||||
new file mode 100644
|
||||
index 0000000..ddf39c4
|
||||
--- /dev/null
|
||||
+++ b/hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.rc
|
||||
@@ -0,0 +1,4 @@
|
||||
+service vibrator.meizu /system/bin/hw/android.hardware.vibrator@1.3-service.meizu
|
||||
+ class late_start
|
||||
+ user system
|
||||
+ group system
|
||||
diff --git a/hal/meizu-vibrator/service.cpp b/hal/meizu-vibrator/service.cpp
|
||||
new file mode 100644
|
||||
index 0000000..1405dfb
|
||||
--- /dev/null
|
||||
+++ b/hal/meizu-vibrator/service.cpp
|
||||
@@ -0,0 +1,72 @@
|
||||
+/*
|
||||
+ * Copyright (C) 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.
|
||||
+ */
|
||||
+#define LOG_TAG "android.hardware.vibrator@1.3-service.meizu"
|
||||
+
|
||||
+#include <android/hardware/vibrator/1.3/IVibrator.h>
|
||||
+#include <hidl/HidlSupport.h>
|
||||
+#include <hidl/HidlTransportSupport.h>
|
||||
+#include <utils/Errors.h>
|
||||
+#include <utils/StrongPointer.h>
|
||||
+
|
||||
+#include "Vibrator.h"
|
||||
+
|
||||
+using android::hardware::configureRpcThreadpool;
|
||||
+using android::hardware::joinRpcThreadpool;
|
||||
+using android::hardware::vibrator::V1_3::IVibrator;
|
||||
+using android::hardware::vibrator::V1_3::implementation::Vibrator;
|
||||
+using namespace android;
|
||||
+
|
||||
+static const char *CONTROL_PATH_TIMEOUT = "/sys/class/timed_output/vibrator/enable";
|
||||
+static const char *PATH_WAVE_NUMBER = "/sys/class/meizu/motor/waveform";
|
||||
+static const char *CONTROL_PATH_EFFECT = "/sys/class/meizu/motor/on_off";
|
||||
+
|
||||
+status_t registerVibratorService() {
|
||||
+ std::ofstream timeoutAndAmplitude{CONTROL_PATH_TIMEOUT};
|
||||
+ if (!timeoutAndAmplitude) {
|
||||
+ int error = errno;
|
||||
+ ALOGE("Failed to open %s (%d): %s", CONTROL_PATH_TIMEOUT, error, strerror(error));
|
||||
+ return -error;
|
||||
+ }
|
||||
+
|
||||
+ std::ofstream waveNumber{PATH_WAVE_NUMBER};
|
||||
+ if (!waveNumber) {
|
||||
+ int error = errno;
|
||||
+ ALOGE("Failed to open %s (%d): %s", PATH_WAVE_NUMBER, error, strerror(error));
|
||||
+ return -error;
|
||||
+ }
|
||||
+
|
||||
+ std::ofstream effectTrigger{CONTROL_PATH_EFFECT};
|
||||
+ if (!effectTrigger) {
|
||||
+ int error = errno;
|
||||
+ ALOGE("Failed to open %s (%d): %s", CONTROL_PATH_EFFECT, error, strerror(error));
|
||||
+ return -error;
|
||||
+ }
|
||||
+
|
||||
+ sp<IVibrator> vibrator = new Vibrator(std::move(timeoutAndAmplitude), std::move(waveNumber), std::move(effectTrigger));
|
||||
+ (void) vibrator->registerAsService(); // suppress unused-result warning
|
||||
+ return OK;
|
||||
+}
|
||||
+
|
||||
+int main() {
|
||||
+ configureRpcThreadpool(1, true);
|
||||
+ status_t status = registerVibratorService();
|
||||
+
|
||||
+ if (status != OK) {
|
||||
+ return status;
|
||||
+ }
|
||||
+
|
||||
+ joinRpcThreadpool();
|
||||
+}
|
||||
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
|
||||
index 5e39d5b..41d395d 100644
|
||||
--- a/sepolicy/file_contexts
|
||||
+++ b/sepolicy/file_contexts
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
/system/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.oppo.compat u:object_r:hal_fingerprint_oppo_compat_exec:s0
|
||||
/system/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.oplus.compat u:object_r:hal_fingerprint_oppo_compat_exec:s0
|
||||
+/system/bin/hw/android.hardware.vibrator@1.3-service.meizu u:object_r:hal_vibrator_default_exec:s0
|
||||
|
||||
/efs u:object_r:efs_file:s0
|
||||
|
||||
diff --git a/sepolicy/hal.te b/sepolicy/hal.te
|
||||
index cb44422..280ae2d 100644
|
||||
--- a/sepolicy/hal.te
|
||||
+++ b/sepolicy/hal.te
|
||||
@@ -8,3 +8,14 @@ init_daemon_domain(hal_fingerprint_oppo_compat)
|
||||
|
||||
type hal_fingerprint_oppo, domain;
|
||||
allow hal_fingerprint_oppo vendor_default_prop:property_service { set };
|
||||
+
|
||||
+type vib_strength_sysfs, fs_type, sysfs_type;
|
||||
+
|
||||
+type hal_vibrator_default, domain;
|
||||
+hal_server_domain(hal_vibrator_default, hal_vibrator)
|
||||
+
|
||||
+type hal_vibrator_default_exec, exec_type, vendor_file_type, file_type;
|
||||
+init_daemon_domain(hal_vibrator_default)
|
||||
+
|
||||
+allow hal_vibrator_default vib_strength_sysfs:dir rw_dir_perms;
|
||||
+allow hal_vibrator_default vib_strength_sysfs:file rw_file_perms;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,115 @@
|
||||
From fd5e5139356c792a17328692a90abc6b2c40677e Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 27 Jun 2021 05:21:38 +0000
|
||||
Subject: [PATCH 2/4] Only use meizu-vibrator on Meizu 18
|
||||
|
||||
- Convert manifest to VINTF fragment
|
||||
- If not the target device, bind to dummy manifest on boot
|
||||
|
||||
Change-Id: I97fc52a98a77aa72bbd5601f36abc0cf18efbaea
|
||||
---
|
||||
framework_manifest.xml | 10 ----------
|
||||
hal/meizu-vibrator/Android.bp | 1 +
|
||||
.../android.hardware.vibrator@1.3-service.meizu.xml | 11 +++++++++++
|
||||
hal/meizu-vibrator/manifest_dummy.xml | 3 +++
|
||||
rw-system.sh | 10 ++++++++--
|
||||
5 files changed, 23 insertions(+), 12 deletions(-)
|
||||
create mode 100644 hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.xml
|
||||
create mode 100644 hal/meizu-vibrator/manifest_dummy.xml
|
||||
|
||||
diff --git a/framework_manifest.xml b/framework_manifest.xml
|
||||
index 1b45b4a..cb37b49 100644
|
||||
--- a/framework_manifest.xml
|
||||
+++ b/framework_manifest.xml
|
||||
@@ -19,15 +19,5 @@
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
-
|
||||
- <hal>
|
||||
- <name>android.hardware.vibrator</name>
|
||||
- <transport>hwbinder</transport>
|
||||
- <version>1.3</version>
|
||||
- <interface>
|
||||
- <name>IVibrator</name>
|
||||
- <instance>default</instance>
|
||||
- </interface>
|
||||
- </hal>
|
||||
</manifest>
|
||||
|
||||
diff --git a/hal/meizu-vibrator/Android.bp b/hal/meizu-vibrator/Android.bp
|
||||
index 4e3c1b9..276728c 100644
|
||||
--- a/hal/meizu-vibrator/Android.bp
|
||||
+++ b/hal/meizu-vibrator/Android.bp
|
||||
@@ -15,6 +15,7 @@
|
||||
cc_binary {
|
||||
name: "android.hardware.vibrator@1.3-service.meizu",
|
||||
relative_install_path: "hw",
|
||||
+ vintf_fragments: ["android.hardware.vibrator@1.3-service.meizu.xml", "manifest_dummy.xml"],
|
||||
init_rc: ["android.hardware.vibrator@1.3-service.meizu.rc"],
|
||||
srcs: ["service.cpp", "Vibrator.cpp"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
diff --git a/hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.xml b/hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.xml
|
||||
new file mode 100644
|
||||
index 0000000..d1b836e
|
||||
--- /dev/null
|
||||
+++ b/hal/meizu-vibrator/android.hardware.vibrator@1.3-service.meizu.xml
|
||||
@@ -0,0 +1,11 @@
|
||||
+<manifest version="1.0" type="framework">
|
||||
+ <hal format="hidl">
|
||||
+ <name>android.hardware.vibrator</name>
|
||||
+ <transport>hwbinder</transport>
|
||||
+ <version>1.3</version>
|
||||
+ <interface>
|
||||
+ <name>IVibrator</name>
|
||||
+ <instance>default</instance>
|
||||
+ </interface>
|
||||
+ </hal>
|
||||
+</manifest>
|
||||
diff --git a/hal/meizu-vibrator/manifest_dummy.xml b/hal/meizu-vibrator/manifest_dummy.xml
|
||||
new file mode 100644
|
||||
index 0000000..b34a10b
|
||||
--- /dev/null
|
||||
+++ b/hal/meizu-vibrator/manifest_dummy.xml
|
||||
@@ -0,0 +1,3 @@
|
||||
+<!-- Dummy manifest XML -->
|
||||
+<manifest version="1.0" type="framework">
|
||||
+</manifest>
|
||||
diff --git a/rw-system.sh b/rw-system.sh
|
||||
index a49e8f5..434be7c 100644
|
||||
--- a/rw-system.sh
|
||||
+++ b/rw-system.sh
|
||||
@@ -325,6 +325,12 @@ if [ "$foundFingerprint" = false ];then
|
||||
mount -o bind system/phh/empty /system/etc/permissions/android.hardware.fingerprint.xml
|
||||
fi
|
||||
|
||||
+if ! getprop ro.vendor.build.fingerprint | grep -qE 'meizu_18'; then
|
||||
+ mount -o bind system/phh/empty /system/bin/hw/android.hardware.vibrator@1.3-service.meizu
|
||||
+ mount -o bind system/phh/empty /system/etc/init/android.hardware.vibrator@1.3-service.meizu.rc
|
||||
+ mount -o bind system/etc/vintf/manifest/manifest_dummy.xml /system/etc/vintf/manifest/android.hardware.vibrator@1.3-service.meizu.xml
|
||||
+fi
|
||||
+
|
||||
if ! grep android.hardware.bluetooth /vendor/manifest.xml && ! grep android.hardware.bluetooth /vendor/etc/vintf/manifest.xml; then
|
||||
mount -o bind system/phh/empty /system/etc/permissions/android.hardware.bluetooth.xml
|
||||
mount -o bind system/phh/empty /system/etc/permissions/android.hardware.bluetooth_le.xml
|
||||
@@ -396,7 +402,7 @@ if getprop ro.build.overlay.deviceid |grep -q -e CPH1859 -e CPH1861 -e RMX1811 -
|
||||
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
|
||||
fi
|
||||
|
||||
-if getprop ro.build.overlay.deviceid |grep -iq -e RMX2020 -e RMX2027 -e RMX2040 -e RMX2193 -e RMX2191;then
|
||||
+if getprop ro.build.overlay.deviceid |grep -iq -e RMX2020 -e RMX2027 -e RMX2040 -e RMX2193 -e RMX2191;then
|
||||
setprop persist.sys.qcom-brightness 2047
|
||||
setprop persist.sys.overlay.devinputjack true
|
||||
setprop persist.sys.phh.fingerprint.nocleanup true
|
||||
@@ -891,7 +897,7 @@ if getprop ro.build.overlay.deviceid |grep -qiE -e '^RMX' -e '^CPH';then
|
||||
setprop persist.sys.phh.fod.bbk true
|
||||
fi
|
||||
|
||||
-if getprop ro.build.overlay.deviceid |grep -iq -e RMX1941 -e RMX1945 -e RMX1943 -e RMX1942;then
|
||||
+if getprop ro.build.overlay.deviceid |grep -iq -e RMX1941 -e RMX1945 -e RMX1943 -e RMX1942;then
|
||||
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
|
||||
setprop persist.sys.phh.mainkeys 0
|
||||
fi
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From dd31f491d59f77fe6451de89882d17d432cacdaf Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 28 Oct 2021 01:51:27 +0000
|
||||
Subject: [PATCH 3/4] Revert "Include sim toolkit app"
|
||||
|
||||
This reverts commit 52d4d731465f37e3e8ccf9d315cfc8195303e51f.
|
||||
|
||||
Change-Id: I1eb7f4bb070eea649b4cea6280299e629d1edb3d
|
||||
---
|
||||
base.mk | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/base.mk b/base.mk
|
||||
index 409bb1d..b8b078e 100644
|
||||
--- a/base.mk
|
||||
+++ b/base.mk
|
||||
@@ -156,9 +156,6 @@ PRODUCT_PACKAGES += \
|
||||
xiaomi-motor \
|
||||
oneplus-motor
|
||||
|
||||
-PRODUCT_PACKAGES += \
|
||||
- Stk
|
||||
-
|
||||
PRODUCT_PACKAGES += \
|
||||
resetprop_phh
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 45739cc78ffe6af2124211ef108fef17bdc56baa Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 09:31:01 +0000
|
||||
Subject: [PATCH 4/4] Revert "treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS
|
||||
explicitly"
|
||||
|
||||
This reverts commit d7b179f234d76c3acf7a723fc05f07efe9adc84c.
|
||||
|
||||
Change-Id: I2bf95d40d4a096181710765c7d152f63556d27d8
|
||||
---
|
||||
board-base.mk | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/board-base.mk b/board-base.mk
|
||||
index 3900f97..4d4cbdd 100644
|
||||
--- a/board-base.mk
|
||||
+++ b/board-base.mk
|
||||
@@ -8,6 +8,4 @@ BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
||||
|
||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
||||
|
||||
-BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
||||
-
|
||||
TARGET_NO_KERNEL_OVERRIDE := true
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,36 @@
|
||||
From 9c440d31d462e558ba6961e8cd42c91411299826 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 27 Oct 2021 14:39:29 -0400
|
||||
Subject: [PATCH] Disable vndklite handling
|
||||
|
||||
Change-Id: Ic4474cf80fc4b45a9a2760dd51e2ca29c4d961e2
|
||||
---
|
||||
linker/linker.cpp | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/linker/linker.cpp b/linker/linker.cpp
|
||||
index 3488f5cc7..c32ea8484 100644
|
||||
--- a/linker/linker.cpp
|
||||
+++ b/linker/linker.cpp
|
||||
@@ -93,7 +93,6 @@ static uint64_t g_module_unload_counter = 0;
|
||||
static const char* const kLdConfigArchFilePath = "/system/etc/ld.config." ABI_STRING ".txt";
|
||||
|
||||
static const char* const kLdConfigFilePath = "/system/etc/ld.config.txt";
|
||||
-static const char* const kLdConfigVndkLiteFilePath = "/system/etc/ld.config.vndk_lite.txt";
|
||||
|
||||
static const char* const kLdGeneratedConfigFilePath = "/linkerconfig/ld.config.txt";
|
||||
|
||||
@@ -3368,10 +3367,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
|
||||
}
|
||||
|
||||
static std::string get_ld_config_file_vndk_path() {
|
||||
- if (android::base::GetBoolProperty("ro.vndk.lite", false)) {
|
||||
- return kLdConfigVndkLiteFilePath;
|
||||
- }
|
||||
-
|
||||
std::string ld_config_file_vndk = kLdConfigFilePath;
|
||||
size_t insert_pos = ld_config_file_vndk.find_last_of('.');
|
||||
if (insert_pos == std::string::npos) {
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 1de21d04e398527381a751bc0f35cb9a298ef7b6 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 12 Sep 2019 20:31:07 +0200
|
||||
Subject: [PATCH] Don't reboot if we couldn't get bootctrl
|
||||
|
||||
Change-Id: Id1793660bd1c97ab369607f58a772ca3512ec1af
|
||||
---
|
||||
update_verifier/update_verifier.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp
|
||||
index a042f900..ea3645af 100644
|
||||
--- a/update_verifier/update_verifier.cpp
|
||||
+++ b/update_verifier/update_verifier.cpp
|
||||
@@ -310,7 +310,7 @@ int update_verifier(int argc, char** argv) {
|
||||
sp<IBootControl> module = IBootControl::getService();
|
||||
if (module == nullptr) {
|
||||
LOG(ERROR) << "Error getting bootctrl module.";
|
||||
- return reboot_device();
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
uint32_t current_slot = module->getCurrentSlot();
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 69ec54d90d2b41ae4e1c27be02b320432c9a1f92 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 9 Apr 2018 00:19:49 +0200
|
||||
Subject: [PATCH 1/8] Increase default log_level to get actual selinux error in
|
||||
kmsg
|
||||
|
||||
---
|
||||
secilc/secilc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/secilc/secilc.c b/secilc/secilc.c
|
||||
index 9c78e425..71a0f685 100644
|
||||
--- a/secilc/secilc.c
|
||||
+++ b/secilc/secilc.c
|
||||
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
|
||||
int opt_index = 0;
|
||||
char *fc_buf = NULL;
|
||||
size_t fc_size;
|
||||
- enum cil_log_level log_level = CIL_ERR;
|
||||
+ enum cil_log_level log_level = CIL_WARN;
|
||||
static struct option long_opts[] = {
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"verbose", no_argument, 0, 'v'},
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 9f95f8b0858cec9d105efcfb5923a96610eab76f Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 9 Sep 2020 22:36:42 +0200
|
||||
Subject: [PATCH 2/8] Revert "libsepol: Make an unknown permission an error in
|
||||
CIL"
|
||||
|
||||
This reverts commit dc4e54126bf25dea4d51820922ccd1959be68fbc.
|
||||
|
||||
This is required because some targets calls undefined permissions:
|
||||
- Realme X2 Pro calls sigcont
|
||||
- Honor 7X calls perf_event
|
||||
---
|
||||
libsepol/cil/src/cil_resolve_ast.c | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libsepol/cil/src/cil_resolve_ast.c b/libsepol/cil/src/cil_resolve_ast.c
|
||||
index 87575860..e72abdeb 100644
|
||||
--- a/libsepol/cil/src/cil_resolve_ast.c
|
||||
+++ b/libsepol/cil/src/cil_resolve_ast.c
|
||||
@@ -131,14 +131,18 @@ static int __cil_resolve_perms(symtab_t *class_symtab, symtab_t *common_symtab,
|
||||
}
|
||||
}
|
||||
if (rc != SEPOL_OK) {
|
||||
+ struct cil_list *empty_list;
|
||||
if (class_flavor == CIL_MAP_CLASS) {
|
||||
cil_log(CIL_ERR, "Failed to resolve permission %s for map class\n", (char*)curr->data);
|
||||
- } else {
|
||||
- cil_log(CIL_ERR, "Failed to resolve permission %s\n", (char*)curr->data);
|
||||
+ goto exit;
|
||||
}
|
||||
- goto exit;
|
||||
+ cil_log(CIL_WARN, "Failed to resolve permission %s\n", (char*)curr->data);
|
||||
+ /* Use an empty list to represent unknown perm */
|
||||
+ cil_list_init(&empty_list, perm_strs->flavor);
|
||||
+ cil_list_append(*perm_datums, CIL_LIST, empty_list);
|
||||
+ } else {
|
||||
+ cil_list_append(*perm_datums, CIL_DATUM, perm_datum);
|
||||
}
|
||||
- cil_list_append(*perm_datums, CIL_DATUM, perm_datum);
|
||||
} else {
|
||||
cil_list_append(*perm_datums, curr->flavor, curr->data);
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,125 @@
|
||||
From 357d0c61451ab507248697d1b2327f6204884b78 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 31 Mar 2021 23:32:37 +0200
|
||||
Subject: [PATCH 3/8] Workaround device/phh/treble conflict with SELinux policy
|
||||
|
||||
device/phh/treble defines the following three types (hostapd,
|
||||
sysfs_usb_supply, rpmb_device)
|
||||
However, Qualcomm Samsung Android 11 devices export those symbols as
|
||||
typealias.
|
||||
Type and typealias are fundamentally not mergeable.
|
||||
Luckily, Samsung doesn't do anything with those typealias, so we can
|
||||
simply ignore them.
|
||||
|
||||
Change-Id: I52938703c1c39de8f881c98c82cfbf5a04d96cf7
|
||||
---
|
||||
libsepol/cil/src/cil_binary.c | 8 ++++++--
|
||||
libsepol/cil/src/cil_build_ast.c | 15 +++++++++++----
|
||||
libsepol/cil/src/cil_resolve_ast.c | 15 +++++++++++++--
|
||||
3 files changed, 30 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/libsepol/cil/src/cil_binary.c b/libsepol/cil/src/cil_binary.c
|
||||
index 03d53e1f..160fd0e0 100644
|
||||
--- a/libsepol/cil/src/cil_binary.c
|
||||
+++ b/libsepol/cil/src/cil_binary.c
|
||||
@@ -515,13 +515,17 @@ int cil_typealias_to_policydb(policydb_t *pdb, struct cil_alias *cil_alias)
|
||||
type_datum_init(sepol_alias);
|
||||
|
||||
rc = __cil_get_sepol_type_datum(pdb, DATUM(cil_alias->actual), &sepol_type);
|
||||
- if (rc != SEPOL_OK) goto exit;
|
||||
+ if (rc != SEPOL_OK) {
|
||||
+ cil_log(CIL_ERR, "Failed at %s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__);
|
||||
+ goto exit;
|
||||
+ }
|
||||
|
||||
sepol_alias->flavor = TYPE_TYPE;
|
||||
|
||||
key = cil_strdup(cil_alias->datum.fqn);
|
||||
rc = symtab_insert(pdb, SYM_TYPES, key, sepol_alias, SCOPE_DECL, 0, NULL);
|
||||
if (rc != SEPOL_OK) {
|
||||
+ cil_log(CIL_ERR, "Failed at %s:%s:%d:%d\n", __FILE__, __FUNCTION__, __LINE__, rc);
|
||||
goto exit;
|
||||
}
|
||||
sepol_alias->s.value = sepol_type->s.value;
|
||||
@@ -3776,7 +3780,7 @@ int __cil_node_to_policydb(struct cil_tree_node *node, void *extra_args)
|
||||
|
||||
exit:
|
||||
if (rc != SEPOL_OK) {
|
||||
- cil_tree_log(node, CIL_ERR, "Binary policy creation failed");
|
||||
+ cil_tree_log(node, CIL_ERR, "Binary policy creation failed, for pass = %d, flavor = %d", pass, node->flavor);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
diff --git a/libsepol/cil/src/cil_build_ast.c b/libsepol/cil/src/cil_build_ast.c
|
||||
index 307b1ee3..aaec0a9b 100644
|
||||
--- a/libsepol/cil/src/cil_build_ast.c
|
||||
+++ b/libsepol/cil/src/cil_build_ast.c
|
||||
@@ -108,7 +108,7 @@ int cil_gen_node(struct cil_db *db, struct cil_tree_node *ast_node, struct cil_s
|
||||
{
|
||||
int rc = SEPOL_ERR;
|
||||
symtab_t *symtab = NULL;
|
||||
- struct cil_symtab_datum *prev;
|
||||
+ struct cil_symtab_datum *prev = NULL;
|
||||
|
||||
rc = __cil_verify_name((const char*)key);
|
||||
if (rc != SEPOL_OK) {
|
||||
@@ -133,13 +133,20 @@ int cil_gen_node(struct cil_db *db, struct cil_tree_node *ast_node, struct cil_s
|
||||
/* multiple_decls not ok, ret error */
|
||||
cil_log(CIL_ERR, "Re-declaration of %s %s\n",
|
||||
cil_node_to_string(ast_node), key);
|
||||
- if (cil_symtab_get_datum(symtab, key, &datum) == SEPOL_OK) {
|
||||
+ if (cil_symtab_get_datum(symtab, key, &prev) == SEPOL_OK) {
|
||||
if (sflavor == CIL_SYM_BLOCKS) {
|
||||
- struct cil_tree_node *node = datum->nodes->head->data;
|
||||
+ struct cil_tree_node *node = prev->nodes->head->data;
|
||||
cil_tree_log(node, CIL_ERR, "Previous declaration");
|
||||
}
|
||||
}
|
||||
- goto exit;
|
||||
+ if(
|
||||
+ strcmp(key, "sysfs_usb_supply") == 0 ||
|
||||
+ strcmp(key, "hostapd") == 0 ||
|
||||
+ strcmp(key, "rpmb_device") == 0) {
|
||||
+ cil_log(CIL_ERR, "Ignoring...");
|
||||
+ } else {
|
||||
+ goto exit;
|
||||
+ }
|
||||
}
|
||||
/* multiple_decls is enabled and works for this datum type, add node */
|
||||
cil_list_append(prev->nodes, CIL_NODE, ast_node);
|
||||
diff --git a/libsepol/cil/src/cil_resolve_ast.c b/libsepol/cil/src/cil_resolve_ast.c
|
||||
index e72abdeb..db3f24f4 100644
|
||||
--- a/libsepol/cil/src/cil_resolve_ast.c
|
||||
+++ b/libsepol/cil/src/cil_resolve_ast.c
|
||||
@@ -512,7 +512,13 @@ int cil_resolve_aliasactual(struct cil_tree_node *current, void *extra_args, enu
|
||||
}
|
||||
if (NODE(alias_datum)->flavor != alias_flavor) {
|
||||
cil_log(CIL_ERR, "%s is not an alias\n",alias_datum->name);
|
||||
- rc = SEPOL_ERR;
|
||||
+ if(
|
||||
+ strcmp(alias_datum->name, "hostapd") == 0 ||
|
||||
+ strcmp(alias_datum->name, "sysfs_usb_supply") == 0 ||
|
||||
+ strcmp(alias_datum->name, "rpmb_device") == 0)
|
||||
+ rc = 0;
|
||||
+ else
|
||||
+ rc = SEPOL_ERR;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -553,7 +559,12 @@ int cil_resolve_alias_to_actual(struct cil_tree_node *current, enum cil_flavor f
|
||||
int limit = 2;
|
||||
|
||||
if (alias->actual == NULL) {
|
||||
- cil_tree_log(current, CIL_ERR, "Alias declared but not used");
|
||||
+ cil_tree_log(current, CIL_ERR, "Alias %s declared but not used", a1->datum.name);
|
||||
+ if(
|
||||
+ strcmp(a1->datum.name, "hostapd") == 0 ||
|
||||
+ strcmp(a1->datum.name, "sysfs_usb_supply") == 0 ||
|
||||
+ strcmp(a1->datum.name, "rpmb_device") == 0)
|
||||
+ return SEPOL_OK;
|
||||
return SEPOL_ERR;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,84 @@
|
||||
From df88fcc15f776b8ba1831b491509137b01b58356 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 25 Oct 2019 13:29:20 +0200
|
||||
Subject: [PATCH 4/8] Fix boot on Moto devices using unknown class
|
||||
|
||||
vendor sepolicy never contains new class or classorder, and are not
|
||||
allowed to.
|
||||
Though this is not tested, and it turns out Moto did it anyway.
|
||||
This raises an issue, because class need to be ordered, and thus the cil
|
||||
contains the ordering. This ordering needs to be merged.
|
||||
Android 10 added new classes, so the ordering can no longer be merged,
|
||||
and secilc fails on those devices, preventing boot.
|
||||
|
||||
Considering vendor are not supposed to declare new class (and thus
|
||||
declare classorder), this fix ignores class-es/classorder in vendor
|
||||
SELinux policy.
|
||||
|
||||
Since the vendor selinux policy has allows rules based on this context,
|
||||
those allows will fail since the class doesn't exist.
|
||||
Workaround this by ignoring rules with the problematic class
|
||||
( keystore_moto_key )
|
||||
|
||||
Lucky us, this new class `keystore_moto_key` is used by Moto for
|
||||
framework to framework (more accurately priv app to keymaster), since
|
||||
our own framework doesn't use this class, simply ignoring it fixes the
|
||||
issue.
|
||||
|
||||
Change-Id: I66339857634ebfdba359f12a99dfd0bff709d80b
|
||||
---
|
||||
libsepol/cil/src/cil_build_ast.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/libsepol/cil/src/cil_build_ast.c b/libsepol/cil/src/cil_build_ast.c
|
||||
index aaec0a9b..6b4b8708 100644
|
||||
--- a/libsepol/cil/src/cil_build_ast.c
|
||||
+++ b/libsepol/cil/src/cil_build_ast.c
|
||||
@@ -393,6 +393,14 @@ int cil_gen_class(struct cil_db *db, struct cil_tree_node *parse_current, struct
|
||||
struct cil_tree_node *perms = NULL;
|
||||
int rc = SEPOL_ERR;
|
||||
|
||||
+ {
|
||||
+ const char* path = cil_tree_get_cil_path(parse_current);
|
||||
+ if(strstr(path, "vendor")) {
|
||||
+ cil_clear_node(ast_node);
|
||||
+ return SEPOL_OK;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
|
||||
if (rc != SEPOL_OK) {
|
||||
goto exit;
|
||||
@@ -459,6 +467,14 @@ int cil_gen_classorder(struct cil_db *db, struct cil_tree_node *parse_current, s
|
||||
struct cil_list_item *head = NULL;
|
||||
int rc = SEPOL_ERR;
|
||||
|
||||
+ {
|
||||
+ const char* path = cil_tree_get_cil_path(parse_current);
|
||||
+ if(strstr(path, "vendor")) {
|
||||
+ cil_clear_node(ast_node);
|
||||
+ return SEPOL_OK;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (db == NULL || parse_current == NULL || ast_node == NULL) {
|
||||
goto exit;
|
||||
}
|
||||
@@ -2057,6 +2073,14 @@ int cil_gen_avrule(struct cil_tree_node *parse_current, struct cil_tree_node *as
|
||||
rule->src_str = parse_current->next->data;
|
||||
rule->tgt_str = parse_current->next->next->data;
|
||||
|
||||
+ {
|
||||
+ const char *classname = parse_current->next->next->next->cl_head->data;
|
||||
+ if(strcmp(classname, "keystore_moto_key") == 0) {
|
||||
+ cil_clear_node(ast_node);
|
||||
+ return SEPOL_OK;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
rc = cil_fill_classperms_list(parse_current->next->next->next, &rule->perms.classperms);
|
||||
if (rc != SEPOL_OK) {
|
||||
goto exit;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,43 @@
|
||||
From 55627b8443a01f8daa37892d0cede3fef98a6758 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 6 Sep 2019 15:07:25 +0200
|
||||
Subject: [PATCH 5/8] Allow /devices/virtual/block/ genfscon conflict (seen on
|
||||
Xiaomi Mi 9)
|
||||
|
||||
Change-Id: I06e4e9d5b82d61a8aeab595b47e2589249675895
|
||||
---
|
||||
libsepol/cil/src/cil_post.c | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c
|
||||
index a0cadfde..68c0318e 100644
|
||||
--- a/libsepol/cil/src/cil_post.c
|
||||
+++ b/libsepol/cil/src/cil_post.c
|
||||
@@ -477,7 +477,23 @@ int cil_post_genfscon_context_compare(const void *a, const void *b)
|
||||
{
|
||||
struct cil_genfscon *a_genfscon = *(struct cil_genfscon**)a;
|
||||
struct cil_genfscon *b_genfscon = *(struct cil_genfscon**)b;
|
||||
- return context_compare(a_genfscon->context, b_genfscon->context);
|
||||
+ int rc = context_compare(a_genfscon->context, b_genfscon->context);
|
||||
+ if(rc) {
|
||||
+ fprintf(stderr, "hello %s\n", a_genfscon->fs_str);
|
||||
+ int bypass = 0;
|
||||
+ /*
|
||||
+ * This conflict has been seen on Xiaomi Mi 9:
|
||||
+ * - AOSP Q says (genfscon sysfs /devices/virtual/block/ (u object_r sysfs_devices_block ((s0) (s0))))
|
||||
+ * - stock rom says (genfscon sysfs /devices/virtual/block/ (u object_r sysfs_ufs_target ((s0) (s0))))
|
||||
+ */
|
||||
+ if(strcmp(a_genfscon->path_str, "/devices/virtual/block/") == 0)
|
||||
+ bypass = 1;
|
||||
+ if(bypass == 1) {
|
||||
+ fprintf(stderr, "Received conflicting %s vs %s but ignore\n", a_genfscon->path_str, b_genfscon->path_str);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+ return rc;
|
||||
}
|
||||
|
||||
int cil_post_netifcon_context_compare(const void *a, const void *b)
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,44 @@
|
||||
From ec8e7155afc36bbe1a9649ba307abaa92c32cb0d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 12 Sep 2019 20:37:04 +0200
|
||||
Subject: [PATCH 6/8] if service is "rcs", accept conflict. Seen on Moto E5
|
||||
|
||||
Change-Id: I0cc2d0fad83f403f2b5d7458039b1564ce5ed9dd
|
||||
---
|
||||
libselinux/src/label_backends_android.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libselinux/src/label_backends_android.c b/libselinux/src/label_backends_android.c
|
||||
index d81faabe..1e4513e9 100644
|
||||
--- a/libselinux/src/label_backends_android.c
|
||||
+++ b/libselinux/src/label_backends_android.c
|
||||
@@ -62,14 +62,24 @@ static int nodups_specs(struct saved_data *data)
|
||||
curr_spec->property_key)) {
|
||||
if (strcmp(spec_arr[jj].lr.ctx_raw,
|
||||
curr_spec->lr.ctx_raw)) {
|
||||
- rc = -1;
|
||||
- errno = EINVAL;
|
||||
selinux_log
|
||||
(SELINUX_ERROR,
|
||||
"Multiple different specifications for %s (%s and %s).\n",
|
||||
curr_spec->property_key,
|
||||
spec_arr[jj].lr.ctx_raw,
|
||||
curr_spec->lr.ctx_raw);
|
||||
+ int ignore = 0;
|
||||
+ /*
|
||||
+ * This issue has been found on Moto E5
|
||||
+ * E SELinux : Multiple different specifications for rcs (u:object_r:radio_service:s0 and u:object_r:mot_rcs_service:s0).
|
||||
+ */
|
||||
+ if(!strcmp(curr_spec->property_key, "rcs"))
|
||||
+ ignore = 1;
|
||||
+
|
||||
+ if(!ignore) {
|
||||
+ rc = -1;
|
||||
+ errno = EINVAL;
|
||||
+ }
|
||||
} else {
|
||||
selinux_log
|
||||
(SELINUX_WARNING,
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 379d7cf233f500f1914fb86698688717b84385d0 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 24 May 2020 17:22:22 +0200
|
||||
Subject: [PATCH 7/8] Allow mismatches of exfat genfscon
|
||||
|
||||
---
|
||||
libsepol/cil/src/cil_post.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c
|
||||
index 68c0318e..75e5128c 100644
|
||||
--- a/libsepol/cil/src/cil_post.c
|
||||
+++ b/libsepol/cil/src/cil_post.c
|
||||
@@ -488,6 +488,10 @@ int cil_post_genfscon_context_compare(const void *a, const void *b)
|
||||
*/
|
||||
if(strcmp(a_genfscon->path_str, "/devices/virtual/block/") == 0)
|
||||
bypass = 1;
|
||||
+ if(strcmp(a_genfscon->fs_str, "exfat") == 0 || strcmp(a_genfscon->fs_str, "esdfs") == 0) {
|
||||
+ if(strcmp(a_genfscon->path_str, "/") == 0)
|
||||
+ bypass = 1;
|
||||
+ }
|
||||
if(bypass == 1) {
|
||||
fprintf(stderr, "Received conflicting %s vs %s but ignore\n", a_genfscon->path_str, b_genfscon->path_str);
|
||||
return 0;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From aca2ac082800d1db0bb6a1b7ffa9069dd3a3bc2d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 2 Mar 2018 22:49:55 +0100
|
||||
Subject: [PATCH 8/8] Enable multipl_decls by default. This is needed because
|
||||
8.0 init doesn't add -m
|
||||
|
||||
Change-Id: I43dc661d519f7b8576d72a828d8cbd444592bf5e
|
||||
---
|
||||
secilc/secilc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/secilc/secilc.c b/secilc/secilc.c
|
||||
index 71a0f685..a7e2e531 100644
|
||||
--- a/secilc/secilc.c
|
||||
+++ b/secilc/secilc.c
|
||||
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
|
||||
int target = SEPOL_TARGET_SELINUX;
|
||||
int mls = -1;
|
||||
int disable_dontaudit = 0;
|
||||
- int multiple_decls = 0;
|
||||
+ int multiple_decls = 1;
|
||||
int disable_neverallow = 0;
|
||||
int preserve_tunables = 0;
|
||||
int handle_unknown = -1;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -0,0 +1,131 @@
|
||||
From e280efe7945437b9295600f3ade73deb978284eb Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 5 Aug 2019 18:09:50 +0200
|
||||
Subject: [PATCH 01/19] Fix BT in-call on CAF devices
|
||||
|
||||
See https://github.com/phhusson/treble_experimentations/issues/374
|
||||
|
||||
In Qualcomm's BSP audio_policy_configuration.xml, one route is missing,
|
||||
from primary output and telephony to BT SCO.
|
||||
|
||||
Add it if we detect telephony and bt sco, but no such route.
|
||||
|
||||
Change-Id: Ifea0f88276ec9a0811f3cb1973c4b06f2c82077b
|
||||
---
|
||||
.../managerdefinitions/src/Serializer.cpp | 93 +++++++++++++++++++
|
||||
1 file changed, 93 insertions(+)
|
||||
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index 84ed6567b2..9a857ff091 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -648,6 +648,98 @@ std::variant<status_t, RouteTraits::Element> PolicySerializer::deserialize<Route
|
||||
return route;
|
||||
}
|
||||
|
||||
+static void fixupQualcommBtScoRoute(RouteTraits::Collection& routes, DevicePortTraits::Collection& devicePorts, HwModule* ctx) {
|
||||
+ // On many Qualcomm devices, there is a BT SCO Headset Mic => primary input mix
|
||||
+ // But Telephony Rx => BT SCO Headset route is missing
|
||||
+ // When we detect such case, add the missing route
|
||||
+
|
||||
+ // If we have:
|
||||
+ // <route type="mix" sink="Telephony Tx" sources="voice_tx"/>
|
||||
+ // <route type="mix" sink="primary input" sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
|
||||
+ // <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink" />
|
||||
+ // And no <route type="mix" sink="BT SCO Headset" />
|
||||
+
|
||||
+ // Add:
|
||||
+ // <route type="mix" sink="BT SCO Headset" sources="primary output,deep_buffer,compressed_offload,Telephony Rx"/>
|
||||
+ bool foundBtScoHeadsetDevice = false;
|
||||
+ for(const auto& device: devicePorts) {
|
||||
+ if(device->getTagName() == "BT SCO Headset") {
|
||||
+ foundBtScoHeadsetDevice = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if(!foundBtScoHeadsetDevice) {
|
||||
+ ALOGE("No BT SCO Headset device found, don't patch policy");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ bool foundTelephony = false;
|
||||
+ bool foundBtScoInput = false;
|
||||
+ bool foundScoHeadsetRoute = false;
|
||||
+ for(const auto& route: routes) {
|
||||
+ ALOGE("Looking at route %d\n", route->getType());
|
||||
+ if(route->getType() != AUDIO_ROUTE_MIX)
|
||||
+ continue;
|
||||
+ auto sink = route->getSink();
|
||||
+ ALOGE("... With sink %s\n", sink->getTagName().c_str());
|
||||
+ if(sink->getTagName() == "Telephony Tx") {
|
||||
+ foundTelephony = true;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if(sink->getTagName() == "BT SCO Headset") {
|
||||
+ foundScoHeadsetRoute = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ for(const auto& source: route->getSources()) {
|
||||
+ ALOGE("... With source %s\n", source->getTagName().c_str());
|
||||
+ if(source->getTagName() == "BT SCO Headset Mic") {
|
||||
+ foundBtScoInput = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ //The route we want to add is already there
|
||||
+ ALOGE("Done looking for existing routes");
|
||||
+ if(foundScoHeadsetRoute)
|
||||
+ return;
|
||||
+
|
||||
+ ALOGE("No existing route found... %d %d", foundTelephony ? 1 : 0, foundBtScoInput ? 1 : 0);
|
||||
+ //We couldn't find the routes we assume are required for the function we want to add
|
||||
+ if(!foundTelephony || !foundBtScoInput)
|
||||
+ return;
|
||||
+ ALOGE("Adding our own.");
|
||||
+
|
||||
+ // Add:
|
||||
+ // <route type="mix" sink="BT SCO Headset" sources="primary output,deep_buffer,compressed_offload,Telephony Rx"/>
|
||||
+ AudioRoute *newRoute = new AudioRoute(AUDIO_ROUTE_MIX);
|
||||
+
|
||||
+ auto sink = ctx->findPortByTagName("BT SCO Headset");
|
||||
+ ALOGE("Got sink %p\n", sink.get());
|
||||
+ newRoute->setSink(sink);
|
||||
+
|
||||
+ Vector<sp<PolicyAudioPort>> sources;
|
||||
+ for(const auto& sourceName: {
|
||||
+ "primary output",
|
||||
+ "deep_buffer",
|
||||
+ "compressed_offload",
|
||||
+ "Telephony Rx"
|
||||
+ }) {
|
||||
+ auto source = ctx->findPortByTagName(sourceName);
|
||||
+ ALOGE("Got source %p\n", source.get());
|
||||
+ if (source.get() != nullptr) {
|
||||
+ sources.add(source);
|
||||
+ source->addRoute(newRoute);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ newRoute->setSources(sources);
|
||||
+
|
||||
+ sink->addRoute(newRoute);
|
||||
+
|
||||
+ auto ret = routes.add(newRoute);
|
||||
+ ALOGE("route add returned %zd", ret);
|
||||
+}
|
||||
+
|
||||
template<>
|
||||
std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<ModuleTraits>(
|
||||
const xmlNode *cur, ModuleTraits::PtrSerializingCtx ctx)
|
||||
@@ -695,6 +787,7 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||
if (status != NO_ERROR) {
|
||||
return status;
|
||||
}
|
||||
+ fixupQualcommBtScoRoute(routes, devicePorts, module.get());
|
||||
module->setRoutes(routes);
|
||||
|
||||
for (const xmlNode *children = cur->xmlChildrenNode; children != NULL;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,94 @@
|
||||
From f12a643ff63c4d54bb5d50a0a9d62d518b5db470 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 1 Oct 2019 13:35:49 +0200
|
||||
Subject: [PATCH 02/19] Add (partial, cam id is hardcoded) support for Asus ZF6
|
||||
motor camera
|
||||
|
||||
Change-Id: Iea6e1370780a1d16f728748d1d948d092532d8fe
|
||||
---
|
||||
.../camera/libcameraservice/CameraService.cpp | 26 +++++++++++++++++++
|
||||
.../camera/libcameraservice/CameraService.h | 3 +++
|
||||
2 files changed, 29 insertions(+)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
|
||||
index d0d3a9d81b..6705186fdd 100644
|
||||
--- a/services/camera/libcameraservice/CameraService.cpp
|
||||
+++ b/services/camera/libcameraservice/CameraService.cpp
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/wait.h>
|
||||
#include <inttypes.h>
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -142,6 +143,7 @@ const String8 CameraService::kOfflineDevice("offline-");
|
||||
static std::set<String8> sServiceErrorEventSet;
|
||||
|
||||
CameraService::CameraService() :
|
||||
+ mPhysicalFrontCamStatus(false),
|
||||
mEventLog(DEFAULT_EVENT_LOG_LENGTH),
|
||||
mNumberOfCameras(0),
|
||||
mNumberOfCamerasWithoutSystemCamera(0),
|
||||
@@ -1874,6 +1876,7 @@ Status CameraService::connectHelper(const sp<CALLBACK>& cameraCb, const String8&
|
||||
mServiceLock.lock();
|
||||
} else {
|
||||
// Otherwise, add client to active clients list
|
||||
+ physicalFrontCam(cameraId == "1");
|
||||
finishConnectLocked(client, partial, oomScoreOffset);
|
||||
}
|
||||
|
||||
@@ -1963,6 +1966,27 @@ status_t CameraService::addOfflineClient(String8 cameraId, sp<BasicClient> offli
|
||||
return OK;
|
||||
}
|
||||
|
||||
+void CameraService::physicalFrontCam(bool on) {
|
||||
+ if(on == mPhysicalFrontCamStatus) return;
|
||||
+ mPhysicalFrontCamStatus = on;
|
||||
+
|
||||
+ if(access("/dev/asusMotoDrv", F_OK) == 0) {
|
||||
+ int pid = fork();
|
||||
+ if(pid == 0) {
|
||||
+ const char* cmd[] = {
|
||||
+ "/system/bin/asus-motor",
|
||||
+ "0",
|
||||
+ NULL
|
||||
+ };
|
||||
+ cmd[1] = on ? "0" : "1";
|
||||
+ execve("/system/bin/asus-motor", (char**)cmd, environ);
|
||||
+ _exit(1);
|
||||
+ } else {
|
||||
+ waitpid(pid, NULL, 0);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
Status CameraService::setTorchMode(const String16& cameraId, bool enabled,
|
||||
const sp<IBinder>& clientBinder) {
|
||||
Mutex::Autolock lock(mServiceLock);
|
||||
@@ -3049,6 +3073,8 @@ binder::Status CameraService::BasicClient::disconnect() {
|
||||
}
|
||||
mDisconnected = true;
|
||||
|
||||
+ sCameraService->physicalFrontCam(false);
|
||||
+
|
||||
sCameraService->removeByClient(this);
|
||||
sCameraService->logDisconnected(mCameraIdStr, mClientPid, String8(mClientPackageName));
|
||||
sCameraService->mCameraProviderManager->removeRef(CameraProviderManager::DeviceMode::CAMERA,
|
||||
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
|
||||
index bc2e3479bc..b58c41e115 100644
|
||||
--- a/services/camera/libcameraservice/CameraService.h
|
||||
+++ b/services/camera/libcameraservice/CameraService.h
|
||||
@@ -211,6 +211,9 @@ public:
|
||||
// Register an offline client for a given active camera id
|
||||
status_t addOfflineClient(String8 cameraId, sp<BasicClient> offlineClient);
|
||||
|
||||
+ bool mPhysicalFrontCamStatus;
|
||||
+ void physicalFrontCam(bool on);
|
||||
+
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// Client functionality
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,55 @@
|
||||
From ee73ef44e02af6f673e83a8810fe9ea88dc2c821 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Thu, 23 Jan 2020 11:13:43 +0800
|
||||
Subject: [PATCH 03/19] audiopolicy: try again with trimmed audio port name if
|
||||
not found
|
||||
|
||||
* In Spreadtrum BSP, some audio routes may contain ports with extra
|
||||
spaces at the beginning and the end, causing audiopolicy to refuse to
|
||||
load and leading to broken audio.
|
||||
|
||||
* Fix this by retrying with trimmed port name when not found. Do not
|
||||
use trimmed name all the time because a white space is a valid
|
||||
character in port name, and we cannot be sure nobody is using it for
|
||||
legitimite purposes.
|
||||
|
||||
Change-Id: I993708b28e8404bc8c483d71a850ac69382231bd
|
||||
---
|
||||
.../common/managerdefinitions/src/Serializer.cpp | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index 9a857ff091..d919951007 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -579,6 +579,17 @@ std::variant<status_t, DevicePortTraits::Element> PolicySerializer::deserialize<
|
||||
return deviceDesc;
|
||||
}
|
||||
|
||||
+char* trim(char * s) {
|
||||
+ int l = strlen(s);
|
||||
+
|
||||
+ if (l > 0) {
|
||||
+ while (isspace(s[l - 1])) --l;
|
||||
+ while (*s && isspace(*s)) ++s, --l;
|
||||
+ }
|
||||
+
|
||||
+ return strndup(s, l);
|
||||
+}
|
||||
+
|
||||
template<>
|
||||
std::variant<status_t, RouteTraits::Element> PolicySerializer::deserialize<RouteTraits>(
|
||||
const xmlNode *cur, RouteTraits::PtrSerializingCtx ctx)
|
||||
@@ -626,6 +637,9 @@ std::variant<status_t, RouteTraits::Element> PolicySerializer::deserialize<Route
|
||||
while (devTag != NULL) {
|
||||
if (strlen(devTag) != 0) {
|
||||
sp<PolicyAudioPort> source = ctx->findPortByTagName(devTag);
|
||||
+ if (source == NULL) {
|
||||
+ source = ctx->findPortByTagName(trim(devTag));
|
||||
+ }
|
||||
if (source == NULL && !mIgnoreVendorExtensions) {
|
||||
ALOGE("%s: no source found with name=%s", __func__, devTag);
|
||||
return BAD_VALUE;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 8c442bfb93e93c8ea4e7a6de03ea7b5e42369f11 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 13 Apr 2020 21:01:16 +0200
|
||||
Subject: [PATCH 04/19] There are three SCO devices. Fallback from one to the
|
||||
others if needed
|
||||
|
||||
Change-Id: I414dcb6b154855c00cb8520b23dc1069827864b2
|
||||
---
|
||||
.../managerdefinitions/src/HwModule.cpp | 21 +++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp b/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp
|
||||
index 3a143b0058..565defc203 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp
|
||||
@@ -309,6 +309,27 @@ sp<HwModule> HwModuleCollection::getModuleForDeviceType(audio_devices_t type,
|
||||
}
|
||||
}
|
||||
}
|
||||
+ //We didn't find one? Ok but all SCOs are equivalent surely?
|
||||
+ if(type == AUDIO_DEVICE_OUT_BLUETOOTH_SCO ||
|
||||
+ type == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET ||
|
||||
+ type == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT) {
|
||||
+ ALOGE("Fallback SCO");
|
||||
+ if(type != AUDIO_DEVICE_OUT_BLUETOOTH_SCO) {
|
||||
+ auto ret = getModuleForDeviceType(AUDIO_DEVICE_OUT_BLUETOOTH_SCO, encodedFormat);
|
||||
+ ALOGE("Fallback SCO simple? %s", (ret != nullptr) ? "yes" : "no");
|
||||
+ if(ret != nullptr) return ret;
|
||||
+ }
|
||||
+ if(type != AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET) {
|
||||
+ auto ret = getModuleForDeviceType(AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET, encodedFormat);
|
||||
+ ALOGE("Fallback SCO headset? %s", (ret != nullptr) ? "yes" : "no");
|
||||
+ if(ret != nullptr) return ret;
|
||||
+ }
|
||||
+ if(type != AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT) {
|
||||
+ auto ret = getModuleForDeviceType(AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT, encodedFormat);
|
||||
+ ALOGE("Fallback SCO carkit? %s", (ret != nullptr) ? "yes" : "no");
|
||||
+ if(ret != nullptr) return ret;
|
||||
+ }
|
||||
+ }
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,80 @@
|
||||
From 7541559278b514f14a4f2f8a5f775996ee1e5e68 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 14 May 2020 19:54:55 +0200
|
||||
Subject: [PATCH 05/19] Add persist.sys.phh.samsung.camera_ids property to
|
||||
access hidden Samsung cameras
|
||||
|
||||
Change-Id: I2c7bf535272acc28ed2277e96c78ddd28a0b4593
|
||||
---
|
||||
services/camera/libcameraservice/Android.bp | 1 +
|
||||
.../common/CameraProviderManager.cpp | 14 ++++++++++++--
|
||||
2 files changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp
|
||||
index 26562e0426..e940c33845 100644
|
||||
--- a/services/camera/libcameraservice/Android.bp
|
||||
+++ b/services/camera/libcameraservice/Android.bp
|
||||
@@ -154,6 +154,7 @@ cc_library_shared {
|
||||
"android.hardware.camera.device@3.5",
|
||||
"android.hardware.camera.device@3.6",
|
||||
"android.hardware.camera.device@3.7",
|
||||
+ "vendor.samsung.hardware.camera.provider@3.0",
|
||||
"media_permission-aidl-cpp",
|
||||
],
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
index 4f2b878d26..d11ad8d766 100644
|
||||
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "CameraProviderManager.h"
|
||||
|
||||
#include <android/hardware/camera/device/3.7/ICameraDevice.h>
|
||||
+#include <vendor/samsung/hardware/camera/provider/3.0/ISehCameraProvider.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
@@ -1371,6 +1372,7 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
mMinorVersion = 6;
|
||||
}
|
||||
}
|
||||
+
|
||||
// We need to check again since cast2_6.isOk() succeeds even if the provider
|
||||
// version isn't actually 2.6.
|
||||
if (interface2_6 == nullptr){
|
||||
@@ -1407,6 +1409,9 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
return mapToStatusT(status);
|
||||
}
|
||||
|
||||
+ auto samsungCast = vendor::samsung::hardware::camera::provider::V3_0::ISehCameraProvider::castFrom(interface);
|
||||
+ auto samsungProvider = samsungCast.isOk() ? static_cast<sp<vendor::samsung::hardware::camera::provider::V3_0::ISehCameraProvider>>(samsungCast) : nullptr;
|
||||
+
|
||||
hardware::Return<bool> linked = interface->linkToDeath(this, /*cookie*/ mId);
|
||||
if (!linked.isOk()) {
|
||||
ALOGE("%s: Transaction error in linking to camera provider '%s' death: %s",
|
||||
@@ -1437,7 +1442,7 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
|
||||
// Get initial list of camera devices, if any
|
||||
std::vector<std::string> devices;
|
||||
- hardware::Return<void> ret = interface->getCameraIdList([&status, this, &devices](
|
||||
+ auto cb = [&status, this, &devices](
|
||||
Status idStatus,
|
||||
const hardware::hidl_vec<hardware::hidl_string>& cameraDeviceNames) {
|
||||
status = idStatus;
|
||||
@@ -1454,7 +1459,12 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
mProviderPublicCameraIds.push_back(id);
|
||||
}
|
||||
}
|
||||
- } });
|
||||
+ } };
|
||||
+ hardware::Return<void> ret;
|
||||
+ if(samsungProvider != nullptr && property_get_bool("persist.sys.phh.samsung.camera_ids", false))
|
||||
+ ret = samsungProvider->sehGetCameraIdList(cb);
|
||||
+ else
|
||||
+ ret = interface->getCameraIdList(cb);
|
||||
if (!ret.isOk()) {
|
||||
ALOGE("%s: Transaction error in getting camera ID list from provider '%s': %s",
|
||||
__FUNCTION__, mProviderName.c_str(), linked.description().c_str());
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 274f3141e9dc93dde02a81a1889cd76b14860251 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 19 May 2020 14:01:14 +0200
|
||||
Subject: [PATCH 06/19] Add a property to force camera timestamp source
|
||||
|
||||
Some devices wrongly report their timesource
|
||||
Camera's timesource can either be CLOCK_MONOTONIC, or CLOCK_BOOTTIME
|
||||
The former doesn't increment in sleep, while the later does.
|
||||
There is a camera HAL property for that, though some devices don't
|
||||
report it properly.
|
||||
|
||||
This issue happens on Xiaomi Redmi 7A, it needs to force the value to 1
|
||||
|
||||
Add a property persist.sys.phh.camera.force_timestampsource to force
|
||||
timestamp source.
|
||||
---
|
||||
.../libcameraservice/device3/Camera3Device.cpp | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
index fd645c7a72..4a6a922c43 100644
|
||||
--- a/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
+++ b/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
@@ -346,8 +346,16 @@ status_t Camera3Device::initializeCommonLocked() {
|
||||
// Measure the clock domain offset between camera and video/hw_composer
|
||||
camera_metadata_entry timestampSource =
|
||||
mDeviceInfo.find(ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE);
|
||||
- if (timestampSource.count > 0 && timestampSource.data.u8[0] ==
|
||||
- ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME) {
|
||||
+ int timestampSourceValue = 0;
|
||||
+ if ((timestampSource.count > 0 && timestampSource.data.u8[0] ==
|
||||
+ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME)) {
|
||||
+ timestampSourceValue = 1;
|
||||
+ }
|
||||
+ int forceTimestampSource = property_get_int32("persist.sys.phh.camera.force_timestampsource", -1);
|
||||
+ //Don't override if it's -1, default value
|
||||
+ if(forceTimestampSource == 0) timestampSourceValue = 0;
|
||||
+ if(forceTimestampSource == 1) timestampSourceValue = 1;
|
||||
+ if (timestampSourceValue == 1) {
|
||||
mTimestampOffset = getMonoToBoottimeOffset();
|
||||
}
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,87 @@
|
||||
From 6d40f84ff32e4c1f50f794890790d6159132ba4e Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 24 Apr 2018 00:14:28 +0200
|
||||
Subject: [PATCH 07/19] FIH devices: Fix "Earpiece" audio output
|
||||
|
||||
On some FIH devices (confirmed on Razer, and probably on Aquos SS2),
|
||||
Earpiece is not listed in attachedDevices, and devicePort's profile
|
||||
mentions it is AUDIO_CHANNEL_IN_MONO, instead of AUDIO_CHANNEL_OUT_MONO.
|
||||
|
||||
Detect such cases (output device, but got only AUDIO_CHANNEL_IN_MONO),
|
||||
and fix both channelMasks and attachedDevices
|
||||
|
||||
Change-Id: I4a88ba6d34d0fcd346eeea2ca903772f0271040a
|
||||
---
|
||||
.../managerdefinitions/src/Serializer.cpp | 27 ++++++++++++++++---
|
||||
1 file changed, 24 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index d919951007..abc54ccc24 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -416,23 +416,32 @@ std::variant<status_t, AudioGainTraits::Element> PolicySerializer::deserialize<A
|
||||
}
|
||||
}
|
||||
|
||||
+static bool fixedEarpieceChannels = false;
|
||||
template<>
|
||||
std::variant<status_t, AudioProfileTraits::Element>
|
||||
PolicySerializer::deserialize<AudioProfileTraits>(
|
||||
- const xmlNode *cur, AudioProfileTraits::PtrSerializingCtx /*serializingContext*/)
|
||||
+ const xmlNode *cur, AudioProfileTraits::PtrSerializingCtx serializingContext)
|
||||
{
|
||||
using Attributes = AudioProfileTraits::Attributes;
|
||||
+ bool isOutput = serializingContext != nullptr;
|
||||
|
||||
std::string samplingRates = getXmlAttribute(cur, Attributes::samplingRates);
|
||||
std::string format = getXmlAttribute(cur, Attributes::format);
|
||||
std::string channels = getXmlAttribute(cur, Attributes::channelMasks);
|
||||
+ ChannelTraits::Collection channelsMask = channelMasksFromString(channels, ",");
|
||||
+
|
||||
+ //Some Foxconn devices have wrong earpiece channel mask, leading to no channel mask
|
||||
+ if(channelsMask.size() == 1 && *channelsMask.begin() == AUDIO_CHANNEL_IN_MONO && isOutput) {
|
||||
+ fixedEarpieceChannels = true;
|
||||
+ channelsMask = channelMasksFromString("AUDIO_CHANNEL_OUT_MONO", ",");
|
||||
+ }
|
||||
|
||||
if (mIgnoreVendorExtensions && maybeVendorExtension(format)) {
|
||||
ALOGI("%s: vendor extension format \"%s\" skipped", __func__, format.c_str());
|
||||
return NO_INIT;
|
||||
}
|
||||
AudioProfileTraits::Element profile = new AudioProfile(formatFromString(format, gDynamicFormat),
|
||||
- channelMasksFromString(channels, mChannelMasksSeparator.c_str()),
|
||||
+ channelsMask,
|
||||
samplingRatesFromString(samplingRates, mSamplingRatesSeparator.c_str()));
|
||||
|
||||
profile->setDynamicFormat(profile->getFormat() == gDynamicFormat);
|
||||
@@ -557,7 +566,11 @@ std::variant<status_t, DevicePortTraits::Element> PolicySerializer::deserialize<
|
||||
new DeviceDescriptor(type, name, address, encodedFormats);
|
||||
|
||||
AudioProfileTraits::Collection profiles;
|
||||
- status_t status = deserializeCollection<AudioProfileTraits>(cur, &profiles, NULL);
|
||||
+ status_t status;
|
||||
+ if(audio_is_output_devices(type))
|
||||
+ status = deserializeCollection<AudioProfileTraits>(cur, &profiles, (AudioProfileTraits::PtrSerializingCtx)1);
|
||||
+ else
|
||||
+ status = deserializeCollection<AudioProfileTraits>(cur, &profiles, NULL);
|
||||
if (status != NO_ERROR) {
|
||||
return status;
|
||||
}
|
||||
@@ -848,6 +861,14 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if(fixedEarpieceChannels) {
|
||||
+ sp<DeviceDescriptor> device =
|
||||
+ module->getDeclaredDevices().getDeviceFromTagName("Earpiece");
|
||||
+ if(device != 0)
|
||||
+ ctx->addDevice(device);
|
||||
+ fixedEarpieceChannels = false;
|
||||
+ }
|
||||
return module;
|
||||
}
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,32 @@
|
||||
From ed83392795ee1511619cb8d81160e6feecdcb7f9 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 12 Sep 2020 12:32:50 +0200
|
||||
Subject: [PATCH 08/19] [audiopolicy] No longer make re-assigning legacy audio
|
||||
groups fatal. Mi9 declares AUDIO_STREAM_PATCH and AUDIO_STREAM_REROUTING
|
||||
which is defined by framework too
|
||||
|
||||
Change-Id: I794fe22d63a8af705be4f5f09b9879ecaab3eae5
|
||||
---
|
||||
services/audiopolicy/engine/common/src/EngineBase.cpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/services/audiopolicy/engine/common/src/EngineBase.cpp b/services/audiopolicy/engine/common/src/EngineBase.cpp
|
||||
index 150a9a8e4f..740eab288c 100644
|
||||
--- a/services/audiopolicy/engine/common/src/EngineBase.cpp
|
||||
+++ b/services/audiopolicy/engine/common/src/EngineBase.cpp
|
||||
@@ -216,9 +216,9 @@ engineConfig::ParsingResult EngineBase::loadAudioPolicyEngineConfig()
|
||||
}
|
||||
if (group.stream != AUDIO_STREAM_DEFAULT) {
|
||||
// A legacy stream can be assigned once to a volume group
|
||||
- LOG_ALWAYS_FATAL_IF(checkStreamForGroups(group.stream, mVolumeGroups),
|
||||
- "stream %s already assigned to a volume group, "
|
||||
- "review the configuration", toString(group.stream).c_str());
|
||||
+ if(checkStreamForGroups(group.stream, mVolumeGroups)) {
|
||||
+ ALOGE("stream %s already assigned to a volume group, review the configuration", toString(group.stream).c_str());
|
||||
+ }
|
||||
volumeGroup->addSupportedStream(group.stream);
|
||||
}
|
||||
addSupportedAttributesToGroup(group, volumeGroup, strategy);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,326 @@
|
||||
From 55f69fe9965419355d26e7b5a2bb9975eef0f23c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 25 May 2020 21:26:54 +0200
|
||||
Subject: [PATCH 09/19] Add persist.sys.phh.disable_a2dp_offload property to
|
||||
force a2dp offload
|
||||
|
||||
Change-Id: Id474540c33c594cc4010a1a398d82bff8aadaeea
|
||||
---
|
||||
media/libstagefright/ACodec.cpp | 20 +-
|
||||
.../managerdefinitions/src/Serializer.cpp | 182 +++++++++++++++++-
|
||||
.../audiopolicy/enginedefault/src/Engine.cpp | 2 +-
|
||||
3 files changed, 197 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
|
||||
index 1aa18485f9..f9365cacc9 100644
|
||||
--- a/media/libstagefright/ACodec.cpp
|
||||
+++ b/media/libstagefright/ACodec.cpp
|
||||
@@ -1183,6 +1183,9 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
|
||||
return err;
|
||||
}
|
||||
|
||||
+ ALOGE("Window undequeued buffers is %d\n", *minUndequeuedBuffers);
|
||||
+ ALOGE("Consumerrequested %d\n", def.nBufferCountMin);
|
||||
+
|
||||
// FIXME: assume that surface is controlled by app (native window
|
||||
// returns the number for the case when surface is not controlled by app)
|
||||
// FIXME2: This means that minUndeqeueudBufs can be 1 larger than reported
|
||||
@@ -1195,22 +1198,29 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
|
||||
// 2. try to allocate two (2) additional buffers to reduce starvation from
|
||||
// the consumer
|
||||
// plus an extra buffer to account for incorrect minUndequeuedBufs
|
||||
- for (OMX_U32 extraBuffers = 2 + 1; /* condition inside loop */; extraBuffers--) {
|
||||
- OMX_U32 newBufferCount =
|
||||
- def.nBufferCountMin + *minUndequeuedBuffers + extraBuffers;
|
||||
+ for (int extraBuffers = 2 + 1; /* condition inside loop */; extraBuffers--) {
|
||||
+ int a = def.nBufferCountMin;
|
||||
+ int b = *minUndequeuedBuffers;
|
||||
+ int c = extraBuffers;
|
||||
+ int newBufferCount = a+b+c;
|
||||
def.nBufferCountActual = newBufferCount;
|
||||
err = mOMXNode->setParameter(
|
||||
OMX_IndexParamPortDefinition, &def, sizeof(def));
|
||||
|
||||
if (err == OK) {
|
||||
- *minUndequeuedBuffers += extraBuffers;
|
||||
+ ALOGE("Managed to allocate %d buffers (%d extra)\n", newBufferCount, extraBuffers);
|
||||
+ if(extraBuffers > 0) {
|
||||
+ *minUndequeuedBuffers += extraBuffers;
|
||||
+ } else {
|
||||
+ *minUndequeuedBuffers -= -extraBuffers;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
|
||||
ALOGW("[%s] setting nBufferCountActual to %u failed: %d",
|
||||
mComponentName.c_str(), newBufferCount, err);
|
||||
/* exit condition */
|
||||
- if (extraBuffers == 0) {
|
||||
+ if (extraBuffers == -2 || newBufferCount == 1) {
|
||||
return err;
|
||||
}
|
||||
}
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index abc54ccc24..c6db471c8c 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <utils/StrongPointer.h>
|
||||
#include <utils/Errors.h>
|
||||
#include <utils/RefBase.h>
|
||||
+#include <cutils/properties.h>
|
||||
#include "Serializer.h"
|
||||
#include "TypeConverter.h"
|
||||
|
||||
@@ -36,6 +37,8 @@ namespace android {
|
||||
|
||||
namespace {
|
||||
|
||||
+static bool forceDisableA2dpOffload = false;
|
||||
+
|
||||
using utilities::convertTo;
|
||||
|
||||
static inline bool maybeVendorExtension(const std::string& s) {
|
||||
@@ -335,7 +338,7 @@ status_t PolicySerializer::deserializeCollection(const xmlNode *cur,
|
||||
} else if (mIgnoreVendorExtensions && std::get<status_t>(maybeElement) == NO_INIT) {
|
||||
// Skip a vendor extension element.
|
||||
} else {
|
||||
- return BAD_VALUE;
|
||||
+ ALOGE("Ignoring...");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -795,11 +798,33 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||
ModuleTraits::Element module = new HwModule(name.c_str(), versionMajor, versionMinor);
|
||||
|
||||
// Deserialize children: Audio Mix Port, Audio Device Ports (Source/Sink), Audio Routes
|
||||
+ bool isA2dpModule = strcmp(name.c_str(), "a2dp") == 0;
|
||||
+ bool isPrimaryModule = strcmp(name.c_str(), "primary") == 0;
|
||||
+
|
||||
MixPortTraits::Collection mixPorts;
|
||||
status_t status = deserializeCollection<MixPortTraits>(cur, &mixPorts, NULL);
|
||||
if (status != NO_ERROR) {
|
||||
return status;
|
||||
}
|
||||
+ if(forceDisableA2dpOffload && isA2dpModule) {
|
||||
+ for(const auto& mixPort: mixPorts) {
|
||||
+ ALOGE("Disable a2dp offload...? %s", mixPort->getTagName().c_str());
|
||||
+ //"a2dp" sw module already has a2dp out
|
||||
+ if(mixPort->getTagName() == "a2dp output") {
|
||||
+ forceDisableA2dpOffload = false;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if(forceDisableA2dpOffload && isA2dpModule) {
|
||||
+ //Add
|
||||
+ //<mixPort name="a2dp output" role="source"/>
|
||||
+ auto mixPort = new IOProfile("a2dp output", AUDIO_PORT_ROLE_SOURCE);
|
||||
+ AudioProfileTraits::Collection profiles;
|
||||
+ profiles.add(AudioProfile::createFullDynamic());
|
||||
+ mixPort->setAudioProfiles(profiles);
|
||||
+ mixPorts.push_back(mixPort);
|
||||
+ }
|
||||
module->setProfiles(mixPorts);
|
||||
|
||||
DevicePortTraits::Collection devicePorts;
|
||||
@@ -807,6 +832,90 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||
if (status != NO_ERROR) {
|
||||
return status;
|
||||
}
|
||||
+ Vector<std::string> a2dpOuts;
|
||||
+ a2dpOuts.push_back("BT A2DP Out");
|
||||
+ a2dpOuts.push_back("BT A2DP Headphones");
|
||||
+ a2dpOuts.push_back("BT A2DP Speaker");
|
||||
+ if(forceDisableA2dpOffload) {
|
||||
+ if(isA2dpModule) {
|
||||
+ //<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink" address="lhdc_a2dp">
|
||||
+ // <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
+ // samplingRates="44100,48000,96000"
|
||||
+ // channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
+ //</devicePort>
|
||||
+ if(true) {
|
||||
+ FormatVector formats;
|
||||
+ //auto devicePortOut = new DeviceDescriptor(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, formats, "BT A2DP Out");
|
||||
+ auto devicePortOut = new DeviceDescriptor(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, "BT A2DP Out");
|
||||
+ AudioProfileTraits::Collection profiles;
|
||||
+ ChannelTraits::Collection channels;
|
||||
+ channels.insert(AUDIO_CHANNEL_OUT_STEREO);
|
||||
+ SampleRateSet sampleRates;
|
||||
+ sampleRates.insert(44100);
|
||||
+ sampleRates.insert(48000);
|
||||
+ sampleRates.insert(96000);
|
||||
+ auto profile = new AudioProfile(AUDIO_FORMAT_PCM_16_BIT, channels, sampleRates);
|
||||
+ profiles.add(profile);
|
||||
+ devicePortOut->setAudioProfiles(profiles);
|
||||
+ devicePortOut->setAddress("lhdc_a2dp");
|
||||
+ devicePorts.add(devicePortOut);
|
||||
+ }
|
||||
+ //<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink" address="lhdc_a2dp">
|
||||
+ // <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
+ // samplingRates="44100,48000,96000"
|
||||
+ // channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
+ //</devicePort>
|
||||
+ if(true) {
|
||||
+ FormatVector formats;
|
||||
+ auto devicePortOut = new DeviceDescriptor(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, "BT A2DP Headphones");
|
||||
+ AudioProfileTraits::Collection profiles;
|
||||
+ ChannelTraits::Collection channels;
|
||||
+ channels.insert(AUDIO_CHANNEL_OUT_STEREO);
|
||||
+ SampleRateSet sampleRates;
|
||||
+ sampleRates.insert(44100);
|
||||
+ sampleRates.insert(48000);
|
||||
+ sampleRates.insert(96000);
|
||||
+ auto profile = new AudioProfile(AUDIO_FORMAT_PCM_16_BIT, channels, sampleRates);
|
||||
+ profiles.add(profile);
|
||||
+ devicePortOut->setAudioProfiles(profiles);
|
||||
+ devicePortOut->setAddress("lhdc_a2dp");
|
||||
+ devicePorts.add(devicePortOut);
|
||||
+ }
|
||||
+ //<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink" address="lhdc_a2dp">
|
||||
+ // <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
+ // samplingRates="44100,48000,96000"
|
||||
+ // channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
+ //</devicePort>
|
||||
+ if(true) {
|
||||
+ FormatVector formats;
|
||||
+ auto devicePortOut = new DeviceDescriptor(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, "BT A2DP Speaker");
|
||||
+ AudioProfileTraits::Collection profiles;
|
||||
+ ChannelTraits::Collection channels;
|
||||
+ channels.insert(AUDIO_CHANNEL_OUT_STEREO);
|
||||
+ SampleRateSet sampleRates;
|
||||
+ sampleRates.insert(44100);
|
||||
+ sampleRates.insert(48000);
|
||||
+ sampleRates.insert(96000);
|
||||
+ auto profile = new AudioProfile(AUDIO_FORMAT_PCM_16_BIT, channels, sampleRates);
|
||||
+ profiles.add(profile);
|
||||
+ devicePortOut->setAudioProfiles(profiles);
|
||||
+ devicePortOut->setAddress("lhdc_a2dp");
|
||||
+ devicePorts.add(devicePortOut);
|
||||
+
|
||||
+ }
|
||||
+ } else if(isPrimaryModule) {
|
||||
+ for(const auto& out: a2dpOuts) {
|
||||
+ auto iterA = std::find_if(devicePorts.begin(), devicePorts.end(), [out](const auto port) {
|
||||
+ if(port->getTagName() == out) return true;
|
||||
+ return false;
|
||||
+ });
|
||||
+ if(iterA != devicePorts.end()) {
|
||||
+ ALOGE("Erasing device port %s", (*iterA)->getTagName().c_str());
|
||||
+ devicePorts.erase(iterA);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
module->setDeclaredDevices(devicePorts);
|
||||
|
||||
RouteTraits::Collection routes;
|
||||
@@ -814,7 +923,76 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||
if (status != NO_ERROR) {
|
||||
return status;
|
||||
}
|
||||
+ if(forceDisableA2dpOffload) {
|
||||
+ if(strcmp(name.c_str(), "primary") == 0) {
|
||||
+ for(const auto& out: a2dpOuts) {
|
||||
+ auto iterA = std::find_if(routes.begin(), routes.end(), [out](const auto route) {
|
||||
+ if(route->getType() != AUDIO_ROUTE_MIX)
|
||||
+ return false;
|
||||
+ auto sink = route->getSink();
|
||||
+ if(sink->getTagName() == out) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ });
|
||||
+ if(iterA != routes.end()) {
|
||||
+ auto sink = (*iterA)->getSink()->getTagName();
|
||||
+ ALOGE("Erasing route %s", sink.c_str());
|
||||
+ routes.erase(iterA);
|
||||
+ }
|
||||
+ }
|
||||
+ } else if(isA2dpModule) {
|
||||
+ //<route type="mix" sink="BT A2DP Out"
|
||||
+ // sources="a2dp output"/>
|
||||
+ if(true) {
|
||||
+ auto newRoute = new AudioRoute(AUDIO_ROUTE_MIX);
|
||||
+ auto sink = module->findPortByTagName("BT A2DP Out");
|
||||
+ auto source = module->findPortByTagName("a2dp output");
|
||||
+ newRoute->setSink(sink);
|
||||
+ Vector<sp<PolicyAudioPort>> sources;
|
||||
+ sources.add(source);
|
||||
+
|
||||
+ sink->addRoute(newRoute);
|
||||
+ source->addRoute(newRoute);
|
||||
+ newRoute->setSources(sources);
|
||||
+
|
||||
+ routes.add(newRoute);
|
||||
+ }
|
||||
+ //<route type="mix" sink="BT A2DP Headphones"
|
||||
+ // sources="a2dp output"/>
|
||||
+ if(true) {
|
||||
+ auto newRoute = new AudioRoute(AUDIO_ROUTE_MIX);
|
||||
+ auto sink = module->findPortByTagName("BT A2DP Headphones");
|
||||
+ auto source = module->findPortByTagName("a2dp output");
|
||||
+ newRoute->setSink(sink);
|
||||
+ Vector<sp<PolicyAudioPort>> sources;
|
||||
+ sources.add(source);
|
||||
+
|
||||
+ sink->addRoute(newRoute);
|
||||
+ source->addRoute(newRoute);
|
||||
+ newRoute->setSources(sources);
|
||||
+ routes.add(newRoute);
|
||||
+ }
|
||||
+ //<route type="mix" sink="BT A2DP Speaker"
|
||||
+ // sources="a2dp output"/>
|
||||
+ if(true) {
|
||||
+ auto newRoute = new AudioRoute(AUDIO_ROUTE_MIX);
|
||||
+ auto sink = module->findPortByTagName("BT A2DP Speaker");
|
||||
+ auto source = module->findPortByTagName("a2dp output");
|
||||
+ newRoute->setSink(sink);
|
||||
+ Vector<sp<PolicyAudioPort>> sources;
|
||||
+ sources.add(source);
|
||||
+
|
||||
+ sink->addRoute(newRoute);
|
||||
+ source->addRoute(newRoute);
|
||||
+ newRoute->setSources(sources);
|
||||
+ routes.add(newRoute);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ ALOGE("Good morning");
|
||||
fixupQualcommBtScoRoute(routes, devicePorts, module.get());
|
||||
+ ALOGE("Good morning2");
|
||||
module->setRoutes(routes);
|
||||
|
||||
for (const xmlNode *children = cur->xmlChildrenNode; children != NULL;
|
||||
@@ -1019,6 +1197,7 @@ status_t PolicySerializer::deserialize(const char *configFile, AudioPolicyConfig
|
||||
status_t deserializeAudioPolicyFile(const char *fileName, AudioPolicyConfig *config)
|
||||
{
|
||||
PolicySerializer serializer;
|
||||
+ forceDisableA2dpOffload = property_get_bool("persist.sys.phh.disable_a2dp_offload", false);
|
||||
status_t status = serializer.deserialize(fileName, config);
|
||||
if (status != OK) config->clear();
|
||||
return status;
|
||||
@@ -1027,6 +1206,7 @@ status_t deserializeAudioPolicyFile(const char *fileName, AudioPolicyConfig *con
|
||||
status_t deserializeAudioPolicyFileForVts(const char *fileName, AudioPolicyConfig *config)
|
||||
{
|
||||
PolicySerializer serializer;
|
||||
+ forceDisableA2dpOffload = property_get_bool("persist.sys.phh.disable_a2dp_offload", false);
|
||||
status_t status = serializer.deserialize(fileName, config, true /*ignoreVendorExtensions*/);
|
||||
if (status != OK) config->clear();
|
||||
return status;
|
||||
diff --git a/services/audiopolicy/enginedefault/src/Engine.cpp b/services/audiopolicy/enginedefault/src/Engine.cpp
|
||||
index c73c17d1e4..314de7889b 100644
|
||||
--- a/services/audiopolicy/enginedefault/src/Engine.cpp
|
||||
+++ b/services/audiopolicy/enginedefault/src/Engine.cpp
|
||||
@@ -52,7 +52,7 @@ static const std::vector<legacy_strategy_map>& getLegacyStrategy() {
|
||||
{ "STRATEGY_ENFORCED_AUDIBLE", STRATEGY_ENFORCED_AUDIBLE },
|
||||
{ "STRATEGY_TRANSMITTED_THROUGH_SPEAKER", STRATEGY_TRANSMITTED_THROUGH_SPEAKER },
|
||||
{ "STRATEGY_ACCESSIBILITY", STRATEGY_ACCESSIBILITY },
|
||||
- { "STRATEGY_REROUTING", STRATEGY_REROUTING },
|
||||
+ //{ "STRATEGY_REROUTING", STRATEGY_REROUTING },
|
||||
{ "STRATEGY_PATCH", STRATEGY_REROUTING }, // boiler to manage stream patch volume
|
||||
{ "STRATEGY_CALL_ASSISTANT", STRATEGY_CALL_ASSISTANT },
|
||||
};
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,30 @@
|
||||
From c461aa6104426d270e1297a1e2d6213fb4c34297 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 21 Dec 2020 20:19:11 +0100
|
||||
Subject: [PATCH 10/19] Make camera IDs filter-out optional
|
||||
|
||||
Nowadays most people have Camera 2 apps, and would like to have all
|
||||
cameras, rather than limit which cameras are available.
|
||||
Add a property for that.
|
||||
---
|
||||
.../camera/libcameraservice/common/CameraProviderManager.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
index d11ad8d766..ab5ddd12d0 100644
|
||||
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
@@ -183,7 +183,9 @@ std::vector<std::string> CameraProviderManager::getAPI1CompatibleCameraDeviceIds
|
||||
// API1 app doesn't handle logical and physical camera devices well. So
|
||||
// for each camera facing, only take the first id advertised by HAL in
|
||||
// all [logical, physical1, physical2, ...] id combos, and filter out the rest.
|
||||
- filterLogicalCameraIdsLocked(providerDeviceIds);
|
||||
+ if(!property_get_bool("persist.sys.phh.include_all_cameras", false)) {
|
||||
+ filterLogicalCameraIdsLocked(providerDeviceIds);
|
||||
+ }
|
||||
collectDeviceIdsLocked(providerDeviceIds, publicDeviceIds, systemDeviceIds);
|
||||
}
|
||||
auto sortFunc =
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 91e653004e622132574610017e855056358d8f6c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 6 Mar 2021 19:15:24 -0500
|
||||
Subject: [PATCH 11/19] Fix AAC decoder failing to instantiate
|
||||
|
||||
This has been caused by I50fcc5ef35cb7e96592c2267652228b5fa074ba9
|
||||
Non-Android 11 vendors won't provide those calls, and will thus fail.
|
||||
---
|
||||
media/libstagefright/ACodec.cpp | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
|
||||
index f9365cacc9..52ca1955e8 100644
|
||||
--- a/media/libstagefright/ACodec.cpp
|
||||
+++ b/media/libstagefright/ACodec.cpp
|
||||
@@ -5405,9 +5405,7 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> ¬ify) {
|
||||
err = mOMXNode->getParameter(
|
||||
(OMX_INDEXTYPE)OMX_IndexParamAudioAndroidAacDrcPresentation,
|
||||
&presentation, sizeof(presentation));
|
||||
- if (err != OK) {
|
||||
- return err;
|
||||
- }
|
||||
+ if (err == OK) {
|
||||
notify->setInt32("aac-encoded-target-level",
|
||||
presentation.nEncodedTargetLevel);
|
||||
notify->setInt32("aac-drc-cut-level", presentation.nDrcCut);
|
||||
@@ -5420,6 +5418,7 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> ¬ify) {
|
||||
notify->setInt32("aac-drc-album-mode", presentation.nDrcAlbumMode);
|
||||
notify->setInt32("aac-drc-output-loudness",
|
||||
presentation.nDrcOutputLoudness);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
break;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,67 @@
|
||||
From 80e55073914af5719060ef1c6b1f3bddfb6b7b5f Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 13 Mar 2021 14:20:03 -0500
|
||||
Subject: [PATCH 12/19] Support Samsung R multi-cams
|
||||
|
||||
Change-Id: If46f385e8dd16185cbf37ab083e6a1242e1d1555
|
||||
---
|
||||
services/camera/libcameraservice/Android.bp | 1 +
|
||||
.../libcameraservice/common/CameraProviderManager.cpp | 8 +++++++-
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp
|
||||
index e940c33845..a2a2ad623e 100644
|
||||
--- a/services/camera/libcameraservice/Android.bp
|
||||
+++ b/services/camera/libcameraservice/Android.bp
|
||||
@@ -155,6 +155,7 @@ cc_library_shared {
|
||||
"android.hardware.camera.device@3.6",
|
||||
"android.hardware.camera.device@3.7",
|
||||
"vendor.samsung.hardware.camera.provider@3.0",
|
||||
+ "vendor.samsung.hardware.camera.provider@4.0",
|
||||
"media_permission-aidl-cpp",
|
||||
],
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
index ab5ddd12d0..c08bcb9ce2 100644
|
||||
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <android/hardware/camera/device/3.7/ICameraDevice.h>
|
||||
#include <vendor/samsung/hardware/camera/provider/3.0/ISehCameraProvider.h>
|
||||
+#include <vendor/samsung/hardware/camera/provider/4.0/ISehCameraProvider.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
@@ -1412,7 +1413,9 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
}
|
||||
|
||||
auto samsungCast = vendor::samsung::hardware::camera::provider::V3_0::ISehCameraProvider::castFrom(interface);
|
||||
+ auto samsung40Cast = vendor::samsung::hardware::camera::provider::V4_0::ISehCameraProvider::castFrom(interface);
|
||||
auto samsungProvider = samsungCast.isOk() ? static_cast<sp<vendor::samsung::hardware::camera::provider::V3_0::ISehCameraProvider>>(samsungCast) : nullptr;
|
||||
+ auto samsung40Provider = samsung40Cast.isOk() ? static_cast<sp<vendor::samsung::hardware::camera::provider::V4_0::ISehCameraProvider>>(samsung40Cast) : nullptr;
|
||||
|
||||
hardware::Return<bool> linked = interface->linkToDeath(this, /*cookie*/ mId);
|
||||
if (!linked.isOk()) {
|
||||
@@ -1450,6 +1453,7 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
status = idStatus;
|
||||
if (status == Status::OK) {
|
||||
for (auto& name : cameraDeviceNames) {
|
||||
+ ALOGE("Listing camera ID %s", name.c_str());
|
||||
uint16_t major, minor;
|
||||
std::string type, id;
|
||||
status_t res = parseDeviceName(name, &major, &minor, &type, &id);
|
||||
@@ -1463,7 +1467,9 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
}
|
||||
} };
|
||||
hardware::Return<void> ret;
|
||||
- if(samsungProvider != nullptr && property_get_bool("persist.sys.phh.samsung.camera_ids", false))
|
||||
+ if(samsung40Provider != nullptr && property_get_bool("persist.sys.phh.samsung.camera_ids", false))
|
||||
+ ret = samsung40Provider->sehGetCameraIdList(cb);
|
||||
+ else if(samsungProvider != nullptr && property_get_bool("persist.sys.phh.samsung.camera_ids", false))
|
||||
ret = samsungProvider->sehGetCameraIdList(cb);
|
||||
else
|
||||
ret = interface->getCameraIdList(cb);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 0b33dc520b09f9ad74005280920f561356333f99 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 23 Mar 2021 00:16:42 +0100
|
||||
Subject: [PATCH 13/19] [audiopolicy] Don't crash on unknown audio devices
|
||||
|
||||
Change-Id: I2df8d88f742da6a84aa8888cdf19de25444de919
|
||||
---
|
||||
.../audiopolicy/common/managerdefinitions/src/Serializer.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index c6db471c8c..a76da4569b 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -1011,7 +1011,7 @@ std::variant<status_t, ModuleTraits::Element> PolicySerializer::deserialize<Modu
|
||||
sp<DeviceDescriptor> device = module->getDeclaredDevices().
|
||||
getDeviceFromTagName(std::string(reinterpret_cast<const char*>(
|
||||
attachedDevice.get())));
|
||||
- if (device == nullptr && mIgnoreVendorExtensions) {
|
||||
+ if (device == nullptr) {
|
||||
ALOGW("Skipped attached device \"%s\" because it likely uses a vendor"
|
||||
"extension type",
|
||||
reinterpret_cast<const char*>(attachedDevice.get()));
|
||||
--
|
||||
2.29.2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user