mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-11 21:37:47 +01:00
clean: setTargetSdkVersion used before manifest was decoded
This commit is contained in:
parent
992de66bac
commit
1fd3f52b9d
@ -102,8 +102,6 @@ public class ApkDecoder {
|
||||
case DECODE_RESOURCES_NONE:
|
||||
mAndrolib.decodeResourcesRaw(mApkFile, outDir);
|
||||
if (mForceDecodeManifest == FORCE_DECODE_MANIFEST_FULL) {
|
||||
setTargetSdkVersion();
|
||||
|
||||
// done after raw decoding of resources because copyToDir overwrites dest files
|
||||
if (hasManifest()) {
|
||||
mAndrolib.decodeManifestWithResources(mApkFile, outDir, getResTable());
|
||||
@ -111,8 +109,6 @@ public class ApkDecoder {
|
||||
}
|
||||
break;
|
||||
case DECODE_RESOURCES_FULL:
|
||||
setTargetSdkVersion();
|
||||
|
||||
if (hasManifest()) {
|
||||
mAndrolib.decodeManifestWithResources(mApkFile, outDir, getResTable());
|
||||
}
|
||||
@ -222,17 +218,6 @@ public class ApkDecoder {
|
||||
}
|
||||
}
|
||||
|
||||
public void setTargetSdkVersion() throws AndrolibException {
|
||||
if (mResTable == null) {
|
||||
mResTable = mAndrolib.getResTable(mApkFile);
|
||||
}
|
||||
|
||||
Map<String, String> sdkInfo = mResTable.getSdkInfo();
|
||||
if (sdkInfo.get("targetSdkVersion") != null) {
|
||||
mApiLevel = Integer.parseInt(sdkInfo.get("targetSdkVersion"));
|
||||
}
|
||||
}
|
||||
|
||||
public void setBaksmaliDebugMode(boolean bakDeb) {
|
||||
mBakDeb = bakDeb;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user