summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shawn Lin <shawnlin@google.com> 2021-05-03 12:28:30 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-05-03 12:28:30 +0000
commit1bfc000a822bdf79c2824f740a2c22e2bc096418 (patch)
tree129465e0861e9e9445afb0d8525b13058ffce0fb
parent214bff101ffc4f0db916a47a21de7f41ea2fe6a1 (diff)
parent431ebd6040664d6add8d532cced28a35bc9b169d (diff)
Merge "Move no cutout overlay packages to frameworks/base" into sc-dev
-rw-r--r--packages/overlays/AvoidAppsInCutoutOverlay/Android.bp29
-rw-r--r--packages/overlays/AvoidAppsInCutoutOverlay/AndroidManifest.xml26
-rw-r--r--packages/overlays/AvoidAppsInCutoutOverlay/res/values/config.xml27
-rw-r--r--packages/overlays/AvoidAppsInCutoutOverlay/res/values/strings.xml23
-rw-r--r--packages/overlays/NoCutoutOverlay/Android.bp30
-rw-r--r--packages/overlays/NoCutoutOverlay/AndroidManifest.xml26
-rw-r--r--packages/overlays/NoCutoutOverlay/res/values/config.xml36
-rw-r--r--packages/overlays/NoCutoutOverlay/res/values/strings.xml24
8 files changed, 221 insertions, 0 deletions
diff --git a/packages/overlays/AvoidAppsInCutoutOverlay/Android.bp b/packages/overlays/AvoidAppsInCutoutOverlay/Android.bp
new file mode 100644
index 000000000000..4352c04f2022
--- /dev/null
+++ b/packages/overlays/AvoidAppsInCutoutOverlay/Android.bp
@@ -0,0 +1,29 @@
+//
+// 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: "AvoidAppsInCutoutOverlay",
+ theme: "DisplayCutoutAvoidAppsInCutout",
+ product_specific: true,
+}
diff --git a/packages/overlays/AvoidAppsInCutoutOverlay/AndroidManifest.xml b/packages/overlays/AvoidAppsInCutoutOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..e63c5c3fb554
--- /dev/null
+++ b/packages/overlays/AvoidAppsInCutoutOverlay/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<!--
+ ~ 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.android.internal.display.cutout.emulation.avoidAppsInCutout"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:category="com.android.internal.display_cutout_emulation"
+ android:priority="0"/>
+
+ <application android:label="@string/display_cutout_emulation_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/AvoidAppsInCutoutOverlay/res/values/config.xml b/packages/overlays/AvoidAppsInCutoutOverlay/res/values/config.xml
new file mode 100644
index 000000000000..22eabf2f5927
--- /dev/null
+++ b/packages/overlays/AvoidAppsInCutoutOverlay/res/values/config.xml
@@ -0,0 +1,27 @@
+<!--
+ ~ 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.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- 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>
+
+ <!-- If true, hide the display cutout with display area -->
+ <bool name="config_hideDisplayCutoutWithDisplayArea">true</bool>
+
+</resources>
diff --git a/packages/overlays/AvoidAppsInCutoutOverlay/res/values/strings.xml b/packages/overlays/AvoidAppsInCutoutOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..a65fd43b7415
--- /dev/null
+++ b/packages/overlays/AvoidAppsInCutoutOverlay/res/values/strings.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- [CHAR_LIMIT=NONE] Developer Settings: Label for the option that masks the display cutout, i.e. avoid apps in cutout region.-->
+ <string name="display_cutout_emulation_overlay">Hide (avoid apps in cutout region)</string>
+
+</resources>
+
diff --git a/packages/overlays/NoCutoutOverlay/Android.bp b/packages/overlays/NoCutoutOverlay/Android.bp
new file mode 100644
index 000000000000..78f56273e223
--- /dev/null
+++ b/packages/overlays/NoCutoutOverlay/Android.bp
@@ -0,0 +1,30 @@
+//
+// 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: "NoCutoutOverlay",
+ theme: "DisplayCutoutNoCutout",
+ product_specific: true,
+}
diff --git a/packages/overlays/NoCutoutOverlay/AndroidManifest.xml b/packages/overlays/NoCutoutOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..c6224967b922
--- /dev/null
+++ b/packages/overlays/NoCutoutOverlay/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<!--
+ ~ 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.android.internal.display.cutout.emulation.noCutout"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:category="com.android.internal.display_cutout_emulation"
+ android:priority="0"/>
+
+ <application android:label="@string/display_cutout_emulation_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/NoCutoutOverlay/res/values/config.xml b/packages/overlays/NoCutoutOverlay/res/values/config.xml
new file mode 100644
index 000000000000..91576998cc54
--- /dev/null
+++ b/packages/overlays/NoCutoutOverlay/res/values/config.xml
@@ -0,0 +1,36 @@
+<!--
+ ~ 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.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- 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>
+
+ <!-- If true, and there is a cutout on the main built in display, the cutout will be masked
+ by shrinking the display such that it does not overlap the cutout area. -->
+ <bool name="config_maskMainBuiltInDisplayCutout">true</bool>
+
+ <!-- Height of the status bar -->
+ <dimen name="status_bar_height_portrait">28dp</dimen>
+ <dimen name="status_bar_height_landscape">28dp</dimen>
+
+ <!-- Height of area above QQS where battery/time go (equal to status bar height if > 48dp) -->
+ <dimen name="quick_qs_offset_height">48dp</dimen>
+ <!-- Total height of QQS (quick_qs_offset_height + 128) -->
+ <dimen name="quick_qs_total_height">176dp</dimen>
+</resources>
diff --git a/packages/overlays/NoCutoutOverlay/res/values/strings.xml b/packages/overlays/NoCutoutOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..dd01adabf81d
--- /dev/null
+++ b/packages/overlays/NoCutoutOverlay/res/values/strings.xml
@@ -0,0 +1,24 @@
+<?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.
+ -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- [CHAR_LIMIT=NONE] Developer Settings: Label for the option that masks the display cutout,
+ i.e. it shrinks the display such that the display cutout is no longer visible.-->
+ <string name="display_cutout_emulation_overlay">Hide</string>
+
+</resources>
+