Use proper ImportKeysProxyActivity to scan QR Codes
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Dominik Schürmann <dominik@dominikschuermann.de>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -20,7 +22,6 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
|
||||
@@ -34,15 +35,16 @@ public class RedirectImportKeysActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void startQrCodeCaptureActivity() {
|
||||
final Intent intent = new Intent(this, QrCodeCaptureActivity.class);
|
||||
final Intent scanQrCode = new Intent(this, ImportKeysProxyActivity.class);
|
||||
scanQrCode.setAction(ImportKeysProxyActivity.ACTION_QR_CODE_API);
|
||||
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(R.string.redirect_import_key_title)
|
||||
.setMessage(R.string.redirect_import_key_message)
|
||||
.setPositiveButton(R.string.redirect_import_key_yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
// intent directly to ImportKeyChain activity
|
||||
startActivity(intent);
|
||||
// directly scan with OpenKeychain
|
||||
startActivity(scanQrCode);
|
||||
finish();
|
||||
}
|
||||
})
|
||||
@@ -52,7 +54,6 @@ public class RedirectImportKeysActivity extends BaseActivity {
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user