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

Commit 09c9df3f authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Remove the redundant capability changes from process change event" into udc-dev

parents 9001a6e4 03b6e853
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()) {