summaryrefslogtreecommitdiff
path: root/tools/aapt2/LoadedApk.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/LoadedApk.h')
-rw-r--r--tools/aapt2/LoadedApk.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/aapt2/LoadedApk.h b/tools/aapt2/LoadedApk.h
index 0cc2d22eb7b7..f8878d13ae35 100644
--- a/tools/aapt2/LoadedApk.h
+++ b/tools/aapt2/LoadedApk.h
@@ -19,12 +19,11 @@
#include "androidfw/StringPiece.h"
-#include "io/ZipArchive.h"
#include "ResourceTable.h"
+#include "flatten/Archive.h"
+#include "io/ZipArchive.h"
#include "unflatten/BinaryResourceParser.h"
-using android::StringPiece;
-
namespace aapt {
/** Info about an APK loaded in memory. */
@@ -42,8 +41,14 @@ class LoadedApk {
const Source& GetSource() { return source_; }
- static std::unique_ptr<LoadedApk> LoadApkFromPath(
- IAaptContext* context, const StringPiece& path);
+ /**
+ * Writes the APK on disk at the given path, while also removing the resource
+ * files that are not referenced in the resource table.
+ */
+ bool WriteToArchive(IAaptContext* context, IArchiveWriter* writer);
+
+ static std::unique_ptr<LoadedApk> LoadApkFromPath(IAaptContext* context,
+ const android::StringPiece& path);
private:
Source source_;