Loading services/core/java/com/android/server/am/ActivityManagerService.java +9 −2 Original line number Diff line number Diff line Loading @@ -2623,6 +2623,11 @@ public final class ActivityManagerService extends ActivityManagerNative final void removeLruProcessLocked(ProcessRecord app) { int lrui = mLruProcesses.lastIndexOf(app); if (lrui >= 0) { if (!app.killed) { Slog.wtf(TAG, "Removing process that hasn't been killed: " + app); Process.killProcessQuiet(app.pid); Process.killProcessGroup(app.info.uid, app.pid); } if (lrui <= mLruProcessActivityStart) { mLruProcessActivityStart--; } Loading Loading @@ -3206,6 +3211,7 @@ public final class ActivityManagerService extends ActivityManagerNative app.setPid(startResult.pid); app.usingWrapper = startResult.usingWrapper; app.removed = false; app.killed = false; app.killedByAm = false; checkTime(startTime, "startProcess: starting to update pids map"); synchronized (mPidsSelfLocked) { Loading Loading @@ -4804,15 +4810,16 @@ public final class ActivityManagerService extends ActivityManagerNative appDiedLocked(app, app.pid, app.thread); } final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread) { final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread) { BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); synchronized (stats) { stats.noteProcessDiedLocked(app.info.uid, pid); } Process.killProcessQuiet(pid); Process.killProcessGroup(app.info.uid, pid); app.killed = true; // Clean up already done if the process has been re-started. if (app.pid == pid && app.thread != null && Loading services/core/java/com/android/server/am/ProcessRecord.java +5 −2 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ final class ProcessRecord { boolean treatLikeActivity; // Bound using BIND_TREAT_LIKE_ACTIVITY boolean bad; // True if disabled in the bad process list boolean killedByAm; // True when proc has been killed by activity manager, not for RAM boolean killed; // True once we know the process has been killed boolean procStateChanged; // Keep track of whether we changed 'setAdj'. String waitingToKill; // Process is waiting to be killed when in the bg, and reason IBinder forcingToForeground;// Token that is forcing this process to be foreground Loading Loading @@ -303,8 +304,9 @@ final class ProcessRecord { pw.print(" lastLowMemory="); TimeUtils.formatDuration(lastLowMemory, now, pw); pw.print(" reportLowMemory="); pw.println(reportLowMemory); if (killedByAm || waitingToKill != null) { pw.print(prefix); pw.print("killedByAm="); pw.print(killedByAm); if (killed || killedByAm || waitingToKill != null) { pw.print(prefix); pw.print("killed="); pw.print(killed); pw.print(" killedByAm="); pw.print(killedByAm); pw.print(" waitingToKill="); pw.println(waitingToKill); } if (debugging || crashing || crashDialog != null || notResponding Loading Loading @@ -514,6 +516,7 @@ final class ProcessRecord { Process.killProcessQuiet(pid); Process.killProcessGroup(info.uid, pid); if (!persistent) { killed = true; killedByAm = true; } } Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +9 −2 Original line number Diff line number Diff line Loading @@ -2623,6 +2623,11 @@ public final class ActivityManagerService extends ActivityManagerNative final void removeLruProcessLocked(ProcessRecord app) { int lrui = mLruProcesses.lastIndexOf(app); if (lrui >= 0) { if (!app.killed) { Slog.wtf(TAG, "Removing process that hasn't been killed: " + app); Process.killProcessQuiet(app.pid); Process.killProcessGroup(app.info.uid, app.pid); } if (lrui <= mLruProcessActivityStart) { mLruProcessActivityStart--; } Loading Loading @@ -3206,6 +3211,7 @@ public final class ActivityManagerService extends ActivityManagerNative app.setPid(startResult.pid); app.usingWrapper = startResult.usingWrapper; app.removed = false; app.killed = false; app.killedByAm = false; checkTime(startTime, "startProcess: starting to update pids map"); synchronized (mPidsSelfLocked) { Loading Loading @@ -4804,15 +4810,16 @@ public final class ActivityManagerService extends ActivityManagerNative appDiedLocked(app, app.pid, app.thread); } final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread) { final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread) { BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); synchronized (stats) { stats.noteProcessDiedLocked(app.info.uid, pid); } Process.killProcessQuiet(pid); Process.killProcessGroup(app.info.uid, pid); app.killed = true; // Clean up already done if the process has been re-started. if (app.pid == pid && app.thread != null && Loading
services/core/java/com/android/server/am/ProcessRecord.java +5 −2 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ final class ProcessRecord { boolean treatLikeActivity; // Bound using BIND_TREAT_LIKE_ACTIVITY boolean bad; // True if disabled in the bad process list boolean killedByAm; // True when proc has been killed by activity manager, not for RAM boolean killed; // True once we know the process has been killed boolean procStateChanged; // Keep track of whether we changed 'setAdj'. String waitingToKill; // Process is waiting to be killed when in the bg, and reason IBinder forcingToForeground;// Token that is forcing this process to be foreground Loading Loading @@ -303,8 +304,9 @@ final class ProcessRecord { pw.print(" lastLowMemory="); TimeUtils.formatDuration(lastLowMemory, now, pw); pw.print(" reportLowMemory="); pw.println(reportLowMemory); if (killedByAm || waitingToKill != null) { pw.print(prefix); pw.print("killedByAm="); pw.print(killedByAm); if (killed || killedByAm || waitingToKill != null) { pw.print(prefix); pw.print("killed="); pw.print(killed); pw.print(" killedByAm="); pw.print(killedByAm); pw.print(" waitingToKill="); pw.println(waitingToKill); } if (debugging || crashing || crashDialog != null || notResponding Loading Loading @@ -514,6 +516,7 @@ final class ProcessRecord { Process.killProcessQuiet(pid); Process.killProcessGroup(info.uid, pid); if (!persistent) { killed = true; killedByAm = true; } } Loading