From e6322b44f752607da87a9b79c64872f03afcd4bb Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 21 Aug 2021 18:04:32 +0200 Subject: [PATCH] Revert "Set locus ID" This reverts commit d96e979731f7fe4a07a8a25664ca7368492efc67. --- app/src/main/java/eu/faircode/email/Core.java | 5 ----- app/src/main/java/eu/faircode/email/Shortcuts.java | 8 +------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index e2a8a22922..c482cc4f10 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -49,7 +49,6 @@ import androidx.annotation.Nullable; import androidx.core.app.NotificationCompat; import androidx.core.app.Person; import androidx.core.app.RemoteInput; -import androidx.core.content.LocusIdCompat; import androidx.core.graphics.drawable.IconCompat; import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.preference.PreferenceManager; @@ -4562,10 +4561,6 @@ class Core { .setOnlyAlertOnce(alert_once) .setAllowSystemGeneratedContextualActions(false); - // https://developer.android.com/reference/android/content/LocusId - if (message.thread != null) - mbuilder.setLocusId(new LocusIdCompat(message.thread)); - if (message.ui_silent) { mbuilder.setSilent(true); Log.i("Notify silent=" + message.id); diff --git a/app/src/main/java/eu/faircode/email/Shortcuts.java b/app/src/main/java/eu/faircode/email/Shortcuts.java index f9ab0a1fe0..a95a4c22c9 100644 --- a/app/src/main/java/eu/faircode/email/Shortcuts.java +++ b/app/src/main/java/eu/faircode/email/Shortcuts.java @@ -41,7 +41,6 @@ import android.widget.Toast; import androidx.annotation.NonNull; import androidx.core.app.Person; -import androidx.core.content.LocusIdCompat; import androidx.core.content.pm.ShortcutInfoCompat; import androidx.core.content.pm.ShortcutManagerCompat; import androidx.core.graphics.drawable.IconCompat; @@ -304,16 +303,11 @@ class Shortcuts { IconCompat icon = IconCompat.createWithBitmap(bm); String id = "message:" + message.id; - ShortcutInfoCompat.Builder builder = new ShortcutInfoCompat.Builder(context, id) + return new ShortcutInfoCompat.Builder(context, id) .setIcon(icon) .setShortLabel(label) .setLongLabel(label) .setIntent(thread); - - if (message.thread != null) - builder.setLocusId(new LocusIdCompat(message.thread)); - - return builder; } @NonNull