Skip to content

Commit

Permalink
Changes for October 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyCGYan committed Oct 22, 2024
1 parent 74d46c3 commit 20c8d89
Show file tree
Hide file tree
Showing 71 changed files with 405 additions and 144 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
From 1c6ae8ea3a7075d1030d042057ab335817271683 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Fri, 13 Sep 2024 08:10:14 +0800
Subject: [PATCH 01/45] Add DisplayCutoutEmulationNoneOverlay

Unlike AvoidAppsInCutoutOverlay or NoCutoutOverlay, this overlay simply
removes cutout definitions, making full display area usable
Intended for devices with center cutouts, esp. badly defined ones

Change-Id: I5e95bbd2dabcecbfdf8e25dea68acc86acf8fe48
---
packages/overlays/Android.bp | 1 +
.../Android.bp | 14 +++++++
.../AndroidManifest.xml | 26 ++++++++++++
.../res/values-zh-rCN/strings.xml | 21 ++++++++++
.../res/values/config.xml | 40 +++++++++++++++++++
.../res/values/strings.xml | 21 ++++++++++
6 files changed, 123 insertions(+)
create mode 100644 packages/overlays/DisplayCutoutEmulationNoneOverlay/Android.bp
create mode 100644 packages/overlays/DisplayCutoutEmulationNoneOverlay/AndroidManifest.xml
create mode 100644 packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values-zh-rCN/strings.xml
create mode 100644 packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values/config.xml
create mode 100644 packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values/strings.xml

diff --git a/packages/overlays/Android.bp b/packages/overlays/Android.bp
index 5e001fba6aa1..11269cbacb06 100644
--- a/packages/overlays/Android.bp
+++ b/packages/overlays/Android.bp
@@ -25,6 +25,7 @@ phony {
"DisplayCutoutEmulationCornerOverlay",
"DisplayCutoutEmulationDoubleOverlay",
"DisplayCutoutEmulationHoleOverlay",
+ "DisplayCutoutEmulationNoneOverlay",
"DisplayCutoutEmulationTallOverlay",
"DisplayCutoutEmulationWaterfallOverlay",
"FontNotoSerifSourceOverlay",
diff --git a/packages/overlays/DisplayCutoutEmulationNoneOverlay/Android.bp b/packages/overlays/DisplayCutoutEmulationNoneOverlay/Android.bp
new file mode 100644
index 000000000000..a61430bad341
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationNoneOverlay/Android.bp
@@ -0,0 +1,14 @@
+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: "DisplayCutoutEmulationNoneOverlay",
+ theme: "DisplayCutoutEmulationNone",
+ product_specific: true,
+}
diff --git a/packages/overlays/DisplayCutoutEmulationNoneOverlay/AndroidManifest.xml b/packages/overlays/DisplayCutoutEmulationNoneOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..31942fce96e4
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationNoneOverlay/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<!--
+ ~ 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.
+ ~ 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.android.internal.display.cutout.emulation.none"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:category="com.android.internal.display_cutout_emulation"
+ android:priority="1"/>
+
+ <application android:label="@string/display_cutout_emulation_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values-zh-rCN/strings.xml b/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values-zh-rCN/strings.xml
new file mode 100644
index 000000000000..c2440981dfad
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values-zh-rCN/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ ~ 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 xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="display_cutout_emulation_overlay">"无"</string>
+</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values/config.xml b/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values/config.xml
new file mode 100644
index 000000000000..613eaa7dab6a
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values/config.xml
@@ -0,0 +1,40 @@
+<!--
+ ~ 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.
+ ~ 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- The bounding path of the cutout region of the main built-in display.
+ Must either be empty if there is no cutout region, or a string that is parsable by
+ {@link android.util.PathParser}.
+
+ The path is assumed to be specified in display coordinates with pixel units and in
+ the display's native orientation, with the origin of the coordinate system at the
+ center top of the display.
+
+ To facilitate writing device-independent emulation overlays, the marker `@dp` can be
+ appended after the path string to interpret coordinates in dp instead of px units.
+ Note that a physical cutout should be configured in pixels for the best results.
+ -->
+ <!-- Display cutout configuration -->
+ <string translatable="false" name="config_mainBuiltInDisplayCutout" />
+
+ <string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation" />
+
+ <!-- Whether the display cutout region of the main built-in display should be forced to
+ black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+ -->
+ <bool name="config_fillMainBuiltInDisplayCutout">false</bool>
+</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..382c67cfec13
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationNoneOverlay/res/values/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ 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.
+ ~ 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string name="display_cutout_emulation_overlay">None</string>
+
+</resources>
--
2.34.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e535be2c76e6969ca8a58023b203bf66cfe0d3ae Mon Sep 17 00:00:00 2001
From b3430ef517e91fb3305cbfbd564eea5a9fa747cd Mon Sep 17 00:00:00 2001
From: AndyCGYan <[email protected]>
Date: Fri, 22 Mar 2019 00:41:20 +0800
Subject: [PATCH 01/43] Disable FP lockouts optionally
Subject: [PATCH 02/45] Disable FP lockouts optionally

