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

Commit 16966a34 authored by Hugo Benichi's avatar Hugo Benichi Committed by Android (Google) Code Review
Browse files

Merge "am: regroup debug conditionals in OomAdjuster" into main

parents 727798ed 49546f9f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2205,6 +2205,9 @@ public abstract class OomAdjuster {
        final ProcessRecordInternal state = app;
        final UidRecordInternal uidRec = app.getUidRecord();

        final boolean reportDebugMsgs =
                DEBUG_SWITCH || DEBUG_OOM_ADJ || mService.mCurOomAdjUid == app.info.uid;

        if (state.getCurRawAdj() != state.getSetRawAdj()) {
            state.setSetRawAdj(state.getCurRawAdj());
        }
@@ -2223,7 +2226,7 @@ public abstract class OomAdjuster {
                mInjector.setOomAdj(app.getPid(), app.uid, state.getCurAdj());
            }

            if (DEBUG_SWITCH || DEBUG_OOM_ADJ || mService.mCurOomAdjUid == app.info.uid) {
            if (reportDebugMsgs) {
                String msg = "Set " + app.getPid() + " " + app.processName + " adj "
                        + state.getCurAdj() + ": " + state.getAdjType();
                reportOomAdjMessageLocked(TAG_OOM_ADJ, msg);
@@ -2245,7 +2248,7 @@ public abstract class OomAdjuster {
        } else if (state.getSetSchedGroup() != curSchedGroup) {
            int oldSchedGroup = state.getSetSchedGroup();
            state.setSetSchedGroup(curSchedGroup);
            if (DEBUG_SWITCH || DEBUG_OOM_ADJ || mService.mCurOomAdjUid == app.uid) {
            if (reportDebugMsgs) {
                String msg = "Setting sched group of " + app.processName
                        + " to " + curSchedGroup + ": " + state.getAdjType();
                reportOomAdjMessageLocked(TAG_OOM_ADJ, msg);
@@ -2357,7 +2360,7 @@ public abstract class OomAdjuster {
        }
        int oldProcState = state.getSetProcState();
        if (state.getSetProcState() != state.getCurProcState()) {
            if (DEBUG_SWITCH || DEBUG_OOM_ADJ || mService.mCurOomAdjUid == app.uid) {
            if (reportDebugMsgs) {
                String msg = "Proc state change of " + app.processName
                        + " to " + ProcessList.makeProcStateString(state.getCurProcState())
                        + " (" + state.getCurProcState() + ")" + ": " + state.getAdjType();