summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2012-09-04 15:01:03 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-04 15:01:03 -0700
commit035ce2ca92742894f7f906c93d7d217c647aa19a (patch)
tree091278302dd86f6009db3d86ff95dd607fef8c11 /native
parent167611811d4fd6318bc366128590701274488e84 (diff)
parent5f7979993979466c79ab4f38d83c6f2aca361662 (diff)
downloadframeworks_base-035ce2ca92742894f7f906c93d7d217c647aa19a.zip
frameworks_base-035ce2ca92742894f7f906c93d7d217c647aa19a.tar.gz
frameworks_base-035ce2ca92742894f7f906c93d7d217c647aa19a.tar.bz2
Merge "Add support for "-rtl" in resources" into jb-mr1-dev
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) {