diff options
author | Adam Lesinski <adamlesinski@google.com> | 2016-02-13 20:26:45 -0800 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2016-02-17 18:17:25 -0800 |
commit | 355f285ffd000f6cfe76680eb22d010546d124bb (patch) | |
tree | 94d86559ba73ed2f482af1f296ef56374776a8f6 /tools/aapt2/ResourceTable.h | |
parent | e4735a99598bf29847a9f12dd7fae6d7df880bc4 (diff) |
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
Diffstat (limited to 'tools/aapt2/ResourceTable.h')
-rw-r--r-- | tools/aapt2/ResourceTable.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/tools/aapt2/ResourceTable.h b/tools/aapt2/ResourceTable.h index 8ffff1f70710..7f5c2b8c0f37 100644 --- a/tools/aapt2/ResourceTable.h +++ b/tools/aapt2/ResourceTable.h @@ -23,6 +23,7 @@ #include "ResourceValues.h" #include "Source.h" #include "StringPool.h" +#include "io/File.h" #include <android-base/macros.h> #include <map> @@ -202,17 +203,17 @@ public: IDiagnostics* diag); bool addFileReference(const ResourceNameRef& name, - const ConfigDescription& config, - const Source& source, - const StringPiece16& path, - IDiagnostics* diag); - - bool addFileReference(const ResourceNameRef& name, - const ConfigDescription& config, - const Source& source, - const StringPiece16& path, - std::function<int(Value*,Value*)> conflictResolver, - IDiagnostics* diag); + const ConfigDescription& config, + const Source& source, + const StringPiece16& path, + IDiagnostics* diag); + + bool addFileReferenceAllowMangled(const ResourceNameRef& name, + const ConfigDescription& config, + const Source& source, + const StringPiece16& path, + io::IFile* file, + IDiagnostics* diag); /** * Same as addResource, but doesn't verify the validity of the name. This is used @@ -280,6 +281,14 @@ public: private: ResourceTablePackage* findOrCreatePackage(const StringPiece16& name); + bool addFileReferenceImpl(const ResourceNameRef& name, + const ConfigDescription& config, + const Source& source, + const StringPiece16& path, + io::IFile* file, + const char16_t* validChars, + IDiagnostics* diag); + bool addResourceImpl(const ResourceNameRef& name, ResourceId resId, const ConfigDescription& config, |