Simplify compat.SupportedArchitectures
This commit is contained in:
parent
a3c78e4d02
commit
14ae58690c
@ -5,33 +5,18 @@ import android.os.Build;
|
|||||||
|
|
||||||
public class SupportedArchitectures extends Compatibility {
|
public class SupportedArchitectures extends Compatibility {
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
private static final String[] getAbisDonut() {
|
|
||||||
return new String[]{Build.CPU_ABI};
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@TargetApi(8)
|
|
||||||
private static final String[] getAbisFroyo() {
|
|
||||||
return new String[]{Build.CPU_ABI, Build.CPU_ABI2};
|
|
||||||
}
|
|
||||||
|
|
||||||
@TargetApi(21)
|
|
||||||
private static final String[] getAbisLollipop() {
|
|
||||||
return Build.SUPPORTED_ABIS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The most preferred ABI is the first element in the list.
|
* The most preferred ABI is the first element in the list.
|
||||||
*/
|
*/
|
||||||
public static final String[] getAbis() {
|
@SuppressWarnings("deprecation")
|
||||||
|
public static String[] getAbis() {
|
||||||
if (hasApi(21)) {
|
if (hasApi(21)) {
|
||||||
return getAbisLollipop();
|
return new String[]{Build.CPU_ABI};
|
||||||
}
|
}
|
||||||
if (hasApi(8)) {
|
if (hasApi(8)) {
|
||||||
return getAbisFroyo();
|
return new String[]{Build.CPU_ABI, Build.CPU_ABI2};
|
||||||
}
|
}
|
||||||
return getAbisDonut();
|
return Build.SUPPORTED_ABIS;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user