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

Commit 03f0c674 authored by Thales Lima's avatar Thales Lima Committed by Android (Google) Code Review
Browse files

Merge "launcher: check if task still exists before leaving it in focus" into sc-v2-dev

parents 7c50c2fa 9c102475
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1158,7 +1158,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
            final TaskView taskView = (TaskView) getChildAt(pageIndex);
            taskView.bind(task, mOrientationState);
        }
        if (mFocusedTaskId == -1 && getTaskViewCount() > 0) {

        // If the list changed, maybe the focused task doesn't exist anymore
        if (getFocusedTaskView() == null && getTaskViewCount() > 0) {
            mFocusedTaskId = getTaskViewAt(0).getTaskId();
        }
        updateTaskSize();