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

Commit 9f5453e6 authored by Andrii Kulian's avatar Andrii Kulian Committed by Android (Google) Code Review
Browse files

Merge "ActivityStack cleanup"

parents e56e9b65 21713ac8
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -4793,7 +4793,8 @@ public final class ActivityManagerService extends ActivityManagerNative
            final long origId = Binder.clearCallingIdentity();
            try {
                r.forceNewConfig = true;
                r.getStack().ensureActivityConfigurationLocked(r, 0, false);
                r.ensureActivityConfigurationLocked(0 /* globalChanges */,
                        false /* preserveWindow */);
            } finally {
                Binder.restoreCallingIdentity(origId);
            }
@@ -6901,10 +6902,7 @@ public final class ActivityManagerService extends ActivityManagerNative
    public final void activityResumed(IBinder token) {
        final long origId = Binder.clearCallingIdentity();
        synchronized(this) {
            ActivityStack stack = ActivityRecord.getStackLocked(token);
            if (stack != null) {
                stack.activityResumedLocked(token);
            }
            ActivityRecord.activityResumedLocked(token);
        }
        Binder.restoreCallingIdentity(origId);
    }
@@ -6936,7 +6934,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        synchronized (this) {
            final ActivityRecord r = ActivityRecord.isInStackLocked(token);
            if (r != null) {
                r.getStack().activityStoppedLocked(r, icicle, persistentState, description);
                r.activityStoppedLocked(icicle, persistentState, description);
            }
        }
@@ -19117,7 +19115,8 @@ public final class ActivityManagerService extends ActivityManagerNative
            }
            if (starting != null) {
                kept = mainStack.ensureActivityConfigurationLocked(starting, changes, false);
                kept = starting.ensureActivityConfigurationLocked(changes,
                        false /* preserveWindow */);
                // And we need to make sure at this point that all other activities
                // are made visible with the correct configuration.
                mStackSupervisor.ensureActivitiesVisibleLocked(starting, changes,
+529 −13

File changed.

Preview size limit exceeded, changes collapsed.

+51 −557

File changed.

Preview size limit exceeded, changes collapsed.

+4 −6
Original line number Diff line number Diff line
@@ -1619,7 +1619,7 @@ public final class ActivityStackSupervisor extends ConfigurationContainer
            // We'll update with whatever configuration it now says
            // it used to launch.
            if (config != null) {
                r.mLastReportedConfiguration.setTo(config);
                r.setLastReportedConfiguration(config);
            }

            // We are now idle.  If someone is waiting for a thumbnail from
@@ -2255,11 +2255,9 @@ public final class ActivityStackSupervisor extends ConfigurationContainer
        if (updatedConfig) {
            final ActivityRecord r = task.topRunningActivityLocked();
            if (r != null) {
                final ActivityStack stack = r.getStack();
                kept = stack.ensureActivityConfigurationLocked(r, 0, preserveWindow);
                kept = r.ensureActivityConfigurationLocked(0 /* globalChanges */, preserveWindow);

                if (!deferResume) {

                    // All other activities must be made visible with their correct configuration.
                    ensureActivitiesVisibleLocked(r, 0, !PRESERVE_WINDOWS);
                    if (!kept) {
@@ -2884,12 +2882,12 @@ public final class ActivityStackSupervisor extends ConfigurationContainer
    }

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

        r.mLaunchTaskBehind = false;
        task.setLastThumbnailLocked(stack.screenshotActivitiesLocked(r));
        task.setLastThumbnailLocked(r.screenshotActivityLocked());
        mRecentTasks.addLocked(task);
        mService.notifyTaskStackChangedLocked();
        mWindowManager.setAppVisibility(r.appToken, false);
+2 −1
Original line number Diff line number Diff line
@@ -385,7 +385,8 @@ public final class CompatModePackages {
            }

            if (starting != null) {
                stack.ensureActivityConfigurationLocked(starting, 0, false);
                starting.ensureActivityConfigurationLocked(0 /* globalChanges */,
                        false /* preserveWindow */);
                // And we need to make sure at this point that all other activities
                // are made visible with the correct configuration.
                stack.ensureActivitiesVisibleLocked(starting, 0, !PRESERVE_WINDOWS);
Loading