Created resuable DumpApkCommand and added "badger"
This change refactors the dump commands to inherit from a base
DumpApkCommand and adds a command that prints out an ASCII
image of a badger if the user wrote "badger" instead of
"badging". The command is hidden from the help menu.
Bug: 73535002
Test: manual
Change-Id: I9bdd8a7bbf6a4282c4933e5c478f6d1d8e32d99e
diff --git a/tools/aapt2/cmd/Command.h b/tools/aapt2/cmd/Command.h
index 71dc6fe..1694988 100644
--- a/tools/aapt2/cmd/Command.h
+++ b/tools/aapt2/cmd/Command.h
@@ -49,7 +49,7 @@
const android::StringPiece& description, std::unordered_set<std::string>* value);
void AddOptionalSwitch(const android::StringPiece& name, const android::StringPiece& description,
bool* value);
- void AddOptionalSubcommand(std::unique_ptr<Command>&& subcommand);
+ void AddOptionalSubcommand(std::unique_ptr<Command>&& subcommand, bool experimental = false);
void SetDescription(const android::StringPiece& name);
@@ -83,6 +83,7 @@
std::string fullname_;
std::vector<Flag> flags_;
std::vector<std::unique_ptr<Command>> subcommands_;
+ std::vector<std::unique_ptr<Command>> experimental_subcommands_;
};
} // namespace aapt