Loading services/core/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -15952,7 +15952,7 @@ public final class ActivityManagerService extends ActivityManagerNative int changes = 0; if (app.curAdj != app.setAdj) { ProcessList.setOomAdj(app.pid, app.curAdj); ProcessList.setOomAdj(app.pid, app.info.uid, app.curAdj); if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Slog.v( TAG, "Set " + app.pid + " " + app.processName + " adj " + app.curAdj + ": " + app.adjType); services/core/java/com/android/server/am/ProcessList.java +4 −2 Original line number Diff line number Diff line Loading @@ -519,17 +519,19 @@ final class ProcessList { * Set the out-of-memory badness adjustment for a process. * * @param pid The process identifier to set. * @param uid The uid of the app * @param amt Adjustment value -- lmkd allows -16 to +15. * * {@hide} */ public static final void setOomAdj(int pid, int amt) { public static final void setOomAdj(int pid, int uid, int amt) { if (amt == UNKNOWN_ADJ) return; ByteBuffer buf = ByteBuffer.allocate(4 * 3); ByteBuffer buf = ByteBuffer.allocate(4 * 4); buf.putInt(LMK_PROCPRIO); buf.putInt(pid); buf.putInt(uid); buf.putInt(amt); writeLmkd(buf); } Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -15952,7 +15952,7 @@ public final class ActivityManagerService extends ActivityManagerNative int changes = 0; if (app.curAdj != app.setAdj) { ProcessList.setOomAdj(app.pid, app.curAdj); ProcessList.setOomAdj(app.pid, app.info.uid, app.curAdj); if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Slog.v( TAG, "Set " + app.pid + " " + app.processName + " adj " + app.curAdj + ": " + app.adjType);
services/core/java/com/android/server/am/ProcessList.java +4 −2 Original line number Diff line number Diff line Loading @@ -519,17 +519,19 @@ final class ProcessList { * Set the out-of-memory badness adjustment for a process. * * @param pid The process identifier to set. * @param uid The uid of the app * @param amt Adjustment value -- lmkd allows -16 to +15. * * {@hide} */ public static final void setOomAdj(int pid, int amt) { public static final void setOomAdj(int pid, int uid, int amt) { if (amt == UNKNOWN_ADJ) return; ByteBuffer buf = ByteBuffer.allocate(4 * 3); ByteBuffer buf = ByteBuffer.allocate(4 * 4); buf.putInt(LMK_PROCPRIO); buf.putInt(pid); buf.putInt(uid); buf.putInt(amt); writeLmkd(buf); } Loading