mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +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:
|
case DECODE_RESOURCES_NONE:
|
||||||
mAndrolib.decodeResourcesRaw(mApkFile, outDir);
|
mAndrolib.decodeResourcesRaw(mApkFile, outDir);
|
||||||
if (mForceDecodeManifest == FORCE_DECODE_MANIFEST_FULL) {
|
if (mForceDecodeManifest == FORCE_DECODE_MANIFEST_FULL) {
|
||||||
setTargetSdkVersion();
|
|
||||||
|
|
||||||
// done after raw decoding of resources because copyToDir overwrites dest files
|
// done after raw decoding of resources because copyToDir overwrites dest files
|
||||||
if (hasManifest()) {
|
if (hasManifest()) {
|
||||||
mAndrolib.decodeManifestWithResources(mApkFile, outDir, getResTable());
|
mAndrolib.decodeManifestWithResources(mApkFile, outDir, getResTable());
|
||||||
@ -111,8 +109,6 @@ public class ApkDecoder {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DECODE_RESOURCES_FULL:
|
case DECODE_RESOURCES_FULL:
|
||||||
setTargetSdkVersion();
|
|
||||||
|
|
||||||
if (hasManifest()) {
|
if (hasManifest()) {
|
||||||
mAndrolib.decodeManifestWithResources(mApkFile, outDir, getResTable());
|
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) {
|
public void setBaksmaliDebugMode(boolean bakDeb) {
|
||||||
mBakDeb = bakDeb;
|
mBakDeb = bakDeb;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user