Add Launcher3 patches

This commit is contained in:
Peter Cai 2022-08-17 22:25:02 -04:00
parent bc0032890e
commit 04694ee655
5 changed files with 192 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From f11b5953c3d3a4e69fcf91eb5642d5e7e37fe398 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 17 Aug 2022 22:02:33 -0400
Subject: [PATCH 1/5] Disable QSB in BuildConfig
Change-Id: I3150ef1d9b8c161ed2a6569d1ae75bba0060b36f
---
src_build_config/com/android/launcher3/BuildConfig.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src_build_config/com/android/launcher3/BuildConfig.java b/src_build_config/com/android/launcher3/BuildConfig.java
index 9a81d3f54c..8c83bcc372 100644
--- a/src_build_config/com/android/launcher3/BuildConfig.java
+++ b/src_build_config/com/android/launcher3/BuildConfig.java
@@ -23,5 +23,5 @@ public final class BuildConfig {
* Flag to state if the QSB is on the first screen and placed on the top,
* this can be overwritten in other launchers with a different value, if needed.
*/
- public static final boolean QSB_ON_FIRST_SCREEN = true;
+ public static final boolean QSB_ON_FIRST_SCREEN = false;
}
--
2.37.2

View File

@ -0,0 +1,42 @@
From 8d396831eabfaa0859313db9598a5641f51493e6 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Mon, 11 Oct 2021 20:48:44 -0700
Subject: [PATCH 2/5] Expose themed icon setting in ThemePicker
Change-Id: I44e9288c3de13a3604b7a03857ec400753317d9a
---
AndroidManifest.xml | 3 +++
quickstep/AndroidManifest-launcher.xml | 3 +++
2 files changed, 6 insertions(+)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4f580e0bd6..d5b14e5bb9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -67,6 +67,9 @@
<meta-data
android:name="com.android.launcher3.grid.control"
android:value="${packageName}.grid_control" />
+ <meta-data
+ android:name="com.android.launcher3.themedicon.option"
+ android:value="${packageName}.grid_control" />
</activity>
</application>
diff --git a/quickstep/AndroidManifest-launcher.xml b/quickstep/AndroidManifest-launcher.xml
index 7d7054f5a5..d2955c4327 100644
--- a/quickstep/AndroidManifest-launcher.xml
+++ b/quickstep/AndroidManifest-launcher.xml
@@ -66,6 +66,9 @@
<meta-data
android:name="com.android.launcher3.grid.control"
android:value="${packageName}.grid_control" />
+ <meta-data
+ android:name="com.android.launcher3.themedicon.option"
+ android:value="${packageName}.grid_control" />
</activity>
</application>
--
2.37.2

View File

@ -0,0 +1,28 @@
From c304a46115f8244f55f38b85ca68613905c6c015 Mon Sep 17 00:00:00 2001
From: Luca Stefani <luca.stefani.ge1@gmail.com>
Date: Fri, 1 Nov 2019 23:17:59 +0100
Subject: [PATCH 3/5] Properly expose GridCustomizationsProvider
Change-Id: I8268a215257ae0e399c56ac8b44cdfdff8cc92a0
---
AndroidManifest-common.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/AndroidManifest-common.xml b/AndroidManifest-common.xml
index 02b83fe889..00e7fc35ad 100644
--- a/AndroidManifest-common.xml
+++ b/AndroidManifest-common.xml
@@ -135,7 +135,9 @@
<provider
android:name="com.android.launcher3.graphics.GridCustomizationsProvider"
android:authorities="${packageName}.grid_control"
- android:exported="true" />
+ android:exported="true"
+ android:writePermission="${packageName}.permission.WRITE_SETTINGS"
+ android:readPermission="${packageName}.permission.READ_SETTINGS" />
<!--
The settings activity. To extend point settings_fragment_name to appropriate fragment class
--
2.37.2

View File

@ -0,0 +1,25 @@
From cf2a48c3b77753dbb850726495308dad64205497 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Wed, 6 Oct 2021 22:45:33 -0700
Subject: [PATCH 4/5] Fix all apps header color in dark mode
Change-Id: Ib2ce7f6e3c9b87a4626699cb54673d88392a5f41
---
res/values/styles.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 21095109a6..63f46e413d 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -99,6 +99,7 @@
<item name="android:colorControlHighlight">#19FFFFFF</item>
<item name="android:colorPrimary">#FF212121</item>
<item name="allAppsScrimColor">?android:attr/colorBackgroundFloating</item>
+ <item name="allappsHeaderProtectionColor">@color/popup_color_tertiary_dark</item>
<item name="allAppsNavBarScrimColor">#80000000</item>
<item name="allAppsTheme">@style/AllAppsTheme.Dark</item>
<item name="popupColorPrimary">@color/popup_color_primary_dark</item>
--
2.37.2

View File

@ -0,0 +1,73 @@
From dbb30694c2cce4a5fb70ea6a8c5594bcca7cba4d Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Sun, 10 Oct 2021 03:38:23 -0700
Subject: [PATCH 5/5] Fix Personal/Work profile tab colors in All Apps
The default AOSP colors are broken and result in poor contrast, among
other issues.
Change-Id: Id7824bc08cac0aad055f41c0b617e15300af05d4
---
res/color-night-v31/all_apps_tab_text.xml | 6 +++---
.../all_apps_tabs_background.xml | 18 ++++++++++++++++++
res/color-v31/all_apps_tab_text.xml | 6 +++---
3 files changed, 24 insertions(+), 6 deletions(-)
create mode 100644 res/color-night-v31/all_apps_tabs_background.xml
diff --git a/res/color-night-v31/all_apps_tab_text.xml b/res/color-night-v31/all_apps_tab_text.xml
index 83237b49e5..eaac621cfc 100644
--- a/res/color-night-v31/all_apps_tab_text.xml
+++ b/res/color-night-v31/all_apps_tab_text.xml
@@ -14,6 +14,6 @@
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_50" android:state_selected="true"/>
- <item android:color="@android:color/system_neutral2_700"/>
-</selector>
\ No newline at end of file
+ <item android:color="?android:textColorPrimaryInverse" android:state_selected="true"/>
+ <item android:color="?android:textColorSecondary"/>
+</selector>
diff --git a/res/color-night-v31/all_apps_tabs_background.xml b/res/color-night-v31/all_apps_tabs_background.xml
new file mode 100644
index 0000000000..fc8a4d7d79
--- /dev/null
+++ b/res/color-night-v31/all_apps_tabs_background.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="@android:color/system_neutral1_800" />
+</selector>
diff --git a/res/color-v31/all_apps_tab_text.xml b/res/color-v31/all_apps_tab_text.xml
index c3520a7ab5..d133a31a2d 100644
--- a/res/color-v31/all_apps_tab_text.xml
+++ b/res/color-v31/all_apps_tab_text.xml
@@ -14,6 +14,6 @@
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_900" android:state_selected="true"/>
- <item android:color="@android:color/system_neutral2_700"/>
-</selector>
\ No newline at end of file
+ <item android:color="?android:textColorPrimary" android:state_selected="true"/>
+ <item android:color="?android:textColorSecondary"/>
+</selector>
--
2.37.2