mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-07 18:45:58 +01:00
fixes regression introduced in 40fdfc50a1
- tagged framework support fixed
This commit is contained in:
parent
ce2088df80
commit
daafeb284e
@ -225,10 +225,7 @@ public class ApkDecoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setFrameworkTag(String tag) throws AndrolibException {
|
public void setFrameworkTag(String tag) throws AndrolibException {
|
||||||
mFrameTag = tag;
|
mAndrolib.apkOptions.frameworkTag = tag;
|
||||||
if (mResTable != null) {
|
|
||||||
getResTable().setFrameTag(tag);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKeepBrokenResources(boolean keepBrokenResources) {
|
public void setKeepBrokenResources(boolean keepBrokenResources) {
|
||||||
@ -237,7 +234,6 @@ public class ApkDecoder {
|
|||||||
|
|
||||||
public void setFrameworkDir(String dir) {
|
public void setFrameworkDir(String dir) {
|
||||||
mAndrolib.apkOptions.frameworkFolderLocation = dir;
|
mAndrolib.apkOptions.frameworkFolderLocation = dir;
|
||||||
mFrameworkDir = dir;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResTable getResTable() throws AndrolibException {
|
public ResTable getResTable() throws AndrolibException {
|
||||||
@ -250,7 +246,6 @@ public class ApkDecoder {
|
|||||||
}
|
}
|
||||||
AndrolibResources.sKeepBroken = mKeepBrokenResources;
|
AndrolibResources.sKeepBroken = mKeepBrokenResources;
|
||||||
mResTable = mAndrolib.getResTable(mApkFile, hasResources);
|
mResTable = mAndrolib.getResTable(mApkFile, hasResources);
|
||||||
mResTable.setFrameTag(mFrameTag);
|
|
||||||
}
|
}
|
||||||
return mResTable;
|
return mResTable;
|
||||||
}
|
}
|
||||||
@ -344,8 +339,8 @@ public class ApkDecoder {
|
|||||||
Map<String, Object> uses = new LinkedHashMap<String, Object>();
|
Map<String, Object> uses = new LinkedHashMap<String, Object>();
|
||||||
uses.put("ids", ids);
|
uses.put("ids", ids);
|
||||||
|
|
||||||
if (mFrameTag != null) {
|
if (mAndrolib.apkOptions.frameworkTag != null) {
|
||||||
uses.put("tag", mFrameTag);
|
uses.put("tag", mAndrolib.apkOptions.frameworkTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta.put("usesFramework", uses);
|
meta.put("usesFramework", uses);
|
||||||
@ -405,8 +400,6 @@ public class ApkDecoder {
|
|||||||
private short mDecodeSources = DECODE_SOURCES_SMALI;
|
private short mDecodeSources = DECODE_SOURCES_SMALI;
|
||||||
private short mDecodeResources = DECODE_RESOURCES_FULL;
|
private short mDecodeResources = DECODE_RESOURCES_FULL;
|
||||||
private String mDebugLinePrefix = "a=0;// ";
|
private String mDebugLinePrefix = "a=0;// ";
|
||||||
private String mFrameTag;
|
|
||||||
private String mFrameworkDir = null;
|
|
||||||
private boolean mDebug = false;
|
private boolean mDebug = false;
|
||||||
private boolean mForceDelete = false;
|
private boolean mForceDelete = false;
|
||||||
private boolean mKeepBrokenResources = false;
|
private boolean mKeepBrokenResources = false;
|
||||||
|
@ -33,7 +33,6 @@ public class ResTable {
|
|||||||
private final Set<ResPackage> mMainPackages = new LinkedHashSet<ResPackage>();
|
private final Set<ResPackage> mMainPackages = new LinkedHashSet<ResPackage>();
|
||||||
private final Set<ResPackage> mFramePackages = new LinkedHashSet<ResPackage>();
|
private final Set<ResPackage> mFramePackages = new LinkedHashSet<ResPackage>();
|
||||||
|
|
||||||
private String mFrameTag;
|
|
||||||
private String mPackageRenamed;
|
private String mPackageRenamed;
|
||||||
private String mPackageOriginal;
|
private String mPackageOriginal;
|
||||||
private int mPackageId;
|
private int mPackageId;
|
||||||
@ -72,7 +71,7 @@ public class ResTable {
|
|||||||
return pkg;
|
return pkg;
|
||||||
}
|
}
|
||||||
if (mAndRes != null) {
|
if (mAndRes != null) {
|
||||||
return mAndRes.loadFrameworkPkg(this, id, mFrameTag);
|
return mAndRes.loadFrameworkPkg(this, id, mAndRes.apkOptions.frameworkTag);
|
||||||
}
|
}
|
||||||
throw new UndefinedResObject(String.format("package: id=%d", id));
|
throw new UndefinedResObject(String.format("package: id=%d", id));
|
||||||
}
|
}
|
||||||
@ -143,10 +142,6 @@ public class ResTable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFrameTag(String tag) {
|
|
||||||
mFrameTag = tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAnalysisMode(boolean mode) {
|
public void setAnalysisMode(boolean mode) {
|
||||||
mAnalysisMode = mode;
|
mAnalysisMode = mode;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user