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

Commit 09564e23 authored by Winson's avatar Winson Committed by android-build-merger
Browse files

Fixing issue where affiliated task last-active-times were inconsistent.

am: 730bf061

* commit '730bf061':
  Fixing issue where affiliated task last-active-times were inconsistent.

Change-Id: I38bb3d35e92db977a59fb30942412425a6fc8b0e
parents 0732217c 730bf061
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -2738,12 +2738,21 @@ public final class ActivityStackSupervisor implements DisplayListener {

    // Called when WindowManager has finished animating the launchingBehind activity to the back.
    void handleLaunchTaskBehindCompleteLocked(ActivityRecord r) {
        r.mLaunchTaskBehind = false;
        final TaskRecord task = r.task;
        task.setLastThumbnailLocked(task.stack.screenshotActivitiesLocked(r));
        final ActivityStack stack = task.stack;

        r.mLaunchTaskBehind = false;
        task.setLastThumbnailLocked(stack.screenshotActivitiesLocked(r));
        mRecentTasks.addLocked(task);
        mService.notifyTaskStackChangedLocked();
        mWindowManager.setAppVisibility(r.appToken, false);

        // When launching tasks behind, update the last active time of the top task after the new
        // task has been shown briefly
        final ActivityRecord top = stack.topActivity();
        if (top != null) {
            top.task.touchActiveTime();
        }
    }

    void scheduleLaunchTaskBehindComplete(IBinder token) {
+2 −0
Original line number Diff line number Diff line
@@ -285,6 +285,7 @@ final class TaskRecord {
        mCallingPackage = info.packageName;
        setIntent(_intent, info);
        setMinDimensions(info);
        touchActiveTime();
    }

    TaskRecord(ActivityManagerService service, int _taskId, ActivityInfo info, Intent _intent,
@@ -315,6 +316,7 @@ final class TaskRecord {
        taskType = APPLICATION_ACTIVITY_TYPE;
        mTaskToReturnTo = HOME_ACTIVITY_TYPE;
        lastTaskDescription = _taskDescription;
        touchActiveTime();
    }

    private TaskRecord(ActivityManagerService service, int _taskId, Intent _intent,