diff options
author | Sergey Ten <sergey.ten6@t-mobile.com> | 2009-05-07 07:05:23 -0700 |
---|---|---|
committer | Josh Guilfoyle <Josh.Guilfoyle@T-Mobile.com> | 2009-07-29 19:58:03 -0700 |
commit | c6c07646aabfa31d009b4bcf3cd0dd3ab9c9f15e (patch) | |
tree | d8a3d6bb7b3dca8f20801ed8a3abf836451355d0 /core/jni/android_util_AssetManager.cpp | |
parent | 777e111e4463da144548224f08cdf239140d77f3 (diff) | |
download | frameworks_base-c6c07646aabfa31d009b4bcf3cd0dd3ab9c9f15e.zip frameworks_base-c6c07646aabfa31d009b4bcf3cd0dd3ab9c9f15e.tar.gz frameworks_base-c6c07646aabfa31d009b4bcf3cd0dd3ab9c9f15e.tar.bz2 |
Changes allowing to set color attributes directly on a theme, without (re-)generating resource bundle/theme apk.
Diffstat (limited to 'core/jni/android_util_AssetManager.cpp')
-rw-r--r-- | core/jni/android_util_AssetManager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp index 3442785..fbedc83 100644 --- a/core/jni/android_util_AssetManager.cpp +++ b/core/jni/android_util_AssetManager.cpp @@ -827,6 +827,16 @@ static void android_content_AssetManager_applyThemeStyle(JNIEnv* env, jobject cl theme->applyStyle(styleRes, force ? true : false); } +static void android_content_AssetManager_setAttributeValue(JNIEnv* env, jobject clazz, + jint themeInt, + jint attribute, + jint value) +{ + ResTable::Theme* theme = (ResTable::Theme*)themeInt; + theme->setAttributeValue(attribute, value); +} + + static void android_content_AssetManager_copyTheme(JNIEnv* env, jobject clazz, jint destInt, jint srcInt) { @@ -1715,6 +1725,8 @@ static JNINativeMethod gAssetManagerMethods[] = { (void*) android_content_AssetManager_getArraySize }, { "retrieveArray","(I[I)I", (void*) android_content_AssetManager_retrieveArray }, + { "setAttributeValue", "(III)V", + (void*) android_content_AssetManager_setAttributeValue }, // XML files. { "openXmlAssetNative", "(ILjava/lang/String;)I", |