Loading services/core/java/com/android/server/am/OomAdjuster.java +81 −83 Original line number Diff line number Diff line Loading @@ -3313,7 +3313,13 @@ public class OomAdjuster { } final int curSchedGroup = state.getCurrentSchedulingGroup(); if (state.getSetSchedGroup() != curSchedGroup) { if (app.getWaitingToKill() != null && app.mReceivers.numberOfCurReceivers() == 0 && ActivityManager.isProcStateBackground(state.getCurProcState()) && !state.hasStartedServices()) { app.killLocked(app.getWaitingToKill(), ApplicationExitInfo.REASON_USER_REQUESTED, ApplicationExitInfo.SUBREASON_REMOVE_TASK, true); success = false; } else if (state.getSetSchedGroup() != curSchedGroup) { int oldSchedGroup = state.getSetSchedGroup(); state.setSetSchedGroup(curSchedGroup); if (DEBUG_SWITCH || DEBUG_OOM_ADJ || mService.mCurOomAdjUid == app.uid) { Loading @@ -3321,13 +3327,6 @@ public class OomAdjuster { + " to " + curSchedGroup + ": " + state.getAdjType(); reportOomAdjMessageLocked(TAG_OOM_ADJ, msg); } if (app.getWaitingToKill() != null && app.mReceivers.numberOfCurReceivers() == 0 && ActivityManager.isProcStateBackground(state.getSetProcState()) && !state.hasStartedServices()) { app.killLocked(app.getWaitingToKill(), ApplicationExitInfo.REASON_USER_REQUESTED, ApplicationExitInfo.SUBREASON_REMOVE_TASK, true); success = false; } else { int processGroup; switch (curSchedGroup) { case SCHED_GROUP_BACKGROUND: Loading Loading @@ -3360,8 +3359,8 @@ public class OomAdjuster { mService.scheduleAsFifoPriority(renderThreadTid, /* suppressLogs */true); if (DEBUG_OOM_ADJ) { Slog.d("UI_FIFO", "Set RenderThread (TID " + renderThreadTid + ") to FIFO"); Slog.d("UI_FIFO", "Set RenderThread (TID " + renderThreadTid + ") to FIFO"); } } else { if (DEBUG_OOM_ADJ) { Loading Loading @@ -3415,7 +3414,6 @@ public class OomAdjuster { } } } } if (state.hasRepForegroundActivities() != state.hasForegroundActivities()) { state.setRepForegroundActivities(state.hasForegroundActivities()); changes |= ActivityManagerService.ProcessChangeItem.CHANGE_ACTIVITIES; Loading Loading
services/core/java/com/android/server/am/OomAdjuster.java +81 −83 Original line number Diff line number Diff line Loading @@ -3313,7 +3313,13 @@ public class OomAdjuster { } final int curSchedGroup = state.getCurrentSchedulingGroup(); if (state.getSetSchedGroup() != curSchedGroup) { if (app.getWaitingToKill() != null && app.mReceivers.numberOfCurReceivers() == 0 && ActivityManager.isProcStateBackground(state.getCurProcState()) && !state.hasStartedServices()) { app.killLocked(app.getWaitingToKill(), ApplicationExitInfo.REASON_USER_REQUESTED, ApplicationExitInfo.SUBREASON_REMOVE_TASK, true); success = false; } else if (state.getSetSchedGroup() != curSchedGroup) { int oldSchedGroup = state.getSetSchedGroup(); state.setSetSchedGroup(curSchedGroup); if (DEBUG_SWITCH || DEBUG_OOM_ADJ || mService.mCurOomAdjUid == app.uid) { Loading @@ -3321,13 +3327,6 @@ public class OomAdjuster { + " to " + curSchedGroup + ": " + state.getAdjType(); reportOomAdjMessageLocked(TAG_OOM_ADJ, msg); } if (app.getWaitingToKill() != null && app.mReceivers.numberOfCurReceivers() == 0 && ActivityManager.isProcStateBackground(state.getSetProcState()) && !state.hasStartedServices()) { app.killLocked(app.getWaitingToKill(), ApplicationExitInfo.REASON_USER_REQUESTED, ApplicationExitInfo.SUBREASON_REMOVE_TASK, true); success = false; } else { int processGroup; switch (curSchedGroup) { case SCHED_GROUP_BACKGROUND: Loading Loading @@ -3360,8 +3359,8 @@ public class OomAdjuster { mService.scheduleAsFifoPriority(renderThreadTid, /* suppressLogs */true); if (DEBUG_OOM_ADJ) { Slog.d("UI_FIFO", "Set RenderThread (TID " + renderThreadTid + ") to FIFO"); Slog.d("UI_FIFO", "Set RenderThread (TID " + renderThreadTid + ") to FIFO"); } } else { if (DEBUG_OOM_ADJ) { Loading Loading @@ -3415,7 +3414,6 @@ public class OomAdjuster { } } } } if (state.hasRepForegroundActivities() != state.hasForegroundActivities()) { state.setRepForegroundActivities(state.hasForegroundActivities()); changes |= ActivityManagerService.ProcessChangeItem.CHANGE_ACTIVITIES; Loading