AAPT2: Rename strip phase to optimize

- Allow resource deduping, version collapsing, and sparse resource
  encoding.

Test: manual
Change-Id: Ia4aa892ab5b06ba1d5ea4a6efb51b00bc3a980c4
diff --git a/tools/aapt2/LoadedApk.cpp b/tools/aapt2/LoadedApk.cpp
index 407550b..1d04b35 100644
--- a/tools/aapt2/LoadedApk.cpp
+++ b/tools/aapt2/LoadedApk.cpp
@@ -58,7 +58,8 @@
   return util::make_unique<LoadedApk>(source, std::move(apk), std::move(table));
 }
 
-bool LoadedApk::WriteToArchive(IAaptContext* context, IArchiveWriter* writer) {
+bool LoadedApk::WriteToArchive(IAaptContext* context, const TableFlattenerOptions& options,
+                               IArchiveWriter* writer) {
   std::set<std::string> referenced_resources;
   // List the files being referenced in the resource table.
   for (auto& pkg : table_->packages) {
@@ -96,7 +97,7 @@
       BigBuffer buffer = BigBuffer(1024);
       // TODO(adamlesinski): How to determine if there were sparse entries (and if to encode
       // with sparse entries) b/35389232.
-      TableFlattener flattener({}, &buffer);
+      TableFlattener flattener(options, &buffer);
       if (!flattener.Consume(context, table_.get())) {
         return false;
       }