summaryrefslogtreecommitdiff
path: root/tools/aapt2/Main.cpp
diff options
context:
space:
mode:
author Jeremy Meyer <jakmcbane@google.com> 2022-05-20 20:35:42 +0000
committer Jeremy Meyer <jakmcbane@google.com> 2022-05-31 23:43:03 +0000
commit56f36e8f2fa808128bc68d4ae9adad9e65b90367 (patch)
tree07b10081f9a44efde8a3b1cc0c33264253451ca8 /tools/aapt2/Main.cpp
parent14be35a5de080e7ae797edbecd94e0684244d647 (diff)
Move StringPool to libandroidfw
Test: verified affected tests pass Bug: 232940948 Change-Id: I22089893d7e5013f759c39ce190bec07fa6435db
Diffstat (limited to 'tools/aapt2/Main.cpp')
-rw-r--r--tools/aapt2/Main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/aapt2/Main.cpp b/tools/aapt2/Main.cpp
index e47bd67c4b8d..a0b4dab9b8e5 100644
--- a/tools/aapt2/Main.cpp
+++ b/tools/aapt2/Main.cpp
@@ -27,6 +27,7 @@
#include "Diagnostics.h"
#include "android-base/stringprintf.h"
#include "android-base/utf8.h"
+#include "androidfw/IDiagnostics.h"
#include "androidfw/StringPiece.h"
#include "cmd/ApkInfo.h"
#include "cmd/Command.h"
@@ -63,7 +64,7 @@ class VersionCommand : public Command {
/** The main entry point of AAPT. */
class MainCommand : public Command {
public:
- explicit MainCommand(text::Printer* printer, IDiagnostics* diagnostics)
+ explicit MainCommand(text::Printer* printer, android::IDiagnostics* diagnostics)
: Command("aapt2"), diagnostics_(diagnostics) {
AddOptionalSubcommand(util::make_unique<CompileCommand>(diagnostics));
AddOptionalSubcommand(util::make_unique<LinkCommand>(diagnostics));
@@ -77,9 +78,9 @@ class MainCommand : public Command {
int Action(const std::vector<std::string>& args) override {
if (args.size() == 0) {
- diagnostics_->Error(DiagMessage() << "no subcommand specified");
+ diagnostics_->Error(android::DiagMessage() << "no subcommand specified");
} else {
- diagnostics_->Error(DiagMessage() << "unknown subcommand '" << args[0] << "'");
+ diagnostics_->Error(android::DiagMessage() << "unknown subcommand '" << args[0] << "'");
}
Usage(&std::cerr);
@@ -87,7 +88,7 @@ class MainCommand : public Command {
}
private:
- IDiagnostics* diagnostics_;
+ android::IDiagnostics* diagnostics_;
};
/*
@@ -98,7 +99,7 @@ class MainCommand : public Command {
*/
class DaemonCommand : public Command {
public:
- explicit DaemonCommand(io::FileOutputStream* out, IDiagnostics* diagnostics)
+ explicit DaemonCommand(io::FileOutputStream* out, android::IDiagnostics* diagnostics)
: Command("daemon", "m"), out_(out), diagnostics_(diagnostics) {
SetDescription("Runs aapt in daemon mode. Each subsequent line is a single parameter to the\n"
"command. The end of an invocation is signaled by providing an empty line.");
@@ -147,7 +148,7 @@ class DaemonCommand : public Command {
private:
io::FileOutputStream* out_;
- IDiagnostics* diagnostics_;
+ android::IDiagnostics* diagnostics_;
std::optional<std::string> trace_folder_;
};