Skip to content

Commit

Permalink
ReportIssueDialogFragment: Report all supported ABIs on Android 5.0 (…
Browse files Browse the repository at this point in the history
…Lollipop) and above.
  • Loading branch information
Andreas Schildbach committed Apr 21, 2018
1 parent 4dacf62 commit 31911b6
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions wallet/src/de/schildbach/wallet/ui/ReportIssueDialogFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import de.schildbach.wallet.util.Bluetooth;
import de.schildbach.wallet.util.CrashReporter;

import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.Dialog;
Expand Down Expand Up @@ -261,8 +262,10 @@ private static void appendDeviceInfo(final Appendable report, final Context cont
report.append("Android Version: " + Build.VERSION.RELEASE + "\n");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
report.append("Android security patch level: ").append(Build.VERSION.SECURITY_PATCH).append("\n");
report.append("ABIs: ").append(Joiner.on(", ").skipNulls().join(Strings.emptyToNull(Build.CPU_ABI),
Strings.emptyToNull(Build.CPU_ABI2))).append("\n");
report.append("ABIs: ")
.append(Joiner.on(", ").skipNulls().join(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
? supportedAbisLollipop() : supportedAbisKitKat()))
.append("\n");
report.append("Board: " + Build.BOARD + "\n");
report.append("Brand: " + Build.BRAND + "\n");
report.append("Device: " + Build.DEVICE + "\n");
Expand Down Expand Up @@ -295,4 +298,14 @@ private static String bluetoothMac() {
return x.getMessage();
}
}

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static String[] supportedAbisLollipop() {
return Build.SUPPORTED_ABIS;
}

@SuppressWarnings("deprecation")
private static String[] supportedAbisKitKat() {
return new String[] { Strings.emptyToNull(Build.CPU_ABI), Strings.emptyToNull(Build.CPU_ABI2) };
}
}

0 comments on commit 31911b6

Please sign in to comment.