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

Commit 051c3f9b 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

am: 09564e23

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

Change-Id: Ib8ae1c3dca283baa622480b2e98c4c99580f05d8
parents 9d9a39f1 09564e23
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,