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

Commit 2d0f39bf authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Move home task to front when home stack is moved to front.

Make sure the home task is moved to the front when we are moving
the home stack to the front for HOME_ACTIVITY_TYPE task type.

Bug: 20323082
Change-Id: I035cc86c48633089086f61d3a890ff87b4091479
parent 8a2c92c8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -462,7 +462,7 @@ public final class ActivityStackSupervisor implements DisplayListener {

        mHomeStack.moveHomeStackTaskToTop(homeStackTaskType);

        final ActivityRecord top = mHomeStack.topRunningActivityLocked(null);
        final ActivityRecord top = getHomeActivity();
        if (top == null) {
            return false;
        }
@@ -485,7 +485,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
            prev.task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
        }

        ActivityRecord r = mHomeStack.topRunningActivityLocked(null);
        mHomeStack.moveHomeStackTaskToTop(homeStackTaskType);
        ActivityRecord r = getHomeActivity();
        if (r != null) {
            mService.setFocusedActivityLocked(r, reason);
            return resumeTopActivitiesLocked(mHomeStack, prev, null);
+2 −4
Original line number Diff line number Diff line
@@ -385,10 +385,8 @@ final class TaskRecord {
    }

    void setTaskToReturnTo(int taskToReturnTo) {
        if (IGNORE_RETURN_TO_RECENTS && taskToReturnTo == RECENTS_ACTIVITY_TYPE) {
            taskToReturnTo = HOME_ACTIVITY_TYPE;
        }
        mTaskToReturnTo = taskToReturnTo;
        mTaskToReturnTo = (IGNORE_RETURN_TO_RECENTS && taskToReturnTo == RECENTS_ACTIVITY_TYPE)
            ? HOME_ACTIVITY_TYPE : taskToReturnTo;
    }

    int getTaskToReturnTo() {