From 51a6deb3e2a9caf6a63d11514edc556e92f774ed Mon Sep 17 00:00:00 2001 From: Charles Chen Date: Fri, 5 Jun 2020 18:20:41 +0800 Subject: [PATCH] Ensure that stack view exists when applyUpdate In applyUpdate(), there's a chance that stack view has been removed. Ensure stack view is created before updating. fixes: 157778325 fixes: 157944021 Test: atest BubbleControllerTest Change-Id: I6ff111bf74c11bf44cb8a27260d4dfc04f5d3423 --- .../src/com/android/systemui/bubbles/BubbleController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java index f05d547edd0c7..e6a6dd87f2aec 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java @@ -1116,6 +1116,8 @@ public class BubbleController implements ConfigurationController.ConfigurationLi @Override public void applyUpdate(BubbleData.Update update) { + ensureStackViewCreated(); + // Lazy load overflow bubbles from disk loadOverflowBubblesFromDisk(); // Update bubbles in overflow.