diff options
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java index a3cd63d13..224e0085b 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java @@ -40,6 +40,7 @@ import org.sufficientlysecure.keychain.operations.results.DecryptVerifyResult; import org.sufficientlysecure.keychain.pgp.KeyRing; import org.sufficientlysecure.keychain.service.SaveKeyringParcel.Algorithm; import org.sufficientlysecure.keychain.service.SaveKeyringParcel.Curve; +import org.sufficientlysecure.keychain.ui.util.FormattingUtils; import org.sufficientlysecure.keychain.util.Log; import java.nio.ByteBuffer; @@ -449,11 +450,11 @@ public class KeyFormattingUtils { if (signatureResult != null && signatureResult.isSignatureOnly()) { encIcon = R.drawable.status_lock_open_24dp; encText = R.string.decrypt_result_not_encrypted; - encColor = R.color.android_red_light; + encColor = R.color.key_flag_red; } else { encIcon = R.drawable.status_lock_closed_24dp; encText = R.string.decrypt_result_encrypted; - encColor = R.color.android_green_light; + encColor = R.color.key_flag_green; } int encColorRes = context.getResources().getColor(encColor); @@ -470,7 +471,7 @@ public class KeyFormattingUtils { sigText = R.string.decrypt_result_no_signature; sigIcon = R.drawable.status_signature_invalid_cutout_24dp; - sigColor = R.color.bg_gray; + sigColor = R.color.key_flag_gray; // won't be used, but makes compiler happy sigActionText = 0; @@ -481,7 +482,7 @@ public class KeyFormattingUtils { case OpenPgpSignatureResult.SIGNATURE_SUCCESS_CERTIFIED: { sigText = R.string.decrypt_result_signature_certified; sigIcon = R.drawable.status_signature_verified_cutout_24dp; - sigColor = R.color.android_green_light; + sigColor = R.color.key_flag_green; sigActionText = R.string.decrypt_result_action_show; sigActionIcon = R.drawable.ic_vpn_key_grey_24dp; @@ -491,7 +492,7 @@ public class KeyFormattingUtils { case OpenPgpSignatureResult.SIGNATURE_SUCCESS_UNCERTIFIED: { sigText = R.string.decrypt_result_signature_uncertified; sigIcon = R.drawable.status_signature_unverified_cutout_24dp; - sigColor = R.color.android_orange_light; + sigColor = R.color.key_flag_orange; sigActionText = R.string.decrypt_result_action_show; sigActionIcon = R.drawable.ic_vpn_key_grey_24dp; @@ -501,7 +502,7 @@ public class KeyFormattingUtils { case OpenPgpSignatureResult.SIGNATURE_KEY_REVOKED: { sigText = R.string.decrypt_result_signature_revoked_key; sigIcon = R.drawable.status_signature_revoked_cutout_24dp; - sigColor = R.color.android_red_light; + sigColor = R.color.key_flag_red; sigActionText = R.string.decrypt_result_action_show; sigActionIcon = R.drawable.ic_vpn_key_grey_24dp; @@ -511,7 +512,7 @@ public class KeyFormattingUtils { case OpenPgpSignatureResult.SIGNATURE_KEY_EXPIRED: { sigText = R.string.decrypt_result_signature_expired_key; sigIcon = R.drawable.status_signature_expired_cutout_24dp; - sigColor = R.color.android_red_light; + sigColor = R.color.key_flag_red; sigActionText = R.string.decrypt_result_action_show; sigActionIcon = R.drawable.ic_vpn_key_grey_24dp; @@ -521,7 +522,7 @@ public class KeyFormattingUtils { case OpenPgpSignatureResult.SIGNATURE_KEY_MISSING: { sigText = R.string.decrypt_result_signature_missing_key; sigIcon = R.drawable.status_signature_unknown_cutout_24dp; - sigColor = R.color.android_red_light; + sigColor = R.color.key_flag_red; sigActionText = R.string.decrypt_result_action_Lookup; sigActionIcon = R.drawable.ic_file_download_grey_24dp; @@ -532,7 +533,7 @@ public class KeyFormattingUtils { case OpenPgpSignatureResult.SIGNATURE_ERROR: { sigText = R.string.decrypt_result_invalid_signature; sigIcon = R.drawable.status_signature_invalid_cutout_24dp; - sigColor = R.color.android_red_light; + sigColor = R.color.key_flag_red; sigActionText = R.string.decrypt_result_action_show; sigActionIcon = R.drawable.ic_vpn_key_grey_24dp; @@ -595,7 +596,7 @@ public class KeyFormattingUtils { context.getResources().getDrawable(R.drawable.status_signature_verified_cutout_24dp)); } if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_green_light; + color = R.color.key_flag_green; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -608,7 +609,7 @@ public class KeyFormattingUtils { statusIcon.setImageDrawable( context.getResources().getDrawable(R.drawable.status_lock_closed_24dp)); if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_green_light; + color = R.color.key_flag_green; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -627,7 +628,7 @@ public class KeyFormattingUtils { context.getResources().getDrawable(R.drawable.status_signature_unverified_cutout_24dp)); } if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_orange_light; + color = R.color.key_flag_orange; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -640,7 +641,7 @@ public class KeyFormattingUtils { statusIcon.setImageDrawable( context.getResources().getDrawable(R.drawable.status_signature_unknown_cutout_24dp)); if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_red_light; + color = R.color.key_flag_red; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -659,7 +660,7 @@ public class KeyFormattingUtils { context.getResources().getDrawable(R.drawable.status_signature_revoked_cutout_24dp)); } if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_red_light; + color = R.color.key_flag_red; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -677,7 +678,7 @@ public class KeyFormattingUtils { context.getResources().getDrawable(R.drawable.status_signature_expired_cutout_24dp)); } if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_red_light; + color = R.color.key_flag_red; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -690,7 +691,7 @@ public class KeyFormattingUtils { statusIcon.setImageDrawable( context.getResources().getDrawable(R.drawable.status_lock_open_24dp)); if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_red_light; + color = R.color.key_flag_red; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -703,7 +704,7 @@ public class KeyFormattingUtils { statusIcon.setImageDrawable( context.getResources().getDrawable(R.drawable.status_signature_unknown_cutout_24dp)); if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_red_light; + color = R.color.key_flag_red; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -716,7 +717,7 @@ public class KeyFormattingUtils { statusIcon.setImageDrawable( context.getResources().getDrawable(R.drawable.status_signature_invalid_cutout_24dp)); if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.android_red_light; + color = R.color.key_flag_red; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); @@ -730,7 +731,7 @@ public class KeyFormattingUtils { statusIcon.setImageDrawable( context.getResources().getDrawable(R.drawable.status_signature_invalid_cutout_24dp)); if (color == KeyFormattingUtils.DEFAULT_COLOR) { - color = R.color.bg_gray; + color = R.color.key_flag_gray; } statusIcon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.SRC_IN); |