if known, show ssid in the AlertDialog directly after scanning (#2528)

This commit is contained in:
bjoern 2023-04-01 11:51:06 +02:00 committed by GitHub
parent 4a181d630b
commit 7fa576e3b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -213,7 +213,7 @@ public class BackupTransferActivity extends BaseActionBarActivity {
}
public static void appendSSID(Activity activity, final TextView textView) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
if (textView != null && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
new Thread(() -> {
try {
// depending on the android version, getting the SSID requires none, all or one of

View file

@ -84,7 +84,11 @@ public class QrCodeHandler {
});
builder.setNegativeButton(R.string.cancel, null);
builder.setCancelable(false);
break;
AlertDialog alertDialog = builder.create();
alertDialog.show();
BackupTransferActivity.appendSSID(activity, alertDialog.findViewById(android.R.id.message));
return;
case DcContext.DC_QR_LOGIN:
String email = qrParsed.getText1();