diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2012-09-04 15:01:03 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-04 15:01:03 -0700 |
commit | 035ce2ca92742894f7f906c93d7d217c647aa19a (patch) | |
tree | 091278302dd86f6009db3d86ff95dd607fef8c11 /native | |
parent | 167611811d4fd6318bc366128590701274488e84 (diff) | |
parent | 5f7979993979466c79ab4f38d83c6f2aca361662 (diff) | |
download | frameworks_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.cpp | 10 |
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) { |