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

Commit 97ae1081 authored by Yuncheol Heo's avatar Yuncheol Heo
Browse files

Fix NPE in TaskView.

Bug: 177646952
Change-Id: I14c0244e2d4b494491092c09f96bb50d9c2ceaaf
parent bfcc7e5f
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) {