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

Commit 4ddd778d authored by Pinyao Ting's avatar Pinyao Ting
Browse files

Fix the exception when shortcut info was removed before loading

persisted bubbles

Bug: 159243080
Test: manual
Change-Id: Ie3211ae97de1ed146a639424ffbc7f19bd496c8e
parent b2014a0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -162,7 +162,7 @@ internal class BubbleDataRepository @Inject constructor(
        // into Bubble.
        // into Bubble.
        val bubbles = entities.mapNotNull { entity ->
        val bubbles = entities.mapNotNull { entity ->
            shortcutMap[ShortcutKey(entity.userId, entity.packageName)]
            shortcutMap[ShortcutKey(entity.userId, entity.packageName)]
                    ?.first { shortcutInfo -> entity.shortcutId == shortcutInfo.id }
                    ?.firstOrNull { shortcutInfo -> entity.shortcutId == shortcutInfo.id }
                    ?.let { shortcutInfo -> Bubble(
                    ?.let { shortcutInfo -> Bubble(
                            entity.key,
                            entity.key,
                            shortcutInfo,
                            shortcutInfo,