Merge "Fix the exception when shortcut info was removed before loading persisted bubbles" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-06-19 20:40:09 +00:00
committed by Android (Google) Code Review

View File

@@ -162,7 +162,7 @@ internal class BubbleDataRepository @Inject constructor(
// into Bubble.
val bubbles = entities.mapNotNull { entity ->
shortcutMap[ShortcutKey(entity.userId, entity.packageName)]
?.first { shortcutInfo -> entity.shortcutId == shortcutInfo.id }
?.firstOrNull { shortcutInfo -> entity.shortcutId == shortcutInfo.id }
?.let { shortcutInfo -> Bubble(
entity.key,
shortcutInfo,