summaryrefslogtreecommitdiffstats
path: root/tools/aapt
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-12-08 12:53:17 -0800
committerAdam Lesinski <adamlesinski@google.com>2014-12-08 15:54:12 -0800
commit73a05114b051c6dcf5e5126ac94eaf8cac0ab289 (patch)
treecf384116b1fba67c0ba0479529f193ff7a2fa7ef /tools/aapt
parent4df65bf1eb454814954421403da9f8b5fcb82180 (diff)
downloadframeworks_base-73a05114b051c6dcf5e5126ac94eaf8cac0ab289.zip
frameworks_base-73a05114b051c6dcf5e5126ac94eaf8cac0ab289.tar.gz
frameworks_base-73a05114b051c6dcf5e5126ac94eaf8cac0ab289.tar.bz2
AAPT: Dump status of required flag for uses-feature
Outside of a feature-group, the legacy uses-feature tag has a boolean required flag that should be emitted in dump badging. Bug:17790999 Change-Id: I43023af00e9c9ed4bc35795c3a983fc719bf9b7a
Diffstat (limited to 'tools/aapt')
-rw-r--r--tools/aapt/Command.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index f5f70c5..d23b82e 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -516,12 +516,10 @@ static void printFeatureGroup(const FeatureGroup& grp,
const size_t numFeatures = grp.features.size();
for (size_t i = 0; i < numFeatures; i++) {
- if (!grp.features[i]) {
- continue;
- }
+ const bool required = grp.features[i];
const String8& featureName = grp.features.keyAt(i);
- printf(" uses-feature: name='%s'\n",
+ printf(" uses-feature%s: name='%s'\n", (required ? "" : "-not-required"),
ResTable::normalizeForOutput(featureName.string()).string());
}
@@ -1844,7 +1842,7 @@ int doDump(Bundle* bundle)
}
}
- if (!grp.features.isEmpty()) {
+ if (!grp.features.isEmpty()) {
printFeatureGroup(grp);
}
}