From f67cfbe6ac9c0a769f0f15af4f0e79e5960b94ba Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Wed, 8 Jan 2025 14:27:27 -0800 Subject: [PATCH] Use bubble count for checking if bubble bar has bubbles hasBubbles() was checking if there is a selected bubble. If there was one, it returned true. Update it to return true when bubble bar has bubble views. This aligns it with the name of the method and the javadoc. Bug: 385928447 Change-Id: If3dafb7608f71b8600dbac064b08a7f7114a361f Test: check that bubble bar is tappable Test: check that bubble bar is shown next to QSB on foldable Test: check bubble bar position with 3 button nav Flag: com.android.wm.shell.enable_bubble_bar --- .../launcher3/taskbar/bubbles/BubbleBarViewController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index 5685093097..84243f5ad1 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -481,7 +481,7 @@ public class BubbleBarViewController { /** Whether the bubble bar has bubbles. */ public boolean hasBubbles() { - return mBubbleBarController.getSelectedBubbleKey() != null; + return mBarView.getBubbleChildCount() > 0; } /**