From 7435831cbd9f9e476cc0b2b2c8181a8fb114b1a5 Mon Sep 17 00:00:00 2001 From: fbaron Date: Mon, 1 Apr 2024 13:17:49 -0700 Subject: [PATCH] Fix null pointer in FloatingWidgetView Flag: NONE Test: NONE Bug: 331868669 Change-Id: I350e6660ea1936bb9ee799c3d2c840c57876fef4 (cherry picked from commit c0c0bdbc38dc7e021aac6e9aaa15e03955789656) --- .../src/com/android/quickstep/views/FloatingWidgetView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java b/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java index 6431bdf5aa..486fc2cf08 100644 --- a/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java +++ b/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java @@ -305,7 +305,8 @@ public class FloatingWidgetView extends FrameLayout implements AnimatorListener, */ public static int getDefaultBackgroundColor( Context context, RemoteAnimationTarget target) { - return (target != null && target.taskInfo.taskDescription != null) + return (target != null && target.taskInfo != null + && target.taskInfo.taskDescription != null) ? target.taskInfo.taskDescription.getBackgroundColor() : Themes.getColorBackground(context); }