From 5cc006da6ac0791d5fd0388fefe4072aab997d0f Mon Sep 17 00:00:00 2001 From: Liran Binyamin Date: Mon, 22 May 2023 17:28:39 -0400 Subject: [PATCH] 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 --- .../com/android/launcher3/taskbar/TaskbarActivityContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index a1c9f05adb..1ed63d900c 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -217,7 +217,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext { // If Bubble bar is present, TaskbarControllers depends on it so build it first. Optional 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),