Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbb25bcf authored by Yuncheol Heo's avatar Yuncheol Heo Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE in TaskView."

parents bc503754 97ae1081
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -252,7 +252,9 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback,
        mTaskOrganizer.setInterceptBackPressedOnTaskRoot(mTaskToken, true);
        // TODO: Synchronize show with the resize
        onLocationChanged();
        if (taskInfo.taskDescription != null) {
            setResizeBackgroundColor(taskInfo.taskDescription.getBackgroundColor());
        }

        if (mListener != null) {
            mListenerExecutor.execute(() -> {
@@ -279,9 +281,10 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback,

    @Override
    public void onTaskInfoChanged(ActivityManager.RunningTaskInfo taskInfo) {
        mTaskInfo.taskDescription = taskInfo.taskDescription;
        if (taskInfo.taskDescription != null) {
            setResizeBackgroundColor(taskInfo.taskDescription.getBackgroundColor());
        }
    }

    @Override
    public void onBackPressedOnTaskRoot(ActivityManager.RunningTaskInfo taskInfo) {