Merge "omni: add EmptyOverlay" into android-10
diff --git a/themes/overlays/Android.mk b/themes/overlays/Android.mk
index 0eb3c82..e7c0e5e 100644
--- a/themes/overlays/Android.mk
+++ b/themes/overlays/Android.mk
@@ -26,7 +26,8 @@
 	PrimaryColorDeepBlueOverlay \
 	AccentColorRedDevilOverlay \
 	FontLatoSourceOverlay \
-	FontMuliSourceOverlay	
+	FontMuliSourceOverlay \
+	EmptyOverlay
 
 include $(BUILD_PHONY_PACKAGE)
 include $(CLEAR_VARS)
diff --git a/themes/overlays/EmptyOverlay/Android.mk b/themes/overlays/EmptyOverlay/Android.mk
new file mode 100644
index 0000000..47fe08d
--- /dev/null
+++ b/themes/overlays/EmptyOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+#  Copyright 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := EmptyOverlay
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := EmptyOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/themes/overlays/EmptyOverlay/AndroidManifest.xml b/themes/overlays/EmptyOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..bb84d3f
--- /dev/null
+++ b/themes/overlays/EmptyOverlay/AndroidManifest.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="org.omnirom.overlay.empty" platformBuildVersionCode="29" platformBuildVersionName="10">
+    <overlay android:isStatic="true" android:priority="999" android:targetPackage="android"/>
+    <application android:label="OmniROM Empty Overlay" android:hasCode="false"/>
+</manifest>
diff --git a/themes/overlays/EmptyOverlay/README.txt b/themes/overlays/EmptyOverlay/README.txt
new file mode 100644
index 0000000..433c261
--- /dev/null
+++ b/themes/overlays/EmptyOverlay/README.txt
@@ -0,0 +1,9 @@
+Empty "fake" static overlay for android
+Can be used to bind mount and hide static overlays from /vendor/overlay
+that a device dont want to see. Using /dev/null breaks idmap2 run
+which also breaks valid static overlays that might be in /product/overlay
+
+Usage:
+Put into init.rc file for every overlay
+    mount none /system/overlay/EmptyOverlay/EmptyOverlay.apk /vendor/overlay/FrameworksResCommon.apk bind
+