diff --git a/OpenKeychain/build.gradle b/OpenKeychain/build.gradle index 88706f1f9..26c49ce18 100644 --- a/OpenKeychain/build.gradle +++ b/OpenKeychain/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'android' +apply plugin: 'com.android.application' dependencies { // NOTE: Always use fixed version codes not dynamic ones, e.g. 0.7.3 instead of 0.7.+, see README for more information diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/helper/EmailKeyHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/helper/EmailKeyHelper.java index 5d281d5b0..7cd4f6710 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/helper/EmailKeyHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/helper/EmailKeyHelper.java @@ -29,6 +29,7 @@ import org.sufficientlysecure.keychain.service.KeychainIntentService; import java.util.ArrayList; import java.util.HashSet; import java.util.List; +import java.util.Locale; import java.util.Set; public class EmailKeyHelper { @@ -86,7 +87,7 @@ public class EmailKeyHelper { for (ImportKeysListEntry key : keyServer.search(mail)) { if (key.isRevoked() || key.isExpired()) continue; for (String userId : key.getUserIds()) { - if (userId.toLowerCase().contains(mail.toLowerCase())) { + if (userId.toLowerCase().contains(mail.toLowerCase(Locale.ENGLISH))) { keys.add(key); } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyserver.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyserver.java index 41f1e6997..eb741fc45 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyserver.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyserver.java @@ -251,14 +251,14 @@ public class HkpKeyserver extends Keyserver { data = query(request); } catch (HttpError e) { if (e.getData() != null) { - Log.d(Constants.TAG, "returned error data: " + e.getData().toLowerCase(Locale.US)); + Log.d(Constants.TAG, "returned error data: " + e.getData().toLowerCase(Locale.ENGLISH)); - if (e.getData().toLowerCase(Locale.US).contains("no keys found")) { + if (e.getData().toLowerCase(Locale.ENGLISH).contains("no keys found")) { // NOTE: This is also a 404 error for some keyservers! return results; - } else if (e.getData().toLowerCase(Locale.US).contains("too many")) { + } else if (e.getData().toLowerCase(Locale.ENGLISH).contains("too many")) { throw new TooManyResponsesException(); - } else if (e.getData().toLowerCase(Locale.US).contains("insufficient")) { + } else if (e.getData().toLowerCase(Locale.ENGLISH).contains("insufficient")) { throw new QueryTooShortException(); } else if (e.getCode() == 404) { // NOTE: handle this 404 at last, maybe it was a "no keys found" error @@ -285,7 +285,7 @@ public class HkpKeyserver extends Keyserver { // group 1 contains the full fingerprint (v4) or the long key id if available // see http://bit.ly/1d4bxbk and http://bit.ly/1gD1wwr - String fingerprintOrKeyId = matcher.group(1).toLowerCase(Locale.US); + String fingerprintOrKeyId = matcher.group(1).toLowerCase(Locale.ENGLISH); if (fingerprintOrKeyId.length() > 16) { entry.setFingerprintHex(fingerprintOrKeyId); entry.setKeyIdHex("0x" + fingerprintOrKeyId.substring(fingerprintOrKeyId.length() diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java index 1ba028006..7e18aa906 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java @@ -104,7 +104,7 @@ public class PgpKeyHelper { * @return */ public static String convertFingerprintToHex(byte[] fingerprint) { - String hexString = Hex.toHexString(fingerprint).toLowerCase(Locale.US); + String hexString = Hex.toHexString(fingerprint).toLowerCase(Locale.ENGLISH); return hexString; } @@ -133,7 +133,7 @@ public class PgpKeyHelper { } private static String convertKeyIdToHex32bit(long keyId) { - String hexString = Long.toHexString(keyId & 0xffffffffL).toLowerCase(Locale.US); + String hexString = Long.toHexString(keyId & 0xffffffffL).toLowerCase(Locale.ENGLISH); while (hexString.length() < 8) { hexString = "0" + hexString; } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java index c4ecfdec5..7789ee064 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java @@ -388,8 +388,8 @@ public class PassphraseCacheService extends Service { } else { // Fallback, since expandable notifications weren't available back then builder.setSmallIcon(R.drawable.ic_launcher) - .setContentTitle(String.format(getString(R.string.passp_cache_notif_n_keys, - mPassphraseCache.size()))) + .setContentTitle(String.format(getString(R.string.passp_cache_notif_n_keys), + mPassphraseCache.size())) .setContentText(getString(R.string.passp_cache_notif_click_to_clear)); Intent intent = new Intent(getApplicationContext(), PassphraseCacheService.class); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java index ac228c9f6..568772709 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -103,7 +103,7 @@ public class ViewKeyActivity extends ActionBarActivity implements @Override protected void onCreate(Bundle savedInstanceState) { - requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); + supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); mExportHelper = new ExportHelper(this); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/EncryptKeyCompletionView.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/EncryptKeyCompletionView.java index f1c17bfb5..b95dee12c 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/EncryptKeyCompletionView.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/EncryptKeyCompletionView.java @@ -32,6 +32,7 @@ import org.sufficientlysecure.keychain.util.Log; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Locale; public class EncryptKeyCompletionView extends TokenCompleteTextView { public EncryptKeyCompletionView(Context context) { @@ -242,8 +243,8 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView { @Override protected boolean keepObject(EncryptionKey obj, String mask) { - String m = mask.toLowerCase(); - return obj.getUserId().toLowerCase().contains(m) || + String m = mask.toLowerCase(Locale.ENGLISH); + return obj.getUserId().toLowerCase(Locale.ENGLISH).contains(m) || obj.getKeyIdHex().contains(m) || obj.getKeyIdHexShort().startsWith(m); } diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_cloud.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_cloud.png deleted file mode 100644 index 3daa64131..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_cloud.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_good.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_good.png deleted file mode 100644 index 38051d8d6..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_good.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_important_small.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_important_small.png deleted file mode 100644 index a1804b2c1..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_important_small.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_menu_search.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_menu_search.png deleted file mode 100644 index 1cb61faf4..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/ic_menu_search.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_menu_search_list.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_menu_search_list.png deleted file mode 100644 index efee6dfd2..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/ic_menu_search_list.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_next.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_next.png deleted file mode 100644 index d71058055..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/ic_next.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_previous.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_previous.png deleted file mode 100644 index d610e4667..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/ic_previous.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/key_small.png b/OpenKeychain/src/main/res/drawable-hdpi/key_small.png deleted file mode 100644 index 6966048a1..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/key_small.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-ldpi/ic_next.png b/OpenKeychain/src/main/res/drawable-ldpi/ic_next.png deleted file mode 100644 index 474ed8faa..000000000 Binary files a/OpenKeychain/src/main/res/drawable-ldpi/ic_next.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-ldpi/ic_previous.png b/OpenKeychain/src/main/res/drawable-ldpi/ic_previous.png deleted file mode 100644 index 6fd885e6b..000000000 Binary files a/OpenKeychain/src/main/res/drawable-ldpi/ic_previous.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-ldpi/key_small.png b/OpenKeychain/src/main/res/drawable-ldpi/key_small.png deleted file mode 100644 index 073b95029..000000000 Binary files a/OpenKeychain/src/main/res/drawable-ldpi/key_small.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_cloud.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_cloud.png deleted file mode 100644 index 266d4c21f..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_cloud.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_good.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_good.png deleted file mode 100644 index 13967b30a..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_good.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_important_small.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_important_small.png deleted file mode 100644 index 11a25b504..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_important_small.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_menu_search.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_menu_search.png deleted file mode 100644 index 2369d03f3..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/ic_menu_search.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_menu_search_list.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_menu_search_list.png deleted file mode 100644 index 9033f1ec2..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/ic_menu_search_list.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_next.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_next.png deleted file mode 100644 index 8271c1380..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/ic_next.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_previous.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_previous.png deleted file mode 100644 index ef90db972..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/ic_previous.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/key_small.png b/OpenKeychain/src/main/res/drawable-mdpi/key_small.png deleted file mode 100644 index c806b6041..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/key_small.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_cloud.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_cloud.png deleted file mode 100644 index 0769899fd..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_cloud.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_good.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_good.png deleted file mode 100644 index 0bb45d2c0..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_good.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_important_small.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_important_small.png deleted file mode 100644 index 40ca1572c..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_important_small.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_menu_search.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_menu_search.png deleted file mode 100644 index 578cb24eb..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/ic_menu_search.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_menu_search_list.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_menu_search_list.png deleted file mode 100644 index de20fa0e7..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/ic_menu_search_list.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_cloud.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_cloud.png deleted file mode 100644 index f97084dbe..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_cloud.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_good.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_good.png deleted file mode 100644 index fda51ad86..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_good.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_important_small.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_important_small.png deleted file mode 100644 index 44754152f..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_important_small.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/layout/api_account_settings_fragment.xml b/OpenKeychain/src/main/res/layout/api_account_settings_fragment.xml index 7bb861547..aaeae78e0 100644 --- a/OpenKeychain/src/main/res/layout/api_account_settings_fragment.xml +++ b/OpenKeychain/src/main/res/layout/api_account_settings_fragment.xml @@ -53,7 +53,7 @@ android:text="@string/api_settings_create_key" android:background="@drawable/button_edgy" android:drawableLeft="@drawable/ic_action_accounts" - android:textSize="14dip"/> + android:textSize="14sp"/> + android:textSize="14sp"/> + android:gravity="center_vertical" /> Apps Keyserver Preference Change Passphrase - Set Passphrase - Share with… Share fingerprint with… Share key with… Share file with… @@ -37,23 +35,17 @@ General Defaults Advanced - Master Key - Primary Identity Actions Whole key Your Key used for certification Upload Key Keyserver - Encrypt and/or Sign - Decrypt and Verify Fingerprint Key to be certified - Certify Decrypt, verify, and save file Decrypt and verify message - From Clipboard Encrypt and save file Encrypt and share file Save @@ -61,16 +53,10 @@ Delete None Okay - Change New Passphrase - Set New Passphrase Upload To Keyserver Next Back - Clipboard - Share with… Lookup key - Show advanced settings - Hide advanced settings Encrypt and share message View certification key Create key @@ -84,16 +70,6 @@ Create my key Import existing key Search - Keyserver… - Share… - Share fingerprint… - Share whole key… - with… - with… - with QR Code - with QR Code - with NFC - Copy to clipboard Beam settings Cancel Encrypt to… @@ -103,7 +79,6 @@ Show advanced info - Sign Message File File(s) @@ -116,12 +91,10 @@ Files: ASCII Armor Let others know that you\'re using OpenKeychain Writes \'OpenKeychain v2.7\' to OpenPGP signatures, ciphertext, and exported keys - Recipients From: To Files: Delete After Encryption Delete After Decryption - Share After Encryption Encryption Algorithm Hash Algorithm With Public Key @@ -142,14 +115,8 @@ Email Upload key to selected keyserver after certification Fingerprint - Select Set expiry date - - %d selected - %d selected - - <no name> <none> <no key> @@ -202,9 +169,7 @@ Wrong passphrase. - Set a passphrase first. No compatible file manager installed. - The file manager does not support saving files. The passphrases didn\'t match. Please enter a passphrase. Symmetric encryption. @@ -222,8 +187,6 @@ Please specify which file to export to.\nWARNING: File will be overwritten if it exists. Do you really want to delete all selected public keys?\nYou can\'t undo this! Do you really want to delete the SECRET key \'%s\'?\nYou can\'t undo this! - You have made changes to the keyring, would you like to save it? - You have added an empty identity, are you sure you want to continue? Do you really want to delete the public key \'%s\'?\nYou can\'t undo this! Also export secret keys @@ -244,7 +207,6 @@ Successfully sent key with NFC Beam! Key has been copied to the clipboard! Fingerprint has been copied to the clipboard! - Key has already been certified! Please select a key to be used for certification! Key is too big to be shared this way! @@ -258,23 +220,17 @@ no suitable secret key found external storage not ready key size must be at least 512bit - the master key cannot be an ElGamal key unknown algorithm choice no email found need at least one identity - primary identity must not be empty - need at least a master key no passphrase given no signature key given not valid encryption data integrity check failed! Data has been modified! wrong passphrase - error saving some keys could not extract private key - expiry date must come after creation date - Direct binary data without actual file in filesystem is not supported. You need Android 4.1 to use Android\'s NFC Beam feature! NFC is not available on your device! No keys found! @@ -289,7 +245,6 @@ part of the loaded file is a valid OpenPGP object but not a OpenPGP key parts of the loaded file are valid OpenPGP objects but not OpenPGP keys - You must make changes to the keyring before you can save it Invalid signature! @@ -309,10 +264,7 @@ exporting… uploading… building key… - certifying master key… building master ring… - adding sub keys… - saving key… generating new RSA key… generating new DSA key… generating new ElGamal key… @@ -333,11 +285,6 @@ exporting keys… - - generating key, this can take up to 3 minutes… - generating keys, this can take up to 3 minutes… - - extracting signature key… extracting key… preparing streams… @@ -357,7 +304,6 @@ Name/Email/Key ID… - Share Key with… Name/Keybase.io username… @@ -393,23 +339,9 @@ QR Code/NFC Keybase.io Import selected keys - Import from clipboard - - - Missing QR Code with ID %s - Missing QR Codes with IDs %s - - - Please start with QR Code with ID 1 QR Code malformed! Please try again! - QR Code scanning finished! Fingerprint is too short (< 16 characters) - Scan QR Code with \'Barcode Scanner\' - To receive keys via NFC, the device needs to be unlocked. - Help Scan QR Code… - Get key from clipboard - Get key from Keybase.io @@ -469,9 +401,6 @@ Share with QR Code - Go through all QR Codes using \'Next\', and scan them one by one. - Fingerprint: - QR Code with ID %1$d of %2$d Share with NFC @@ -531,11 +460,9 @@ Keys Sign and Encrypt Decrypt and Verify - Import Keys Apps Open navigation drawer Close navigation drawer - Edit My Keys @@ -736,13 +663,11 @@ Type Key not found! Error processing key! - subkey unavailable stripped Your own keys can only be deleted individually! View Certificate Details unknown cannot sign - Encoding error No encryption subkey available! Do not create OpenKeychain-Accounts manually.\nFor more information, see Help. Show key (%s)