From 9878bb99b77c3681f0fda116e2964bac26f349c3 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Mon, 18 Apr 2016 15:16:31 -0700 Subject: Kill the real/isolated uid group, not the ApplicationInfo uid This is a direct reimplementation in L of fixes applied to N in these two commits: 8dc8d37c1d7d694016f1ec2b3cea5fb723567be8 e8741d23d2dd05c4cb3fed5ee6a4040ee96a60e3 Bug 19285814 Change-Id: I59bcc8f1d41c426e9da635bea9ad1d7c6756d5aa Resolve merge conflict when cp'ing ag/941553 to mnc-mr1-release branch --- .../core/java/com/android/server/am/ActivityManagerService.java | 6 +++--- services/core/java/com/android/server/am/ProcessRecord.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index b4d2746..33d0a9f 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -2814,7 +2814,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (!app.killed) { Slog.wtfStack(TAG, "Removing process that hasn't been killed: " + app); Process.killProcessQuiet(app.pid); - killProcessGroup(app.info.uid, app.pid); + killProcessGroup(app.uid, app.pid); } if (lrui <= mLruProcessActivityStart) { mLruProcessActivityStart--; @@ -3189,7 +3189,7 @@ public final class ActivityManagerService extends ActivityManagerNative // clean it up now. if (DEBUG_PROCESSES || DEBUG_CLEANUP) Slog.v(TAG_PROCESSES, "App died: " + app); checkTime(startTime, "startProcess: bad proc running, killing"); - killProcessGroup(app.info.uid, app.pid); + killProcessGroup(app.uid, app.pid); handleAppDiedLocked(app, true, true); checkTime(startTime, "startProcess: done killing old proc"); } @@ -4705,7 +4705,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (!fromBinderDied) { Process.killProcessQuiet(pid); } - killProcessGroup(app.info.uid, pid); + killProcessGroup(app.uid, pid); app.killed = true; } diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java index 697b4e2..3e9d0b8 100644 --- a/services/core/java/com/android/server/am/ProcessRecord.java +++ b/services/core/java/com/android/server/am/ProcessRecord.java @@ -548,7 +548,7 @@ final class ProcessRecord { } EventLog.writeEvent(EventLogTags.AM_KILL, userId, pid, processName, setAdj, reason); Process.killProcessQuiet(pid); - Process.killProcessGroup(info.uid, pid); + Process.killProcessGroup(uid, pid); if (!persistent) { killed = true; killedByAm = true; -- cgit v1.1