From fc8852b07b3af8ee37b0e282cc9360e3f5c5e74d Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 20 Aug 2021 21:48:41 +0200 Subject: [PATCH] Revert "Use hashed email/name for shortcut ID" This reverts commit 176aa6d24b8268fdddbad15f8e2d78cc843889a6. --- app/src/main/java/eu/faircode/email/Shortcuts.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Shortcuts.java b/app/src/main/java/eu/faircode/email/Shortcuts.java index 0044fb6de3..a95a4c22c9 100644 --- a/app/src/main/java/eu/faircode/email/Shortcuts.java +++ b/app/src/main/java/eu/faircode/email/Shortcuts.java @@ -247,7 +247,7 @@ class Shortcuts { circular && !identicon ? null : Helper.dp2pixels(context, 3)); IconCompat icon = IconCompat.createWithBitmap(bitmap); - String id = Integer.toHexString(Objects.hash(name, email)); + String id = (name == null ? email : "\"" + name + "\" <" + email + ">"); Set categories = new HashSet<>(Arrays.asList(BuildConfig.APPLICATION_ID + ".TEXT_SHARE_TARGET")); ShortcutInfoCompat.Builder builder = new ShortcutInfoCompat.Builder(context, id) .setIcon(icon)