AAPT2: Implement density stripping and initial Split support
When a preferred density is supplied, the closest matching densities
will be selected, the rest stripped from the APK.
Split support will be enabled in a later CL. Command line support is still
needed, but the foundation is ready.
Bug:25958912
Change-Id: I56d599806b4ec4ffa24e17aad48d47130ca05c08
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp
index ab9c792..dd7ff01 100644
--- a/tools/aapt2/ResourceValues.cpp
+++ b/tools/aapt2/ResourceValues.cpp
@@ -18,6 +18,7 @@
#include "ResourceUtils.h"
#include "ResourceValues.h"
#include "ValueVisitor.h"
+#include "io/File.h"
#include "util/Util.h"
#include <androidfw/ResourceTypes.h>
@@ -190,6 +191,7 @@
FileReference* FileReference::clone(StringPool* newPool) const {
FileReference* fr = new FileReference(newPool->makeRef(*path));
+ fr->file = file;
fr->mComment = mComment;
fr->mSource = mSource;
return fr;