diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-08-22 12:56:26 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2014-08-22 13:01:11 -0700 |
commit | caf797c84a6a2829662872e0df93fcd61da78d51 (patch) | |
tree | f9efcb33c5bdd25c95df7c6a60cdd8e12b3075e7 /tools | |
parent | d255aba09337bf81c3cc277e978f6664699a54b7 (diff) | |
download | frameworks_base-caf797c84a6a2829662872e0df93fcd61da78d51.zip frameworks_base-caf797c84a6a2829662872e0df93fcd61da78d51.tar.gz frameworks_base-caf797c84a6a2829662872e0df93fcd61da78d51.tar.bz2 |
AAPT: Dump installLocation in badging
Bug:17033144
Change-Id: I87dea9af47eef8bcba1465df9b49e355ac6346ec
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aapt/Command.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index bdbf47b..b394671 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -438,6 +438,7 @@ enum { LARGE_SCREEN_ATTR = 0x01010286, XLARGE_SCREEN_ATTR = 0x010102bf, REQUIRED_ATTR = 0x0101028e, + INSTALL_LOCATION_ATTR = 0x010102b7, SCREEN_SIZE_ATTR = 0x010102ca, SCREEN_DENSITY_ATTR = 0x010102cb, REQUIRES_SMALLEST_WIDTH_DP_ATTR = 0x01010364, @@ -1177,6 +1178,33 @@ int doDump(Bundle* bundle) splitName.string()).string()); } printf("\n"); + + int32_t installLocation = getResolvedIntegerAttribute(&res, tree, + INSTALL_LOCATION_ATTR, &error, -1); + if (error != "") { + fprintf(stderr, "ERROR getting 'android:installLocation' attribute: %s\n", + error.string()); + goto bail; + } + + if (installLocation >= 0) { + printf("install-location:'"); + switch (installLocation) { + case 0: + printf("auto"); + break; + case 1: + printf("internalOnly"); + break; + case 2: + printf("preferExternal"); + break; + default: + fprintf(stderr, "Invalid installLocation %d\n", installLocation); + goto bail; + } + printf("'\n"); + } } else if (depth == 2) { withinApplication = false; if (tag == "application") { |