Loading services/core/java/com/android/server/am/OomAdjuster.java +61 −63 Original line number Diff line number Diff line Loading @@ -3277,7 +3277,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 @@ -3285,13 +3291,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 @@ -3355,7 +3354,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 +61 −63 Original line number Diff line number Diff line Loading @@ -3277,7 +3277,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 @@ -3285,13 +3291,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 @@ -3355,7 +3354,6 @@ public class OomAdjuster { } } } } if (state.hasRepForegroundActivities() != state.hasForegroundActivities()) { state.setRepForegroundActivities(state.hasForegroundActivities()); changes |= ActivityManagerService.ProcessChangeItem.CHANGE_ACTIVITIES; Loading