mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-05 02:22:55 +01:00
cs cleanup
This commit is contained in:
parent
4ba1a035ae
commit
21e9dd514c
@ -307,17 +307,11 @@ final public class AndrolibResources {
|
|||||||
mSharedLibrary = flag;
|
mSharedLibrary = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that targetSdkVersion is between minSdkVersion/maxSdkVersion if
|
private String checkTargetSdkVersionBounds() {
|
||||||
// they are specified.
|
|
||||||
private String checkTargetSdkVersionBounds()
|
|
||||||
{
|
|
||||||
int target = Integer.parseInt(mTargetSdkVersion);
|
int target = Integer.parseInt(mTargetSdkVersion);
|
||||||
int min = (mMinSdkVersion != null) ? Integer.parseInt(mMinSdkVersion) : 0;
|
int min = (mMinSdkVersion != null) ? Integer.parseInt(mMinSdkVersion) : 0;
|
||||||
int max = (mMaxSdkVersion != null) ? Integer.parseInt(mMaxSdkVersion) : target;
|
int max = (mMaxSdkVersion != null) ? Integer.parseInt(mMaxSdkVersion) : target;
|
||||||
|
|
||||||
// Your APK seems broken otherwise.
|
|
||||||
assert (min <= max);
|
|
||||||
|
|
||||||
target = Math.min(max, target);
|
target = Math.min(max, target);
|
||||||
target = Math.max(min, target);
|
target = Math.max(min, target);
|
||||||
return Integer.toString(target);
|
return Integer.toString(target);
|
||||||
@ -384,6 +378,9 @@ final public class AndrolibResources {
|
|||||||
}
|
}
|
||||||
if (mTargetSdkVersion != null) {
|
if (mTargetSdkVersion != null) {
|
||||||
cmd.add("--target-sdk-version");
|
cmd.add("--target-sdk-version");
|
||||||
|
|
||||||
|
// Ensure that targetSdkVersion is between minSdkVersion/maxSdkVersion if
|
||||||
|
// they are specified.
|
||||||
cmd.add(checkTargetSdkVersionBounds());
|
cmd.add(checkTargetSdkVersionBounds());
|
||||||
}
|
}
|
||||||
if (mMaxSdkVersion != null) {
|
if (mMaxSdkVersion != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user