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

Commit 1f76132d authored by Winson Chung's avatar Winson Chung
Browse files

Toggling Recents from home should actually toggle Recents instead of launching the first task.

Change-Id: Id60c54839c9f13299ec8d514e73e37c10735f30c
parent 7ab650cb
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -277,9 +277,16 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
                    !mFullScreenshotView.cancelAnimateOnEnterRecents(mFinishRunnable)) {
                // If we have a focused task, then launch that task
                if (!mRecentsView.launchFocusedTask()) {
                    // If there are any tasks, then launch the first task
                    if (mConfig.launchedFromHome) {
                        // Just start the animation out of recents
                        ReferenceCountedTrigger exitTrigger = new ReferenceCountedTrigger(this,
                                null, mFinishRunnable, null);
                        mRecentsView.startExitToHomeAnimation(
                                new ViewAnimation.TaskViewExitContext(exitTrigger));
                    } else {
                        // Otherwise, try and launch the first task
                        if (!mRecentsView.launchFirstTask()) {
                        // We really shouldn't hit this, but if we do, just animate out (aka. finish)
                            // If there are no tasks, then just finish recents
                            ReferenceCountedTrigger exitTrigger = new ReferenceCountedTrigger(this,
                                    null, mFinishRunnable, null);
                            mRecentsView.startExitToHomeAnimation(
@@ -287,6 +294,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
                        }
                    }
                }
            }
            return true;
        }
        return false;