summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-05-14 14:25:36 -0700
committerAdam Lesinski <adamlesinski@google.com>2015-05-15 15:10:58 -0700
commit2738c96d998dedfae5b4670d588d0cd299c4ca0f (patch)
tree76b8571676d42a9c0b3bfa00f1937eebf2c05698 /native
parent038959e851603500eb39b52fef33cbe75dbd73e3 (diff)
downloadframeworks_base-2738c96d998dedfae5b4670d588d0cd299c4ca0f.zip
frameworks_base-2738c96d998dedfae5b4670d588d0cd299c4ca0f.tar.gz
frameworks_base-2738c96d998dedfae5b4670d588d0cd299c4ca0f.tar.bz2
Add -round and -notround qualifier to android runtime/aapt
The round qualifier denotes a device with a screen shape that is round. The qualifier shows up after the 'long/notlong' qualifier and before the orientation 'port/land/square' qualifiers. Change-Id: I3044258b2703a9165694b79725bade770fa6cea1
Diffstat (limited to 'native')
-rw-r--r--native/android/configuration.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/native/android/configuration.cpp b/native/android/configuration.cpp
index 74cf80e..77237ae 100644
--- a/native/android/configuration.cpp
+++ b/native/android/configuration.cpp
@@ -101,6 +101,10 @@ int32_t AConfiguration_getScreenLong(AConfiguration* config) {
>> ResTable_config::SHIFT_SCREENLONG;
}
+int32_t AConfiguration_getScreenRound(AConfiguration* config) {
+ return (config->screenLayout2&ResTable_config::MASK_SCREENROUND);
+}
+
int32_t AConfiguration_getUiModeType(AConfiguration* config) {
return config->uiMode&ResTable_config::MASK_UI_MODE_TYPE;
}
@@ -192,6 +196,11 @@ void AConfiguration_setScreenLong(AConfiguration* config, int32_t screenLong) {
| ((screenLong<<ResTable_config::SHIFT_SCREENLONG)&ResTable_config::MASK_SCREENLONG);
}
+void AConfiguration_setScreenRound(AConfiguration* config, int32_t screenRound) {
+ config->screenLayout2 = (config->screenLayout2&~ResTable_config::MASK_SCREENROUND)
+ | (screenRound&ResTable_config::MASK_SCREENROUND);
+}
+
void AConfiguration_setUiModeType(AConfiguration* config, int32_t uiModeType) {
config->uiMode = (config->uiMode&~ResTable_config::MASK_UI_MODE_TYPE)
| (uiModeType&ResTable_config::MASK_UI_MODE_TYPE);