From 4d257139add1a08b25dbb082cab731ce0efa307c Mon Sep 17 00:00:00 2001 From: Liran Binyamin Date: Mon, 8 Apr 2024 16:02:08 -0400 Subject: [PATCH] Fix NPE when setting bubble bar bounds The bubble bar bounds change listener is sometimes invoked before the IBubbles service has been initialized. This change adds a null check before calling the service. Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT Fixes: 332423960 Test: manual Change-Id: Iaa048c62a60c90c5e416da05ba53467a5034d86c --- quickstep/src/com/android/quickstep/SystemUiProxy.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index ab609fd686..08d54150d5 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -836,7 +836,9 @@ public class SystemUiProxy implements ISystemUiProxy, NavHandle { */ public void setBubbleBarBounds(Rect bubbleBarBounds) { try { - mBubbles.setBubbleBarBounds(bubbleBarBounds); + if (mBubbles != null) { + mBubbles.setBubbleBarBounds(bubbleBarBounds); + } } catch (RemoteException e) { Log.w(TAG, "Failed call setBubbleBarBounds"); }