From 9aa2942f8acc97cd09af3d9d19d8baabd9649ba6 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 22 Jul 2021 08:57:48 +0200 Subject: [PATCH] Use original email address for PGP --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 8 ++++---- app/src/main/java/eu/faircode/email/FragmentMessages.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index f0ae56c4ec..e4bdcba9a4 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -2276,7 +2276,7 @@ public class FragmentCompose extends FragmentBase { List emails = new ArrayList<>(); for (int i = 0; i < recipients.size(); i++) { InternetAddress recipient = (InternetAddress) recipients.get(i); - String email = recipient.getAddress().toLowerCase(Locale.ROOT); + String email = recipient.getAddress(); if (!emails.contains(email)) emails.add(email); } @@ -2902,7 +2902,7 @@ public class FragmentCompose extends FragmentBase { Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY); intent.putExtra(OpenPgpApi.EXTRA_KEY_ID, pgpSignKeyId); intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE, true); - intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE_USER_ID, identity.email.toLowerCase(Locale.ROOT)); + intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE_USER_ID, identity.email); intent.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); intent.putExtra(BuildConfig.APPLICATION_ID, largs); return intent; @@ -2922,7 +2922,7 @@ public class FragmentCompose extends FragmentBase { Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY); intent.putExtra(OpenPgpApi.EXTRA_KEY_ID, pgpSignKeyId); intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE, true); - intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE_USER_ID, identity.email.toLowerCase(Locale.ROOT)); + intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE_USER_ID, identity.email); intent.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); intent.putExtra(BuildConfig.APPLICATION_ID, largs); return intent; @@ -5299,7 +5299,7 @@ public class FragmentCompose extends FragmentBase { String[] userIds = new String[recipients.size()]; for (int i = 0; i < recipients.size(); i++) { InternetAddress recipient = (InternetAddress) recipients.get(i); - userIds[i] = recipient.getAddress().toLowerCase(Locale.ROOT); + userIds[i] = recipient.getAddress(); } Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY_IDS); diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index d09a49b696..a6f739c4d8 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -6668,7 +6668,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. continue; switch (key) { case "addr": - addr = value.toLowerCase(Locale.ROOT); + addr = value; break; case "prefer-encrypt": mutual = value.trim().toLowerCase(Locale.ROOT).equals("mutual");