Skip to content
Snippets Groups Projects
Commit 6e7578a0 authored by akwizgran's avatar akwizgran
Browse files

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

parent f2d3e4cb
No related branches found
No related tags found
No related merge requests found
......@@ -201,16 +201,18 @@ public class CrashReportActivity extends Activity implements OnClickListener {
int sdk = Build.VERSION.SDK_INT;
statusMap.put("Android version:", release + " (" + sdk + ")");
// CPU architecture
// CPU architectures
String arch = null;
if(Build.VERSION.SDK_INT >= 21) {
for(String abi : Build.SUPPORTED_ABIS) {
if(arch == null) arch = abi;
else arch = arch + ", " + abi;
}
} else {
} else if(Build.VERSION.SDK_INT >= 8) {
if(Build.CPU_ABI2 == null) arch = Build.CPU_ABI;
else arch = Build.CPU_ABI + ", " + Build.CPU_ABI2;
} else {
arch = Build.CPU_ABI;
}
statusMap.put("Architecture:", arch);
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment