From b4af7a06a51bb65ed43af1c0fcb8035705b2a24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Fri, 29 Apr 2016 23:14:24 +0200 Subject: Use proper ImportKeysProxyActivity to scan QR Codes --- .../keychain/ui/RedirectImportKeysActivity.java | 11 ++++++----- OpenKeychain/src/main/res/values/strings.xml | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/RedirectImportKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/RedirectImportKeysActivity.java index 2abb98a03..5cb680a57 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/RedirectImportKeysActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/RedirectImportKeysActivity.java @@ -1,4 +1,6 @@ /* + * Copyright (C) 2016 Dominik Schürmann + * * 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(); } } \ No newline at end of file diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index 387522fc1..2f4cb9552 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -1752,8 +1752,8 @@ 50 EUR 100 EUR - "Import key attempt" - "You scanned a fingerprint with another app, please scan with Openkeychain directly to be safe" + "Scan with OpenKeychain!" + "You scanned a OpenPGP QR Code with another app, please scan with Openkeychain directly to be safe." "Scan again" "Close" "Key import redirection" -- cgit v1.2.3