Both timed and permanent lockouts - GET THE FUCK OUT
Now targeting LockoutFramework, introduced in Android 12
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 8595258b7aac74763f6f8b7edbe37b91f0a4c1a5 Mon Sep 17 00:00:00 2001
From 15427fc090a36f299ba56e66a4ce2dbc31475982 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Thu, 5 Apr 2018 10:01:19 +0800
Subject: [PATCH 02/43] Disable vendor mismatch warning
Subject: [PATCH 03/45] Disable vendor mismatch warning

Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 51ff3c370b9a75bb98f949506afe2dd1aafc6ca7 Mon Sep 17 00:00:00 2001
From 83c817d4704fa9537662a9d631b48c2202f8eeb2 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sun, 21 Jan 2024 22:03:47 +0800
Subject: [PATCH 03/43] Keyguard: Allow locking to any rotation mode
Subject: [PATCH 04/45] Keyguard: Allow locking to any rotation mode

Change-Id: I0f12c433f3547e9bfcdbc2cf50e2a4f3ec8ca311
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b2c40aa3a127825dfacf3006d18639557dd4064d Mon Sep 17 00:00:00 2001
From bc84cdb372eee206df39d5f05080b1d32d977238 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Tue, 17 Jan 2023 17:19:19 +0000
Subject: [PATCH 04/43] Keyguard: Fix colors of slices not updating on doze
Subject: [PATCH 05/45] Keyguard: Fix colors of slices not updating on doze

Slices were invisible (black) in doze when using light wallpapers
Introduced in https://github.com/LineageOS/android_frameworks_base/commit/a19e59d717ec6d573c11c7e8277bba3c4de189c2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From cf2228c2c69638c3acf728e6eefda51e2e33cbd7 Mon Sep 17 00:00:00 2001
From 95388febcf538f6c8f2a7425a1dd65187dbb2484 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sat, 16 Oct 2021 02:23:48 +0000
Subject: [PATCH 05/43] UI: Adjust default navbar layouts
Subject: [PATCH 06/45] UI: Adjust default navbar layouts

- Slightly tighten nodpi layout
- Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 2ff1e12e1ff9952fe489c9023eb76d342af1ddbf Mon Sep 17 00:00:00 2001
From 00ce8a490784f8303a042a81d07e73508dc90639 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sat, 19 Mar 2022 09:22:24 +0000
Subject: [PATCH 06/43] UI: Adjust split-screen divider
Subject: [PATCH 07/45] UI: Adjust split-screen divider

- Kill rounded corners - where two rectangles collide should be perfectly straight
- Make it black (pre-Sv2) for phones
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6cdab07dbf6a812c1c2daf80c292fa9088143572 Mon Sep 17 00:00:00 2001
From a47ab249f90e7c0019e97b7b62fb4359e6bfcc9e Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sun, 10 Jan 2021 11:44:29 +0000
Subject: [PATCH 07/43] UI: Disable wallpaper zoom
Subject: [PATCH 08/45] UI: Disable wallpaper zoom

It does little more than inducing motion sickness

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bfc38ff3a5a13606880951948d8e09b430405e25 Mon Sep 17 00:00:00 2001
From 46317e08a2c9a1cd9cf9a7d6f790404d3eebeff5 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sun, 25 Sep 2022 02:20:52 +0000
Subject: [PATCH 08/43] UI: Follow Monet and light/dark theme in user 1 icon
Subject: [PATCH 09/45] UI: Follow Monet and light/dark theme in user 1 icon

Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d53bbfe5b348426411d7c5739ec9910c2fcd3009 Mon Sep 17 00:00:00 2001
From c456235df93c818dd52a4087429d38870a9bbca9 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Wed, 3 Jun 2020 01:31:34 +0000
Subject: [PATCH 09/43] UI: Increase default status bar height
Subject: [PATCH 10/45] UI: Increase default status bar height

Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6e308897ce7844197aa8cbc7bf43b2cdaa54a3df Mon Sep 17 00:00:00 2001
From f49be883011f6787c6a48fc0fd4916817bd2d20e Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Tue, 6 Oct 2020 01:41:16 +0000
Subject: [PATCH 10/43] UI: Revive navbar layout tuning via sysui_nav_bar
Subject: [PATCH 11/45] UI: Revive navbar layout tuning via sysui_nav_bar
tunable

Google keeps fixing what ain't broken.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 7d5902f123cc883437cf198fcc1d40c6773129a9 Mon Sep 17 00:00:00 2001
From bd65f50c07c82d87a717a045fcf1ef67cd3ba84b Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sun, 26 Apr 2020 08:56:13 +0000
Subject: [PATCH 11/43] UI: Use SNAP_FIXED_RATIO for multi-window globally
Subject: [PATCH 12/45] UI: Use SNAP_FIXED_RATIO for multi-window globally

