Add API for obtaining changing configurations bitmask from Theme

Required to know when to reload the system context's theme in response
to configuration changes, and thus needed to support the DayNight theme.

Bug: 20267825
Change-Id: I7df5e28b7a6d8b611ea030032544cf4800788514
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index daf5a61..db495dd 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -999,6 +999,13 @@
     return block >= 0 ? copyValue(env, outValue, &res, value, ref, block, typeSpecFlags) : block;
 }
 
+static jint android_content_AssetManager_getThemeChangingConfigurations(JNIEnv* env, jobject clazz,
+                                                                        jlong themeHandle)
+{
+    ResTable::Theme* theme = reinterpret_cast<ResTable::Theme*>(themeHandle);
+    return theme->getChangingConfigurations();
+}
+
 static void android_content_AssetManager_dumpTheme(JNIEnv* env, jobject clazz,
                                                    jlong themeHandle, jint pri,
                                                    jstring tag, jstring prefix)
@@ -2103,6 +2110,8 @@
         (void*) android_content_AssetManager_copyTheme },
     { "loadThemeAttributeValue", "(JILandroid/util/TypedValue;Z)I",
         (void*) android_content_AssetManager_loadThemeAttributeValue },
+    { "getThemeChangingConfigurations", "(J)I",
+        (void*) android_content_AssetManager_getThemeChangingConfigurations },
     { "dumpTheme", "(JILjava/lang/String;Ljava/lang/String;)V",
         (void*) android_content_AssetManager_dumpTheme },
     { "applyStyle","(JIIJ[I[I[I)Z",