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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11931364

Change-Id: Ic5759625d4c181b173db5d31753cdfc58c1896ef
This commit is contained in:
TreeHugger Robot
2020-06-19 20:46:42 +00:00
committed by Automerger Merge Worker

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,