From 173ac574d80b99073a7491f98ea2b7d0bf5d4214 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Wed, 14 Aug 2024 15:21:31 -0700 Subject: [PATCH] Register the bubble listener after everything has been initialized Flag: com.android.wm.shell.enable_bubble_bar Test: manual - have bubbles in bubble bar, switch between transient taskbar and pinned taskbar repeatedly. Bug: 359096619 Change-Id: I02beacff64b12380ee6d134b7dcc64cfd27e4b0b --- .../launcher3/taskbar/bubbles/BubbleBarController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java index 33d8a8430f..258e92024e 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java @@ -168,10 +168,6 @@ public class BubbleBarController extends IBubblesListener.Stub { mBarView = bubbleView; // Need the view for inflating bubble views. mSystemUiProxy = SystemUiProxy.INSTANCE.get(context); - - if (sBubbleBarEnabled) { - mSystemUiProxy.setBubblesListener(this); - } } public void onDestroy() { @@ -197,6 +193,10 @@ public class BubbleBarController extends IBubblesListener.Stub { mBubbleBarViewController.setUpdateSelectedBubbleAfterCollapse( key -> setSelectedBubbleInternal(mBubbles.get(key))); mBubbleBarViewController.setBoundsChangeListener(this::onBubbleBarBoundsChanged); + + if (sBubbleBarEnabled) { + mSystemUiProxy.setBubblesListener(this); + } }); }