mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 13:57:46 +01:00
aapt2: sparse resource pulling from yaml
This commit is contained in:
parent
3c84590a1a
commit
f05bd31e59
@ -283,6 +283,7 @@ public class Androlib {
|
||||
mAndRes.setPackageRenamed(meta.packageInfo);
|
||||
mAndRes.setVersionInfo(meta.versionInfo);
|
||||
mAndRes.setSharedLibrary(meta.sharedLibrary);
|
||||
mAndRes.setSparseResources(meta.sparseResources);
|
||||
|
||||
if (meta.sdkInfo != null && meta.sdkInfo.get("minSdkVersion") != null) {
|
||||
String minSdkVersion = meta.sdkInfo.get("minSdkVersion");
|
||||
|
@ -302,6 +302,10 @@ final public class AndrolibResources {
|
||||
mSharedLibrary = flag;
|
||||
}
|
||||
|
||||
public void setSparseResources(boolean flag) {
|
||||
mSparseResources = flag;
|
||||
}
|
||||
|
||||
public String checkTargetSdkVersionBounds() {
|
||||
int target = mapSdkShorthandToVersion(mTargetSdkVersion);
|
||||
|
||||
@ -407,7 +411,9 @@ final public class AndrolibResources {
|
||||
cmd.add("--no-version-transitions");
|
||||
cmd.add("--no-resource-deduping");
|
||||
|
||||
// TODO Sparse Resources
|
||||
if (mSparseResources) {
|
||||
cmd.add("--enable-sparse-encoding");
|
||||
}
|
||||
|
||||
if (apkOptions.isFramework) {
|
||||
cmd.add("-x");
|
||||
@ -1016,6 +1022,7 @@ final public class AndrolibResources {
|
||||
private String mPackageId = null;
|
||||
|
||||
private boolean mSharedLibrary = false;
|
||||
private boolean mSparseResources = false;
|
||||
|
||||
private final static String[] IGNORED_PACKAGES = new String[] {
|
||||
"android", "com.htc", "miui", "com.lge", "com.lge.internal", "yi", "com.miui.core", "flyme",
|
||||
|
Loading…
Reference in New Issue
Block a user