diff options
| author | 2018-08-31 00:01:40 +0000 | |
|---|---|---|
| committer | 2018-08-31 00:01:40 +0000 | |
| commit | bd263a40cac6728b11b4cbee83fa221540041ee4 (patch) | |
| tree | 8c837452e6eca901579ce51da96ce43f438807f6 | |
| parent | cca7d943cfaad5e47060d9dcfbc6f2390c854b24 (diff) | |
| parent | dea2fe3f9f8c499f12967ef0bbcec9afdbbb9ae4 (diff) | |
Merge "AAPT2: Fix dump apk format"
| -rw-r--r-- | tools/aapt2/cmd/Dump.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/aapt2/cmd/Dump.cpp b/tools/aapt2/cmd/Dump.cpp index 29e471e581ce..5cb30b6f5db2 100644 --- a/tools/aapt2/cmd/Dump.cpp +++ b/tools/aapt2/cmd/Dump.cpp @@ -298,7 +298,7 @@ int DumpTableCommand::Action(const std::vector<std::string>& args) { return 1; } - if (loaded_apk->GetApkFormat()) { + if (loaded_apk->GetApkFormat() == ApkFormat::kProto) { printer.Println("Proto APK"); } else { printer.Println("Binary APK"); @@ -356,7 +356,7 @@ int DumpXmlStringsCommand::Action(const std::vector<std::string>& args) { for (auto xml_file : files_) { android::ResXMLTree tree; - if (loaded_apk->GetApkFormat() == kProto) { + if (loaded_apk->GetApkFormat() == ApkFormat::kProto) { auto xml = loaded_apk->LoadXml(xml_file, diag_); if (!xml) { return 1; @@ -375,7 +375,7 @@ int DumpXmlStringsCommand::Action(const std::vector<std::string>& args) { std::string data = buffer.to_string(); tree.setTo(data.data(), data.size(), /** copyData */ true); - } else if (loaded_apk->GetApkFormat() == kBinary) { + } else if (loaded_apk->GetApkFormat() == ApkFormat::kBinary) { io::IFile* file = loaded_apk->GetFileCollection()->FindFile(xml_file); if (!file) { diag_->Error(DiagMessage(xml_file) << "file '" << xml_file << "' not found in APK"); |