summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-05-05 09:49:03 -0700
committerAlan Viverette <alanv@google.com>2015-05-05 09:49:03 -0700
commitc1d527926e1c82828e42bdc0c7abf50f6decc0a7 (patch)
tree48cfc47946a00d3c2126aa62fbf8e47e89e3dbf9 /core/jni
parent5551aca2b8ec9fe7ab5ffda8dad82ee104556962 (diff)
downloadframeworks_base-c1d527926e1c82828e42bdc0c7abf50f6decc0a7.zip
frameworks_base-c1d527926e1c82828e42bdc0c7abf50f6decc0a7.tar.gz
frameworks_base-c1d527926e1c82828e42bdc0c7abf50f6decc0a7.tar.bz2
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
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_util_AssetManager.cpp9
1 files changed, 9 insertions, 0 deletions
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 @@ static jint android_content_AssetManager_loadThemeAttributeValue(
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 @@ static JNINativeMethod gAssetManagerMethods[] = {
(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",