Initial unified commit for Android 13, with TrebleDroid GSI target, syncing up to 20221111

This commit is contained in:
Andy CrossGate Yan
2022-11-11 12:27:50 +00:00
commit cd68e3dcbc
197 changed files with 127907 additions and 0 deletions

View File

@@ -0,0 +1,126 @@
From b94084cca9202c12ea41de9f6f23785c818a64c0 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 13 Jan 2022 14:22:24 +0000
Subject: [PATCH 01/12] Add SPenPointerOverlay
Toggle this overlay with property "persist.ui.spen.pointer"
Change-Id: I21f7e05cf8ebd74c950dfb20cf7eee99bfe22988
---
packages/overlays/Android.mk | 1 +
.../overlays/SPenPointerOverlay/Android.bp | 28 ++++++++++++++++++
.../SPenPointerOverlay/AndroidManifest.xml | 23 ++++++++++++++
.../sem_pointer_spot_hovering_spen.png | Bin 0 -> 411 bytes
.../res/drawable/pointer_arrow_icon.xml | 5 ++++
5 files changed, 57 insertions(+)
create mode 100644 packages/overlays/SPenPointerOverlay/Android.bp
create mode 100644 packages/overlays/SPenPointerOverlay/AndroidManifest.xml
create mode 100644 packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png
create mode 100644 packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
index 69641e69a9f2..36ec11af3068 100644
--- a/packages/overlays/Android.mk
+++ b/packages/overlays/Android.mk
@@ -31,6 +31,7 @@ LOCAL_REQUIRED_MODULES := \
NavigationBarModeGesturalOverlayNarrowBack \
NavigationBarModeGesturalOverlayWideBack \
NavigationBarModeGesturalOverlayExtraWideBack \
+ SPenPointerOverlay \
preinstalled-packages-platform-overlays.xml
include $(BUILD_PHONY_PACKAGE)
diff --git a/packages/overlays/SPenPointerOverlay/Android.bp b/packages/overlays/SPenPointerOverlay/Android.bp
new file mode 100644
index 000000000000..7632ebd43ef6
--- /dev/null
+++ b/packages/overlays/SPenPointerOverlay/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: "SPenPointerOverlay",
+ product_specific: true,
+}
diff --git a/packages/overlays/SPenPointerOverlay/AndroidManifest.xml b/packages/overlays/SPenPointerOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..b785214f854b
--- /dev/null
+++ b/packages/overlays/SPenPointerOverlay/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<!--
+ ~ 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.samsung.android.spenpointer.overlay"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:priority="5932" android:isStatic="true"
+ android:requiredSystemPropertyName="persist.ui.spen.pointer" android:requiredSystemPropertyValue="true"/>
+</manifest>
diff --git a/packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png b/packages/overlays/SPenPointerOverlay/res/drawable-xxhdpi/sem_pointer_spot_hovering_spen.png
new file mode 100644
index 0000000000000000000000000000000000000000..b73246c80a95e0bceeb8c09aacd2653722fca2d2
GIT binary patch
literal 411
zcmeAS@N?(olHy`uVBq!ia0vp^av;pX3?zBp#Z3TG?EyX^u0VPYDww}y>9XB>H{O1*
z{q+Z+%%XMcH{QCp_4%7Ek6&zi^&Z52_8N#bKYY6T$G`bYmOylGdHNEl2EyKW`#w-H
zMEkav?|=xXa@&iyKv|#(o9;XSGJv*hefA2d9ViRrHpmHroTOV4<QL2kefT?*&XynF
zf9jt6d~bTxr(K#H%-fm6)$T^@`96*P!_O$D=#P=#_iokL5u<mvYQ}e<#%Z1|jv*T7
z-(HO6Z&DCpO9*-59T;HT8)CHh%)kHdv-@V7U0D0tD*XMooHrlj82&Lg8FU>wkZ<5N
zBf!g`Yhiojq)$5MjpwPIIqY#_(VA78COitTt~#=3<I2pBClgEGRn7j@r_s({E14^`
zzN)C=(stXhXOBPbPTyLVZ~8%?D9+x@`{Nq(tjK9wr(Jhj*%s6+*nEHflkLxVMFlvw
UdB5Fp8R$X=Pgg&ebxsLQ0B%Ow$N&HU
literal 0
HcmV?d00001
diff --git a/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml b/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
new file mode 100644
index 000000000000..f35255c5f961
--- /dev/null
+++ b/packages/overlays/SPenPointerOverlay/res/drawable/pointer_arrow_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/sem_pointer_spot_hovering_spen"
+ android:hotSpotX="5dp"
+ android:hotSpotY="5dp" />
--
2.25.1

View File

@@ -0,0 +1,40 @@
From 5d4c54f6956862135a6066f4c0e322690145cce8 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 02/12] 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 43b66d181326..1f0d60cf3a38 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -5696,20 +5696,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

View File

@@ -0,0 +1,62 @@
From 4dc4d1ec5be6658812b82c09d745975674707572 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 03/12] 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 ba31e7f1f1d1..c4625e7e784d 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -307,7 +307,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

View File

@@ -0,0 +1,28 @@
From 06c01a490bf6379a8f9d8e4e8499add7a4ea2cbc 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/12] 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 34b5589bf81f..be2dbc3cd5dc 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -5029,7 +5029,7 @@
<item name="config_wallpaperMinScale" format="float" type="dimen">1</item>
<!-- 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>
<!-- If true, the wallpaper will scale regardless of the value of shouldZoomOutWallpaper() -->
<bool name="config_alwaysScaleWallpaper">false</bool>
--
2.25.1

View File

@@ -0,0 +1,39 @@
From 202ed6730a9b3182c33ef3d5169ff026ab269a2a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 25 Sep 2022 02:20:52 +0000
Subject: [PATCH 05/12] UI: Follow Monet and light/dark theme in user 1 icon
Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8
---
core/res/res/values-night/colors.xml | 1 +
core/res/res/values/colors.xml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/res/res/values-night/colors.xml b/core/res/res/values-night/colors.xml
index 33c9b95c5819..f3531caa47d9 100644
--- a/core/res/res/values-night/colors.xml
+++ b/core/res/res/values-night/colors.xml
@@ -33,6 +33,7 @@
<color name="overview_background">@color/overview_background_dark</color>
+ <color name="user_icon_1">@color/system_accent1_100</color>
<color name="user_icon_4">#fff439a0</color><!-- pink -->
<color name="user_icon_6">#ff4ecde6</color><!-- cyan -->
<color name="user_icon_7">#fffbbc04</color><!-- yellow -->
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index b515abc4000f..87a4bb9da02b 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -174,7 +174,7 @@
<color name="system_notification_accent_color">#00000000</color>
<!-- Default user icon colors -->
- <color name="user_icon_1">#ffe46962</color><!-- red -->
+ <color name="user_icon_1">@color/system_accent1_600</color>
<color name="user_icon_2">#ffaf5cf7</color><!-- purple -->
<color name="user_icon_3">#ff4c8df6</color><!-- blue -->
<color name="user_icon_4">#fff439a0</color><!-- pink -->
--
2.25.1

View File

@@ -0,0 +1,35 @@
From 448d7cb6f0689082ec63820f72e8ef221154fcfd 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 06/12] UI: Increase default status bar height
Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
---
core/res/res/values/dimens.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index b754100a3ed6..1851b42c0f3b 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -41,7 +41,7 @@
<!-- The default height of the status bar used in {@link SystemBarUtils#getStatusBarHeight} to
calculate the status bar height. -->
- <dimen name="status_bar_height_default">24dp</dimen>
+ <dimen name="status_bar_height_default">28dp</dimen>
<!-- Height of the status bar.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
@@ -49,7 +49,7 @@
<!-- Height of the status bar in portrait.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
- <dimen name="status_bar_height_portrait">24dp</dimen>
+ <dimen name="status_bar_height_portrait">28dp</dimen>
<!-- Height of the status bar in landscape.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
--
2.25.1

View File

@@ -0,0 +1,25 @@
From 057673be164d2bc9cefbe2161bb8293909e72ae6 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 25 Sep 2022 02:20:20 +0000
Subject: [PATCH 07/12] UI: Remove QS footer background
Change-Id: I68e82e0c5e3eddb2d3f767fe792b1436eae506ef
---
packages/SystemUI/res-keyguard/layout/footer_actions.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/packages/SystemUI/res-keyguard/layout/footer_actions.xml b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
index 876f275ab042..497181d9ee03 100644
--- a/packages/SystemUI/res-keyguard/layout/footer_actions.xml
+++ b/packages/SystemUI/res-keyguard/layout/footer_actions.xml
@@ -24,7 +24,6 @@
android:elevation="@dimen/qs_panel_elevation"
android:paddingTop="8dp"
android:paddingBottom="@dimen/qs_footer_actions_bottom_padding"
- android:background="@drawable/qs_footer_actions_background"
android:gravity="center_vertical"
android:layout_gravity="bottom"
>
--
2.25.1

View File

@@ -0,0 +1,56 @@
From e5ac2b04e10ce9b900e9a3ca0c1c609a26e4aaee Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 19 Mar 2022 09:22:24 +0000
Subject: [PATCH 08/12] UI: Restore split-screen divider to pre-Sv2 looks
- Kill rounded corners - where two rectangles collide should be perfectly straight
- Make it black again - taskbar should mind its own business
Change-Id: I240b627793b615c82bd07ebd77638cde180ef80f
---
.../Shell/res/color/split_divider_background.xml | 4 ++--
.../wm/shell/common/split/SplitLayout.java | 15 +--------------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/libs/WindowManager/Shell/res/color/split_divider_background.xml b/libs/WindowManager/Shell/res/color/split_divider_background.xml
index 049980803ee3..cd54ac26a7fd 100644
--- a/libs/WindowManager/Shell/res/color/split_divider_background.xml
+++ b/libs/WindowManager/Shell/res/color/split_divider_background.xml
@@ -15,5 +15,5 @@
~ limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@android:color/system_neutral1_500" android:lStar="15" />
-</selector>
\ No newline at end of file
+ <item android:color="@android:color/black" />
+</selector>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
index c94455d9151a..5eedb1fdb824 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
@@ -138,20 +138,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
}
private int getDividerInsets(Resources resources, Display display) {
- final int dividerInset = resources.getDimensionPixelSize(
- com.android.internal.R.dimen.docked_stack_divider_insets);
-
- int radius = 0;
- RoundedCorner corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_TOP_RIGHT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
- corner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
- radius = corner != null ? Math.max(radius, corner.getRadius()) : radius;
-
- return Math.max(dividerInset, radius);
+ return 0;
}
/** Gets bounds of the primary split with screen based coordinate. */
--
2.25.1

View File

@@ -0,0 +1,64 @@
From d9518a3ec3b88c36f16d8a7417d1d2c29bec25fc 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 09/12] UI: Revive navbar layout tuning via sysui_nav_bar
tunable
Google keeps fixing what ain't broken.
Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352
---
.../navigationbar/NavigationBarInflaterView.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
index 51feed875337..5f0f9a220c31 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
@@ -118,6 +118,7 @@ public class NavigationBarInflaterView extends FrameLayout
private boolean mInverseLayout;
private boolean mIsHintEnabled;
+ private boolean mUsingCustomLayout;
public NavigationBarInflaterView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -177,6 +178,7 @@ public class NavigationBarInflaterView extends FrameLayout
super.onAttachedToWindow();
Dependency.get(TunerService.class).addTunable(this, NAV_BAR_INVERSE);
Dependency.get(TunerService.class).addTunable(this, KEY_NAVIGATION_HINT);
+ Dependency.get(TunerService.class).addTunable(this, NAV_BAR_VIEWS);
}
@Override
@@ -195,6 +197,8 @@ public class NavigationBarInflaterView extends FrameLayout
mIsHintEnabled = TunerService.parseIntegerSwitch(newValue, true);
updateHint();
onLikelyDefaultLayoutChange();
+ } else if (NAV_BAR_VIEWS.equals(key)) {
+ setNavigationBarLayout(newValue);
}
}
@@ -204,7 +208,18 @@ public class NavigationBarInflaterView extends FrameLayout
updateLayoutInversion();
}
+ 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

View File

@@ -0,0 +1,95 @@
From 1556f8d5c97d6fdec1099d6c587a2cac128d4f97 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 10/12] 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 d686dd2ea690..03dcf51846dd 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 be2dbc3cd5dc..c62cce393ff0 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3726,7 +3726,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

View File

@@ -0,0 +1,31 @@
From f7e374407e133b9c53ecfbc9a5dc99a1460b6eb0 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 3 Nov 2020 22:43:12 -0800
Subject: [PATCH 11/12] core: Remove old app target SDK dialog
If an app is old, users should already know that, and there's usually no
point in warning them about it because they would already be using a
newer version if one existed. Sometimes, using an old app is necessary
for one reason or another, so remove this annoyance and let the user use
their old app in peace.
Change-Id: I1a3021f0f9bec1ab6ff7641776391e1bd4c3cc49
---
services/core/java/com/android/server/wm/AppWarnings.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/services/core/java/com/android/server/wm/AppWarnings.java b/services/core/java/com/android/server/wm/AppWarnings.java
index 994f07959f3b..6749ae78c09c 100644
--- a/services/core/java/com/android/server/wm/AppWarnings.java
+++ b/services/core/java/com/android/server/wm/AppWarnings.java
@@ -168,7 +168,6 @@ class AppWarnings {
public void onStartActivity(ActivityRecord r) {
showUnsupportedCompileSdkDialogIfNeeded(r);
showUnsupportedDisplaySizeDialogIfNeeded(r);
- showDeprecatedTargetDialogIfNeeded(r);
}
/**
--
2.25.1

View File

@@ -0,0 +1,41 @@
From 1e6d2e5f957d1a0f497248d1673d9ecaa1a676a3 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 5 Oct 2021 21:01:50 -0700
Subject: [PATCH 12/12] 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 451b99ea7550..e60d506a171b 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -253,7 +253,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