mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-14 23:07:48 +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.setPackageRenamed(meta.packageInfo);
|
||||||
mAndRes.setVersionInfo(meta.versionInfo);
|
mAndRes.setVersionInfo(meta.versionInfo);
|
||||||
mAndRes.setSharedLibrary(meta.sharedLibrary);
|
mAndRes.setSharedLibrary(meta.sharedLibrary);
|
||||||
|
mAndRes.setSparseResources(meta.sparseResources);
|
||||||
|
|
||||||
if (meta.sdkInfo != null && meta.sdkInfo.get("minSdkVersion") != null) {
|
if (meta.sdkInfo != null && meta.sdkInfo.get("minSdkVersion") != null) {
|
||||||
String minSdkVersion = meta.sdkInfo.get("minSdkVersion");
|
String minSdkVersion = meta.sdkInfo.get("minSdkVersion");
|
||||||
|
@ -302,6 +302,10 @@ final public class AndrolibResources {
|
|||||||
mSharedLibrary = flag;
|
mSharedLibrary = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSparseResources(boolean flag) {
|
||||||
|
mSparseResources = flag;
|
||||||
|
}
|
||||||
|
|
||||||
public String checkTargetSdkVersionBounds() {
|
public String checkTargetSdkVersionBounds() {
|
||||||
int target = mapSdkShorthandToVersion(mTargetSdkVersion);
|
int target = mapSdkShorthandToVersion(mTargetSdkVersion);
|
||||||
|
|
||||||
@ -407,7 +411,9 @@ final public class AndrolibResources {
|
|||||||
cmd.add("--no-version-transitions");
|
cmd.add("--no-version-transitions");
|
||||||
cmd.add("--no-resource-deduping");
|
cmd.add("--no-resource-deduping");
|
||||||
|
|
||||||
// TODO Sparse Resources
|
if (mSparseResources) {
|
||||||
|
cmd.add("--enable-sparse-encoding");
|
||||||
|
}
|
||||||
|
|
||||||
if (apkOptions.isFramework) {
|
if (apkOptions.isFramework) {
|
||||||
cmd.add("-x");
|
cmd.add("-x");
|
||||||
@ -1016,6 +1022,7 @@ final public class AndrolibResources {
|
|||||||
private String mPackageId = null;
|
private String mPackageId = null;
|
||||||
|
|
||||||
private boolean mSharedLibrary = false;
|
private boolean mSharedLibrary = false;
|
||||||
|
private boolean mSparseResources = false;
|
||||||
|
|
||||||
private final static String[] IGNORED_PACKAGES = new String[] {
|
private final static String[] IGNORED_PACKAGES = new String[] {
|
||||||
"android", "com.htc", "miui", "com.lge", "com.lge.internal", "yi", "com.miui.core", "flyme",
|
"android", "com.htc", "miui", "com.lge", "com.lge.internal", "yi", "com.miui.core", "flyme",
|
||||||
|
Loading…
Reference in New Issue
Block a user