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

Commit 21713ac8 authored by Andrii Kulian's avatar Andrii Kulian
Browse files

ActivityStack cleanup

- Moved some methods that mostly operate with internals of
  ActivityRecord and/or logically should belong their to
  ActivityRecord class.
- Reduced visibility of some methods and fields.
- Other minor cleanups.

Test: Manual and existing tests still pass.
Change-Id: I87ed6987c88512dda3cd69fa43a1f093d47d0bff
parent 1779e610
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,
Loading