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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* 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.os.Bundle;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
|
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||||
|
|
||||||
@@ -34,15 +35,16 @@ public class RedirectImportKeysActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startQrCodeCaptureActivity() {
|
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)
|
new AlertDialog.Builder(this)
|
||||||
.setTitle(R.string.redirect_import_key_title)
|
.setTitle(R.string.redirect_import_key_title)
|
||||||
.setMessage(R.string.redirect_import_key_message)
|
.setMessage(R.string.redirect_import_key_message)
|
||||||
.setPositiveButton(R.string.redirect_import_key_yes, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.redirect_import_key_yes, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
// intent directly to ImportKeyChain activity
|
// directly scan with OpenKeychain
|
||||||
startActivity(intent);
|
startActivity(scanQrCode);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -52,7 +54,6 @@ public class RedirectImportKeysActivity extends BaseActivity {
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1752,8 +1752,8 @@
|
|||||||
<item>50 EUR</item>
|
<item>50 EUR</item>
|
||||||
<item>100 EUR</item>
|
<item>100 EUR</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string name="redirect_import_key_title">"Import key attempt"</string>
|
<string name="redirect_import_key_title">"Scan with OpenKeychain!"</string>
|
||||||
<string name="redirect_import_key_message">"You scanned a fingerprint with another app, please scan with Openkeychain directly to be safe"</string>
|
<string name="redirect_import_key_message">"You scanned a OpenPGP QR Code with another app, please scan with Openkeychain directly to be safe."</string>
|
||||||
<string name="redirect_import_key_yes">"Scan again"</string>
|
<string name="redirect_import_key_yes">"Scan again"</string>
|
||||||
<string name="redirect_import_key_no">"Close"</string>
|
<string name="redirect_import_key_no">"Close"</string>
|
||||||
<string name="title_activity_redirect_key">"Key import redirection"</string>
|
<string name="title_activity_redirect_key">"Key import redirection"</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user