summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2012-06-15 20:16:41 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2012-08-23 14:55:33 -0700
commit5f7979993979466c79ab4f38d83c6f2aca361662 (patch)
tree90c8b098b3c9a53a90c039641b0b7ba379d6b4eb /native
parent5e8e41e41aecd2a4951659a1f3507f3371e0cc47 (diff)
downloadframeworks_base-5f7979993979466c79ab4f38d83c6f2aca361662.zip
frameworks_base-5f7979993979466c79ab4f38d83c6f2aca361662.tar.gz
frameworks_base-5f7979993979466c79ab4f38d83c6f2aca361662.tar.bz2
Add support for "-rtl" in resources
- fix bug #7035019 Need to have "-rtl" support for Resource Change-Id: Ic82145c2ac672729d8a6c695a5f343276a1a0a2c
Diffstat (limited to 'native')
-rw-r--r--native/android/configuration.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/native/android/configuration.cpp b/native/android/configuration.cpp
index 7eb51dd..74cf80e 100644
--- a/native/android/configuration.cpp
+++ b/native/android/configuration.cpp
@@ -123,6 +123,11 @@ int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config) {
return config->smallestScreenWidthDp;
}
+int32_t AConfiguration_getLayoutDirection(AConfiguration* config) {
+ return (config->screenLayout&ResTable_config::MASK_LAYOUTDIR)
+ >> ResTable_config::SHIFT_LAYOUTDIR;
+}
+
// ----------------------------------------------------------------------
void AConfiguration_setMcc(AConfiguration* config, int32_t mcc) {
@@ -210,6 +215,11 @@ void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t val
config->smallestScreenWidthDp = value;
}
+void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) {
+ config->screenLayout = (config->screenLayout&~ResTable_config::MASK_LAYOUTDIR)
+ | ((value<<ResTable_config::SHIFT_LAYOUTDIR)&ResTable_config::MASK_LAYOUTDIR);
+}
+
// ----------------------------------------------------------------------
int32_t AConfiguration_diff(AConfiguration* config1, AConfiguration* config2) {