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

Commit b2c90606 authored by Jing Ji's avatar Jing Ji Committed by Automerger Merge Worker
Browse files

Merge "Remove the redundant capability changes from process change event" into...

Merge "Remove the redundant capability changes from process change event" into udc-dev am: 09c9df3f am: 056413e0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23482557



Change-Id: Id11aabfacf3a355605970cac0aa38602969b6c3b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fa680187 056413e0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1489,12 +1489,10 @@ public class ActivityManagerService extends IActivityManager.Stub
    static final class ProcessChangeItem {
        static final int CHANGE_ACTIVITIES = 1<<0;
        static final int CHANGE_FOREGROUND_SERVICES = 1<<1;
        static final int CHANGE_CAPABILITY = 1<<2;
        int changes;
        int uid;
        int pid;
        int processState;
        int capability;
        boolean foregroundActivities;
        int foregroundServiceTypes;
    }
+1 −3
Original line number Diff line number Diff line
@@ -3188,7 +3188,6 @@ public class OomAdjuster {
        }

        if (state.getCurCapability() != state.getSetCapability()) {
            changes |= ActivityManagerService.ProcessChangeItem.CHANGE_CAPABILITY;
            state.setSetCapability(state.getCurCapability());
        }

@@ -3212,13 +3211,12 @@ public class OomAdjuster {
                    mProcessList.enqueueProcessChangeItemLocked(app.getPid(), app.info.uid);
            item.changes |= changes;
            item.foregroundActivities = state.hasRepForegroundActivities();
            item.capability = state.getSetCapability();
            if (DEBUG_PROCESS_OBSERVERS) Slog.i(TAG_PROCESS_OBSERVERS,
                    "Item " + Integer.toHexString(System.identityHashCode(item))
                            + " " + app.toShortString() + ": changes=" + item.changes
                            + " foreground=" + item.foregroundActivities
                            + " type=" + state.getAdjType() + " source=" + state.getAdjSource()
                            + " target=" + state.getAdjTarget() + " capability=" + item.capability);
                            + " target=" + state.getAdjTarget());
        }

        if (state.isCached() && !state.shouldNotKillOnBgRestrictedAndIdle()) {