aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-01-16 02:12:53 -0800
committerDominik Schürmann <dominik@dominikschuermann.de>2014-01-16 02:12:53 -0800
commitf4f6e84055a0b2f1959eb018478e00c4170fd25e (patch)
tree0146e2f6452ef379a5b1205c98cc00d8a5b97c3b
parent9c0432d24c6aae6fb9420229666a9d1d60d95972 (diff)
parent64f9ea95f4319c7b3dfa377e827c6fd76fca3c9d (diff)
downloadopen-keychain-f4f6e84055a0b2f1959eb018478e00c4170fd25e.tar.gz
open-keychain-f4f6e84055a0b2f1959eb018478e00c4170fd25e.tar.bz2
open-keychain-f4f6e84055a0b2f1959eb018478e00c4170fd25e.zip
Merge pull request #200 from ashh87/import-fix
Import fix
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/compatibility/ClipboardReflection.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java6
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java2
3 files changed, 7 insertions, 5 deletions
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/compatibility/ClipboardReflection.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/compatibility/ClipboardReflection.java
index 69415c4c2..704448e47 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/compatibility/ClipboardReflection.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/compatibility/ClipboardReflection.java
@@ -50,7 +50,7 @@ public class ClipboardReflection {
methodNewPlainText.invoke(clipboard, clip);
}
} catch (Exception e) {
- Log.e("ProjectsException", "There was and error copying the text to the clipboard: "
+ Log.e("ProjectsException", "There was an error copying the text to the clipboard: "
+ e.getMessage());
}
}
@@ -89,7 +89,7 @@ public class ClipboardReflection {
return null;
}
} catch (Exception e) {
- Log.e("ProjectsException", "There was and error getting the text from the clipboard: "
+ Log.e("ProjectsException", "There was an error getting the text from the clipboard: "
+ e.getMessage());
return null;
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java
index 31f758395..04671587a 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java
@@ -59,8 +59,10 @@ public class ImportKeysClipboardFragment extends Fragment {
@Override
public void onClick(View v) {
CharSequence clipboardText = ClipboardReflection.getClipboardText(getActivity());
-
- mImportActivity.loadCallback(clipboardText.toString().getBytes(), null);
+ String sendText = "";
+ if (clipboardText != null)
+ sendText = clipboardText.toString();
+ mImportActivity.loadCallback(sendText.getBytes(), null);
}
});
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java
index ea76d2898..a02bfd678 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java
@@ -93,7 +93,7 @@ public class ImportKeysFileFragment extends Fragment {
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
- switch (requestCode) {
+ switch (requestCode & 0xFFFF) {
case Id.request.filename: {
if (resultCode == Activity.RESULT_OK && data != null) {
String path = null;