aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain/src/main/java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-03-03 15:46:04 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2014-03-03 15:46:04 +0100
commitb837579cdcb88c5c71708d66b78c9e21cf33a4e8 (patch)
treefda8801aa7f1f6e19e6dbfb3a0965da3b39a61ee /OpenPGP-Keychain/src/main/java
parent94e161fe0d08149d26b0d5dcd41bb883d1162ff4 (diff)
parent3acbefa98b0a7e64608de743afebef5a863d98b1 (diff)
downloadopen-keychain-b837579cdcb88c5c71708d66b78c9e21cf33a4e8.tar.gz
open-keychain-b837579cdcb88c5c71708d66b78c9e21cf33a4e8.tar.bz2
open-keychain-b837579cdcb88c5c71708d66b78c9e21cf33a4e8.zip
Merge branch 'master' of github.com:openpgp-keychain/openpgp-keychain
Diffstat (limited to 'OpenPGP-Keychain/src/main/java')
-rw-r--r--OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java7
-rw-r--r--OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java2
-rw-r--r--OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java7
3 files changed, 11 insertions, 5 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
index c28d57627..0afa556cb 100644
--- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
+++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
@@ -33,6 +33,7 @@ import se.emilsjolander.stickylistheaders.ApiLevelTooLowException;
import se.emilsjolander.stickylistheaders.StickyListHeadersListView;
import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
@@ -276,7 +277,8 @@ public class KeyListPublicFragment extends Fragment implements AdapterView.OnIte
viewIntent.setData(KeychainContract.KeyRings.buildPublicKeyRingsUri(Long.toString(id)));
startActivity(viewIntent);
}
-
+
+ @TargetApi(11)
public void encrypt(ActionMode mode, long[] keyRingRowIds) {
// get master key ids from row ids
long[] keyRingIds = new long[keyRingRowIds.length];
@@ -298,6 +300,7 @@ public class KeyListPublicFragment extends Fragment implements AdapterView.OnIte
*
* @param keyRingRowIds
*/
+ @TargetApi(11)
public void showDeleteKeyDialog(final ActionMode mode, long[] keyRingRowIds) {
// Message is received after key is deleted
Handler returnHandler = new Handler() {
@@ -332,4 +335,4 @@ public class KeyListPublicFragment extends Fragment implements AdapterView.OnIte
deleteKeyDialog.show(getActivity().getSupportFragmentManager(), "deleteKeyDialog");
}
-} \ No newline at end of file
+}
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java
index f9d267f27..7bb77b60f 100644
--- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java
+++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java
@@ -29,6 +29,7 @@ import org.sufficientlysecure.keychain.ui.adapter.KeyListSecretAdapter;
import org.sufficientlysecure.keychain.ui.dialog.DeleteKeyDialogFragment;
import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
@@ -209,6 +210,7 @@ public class KeyListSecretFragment extends ListFragment implements
*
* @param keyRingRowIds
*/
+ @TargetApi(11)
public void showDeleteKeyDialog(final ActionMode mode, long[] keyRingRowIds) {
// Message is received after key is deleted
Handler returnHandler = new Handler() {
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java
index 61fe13ffb..b94c42e90 100644
--- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java
+++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java
@@ -32,6 +32,7 @@ import java.util.List;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.Locale;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
@@ -172,11 +173,11 @@ public class HkpKeyServer extends KeyServer {
if (e.getCode() == 404) {
return results;
} else {
- if (e.getData().toLowerCase().contains("no keys found")) {
+ if (e.getData().toLowerCase(Locale.US).contains("no keys found")) {
return results;
- } else if (e.getData().toLowerCase().contains("too many")) {
+ } else if (e.getData().toLowerCase(Locale.US).contains("too many")) {
throw new TooManyResponses();
- } else if (e.getData().toLowerCase().contains("insufficient")) {
+ } else if (e.getData().toLowerCase(Locale.US).contains("insufficient")) {
throw new InsufficientQuery();
}
}