mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-02 15:04:24 +02:00
add support for preview builds (N, O)
This commit is contained in:
parent
b09dce4050
commit
e1f7ac355e
@ -19,6 +19,7 @@ package brut.androlib;
|
|||||||
import brut.androlib.meta.MetaInfo;
|
import brut.androlib.meta.MetaInfo;
|
||||||
import brut.androlib.meta.UsesFramework;
|
import brut.androlib.meta.UsesFramework;
|
||||||
import brut.androlib.res.AndrolibResources;
|
import brut.androlib.res.AndrolibResources;
|
||||||
|
import brut.androlib.res.data.ResConfigFlags;
|
||||||
import brut.androlib.res.data.ResPackage;
|
import brut.androlib.res.data.ResPackage;
|
||||||
import brut.androlib.res.data.ResTable;
|
import brut.androlib.res.data.ResTable;
|
||||||
import brut.androlib.res.data.ResUnknownFiles;
|
import brut.androlib.res.data.ResUnknownFiles;
|
||||||
@ -279,7 +280,22 @@ public class Androlib {
|
|||||||
mAndRes.setSharedLibrary(meta.sharedLibrary);
|
mAndRes.setSharedLibrary(meta.sharedLibrary);
|
||||||
|
|
||||||
if (meta.sdkInfo != null && meta.sdkInfo.get("minSdkVersion") != null) {
|
if (meta.sdkInfo != null && meta.sdkInfo.get("minSdkVersion") != null) {
|
||||||
mMinSdkVersion = Integer.parseInt(meta.sdkInfo.get("minSdkVersion"));
|
String minSdkVersion = meta.sdkInfo.get("minSdkVersion");
|
||||||
|
|
||||||
|
// Preview builds use short letter for API versions
|
||||||
|
switch (minSdkVersion) {
|
||||||
|
case "M":
|
||||||
|
mMinSdkVersion = ResConfigFlags.SDK_MNC;
|
||||||
|
break;
|
||||||
|
case "N":
|
||||||
|
mMinSdkVersion = ResConfigFlags.SDK_NOUGAT;
|
||||||
|
break;
|
||||||
|
case "O":
|
||||||
|
mMinSdkVersion = ResConfigFlags.SDK_O;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mMinSdkVersion = Integer.parseInt(meta.sdkInfo.get("minSdkVersion"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outFile == null) {
|
if (outFile == null) {
|
||||||
|
@ -507,6 +507,9 @@ public class ResConfigFlags {
|
|||||||
public final static byte SDK_LOLLIPOP = 21;
|
public final static byte SDK_LOLLIPOP = 21;
|
||||||
public final static byte SDK_LOLLIPOP_MR1 = 22;
|
public final static byte SDK_LOLLIPOP_MR1 = 22;
|
||||||
public final static byte SDK_MNC = 23;
|
public final static byte SDK_MNC = 23;
|
||||||
|
public final static byte SDK_NOUGAT = 24;
|
||||||
|
public final static byte SDK_NOUGAT_MR1 = 25;
|
||||||
|
public final static byte SDK_O = 26;
|
||||||
|
|
||||||
public final static byte ORIENTATION_ANY = 0;
|
public final static byte ORIENTATION_ANY = 0;
|
||||||
public final static byte ORIENTATION_PORT = 1;
|
public final static byte ORIENTATION_PORT = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user