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

Commit 47d1206f authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Toggling Recents from home should actually toggle Recents instead of...

Merge "Toggling Recents from home should actually toggle Recents instead of launching the first task."
parents 88dc8f1e 1f76132d
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;