Fix null pointer in FloatingWidgetView
Flag: NONE
Test: NONE
Bug: 331868669
Change-Id: I350e6660ea1936bb9ee799c3d2c840c57876fef4
(cherry picked from commit c0c0bdbc38dc7e021aac6e9aaa15e03955789656)
diff --git a/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java b/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java
index 6431bdf..486fc2c 100644
--- a/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java
+++ b/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java
@@ -305,7 +305,8 @@
*/
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);
}