omni: emulator: add testing overlays
Change-Id: I0041605f803fd3c59b599fbef406ff6e00ff613b
diff --git a/utils/emulator/create_emulator_image.sh b/utils/emulator/create_emulator_image.sh
index ba5524a..1d7630a 100755
--- a/utils/emulator/create_emulator_image.sh
+++ b/utils/emulator/create_emulator_image.sh
@@ -23,4 +23,4 @@
cd $ANDROID_PRODUCT_OUT/..
rm /tmp/omni_emulator.zip
-zip -r /tmp/omni_emulator.zip generic_x86/skins generic_x86/system-qemu.img generic_x86/system/build.prop generic_x86/cache.img generic_x86/userdata.img generic_x86/start_emulator_image.sh generic_x86/advancedFeatures.ini generic_x86/vendor-qemu.img generic_x86/encryptionkey.img generic_x86/kernel-ranchu-64 generic_x86/ramdisk.img
+zip -r /tmp/omni_emulator.zip generic_x86/skins generic_x86/system-qemu.img generic_x86/system/build.prop generic_x86/cache.img generic_x86/userdata.img generic_x86/start_emulator_image.sh generic_x86/advancedFeatures.ini generic_x86/encryptionkey.img generic_x86/kernel-ranchu-64 generic_x86/ramdisk.img
diff --git a/utils/emulator/overlay/frameworks/base/core/res/res/values/config.xml b/utils/emulator/overlay/frameworks/base/core/res/res/values/config.xml
index d62442c..6deb362 100644
--- a/utils/emulator/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/utils/emulator/overlay/frameworks/base/core/res/res/values/config.xml
@@ -29,4 +29,17 @@
<bool name="config_proxiSensorWakupCheck">true</bool>
<bool name="config_showNavigationBar">true</bool>
<bool name="config_haveHigherAspectRatioScreen">true</bool>
+ <string name="config_mainBuiltInDisplayCutout">M 0,0 L -183, 0 A 24.0, 24.0, 0, 0, 1, -159.0, 22.0 A 64.0, 64.0, 0, 0, 0, -95.0, 80.0 L 95.0, 80.0 A 64.0, 64.0, 0, 0, 0, 159.0, 22.0 A 24.0, 24.0, 0, 0, 1, 183.0, 0 Z</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).
+ -->
+ <bool name="config_fillMainBuiltInDisplayCutout">true</bool>
+ <bool name="config_windowIsRound">true</bool>
+ <bool name="config_smart_battery_available">true</bool>
+ <bool name="config_intrusiveNotificationLed">true</bool>
+ <bool name="config_intrusiveBatteryLed">true</bool>
+ <bool name="config_FastChargingLedSupported">true</bool>
+ <color name="config_defaultNotificationColor">#00ff00</color>
+
</resources>
diff --git a/utils/emulator/overlay/frameworks/base/core/res/res/values/dimens.xml b/utils/emulator/overlay/frameworks/base/core/res/res/values/dimens.xml
new file mode 100644
index 0000000..fd0fef2
--- /dev/null
+++ b/utils/emulator/overlay/frameworks/base/core/res/res/values/dimens.xml
@@ -0,0 +1,24 @@
+<?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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <dimen name="config_dialogCornerRadius">8.0dip</dimen>
+ <dimen name="config_buttonCornerRadius">4.0dip</dimen>
+ <dimen name="config_progressBarCornerRadius">8.0dip</dimen>
+</resources>
diff --git a/utils/emulator/overlay/frameworks/base/packages/SystemUI/res/values-sw372dp/dimens.xml b/utils/emulator/overlay/frameworks/base/packages/SystemUI/res/values-sw372dp/dimens.xml
new file mode 100644
index 0000000..5a90f20
--- /dev/null
+++ b/utils/emulator/overlay/frameworks/base/packages/SystemUI/res/values-sw372dp/dimens.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+* Copyright (c) 2006, 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>
+
+ <dimen name="rounded_corner_radius">16dp</dimen>
+ <dimen name="rounded_corner_content_padding">8dp</dimen>
+ <dimen name="nav_content_padding">8dp</dimen>
+
+</resources>
diff --git a/utils/emulator/packages.mk b/utils/emulator/packages.mk
index 4ca2808..4221c5f 100644
--- a/utils/emulator/packages.mk
+++ b/utils/emulator/packages.mk
@@ -60,3 +60,6 @@
PrimaryColdWhite \
PrimaryWarmWhite \
PrimaryDarkBlue
+
+PRODUCT_PACKAGES += \
+ DocumentsUITheme
diff --git a/utils/emulator/start_emulator_image.sh b/utils/emulator/start_emulator_image.sh
index 916a6ae..f1105b8 100755
--- a/utils/emulator/start_emulator_image.sh
+++ b/utils/emulator/start_emulator_image.sh
@@ -3,4 +3,5 @@
export ANDROID_BUILD_TOP=`pwd`
export ANDROID_PRODUCT_OUT=`pwd`
-/home/maxl/Android/Sdk/emulator/emulator -verbose -skindir $ANDROID_BUILD_TOP/skins/ -skin pixel_2_xl -gpu host -writable-system -qemu -cpu qemu64
+cp $HOME/Android/Sdk/system-images/android-28/google_apis/x86/vendor.img .
+$HOME/Android/Sdk/emulator/emulator -verbose -skindir $ANDROID_BUILD_TOP/skins/ -skin pixel_2_xl -gpu host -writable-system -qemu -cpu qemu64