Turn NightMode into a RRO controlled by prop
diff --git a/NightMode/Android.mk b/NightMode/Android.mk
index 0a763e2..48816a3 100644
--- a/NightMode/Android.mk
+++ b/NightMode/Android.mk
@@ -2,4 +2,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := treble-overlay-NightMode
+LOCAL_MODULE_PATH := $(TARGET_OUT)/overlay
+LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
include $(BUILD_PACKAGE)
diff --git a/NightMode/AndroidManifest.xml b/NightMode/AndroidManifest.xml
index f0cbe4b..1b6b920 100644
--- a/NightMode/AndroidManifest.xml
+++ b/NightMode/AndroidManifest.xml
@@ -3,5 +3,8 @@
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
- android:priority="3"/>
+ android:requiredSystemPropertyName="persist.sys.overlay.nightmode"
+ android:requiredSystemPropertyValue="true"
+ android:priority="3"
+ android:isStatic="true" />
</manifest>