summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pinyao Ting <pinyaoting@google.com> 2020-06-19 11:37:08 -0700
committer Pinyao Ting <pinyaoting@google.com> 2020-06-19 11:37:08 -0700
commit4ddd778d0e0416c4e41d33e85c7a8cce1e8e1794 (patch)
tree307cbb3500e8b0db10532072d2a5d2bc5d03590c
parentb2014a0a7fd19f1f60a6ba5558cb2b2ca915f5af (diff)
Fix the exception when shortcut info was removed before loading
persisted bubbles Bug: 159243080 Test: manual Change-Id: Ie3211ae97de1ed146a639424ffbc7f19bd496c8e
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleDataRepository.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleDataRepository.kt b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleDataRepository.kt
index 0c25d144938c..390f7064a227 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleDataRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleDataRepository.kt
@@ -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,