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

Commit 530a1559 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Android (Google) Code Review
Browse files

Merge changes Ie0f24598,If49c1b0b

* changes:
  Reduce object allocations in WM in some frequently called methods
  Introduced WindowContainer.mConsumerWrapperPool
parents 93ed9d5f 1e129a42
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1386,6 +1386,8 @@ public class ActivityManagerService extends IActivityManager.Stub
    final long[] mTmpLong = new long[2];
    private final ArraySet<BroadcastQueue> mTmpBroadcastQueue = new ArraySet();
    static final class ProcessChangeItem {
        static final int CHANGE_ACTIVITIES = 1<<0;
        static final int CHANGE_PROCESS_STATE = 1<<1;
@@ -19521,7 +19523,7 @@ public class ActivityManagerService extends IActivityManager.Stub
        int schedGroup;
        int procState;
        boolean foregroundActivities = false;
        final ArraySet<BroadcastQueue> queues = new ArraySet<BroadcastQueue>();
        mTmpBroadcastQueue.clear();
        if (app == TOP_APP) {
            // The last app on the list is the foreground app.
            adj = ProcessList.FOREGROUND_APP_ADJ;
@@ -19535,13 +19537,13 @@ public class ActivityManagerService extends IActivityManager.Stub
            schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
            app.adjType = "instrumentation";
            procState = ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
        } else if (isReceivingBroadcastLocked(app, queues)) {
        } else if (isReceivingBroadcastLocked(app, mTmpBroadcastQueue)) {
            // An app that is currently receiving a broadcast also
            // counts as being in the foreground for OOM killer purposes.
            // It's placed in a sched group based on the nature of the
            // broadcast as reflected by which queue it's active in.
            adj = ProcessList.FOREGROUND_APP_ADJ;
            schedGroup = (queues.contains(mFgBroadcastQueue))
            schedGroup = (mTmpBroadcastQueue.contains(mFgBroadcastQueue))
                    ? ProcessList.SCHED_GROUP_DEFAULT : ProcessList.SCHED_GROUP_BACKGROUND;
            app.adjType = "broadcast";
            procState = ActivityManager.PROCESS_STATE_RECEIVER;
+2 −1
Original line number Diff line number Diff line
@@ -1253,7 +1253,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
            mService.mAnimator.mAppWindowAnimating = true;
        } else if (mAppAnimator.wasAnimating) {
            // stopped animating, do one more pass through the layout
            setAppLayoutChanges(FINISH_LAYOUT_REDO_WALLPAPER, "appToken " + this + " done");
            setAppLayoutChanges(FINISH_LAYOUT_REDO_WALLPAPER,
                    DEBUG_LAYOUT_REPEATS ? "appToken " + this + " done" : null);
            if (DEBUG_ANIM) Slog.v(TAG, "updateWindowsApps...: done animating " + this);
        }
    }
Loading