Don't try to access Build.CPU_ABI2 on API version 7.

This commit is contained in:
akwizgran
2015-04-07 19:11:59 +01:00
parent f2d3e4cb81
commit 6e7578a0e0
2 changed files with 7 additions and 3 deletions

View File

@@ -46,9 +46,11 @@ public class TorPluginFactory implements DuplexPluginFactory {
List<String> abis = new ArrayList<String>();
if(Build.VERSION.SDK_INT >= 21) {
for(String abi : Build.SUPPORTED_ABIS) abis.add(abi);
} else {
} else if(Build.VERSION.SDK_INT >= 8) {
abis.add(Build.CPU_ABI);
if(Build.CPU_ABI2 != null) abis.add(Build.CPU_ABI2);
} else {
abis.add(Build.CPU_ABI);
}
boolean supported = false;
for(String abi : abis) if(abi.startsWith("armeabi")) supported = true;