From 2f81c2fb0f20bfc17e6e658047734f9063532269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Fri, 25 Oct 2013 21:46:05 +0200 Subject: spring-cleaning: remove unused resources, rename strings from camelCase to snake_case to follow standard practice --- .../keychain/service/KeychainIntentService.java | 10 +++++----- .../keychain/service/KeychainIntentServiceHandler.java | 2 +- .../keychain/service/remote/AppSettingsFragment.java | 2 +- .../keychain/service/remote/OpenPgpService.java | 4 ++-- .../keychain/service/remote/RemoteServiceActivity.java | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service') diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java index 8f8f1bdca..ba3169b18 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -277,7 +277,7 @@ public class KeychainIntentService extends IntentService implements ProgressDial if (!FileHelper.isStorageMounted(inputFile) || !FileHelper.isStorageMounted(outputFile)) { throw new PgpGeneralException( - getString(R.string.error_externalStorageNotReady)); + getString(R.string.error_external_storage_not_ready)); } inStream = new FileInputStream(inputFile); @@ -421,7 +421,7 @@ public class KeychainIntentService extends IntentService implements ProgressDial if (!FileHelper.isStorageMounted(inputFile) || !FileHelper.isStorageMounted(outputFile)) { throw new PgpGeneralException( - getString(R.string.error_externalStorageNotReady)); + getString(R.string.error_external_storage_not_ready)); } // InputStream @@ -616,9 +616,9 @@ public class KeychainIntentService extends IntentService implements ProgressDial PgpHelper.deleteFileSecurely(this, this, new File(deleteFile)); } catch (FileNotFoundException e) { throw new PgpGeneralException( - getString(R.string.error_fileNotFound, deleteFile)); + getString(R.string.error_file_not_found, deleteFile)); } catch (IOException e) { - throw new PgpGeneralException(getString(R.string.error_fileDeleteFailed, + throw new PgpGeneralException(getString(R.string.error_file_delete_failed, deleteFile)); } @@ -694,7 +694,7 @@ public class KeychainIntentService extends IntentService implements ProgressDial // check if storage is ready if (!FileHelper.isStorageMounted(outputFile)) { - throw new PgpGeneralException(getString(R.string.error_externalStorageNotReady)); + throw new PgpGeneralException(getString(R.string.error_external_storage_not_ready)); } // OutputStream diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java index f3efbf8f1..170b946d2 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java @@ -79,7 +79,7 @@ public class KeychainIntentServiceHandler extends Handler { // show error from service if (data.containsKey(DATA_ERROR)) { Toast.makeText(mActivity, - mActivity.getString(R.string.errorMessage, data.getString(DATA_ERROR)), + mActivity.getString(R.string.error_message, data.getString(DATA_ERROR)), Toast.LENGTH_SHORT).show(); } diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java index 30804ee90..942f8eba8 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java @@ -227,7 +227,7 @@ public class AppSettingsFragment extends Fragment { mKeyUserId.setText(R.string.api_settings_no_key); mKeyUserIdRest.setText(""); } else { - String uid = getResources().getString(R.string.unknownUserId); + String uid = getResources().getString(R.string.unknown_user_id); String uidExtra = ""; PGPSecretKeyRing keyRing = ProviderHelper.getPGPSecretKeyRingByMasterKeyId( getActivity(), secretKeyId); diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java index 9f302459c..575f76a22 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java @@ -387,7 +387,7 @@ public class OpenPgpService extends RemoteService { } secretKeyId = PgpHelper.getDecryptionKeyId(this, inputStream2); if (secretKeyId == Id.key.none) { - throw new PgpGeneralException(getString(R.string.error_noSecretKeyFound)); + throw new PgpGeneralException(getString(R.string.error_no_secret_key_found)); } } catch (NoAsymmetricEncryptionException e) { if (inputStream2.markSupported()) { @@ -396,7 +396,7 @@ public class OpenPgpService extends RemoteService { secretKeyId = Id.key.symmetric; if (!PgpOperation.hasSymmetricEncryption(this, inputStream2)) { throw new PgpGeneralException( - getString(R.string.error_noKnownEncryptionFound)); + getString(R.string.error_no_known_encryption_found)); } // we do not support symmetric decryption from the API! throw new Exception("Symmetric decryption is not supported!"); diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java index 5bf0684b1..2c4bb4e97 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java @@ -225,7 +225,7 @@ public class RemoteServiceActivity extends SherlockFragmentActivity { finishHandled = true; finish(); } - }, R.string.btn_doNotSave, new View.OnClickListener() { + }, R.string.btn_do_not_save, new View.OnClickListener() { @Override public void onClick(View v) { // cancel -- cgit v1.2.3