diff options
author | Miroojin Bakshi <gaglu231094@gmail.com> | 2014-03-28 00:34:24 +0530 |
---|---|---|
committer | Miroojin Bakshi <gaglu231094@gmail.com> | 2014-03-28 00:34:24 +0530 |
commit | d5e3958565054dff06bd02d3c3391935e7c2a961 (patch) | |
tree | a80abd2b137932be3db73de6d1b2dd4bc0bad36c | |
parent | 68668fd444b973502b91b7cbe0cf7dbdd8a8b5c4 (diff) | |
download | open-keychain-d5e3958565054dff06bd02d3c3391935e7c2a961.tar.gz open-keychain-d5e3958565054dff06bd02d3c3391935e7c2a961.tar.bz2 open-keychain-d5e3958565054dff06bd02d3c3391935e7c2a961.zip |
Enable importing of fingerprints from clipboard.
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java index 3f0b4a46e..e53762580 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java @@ -17,6 +17,7 @@ package org.sufficientlysecure.keychain.ui; +import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; @@ -24,9 +25,13 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import com.beardedhen.androidbootstrap.BootstrapButton; + +import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.compatibility.ClipboardReflection; +import java.util.Locale; + public class ImportKeysClipboardFragment extends Fragment { private ImportKeysActivity mImportActivity; @@ -60,6 +65,10 @@ public class ImportKeysClipboardFragment extends Fragment { String sendText = ""; if (clipboardText != null) { sendText = clipboardText.toString(); + if(sendText.toLowerCase(Locale.ENGLISH).startsWith(Constants.FINGERPRINT_SCHEME)) { + mImportActivity.loadFromFingerprintUri(null, Uri.parse(sendText)); + return; + } } mImportActivity.loadCallback(sendText.getBytes(), null, null, null); } |