mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-21 01:07:34 +01:00
fix: add missing hasResources check (#3182)
This commit is contained in:
parent
e3e2a7e1d6
commit
261003316e
@ -135,7 +135,7 @@ public class ApkDecoder {
|
|||||||
|
|
||||||
// In case we have no resources. We should store the minSdk we pulled from the source opcode api level
|
// In case we have no resources. We should store the minSdk we pulled from the source opcode api level
|
||||||
ApkInfo apkInfo = resourcesDecoder.getApkInfo();
|
ApkInfo apkInfo = resourcesDecoder.getApkInfo();
|
||||||
if (mMinSdkVersion > 0) {
|
if (! resourcesDecoder.hasResources() && mMinSdkVersion > 0) {
|
||||||
apkInfo.setSdkInfoField("minSdkVersion", Integer.toString(mMinSdkVersion));
|
apkInfo.setSdkInfoField("minSdkVersion", Integer.toString(mMinSdkVersion));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public class ResourcesDecoder {
|
|||||||
mResTable = new ResTable(mConfig, mApkInfo);
|
mResTable = new ResTable(mConfig, mApkInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasManifest() throws AndrolibException {
|
public boolean hasManifest() throws AndrolibException {
|
||||||
try {
|
try {
|
||||||
return mApkFile.getDirectory().containsFile("AndroidManifest.xml");
|
return mApkFile.getDirectory().containsFile("AndroidManifest.xml");
|
||||||
} catch (DirectoryException ex) {
|
} catch (DirectoryException ex) {
|
||||||
@ -73,7 +73,7 @@ public class ResourcesDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasResources() throws AndrolibException {
|
public boolean hasResources() throws AndrolibException {
|
||||||
try {
|
try {
|
||||||
return mApkFile.getDirectory().containsFile("resources.arsc");
|
return mApkFile.getDirectory().containsFile("resources.arsc");
|
||||||
} catch (DirectoryException ex) {
|
} catch (DirectoryException ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user