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

This commit is contained in:
Liran Binyamin authored and Android (Google) Code Review committed 2023-07-12 19:58:16 +00:00
commit d0121222a5
2 files changed
+7 -2

No files matched your search

@@ -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;
}