mirror of
https://github.com/revanced/smali.git
synced 2025-05-30 20:40:11 +02:00
Use a switch statement in mapDexVersionToApi
This commit is contained in:
parent
a237739444
commit
2f29256bdf
@ -35,19 +35,18 @@ public class VersionMap {
|
|||||||
public static final int NO_VERSION = -1;
|
public static final int NO_VERSION = -1;
|
||||||
|
|
||||||
public static int mapDexVersionToApi(int dexVersion) {
|
public static int mapDexVersionToApi(int dexVersion) {
|
||||||
if (dexVersion == 35) {
|
switch (dexVersion) {
|
||||||
return 23;
|
case 35:
|
||||||
|
return 23;
|
||||||
|
case 37:
|
||||||
|
return 25;
|
||||||
|
case 38:
|
||||||
|
return 27;
|
||||||
|
case 39:
|
||||||
|
return 28;
|
||||||
|
default:
|
||||||
|
return NO_VERSION;
|
||||||
}
|
}
|
||||||
if (dexVersion == 37) {
|
|
||||||
return 25;
|
|
||||||
}
|
|
||||||
if (dexVersion == 38) {
|
|
||||||
return 27;
|
|
||||||
}
|
|
||||||
if (dexVersion == 39) {
|
|
||||||
return 28;
|
|
||||||
}
|
|
||||||
return NO_VERSION;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int mapApiToDexVersion(int api) {
|
public static int mapApiToDexVersion(int api) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user