diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-03-01 17:43:39 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-03-01 20:42:14 -0800 |
commit | ef05e076ced1a32c5c0aaee28403779834adb2ba (patch) | |
tree | 20dcf607adf508481d57610937ceab6ef2c6aee2 /libs/utils | |
parent | 883dbacb12a003f8f46c3faab26b744fdef649a1 (diff) | |
download | frameworks_base-ef05e076ced1a32c5c0aaee28403779834adb2ba.zip frameworks_base-ef05e076ced1a32c5c0aaee28403779834adb2ba.tar.gz frameworks_base-ef05e076ced1a32c5c0aaee28403779834adb2ba.tar.bz2 |
Fix issue #2448075: aapt doesn't fix up activity-alias android:targetActivity links
And related:
- The aapt tool now sets a resource configurations sdk level to match any configs
that have been set (for example if you specify density your sdk level will be
at least 4).
- New option to modify the targetPackage attribute of instrumentation.
- Clean up of aapt options help.
- Fix of UI type values to leave 0 for "unspecified".
- Make the UI mode config APIs public.
Diffstat (limited to 'libs/utils')
-rw-r--r-- | libs/utils/ResourceTypes.cpp | 175 |
1 files changed, 159 insertions, 16 deletions
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp index 5f89788..6da11b5 100644 --- a/libs/utils/ResourceTypes.cpp +++ b/libs/utils/ResourceTypes.cpp @@ -4149,22 +4149,165 @@ void ResTable::print(bool inclValues) const } else { sprintf(density, "%d", (int)dval); } - printf(" config %d lang=%c%c cnt=%c%c orien=%d touch=%d density=%s key=%d infl=%d nav=%d w=%d h=%d sz=%d lng=%d\n", - (int)configIndex, - type->config.language[0] ? type->config.language[0] : '-', - type->config.language[1] ? type->config.language[1] : '-', - type->config.country[0] ? type->config.country[0] : '-', - type->config.country[1] ? type->config.country[1] : '-', - type->config.orientation, - type->config.touchscreen, - density, - type->config.keyboard, - type->config.inputFlags, - type->config.navigation, - dtohs(type->config.screenWidth), - dtohs(type->config.screenHeight), - type->config.screenLayout&ResTable_config::MASK_SCREENSIZE, - type->config.screenLayout&ResTable_config::MASK_SCREENLONG); + printf(" config %d", (int)configIndex); + if (type->config.mcc != 0) { + printf(" mcc=%d", dtohs(type->config.mcc)); + } + if (type->config.mnc != 0) { + printf(" mnc=%d", dtohs(type->config.mnc)); + } + if (type->config.locale != 0) { + printf(" lang=%c%c cnt=%c%c", + type->config.language[0] ? type->config.language[0] : '-', + type->config.language[1] ? type->config.language[1] : '-', + type->config.country[0] ? type->config.country[0] : '-', + type->config.country[1] ? type->config.country[1] : '-'); + } + if (type->config.screenLayout != 0) { + printf(" sz=%d", + type->config.screenLayout&ResTable_config::MASK_SCREENSIZE); + switch (type->config.screenLayout&ResTable_config::MASK_SCREENSIZE) { + case ResTable_config::SCREENSIZE_SMALL: + printf(" (small)"); + break; + case ResTable_config::SCREENSIZE_NORMAL: + printf(" (normal)"); + break; + case ResTable_config::SCREENSIZE_LARGE: + printf(" (large)"); + break; + } + printf(" lng=%d", + type->config.screenLayout&ResTable_config::MASK_SCREENLONG); + switch (type->config.screenLayout&ResTable_config::MASK_SCREENLONG) { + case ResTable_config::SCREENLONG_NO: + printf(" (notlong)"); + break; + case ResTable_config::SCREENLONG_YES: + printf(" (long)"); + break; + } + } + if (type->config.orientation != 0) { + printf(" orient=%d", type->config.orientation); + switch (type->config.orientation) { + case ResTable_config::ORIENTATION_PORT: + printf(" (port)"); + break; + case ResTable_config::ORIENTATION_LAND: + printf(" (land)"); + break; + case ResTable_config::ORIENTATION_SQUARE: + printf(" (square)"); + break; + } + } + if (type->config.uiMode != 0) { + printf(" type=%d", + type->config.uiMode&ResTable_config::MASK_UI_MODE_TYPE); + switch (type->config.uiMode&ResTable_config::MASK_UI_MODE_TYPE) { + case ResTable_config::UI_MODE_TYPE_NORMAL: + printf(" (normal)"); + break; + case ResTable_config::UI_MODE_TYPE_CAR: + printf(" (car)"); + break; + } + printf(" night=%d", + type->config.uiMode&ResTable_config::MASK_UI_MODE_NIGHT); + switch (type->config.uiMode&ResTable_config::MASK_UI_MODE_NIGHT) { + case ResTable_config::UI_MODE_NIGHT_NO: + printf(" (no)"); + break; + case ResTable_config::UI_MODE_NIGHT_YES: + printf(" (yes)"); + break; + } + } + if (dval != 0) { + printf(" density=%s", density); + } + if (type->config.touchscreen != 0) { + printf(" touch=%d", type->config.touchscreen); + switch (type->config.touchscreen) { + case ResTable_config::TOUCHSCREEN_NOTOUCH: + printf(" (notouch)"); + break; + case ResTable_config::TOUCHSCREEN_STYLUS: + printf(" (stylus)"); + break; + case ResTable_config::TOUCHSCREEN_FINGER: + printf(" (finger)"); + break; + } + } + if (type->config.inputFlags != 0) { + printf(" keyhid=%d", type->config.inputFlags&ResTable_config::MASK_KEYSHIDDEN); + switch (type->config.inputFlags&ResTable_config::MASK_KEYSHIDDEN) { + case ResTable_config::KEYSHIDDEN_NO: + printf(" (no)"); + break; + case ResTable_config::KEYSHIDDEN_YES: + printf(" (yes)"); + break; + case ResTable_config::KEYSHIDDEN_SOFT: + printf(" (soft)"); + break; + } + printf(" navhid=%d", type->config.inputFlags&ResTable_config::MASK_NAVHIDDEN); + switch (type->config.inputFlags&ResTable_config::MASK_NAVHIDDEN) { + case ResTable_config::NAVHIDDEN_NO: + printf(" (no)"); + break; + case ResTable_config::NAVHIDDEN_YES: + printf(" (yes)"); + break; + } + } + if (type->config.keyboard != 0) { + printf(" kbd=%d", type->config.keyboard); + switch (type->config.keyboard) { + case ResTable_config::KEYBOARD_NOKEYS: + printf(" (nokeys)"); + break; + case ResTable_config::KEYBOARD_QWERTY: + printf(" (qwerty)"); + break; + case ResTable_config::KEYBOARD_12KEY: + printf(" (12key)"); + break; + } + } + if (type->config.navigation != 0) { + printf(" nav=%d", type->config.navigation); + switch (type->config.navigation) { + case ResTable_config::NAVIGATION_NONAV: + printf(" (nonav)"); + break; + case ResTable_config::NAVIGATION_DPAD: + printf(" (dpad)"); + break; + case ResTable_config::NAVIGATION_TRACKBALL: + printf(" (trackball)"); + break; + case ResTable_config::NAVIGATION_WHEEL: + printf(" (wheel)"); + break; + } + } + if (type->config.screenWidth != 0) { + printf(" w=%d", dtohs(type->config.screenWidth)); + } + if (type->config.screenHeight != 0) { + printf(" h=%d", dtohs(type->config.screenHeight)); + } + if (type->config.sdkVersion != 0) { + printf(" sdk=%d", dtohs(type->config.sdkVersion)); + } + if (type->config.minorVersion != 0) { + printf(" mver=%d", dtohs(type->config.minorVersion)); + } + printf("\n"); size_t entryCount = dtohl(type->entryCount); uint32_t entriesStart = dtohl(type->entriesStart); if ((entriesStart&0x3) != 0) { |