Enables multiple snap targets under landscape for phone UI

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 2717db2bc74bbebcde07904bdf52afae2da35cfa Mon Sep 17 00:00:00 2001
From a0cbbb02a34dfb198b3e76585b10fb402e56577f Mon Sep 17 00:00:00 2001
From: Danny Lin <[email protected]>
Date: Tue, 3 Nov 2020 22:43:12 -0800
Subject: [PATCH 12/43] core: Remove old app target SDK dialog
Subject: [PATCH 13/45] 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 38fbb12c2b6ce42d78e05248410c1de666d46700 Mon Sep 17 00:00:00 2001
From cdeee973b327704be608919a7f39eb6b4f23d1d7 Mon Sep 17 00:00:00 2001
From: Danny Lin <[email protected]>
Date: Tue, 5 Oct 2021 21:01:50 -0700
Subject: [PATCH 13/43] Paint: Enable subpixel text positioning by default
Subject: [PATCH 14/45] 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 76893bd08d5c89685320342db2a3bcec2bc981f5 Mon Sep 17 00:00:00 2001
From 229f40cdfbc7f1721b742571c484ebf3ad75a4ad Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sun, 17 Mar 2024 17:10:38 +0800
Subject: [PATCH 14/43] Remove debuggable requirement for signature spoofing
Subject: [PATCH 15/45] Remove debuggable requirement for signature spoofing

Change-Id: I8d637ddbbd117a9c5b1d9c5e462b0f4b30d98333
---
Expand Down
34 changes: 34 additions & 0 deletions patches_platform/frameworks_base/0016-Display-Cutout-Error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 45d2f321fd992af530d7bf92738887504bff149a Mon Sep 17 00:00:00 2001
From: Andrew Cole <[email protected]>
Date: Tue, 7 May 2024 15:19:16 +0000
Subject: [PATCH 16/45] Display Cutout Error

Removing a historical unsupported exception for square display cutouts.
This was causing falkiness in tests for the notifications team.

Flag: None
Test: SystemUIGoogleScreenshotTests
Bug: 329438697
Change-Id: I545b4b7531312ce4f5b0bdc2902002d96fbeca43
---
core/java/android/view/DisplayCutout.java | 4 ----
1 file changed, 4 deletions(-)

diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java
index db665a92ec5c..c4becea462d5 100644
--- a/core/java/android/view/DisplayCutout.java
+++ b/core/java/android/view/DisplayCutout.java
@@ -1392,10 +1392,6 @@ public final class DisplayCutout {

private static Rect computeSafeInsets(int displayW, int displayH, Insets waterFallInsets,
Rect[] bounds) {
- if (displayW == displayH) {
- throw new UnsupportedOperationException("not implemented: display=" + displayW + "x"
- + displayH + " bounding rects=" + Arrays.toString(bounds));
- }

int leftInset = Math.max(waterFallInsets.left, findCutoutInsetForSide(
displayW, displayH, bounds[BOUNDS_POSITION_LEFT], Gravity.LEFT));
--
2.34.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 533b667c2588eb8b241da7ccbb1955190cbda4c7 Mon Sep 17 00:00:00 2001
From a4d3bd4777ada3fd7c5d1063732559faa4194857 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sun, 30 Jun 2024 15:53:25 +0800
Subject: [PATCH 15/43] Revert "Adding ColorUpdateLogger to track color updates
Subject: [PATCH 17/45] Revert "Adding ColorUpdateLogger to track color updates
so that we demonstrate the root cause of our theme bugs"

This reverts commit 3a819dee1225de25f0e228ef2c1b9447eb081661.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 2f0cb797274c27772f923c7a07ef830c12ddbfd4 Mon Sep 17 00:00:00 2001
From 8a050d13fe7128be39a4ae61adcb36a842ef10cb Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sun, 30 Jun 2024 16:49:47 +0800
Subject: [PATCH 16/43] Revert "Change color of track"
Subject: [PATCH 18/45] Revert "Change color of track"

This reverts commit 9ba91db9836625e5f45367b38b76cf08615cce00.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 587d8c7b04046a1a52c6dba36dbafaf95911b30e Mon Sep 17 00:00:00 2001
From fd5556279e9b68f6589342d49eb9cbb6f8ff1c31 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <[email protected]>
Date: Sun, 30 Jun 2024 16:13:51 +0800
Subject: [PATCH 17/43] Revert "Fix the text color used on the notification
Subject: [PATCH 19/45] Revert "Fix the text color used on the notification
unread indicator."

This reverts commit aee60c49308a81125587ea0c53f40c9d5d60707e.
Expand Down
Loading

0 comments on commit 20c8d89

Please sign in to comment.