diff options
author | Zak Cohen <zakcohen@google.com> | 2016-12-12 15:21:21 -0800 |
---|---|---|
committer | Zak Cohen <zakcohen@google.com> | 2017-01-11 11:44:47 -0800 |
commit | 1a6acdbb86c3e72bdb0a4dcab3bda58cbc4ea34c (patch) | |
tree | 1b243f434a14a25dc0eb39097293c3f27b74a54a /tools/aapt/AaptConfig.cpp | |
parent | 3c6f28aa5968b1edb823495efa15e7358de5261e (diff) |
Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
Bug: 30989383
Test: Unit test for aapt2
Change-Id: I66dc65af6327b94fed74538bee08cada0b8be4fa
Diffstat (limited to 'tools/aapt/AaptConfig.cpp')
-rw-r--r-- | tools/aapt/AaptConfig.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/aapt/AaptConfig.cpp b/tools/aapt/AaptConfig.cpp index b12867a0c135..565d2f0a0549 100644 --- a/tools/aapt/AaptConfig.cpp +++ b/tools/aapt/AaptConfig.cpp @@ -249,7 +249,10 @@ void applyVersionForCompatibility(ConfigDescription* config) { } uint16_t minSdk = 0; - if (config->screenLayout2 & ResTable_config::MASK_SCREENROUND) { + if ((config->uiMode & ResTable_config::MASK_UI_MODE_TYPE) + == ResTable_config::UI_MODE_TYPE_VR_HEADSET) { + minSdk = SDK_O; + } else if (config->screenLayout2 & ResTable_config::MASK_SCREENROUND) { minSdk = SDK_MNC; } else if (config->density == ResTable_config::DENSITY_ANY) { minSdk = SDK_LOLLIPOP; @@ -477,6 +480,11 @@ bool parseUiModeType(const char* name, ResTable_config* out) { (out->uiMode&~ResTable_config::MASK_UI_MODE_TYPE) | ResTable_config::UI_MODE_TYPE_WATCH; return true; + } else if (strcmp(name, "vrheadset") == 0) { + if (out) out->uiMode = + (out->uiMode&~ResTable_config::MASK_UI_MODE_TYPE) + | ResTable_config::UI_MODE_TYPE_VR_HEADSET; + return true; } return false; |