Merge "Fix null pointer in FloatingWidgetView" into 24D1-dev

This commit is contained in:
Treehugger Robot
2024-05-06 22:55:57 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
}