diff --git a/OpenKeychain/build.gradle b/OpenKeychain/build.gradle index 306cb8195..73b46dafb 100644 --- a/OpenKeychain/build.gradle +++ b/OpenKeychain/build.gradle @@ -83,6 +83,7 @@ android { // Do not abort build if lint finds errors lintOptions { abortOnError false + checkAllWarnings true htmlReport true htmlOutput file("lint-report.html") } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java index 6499814fb..aafc2eb34 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java @@ -227,7 +227,7 @@ public class KeychainDatabase extends SQLiteOpenHelper { @Override public void onCreate(SQLiteDatabase db) { // should never happen - assert false; + throw new AssertionError(); } @Override public void onDowngrade(SQLiteDatabase db, int old, int nu) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java index c875818e3..088f593d4 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java @@ -78,7 +78,7 @@ public class DrawerActivity extends ActionBarActivity { } NavItem mItemIconTexts[] = new NavItem[]{ - new NavItem("fa-user", getString(R.string.nav_contacts)), + new NavItem("fa-user", getString(R.string.nav_keys)), new NavItem("fa-lock", getString(R.string.nav_encrypt)), new NavItem("fa-unlock", getString(R.string.nav_decrypt)), new NavItem("fa-android", getString(R.string.nav_apps))}; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java index 2566d1647..8aee6e4b0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFileFragment.java @@ -335,7 +335,7 @@ public class EncryptFileFragment extends Fragment { sendFileIntent.setType("*/*"); sendFileIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(mOutputFilename)); startActivity(Intent.createChooser(sendFileIntent, - getString(R.string.title_send_file))); + getString(R.string.title_share_file))); } } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptMessageFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptMessageFragment.java index b68df81df..4a3a4a43c 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptMessageFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptMessageFragment.java @@ -240,7 +240,7 @@ public class EncryptMessageFragment extends Fragment { sendIntent.putExtra(Intent.EXTRA_TEXT, output); startActivity(Intent.createChooser(sendIntent, - getString(R.string.title_send_email))); + getString(R.string.title_share_with))); } } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java index ebc21a926..82f65a962 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java @@ -612,7 +612,7 @@ public class KeyListFragment extends Fragment if (mCursor.getInt(KeyListFragment.INDEX_HAS_ANY_SECRET) != 0) { { // set contact count int num = mCursor.getCount(); - String contactsTotal = getResources().getQuantityString(R.plurals.n_contacts, num, num); + String contactsTotal = getResources().getQuantityString(R.plurals.n_keys, num, num); holder.mCount.setText(contactsTotal); holder.mCount.setVisibility(View.VISIBLE); } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PreferencesActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PreferencesActivity.java index 6a9403cc2..448d29156 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PreferencesActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PreferencesActivity.java @@ -67,7 +67,7 @@ public class PreferencesActivity extends PreferenceActivity { mKeyServerPreference = (PreferenceScreen) findPreference(Constants.Pref.KEY_SERVERS); String servers[] = sPreferences.getKeyServers(); - mKeyServerPreference.setSummary(getResources().getQuantityString(R.plurals.n_key_servers, + mKeyServerPreference.setSummary(getResources().getQuantityString(R.plurals.n_keyservers, servers.length, servers.length)); mKeyServerPreference .setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @@ -138,7 +138,7 @@ public class PreferencesActivity extends PreferenceActivity { .getStringArrayExtra(PreferencesKeyServerActivity.EXTRA_KEY_SERVERS); sPreferences.setKeyServers(servers); mKeyServerPreference.setSummary(getResources().getQuantityString( - R.plurals.n_key_servers, servers.length, servers.length)); + R.plurals.n_keyservers, servers.length, servers.length)); break; } @@ -175,7 +175,7 @@ public class PreferencesActivity extends PreferenceActivity { mKeyServerPreference = (PreferenceScreen) findPreference(Constants.Pref.KEY_SERVERS); String servers[] = sPreferences.getKeyServers(); - mKeyServerPreference.setSummary(getResources().getQuantityString(R.plurals.n_key_servers, + mKeyServerPreference.setSummary(getResources().getQuantityString(R.plurals.n_keyservers, servers.length, servers.length)); mKeyServerPreference .setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @@ -201,7 +201,7 @@ public class PreferencesActivity extends PreferenceActivity { .getStringArrayExtra(PreferencesKeyServerActivity.EXTRA_KEY_SERVERS); sPreferences.setKeyServers(servers); mKeyServerPreference.setSummary(getResources().getQuantityString( - R.plurals.n_key_servers, servers.length, servers.length)); + R.plurals.n_keyservers, servers.length, servers.length)); break; } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java index ff5f081ae..0de675bab 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java @@ -74,7 +74,7 @@ public class PreferencesKeyServerActivity extends ActionBarActivity implements O mTitle = (TextView) findViewById(R.id.title); mSummary = (TextView) findViewById(R.id.summary); - mTitle.setText(R.string.label_key_servers); + mTitle.setText(R.string.label_keyservers); mEditors = (ViewGroup) findViewById(R.id.editors); mAdd = findViewById(R.id.add); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java index 36fa1edb4..c71bc160a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java @@ -17,6 +17,7 @@ package org.sufficientlysecure.keychain.ui.dialog; +import android.annotation.TargetApi; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; @@ -308,6 +309,7 @@ public class CreateKeyDialogFragment extends DialogFragment { } } + @TargetApi(Build.VERSION_CODES.HONEYCOMB) private void replaceArrayAdapterContent(ArrayAdapter arrayAdapter, int stringArrayResourceId) { final String[] spinnerValuesStringArray = getResources().getStringArray(stringArrayResourceId); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { diff --git a/OpenKeychain/src/main/res/anim/push_left_in.xml b/OpenKeychain/src/main/res/anim/push_left_in.xml deleted file mode 100644 index 45fb4875a..000000000 --- a/OpenKeychain/src/main/res/anim/push_left_in.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/OpenKeychain/src/main/res/anim/push_left_out.xml b/OpenKeychain/src/main/res/anim/push_left_out.xml deleted file mode 100644 index 845679f16..000000000 --- a/OpenKeychain/src/main/res/anim/push_left_out.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OpenKeychain/src/main/res/anim/push_right_in.xml b/OpenKeychain/src/main/res/anim/push_right_in.xml deleted file mode 100644 index 09a244406..000000000 --- a/OpenKeychain/src/main/res/anim/push_right_in.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/OpenKeychain/src/main/res/anim/push_right_out.xml b/OpenKeychain/src/main/res/anim/push_right_out.xml deleted file mode 100644 index e8893a69a..000000000 --- a/OpenKeychain/src/main/res/anim/push_right_out.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OpenKeychain/src/main/res/drawable/ic_next.png b/OpenKeychain/src/main/res/drawable/ic_next.png deleted file mode 100644 index 8271c1380..000000000 Binary files a/OpenKeychain/src/main/res/drawable/ic_next.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable/ic_previous.png b/OpenKeychain/src/main/res/drawable/ic_previous.png deleted file mode 100644 index ef90db972..000000000 Binary files a/OpenKeychain/src/main/res/drawable/ic_previous.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/layout/api_app_settings_activity.xml b/OpenKeychain/src/main/res/layout/api_app_settings_activity.xml index 1377acf0e..49c4ccbfe 100644 --- a/OpenKeychain/src/main/res/layout/api_app_settings_activity.xml +++ b/OpenKeychain/src/main/res/layout/api_app_settings_activity.xml @@ -6,7 +6,7 @@ diff --git a/OpenKeychain/src/main/res/layout/key_list_header.xml b/OpenKeychain/src/main/res/layout/key_list_header.xml index 09ac1c856..de7bdbd5c 100644 --- a/OpenKeychain/src/main/res/layout/key_list_header.xml +++ b/OpenKeychain/src/main/res/layout/key_list_header.xml @@ -18,12 +18,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" - android:text="contact count" + android:text="key count" android:id="@+id/contacts_num" android:layout_centerVertical="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" - android:layout_marginRight="10px" + android:layout_marginRight="8dp" android:visibility="visible" android:textColor="@android:color/darker_gray" /> diff --git a/OpenKeychain/src/main/res/layout/view_key_certs_header.xml b/OpenKeychain/src/main/res/layout/view_key_certs_header.xml index 04e7b8097..037203dbd 100644 --- a/OpenKeychain/src/main/res/layout/view_key_certs_header.xml +++ b/OpenKeychain/src/main/res/layout/view_key_certs_header.xml @@ -23,7 +23,7 @@ android:layout_centerVertical="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" - android:layout_marginRight="10px" + android:layout_marginRight="8dp" android:visibility="visible" android:textColor="@android:color/darker_gray" /> diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index f53ae56ee..b5549f0d8 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -2,8 +2,6 @@ - Contacts - Secret Keys Select Public Key Select Secret Key Encrypt @@ -16,17 +14,15 @@ Keyserver Preference Change Passphrase Set Passphrase - "Send Mail…" - "Send File…" + Share with… + Share file with… Encrypt To File Decrypt To File Import Keys Export Key Export Keys Key Not Found - Query Keyserver Upload to Keyserver - Unknown Signature Key Certify Key Key Details Help @@ -47,12 +43,9 @@ Decrypt and Verify - Sign Certify - Decrypt Decrypt and Verify From Clipboard - Select Recipients Encrypt File Save Cancel @@ -61,7 +54,6 @@ Okay Change New Passphrase Set New Passphrase - Search Upload To Keyserver Next Back @@ -76,7 +68,6 @@ Help Import from file Import from QR Code - Import Import from NFC Export to file Delete key @@ -96,7 +87,6 @@ with QR Code with NFC Copy to clipboard - Sign key Beam settings Cancel Encrypt to… @@ -125,7 +115,7 @@ Message Compression File Compression Force old OpenPGPv3 Signatures - Keyservers + Keyservers Key ID Creation Expiry @@ -148,25 +138,21 @@ <no name> <none> <no key> - <No Email> - can encrypt can sign expired revoked - User ID - - 1 contact - %d contacts + + 1 key + %d keys - + %d keyserver %d keyservers - Fingerprint: Secret Key: @@ -199,7 +185,6 @@ Wrong passphrase. - Using clipboard content. Set a passphrase first. No compatible file manager installed. The passphrases didn\'t match. @@ -217,12 +202,10 @@ Please specify which file to encrypt to.\nWARNING: File will be overwritten if it exists. Please specify which file to decrypt to.\nWARNING: File will be overwritten if it exists. Please specify which file to export to.\nWARNING: File will be overwritten if it exists. - Please specify which file to export to.\nWARNING: You are about to export SECRET keys.\nWARNING: File will be overwritten if it exists. - Do you really want to delete the key \'%s\'?\nYou can\'t undo this! 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 user ID, are you sure you want to continue?" + You have added an empty user ID, 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? @@ -256,7 +239,6 @@ Found %d keys. - %d bad secret key ignored. Perhaps you exported with the option\n --export-secret-subkeys\nMake sure you export with\n --export-secret-keys\ninstead. %d bad secret keys ignored. Perhaps you exported with the option\n --export-secret-subkeys\nMake sure you export with\n --export-secret-keys\ninstead. @@ -279,32 +261,22 @@ deleting \'%s\' failed file not found no suitable secret key found - no known kind of encryption found external storage not ready - invalid email \'%s\' key size must be at least 512bit the master key cannot be an ElGamal key unknown algorithm choice - you need to specify a name no email found - you need to specify an email address need at least one user id main user id must not be empty need at least a master key - no encryption keys or passphrase given no passphrase given no signature key given not valid encryption data - corrupt data integrity check failed! Data has been modified! - couldn\'t find a packet with symmetric encryption wrong passphrase error saving some keys could not extract private key expiry date must come after creation date - please save the keyring first - you can not delete this contact because it is your own. - you can not delete the following contacts because they are your own:\n%s Direct binary data without actual file in filesystem is not supported. This is only supported by ACTION_ENCRYPT_STREAM_AND_RETURN. @@ -316,10 +288,6 @@ Too many responses File has no content A generic error occurred, please create a new bug report for OpenKeychain. - - Please delete it from the \'My Keys\' screen! - Please delete them from the \'My Keys\' screen! - 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 @@ -343,7 +311,6 @@ importing… exporting… building key… - preparing master key… certifying master key… building master ring… adding sub keys… @@ -374,7 +341,6 @@ decompressing data… verifying integrity… deleting \'%s\' securely… - querying… Search Public Keys @@ -409,7 +375,6 @@ Import selected keys - Import, Sign, and upload selected keys Import from clipboard @@ -480,17 +445,16 @@ Edit this key - Encrypt to this contact - Certify this contact\'s key + Encrypt with this key + Certify this key Info Certifications - Keys + Keys Sign and Encrypt Decrypt and Verify Import Keys - My Keys Registered Apps Open navigation drawer Close navigation drawer @@ -505,24 +469,17 @@ Enter ciphertext here to decrypt and/or verify… - Show unknown signatures Signer Certificate Details User ID - Subkey Rank ]]> No certificates for this key User IDs to sign - Reapplying certificates - Show by known secret keys - Show by known public keys - Show all certificates default none casual positive revoke - never Web of Trust ok failed! diff --git a/OpenKeychain/src/main/res/xml/gen_preferences.xml b/OpenKeychain/src/main/res/xml/gen_preferences.xml index 5d7dcd65f..10be61b6a 100644 --- a/OpenKeychain/src/main/res/xml/gen_preferences.xml +++ b/OpenKeychain/src/main/res/xml/gen_preferences.xml @@ -27,6 +27,6 @@ + android:title="@string/label_keyservers" /> diff --git a/OpenKeychain/src/main/res/xml/searchable_public_keys.xml b/OpenKeychain/src/main/res/xml/searchable_public_keys.xml deleted file mode 100644 index 6636e0d94..000000000 --- a/OpenKeychain/src/main/res/xml/searchable_public_keys.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/OpenKeychain/src/main/res/xml/searchable_secret_keys.xml b/OpenKeychain/src/main/res/xml/searchable_secret_keys.xml deleted file mode 100644 index ba0553494..000000000 --- a/OpenKeychain/src/main/res/xml/searchable_secret_keys.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/Resources/AndroidUnusedResources1.6.2.jar b/Resources/AndroidUnusedResources1.6.2.jar deleted file mode 100644 index 5956b0c17..000000000 Binary files a/Resources/AndroidUnusedResources1.6.2.jar and /dev/null differ