Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 340103ba authored by Mady Mellor's avatar Mady Mellor
Browse files

Fix invalid bubble predicate once and for all

Predicate to remove a bubble was returning true for pending intent
based bubbles & removing them accidentally.

Test: manual - 1) Use test app with pending intent based bubbles
               2) Add a bubble from the app, leave the app
               3) Open the app (causes shortcut change)
                 => bubble sticks around

               1) Use test app with shortcut based bubbles
               2) Add a bubble from the app, leave the app
               3) Open the app
               4) removeLongLivedShortcuts
                 => bubble removed
Bug: 159719877
Change-Id: Id17423718669f5b829988c43204941f5535980cd
parent 56caddc3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -368,6 +368,10 @@ public class BubbleData {

        final Predicate<Bubble> invalidBubblesFromPackage = bubble -> {
            final boolean bubbleIsFromPackage = packageName.equals(bubble.getPackageName());
            final boolean isShortcutBubble = bubble.hasMetadataShortcutId();
            if (!bubbleIsFromPackage || !isShortcutBubble) {
                return false;
            }
            final boolean hasShortcutIdAndValidShortcut =
                    bubble.hasMetadataShortcutId()
                            && bubble.getShortcutInfo() != null