Merge "Only remove bubbles with null shortcutinfo if they have a shortcut ID." into rvc-dev
This commit is contained in:
@@ -366,11 +366,15 @@ public class BubbleData {
|
|||||||
validShortcutIds.add(info.getId());
|
validShortcutIds.add(info.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
final Predicate<Bubble> invalidBubblesFromPackage = bubble ->
|
final Predicate<Bubble> invalidBubblesFromPackage = bubble -> {
|
||||||
packageName.equals(bubble.getPackageName())
|
final boolean bubbleIsFromPackage = packageName.equals(bubble.getPackageName());
|
||||||
&& (bubble.getShortcutInfo() == null
|
final boolean hasShortcutIdAndValidShortcut =
|
||||||
|| !bubble.getShortcutInfo().isEnabled()
|
bubble.hasMetadataShortcutId()
|
||||||
|| !validShortcutIds.contains(bubble.getShortcutInfo().getId()));
|
&& bubble.getShortcutInfo() != null
|
||||||
|
&& bubble.getShortcutInfo().isEnabled()
|
||||||
|
&& validShortcutIds.contains(bubble.getShortcutInfo().getId());
|
||||||
|
return bubbleIsFromPackage && !hasShortcutIdAndValidShortcut;
|
||||||
|
};
|
||||||
|
|
||||||
final Consumer<Bubble> removeBubble = bubble ->
|
final Consumer<Bubble> removeBubble = bubble ->
|
||||||
dismissBubbleWithKey(bubble.getKey(), reason);
|
dismissBubbleWithKey(bubble.getKey(), reason);
|
||||||
|
|||||||
Reference in New Issue
Block a user