From 2738c96d998dedfae5b4670d588d0cd299c4ca0f Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Thu, 14 May 2015 14:25:36 -0700 Subject: 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 --- native/android/configuration.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'native') 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<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); -- cgit v1.1