DisplayCutout: Add more display cutout flavors
Adds tall, narrow and wide variants of the cutout
Bug: 65689439
Test: Settings > Developer Options > Drawing > Simulate a display with a cutout > Try Narrow / Wide / Tall
Change-Id: Ie8f0a329fd95d844c6248bc5345b90ff9c8e4858
diff --git a/packages/overlays/DisplayCutoutEmulationOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.mk
similarity index 65%
copy from packages/overlays/DisplayCutoutEmulationOverlay/Android.mk
copy to packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.mk
index f4205ad6..4f3a8b1 100644
--- a/packages/overlays/DisplayCutoutEmulationOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.mk
@@ -1,13 +1,13 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_RRO_THEME := DisplayCutoutEmulation
+LOCAL_RRO_THEME := DisplayCutoutEmulationNarrow
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_PACKAGE_NAME := DisplayCutoutEmulationOverlay
+LOCAL_PACKAGE_NAME := DisplayCutoutEmulationNarrowOverlay
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationOverlay/AndroidManifest.xml b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/AndroidManifest.xml
similarity index 64%
rename from packages/overlays/DisplayCutoutEmulationOverlay/AndroidManifest.xml
rename to packages/overlays/DisplayCutoutEmulationNarrowOverlay/AndroidManifest.xml
index dd43690..71ce6b4 100644
--- a/packages/overlays/DisplayCutoutEmulationOverlay/AndroidManifest.xml
+++ b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/AndroidManifest.xml
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.internal.display.cutout.emulation"
- android:versionCode="1"
- android:versionName="1.0">
+ package="com.android.internal.display.cutout.emulation.narrow"
+ android:versionCode="1"
+ android:versionName="1.0">
<overlay android:targetPackage="android" android:priority="1"/>
<application android:label="@string/display_cutout_emulation_overlay" android:hasCode="false"/>
diff --git a/packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/config.xml
similarity index 95%
rename from packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml
rename to packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/config.xml
index 30e8b68..43bde88 100644
--- a/packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml
+++ b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/config.xml
@@ -41,7 +41,7 @@
</string>
<!-- 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).
+ black in software (to avoid aliasing or emulate a cutout that is not physically existent).
-->
<bool name="config_fillMainBuiltInDisplayCutout">true</bool>
diff --git a/packages/overlays/DisplayCutoutEmulationOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
similarity index 89%
rename from packages/overlays/DisplayCutoutEmulationOverlay/res/values/strings.xml
rename to packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
index 5d5c425..4989677 100644
--- a/packages/overlays/DisplayCutoutEmulationOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
@@ -18,7 +18,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Display Cutout Emulation</string>
+ <string name="display_cutout_emulation_overlay">Narrow display cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationTallOverlay/Android.mk
similarity index 66%
copy from packages/overlays/DisplayCutoutEmulationOverlay/Android.mk
copy to packages/overlays/DisplayCutoutEmulationTallOverlay/Android.mk
index f4205ad6..dac3878 100644
--- a/packages/overlays/DisplayCutoutEmulationOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationTallOverlay/Android.mk
@@ -1,13 +1,13 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_RRO_THEME := DisplayCutoutEmulation
+LOCAL_RRO_THEME := DisplayCutoutEmulationTall
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_PACKAGE_NAME := DisplayCutoutEmulationOverlay
+LOCAL_PACKAGE_NAME := DisplayCutoutEmulationTallOverlay
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationTallOverlay/AndroidManifest.xml b/packages/overlays/DisplayCutoutEmulationTallOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..5a93cfb
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationTallOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ Copyright (C) 2018 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.tall"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:priority="1"/>
+
+ <application android:label="@string/display_cutout_emulation_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/config.xml
similarity index 84%
copy from packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml
copy to packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/config.xml
index 30e8b68..9cf48d9 100644
--- a/packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml
+++ b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/config.xml
@@ -30,18 +30,18 @@
-->
<string translatable="false" name="config_mainBuiltInDisplayCutout">
M 0,0
- L -24, 0
- L -21.9940446283, 20.0595537175
- C -21.1582133885, 28.4178661152 -17.2, 32.0 -8.8, 32.0
- L 8.8, 32.0
- C 17.2, 32.0 21.1582133885, 28.4178661152 21.9940446283, 20.0595537175
- L 24, 0
+ L -48, 0
+ L -44.3940446283, 36.0595537175
+ C -43.5582133885, 44.4178661152 -39.6, 48.0 -31.2, 48.0
+ L 31.2, 48.0
+ C 39.6, 48.0 43.5582133885, 44.4178661152 44.3940446283, 36.0595537175
+ L 48, 0
Z
@dp
</string>
<!-- 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).
+ black in software (to avoid aliasing or emulate a cutout that is not physically existent).
-->
<bool name="config_fillMainBuiltInDisplayCutout">true</bool>
diff --git a/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml
new file mode 100644
index 0000000..6dcbbd9
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 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">Tall display cutout</string>
+
+</resources>
+
diff --git a/packages/overlays/DisplayCutoutEmulationOverlay/Android.mk b/packages/overlays/DisplayCutoutEmulationWideOverlay/Android.mk
similarity index 66%
rename from packages/overlays/DisplayCutoutEmulationOverlay/Android.mk
rename to packages/overlays/DisplayCutoutEmulationWideOverlay/Android.mk
index f4205ad6..f4f250c 100644
--- a/packages/overlays/DisplayCutoutEmulationOverlay/Android.mk
+++ b/packages/overlays/DisplayCutoutEmulationWideOverlay/Android.mk
@@ -1,13 +1,13 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_RRO_THEME := DisplayCutoutEmulation
+LOCAL_RRO_THEME := DisplayCutoutEmulationWide
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_PACKAGE_NAME := DisplayCutoutEmulationOverlay
+LOCAL_PACKAGE_NAME := DisplayCutoutEmulationWideOverlay
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/DisplayCutoutEmulationWideOverlay/AndroidManifest.xml b/packages/overlays/DisplayCutoutEmulationWideOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..96bd060
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationWideOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ Copyright (C) 2018 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.wide"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:priority="1"/>
+
+ <application android:label="@string/display_cutout_emulation_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/config.xml
similarity index 84%
copy from packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml
copy to packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/config.xml
index 30e8b68..1ce41f0 100644
--- a/packages/overlays/DisplayCutoutEmulationOverlay/res/values/config.xml
+++ b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/config.xml
@@ -30,18 +30,18 @@
-->
<string translatable="false" name="config_mainBuiltInDisplayCutout">
M 0,0
- L -24, 0
- L -21.9940446283, 20.0595537175
- C -21.1582133885, 28.4178661152 -17.2, 32.0 -8.8, 32.0
- L 8.8, 32.0
- C 17.2, 32.0 21.1582133885, 28.4178661152 21.9940446283, 20.0595537175
- L 24, 0
+ L -72, 0
+ L -69.9940446283, 20.0595537175
+ C -69.1582133885, 28.4178661152 -65.2, 32.0 -56.8, 32.0
+ L 56.8, 32.0
+ C 65.2, 32.0 69.1582133885, 28.4178661152 69.9940446283, 20.0595537175
+ L 72, 0
Z
@dp
</string>
<!-- 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).
+ black in software (to avoid aliasing or emulate a cutout that is not physically existent).
-->
<bool name="config_fillMainBuiltInDisplayCutout">true</bool>
diff --git a/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml
new file mode 100644
index 0000000..f4b9f7e
--- /dev/null
+++ b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 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">Wide display cutout</string>
+
+</resources>
+