Don't create the bubble bar controllers if the bubble bar view does not exist. This fixes a crash that happens when changing navigation modes.

Bug: 269670598
Test: Tested manually on a physical device
Change-Id: Ifd75418eb969b5d1de8625c0b9ff8884f8005ec5
This commit is contained in:
Liran Binyamin
2023-05-22 17:28:39 -04:00
parent d88ce20005
commit 5cc006da6a

View File

@@ -217,7 +217,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
// If Bubble bar is present, TaskbarControllers depends on it so build it first.
Optional<BubbleControllers> bubbleControllersOptional = Optional.empty();
if (BubbleBarController.BUBBLE_BAR_ENABLED) {
if (BubbleBarController.BUBBLE_BAR_ENABLED && bubbleBarView != null) {
bubbleControllersOptional = Optional.of(new BubbleControllers(
new BubbleBarController(this, bubbleBarView),
new BubbleBarViewController(this, bubbleBarView),