Merge "Check that the bubble bar has bubbles before showing it" into udc-qpr-dev

This commit is contained in:
Liran Binyamin
2023-07-12 19:58:16 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 2 deletions
@@ -145,6 +145,11 @@ public class BubbleBarViewController {
return mBarView.getVisibility() == VISIBLE;
}
/** Whether the bubble bar has bubbles. */
public boolean hasBubbles() {
return mBubbleBarController.getSelectedBubbleKey() != null;
}
/**
* The bounds of the bubble bar.
*/
@@ -126,8 +126,8 @@ public class BubbleStashController {
if (mBubblesShowingOnHome != onHome) {
mBubblesShowingOnHome = onHome;
if (!mBarViewController.isBubbleBarVisible()) {
// if the bubble bar is not visible, there are no bubbles, so just return.
if (!mBarViewController.hasBubbles()) {
// if there are no bubbles, there's nothing to show, so just return.
return;
}