Don't kill home process with the rest of its package.
Killing the GEL search results was killing everything in its package.
This fix keeps the home process from being killed when a task in its
package is killed.
Fixes bug 10927223.
Change-Id: I56e75f0a0118885a1604cbd70320bbdb4f8cf1a2
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index a14d729..e2ae245 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -6786,6 +6786,10 @@
// Kill the running processes.
for (int i=0; i<procs.size(); i++) {
ProcessRecord pr = procs.get(i);
+ if (pr == mHomeProcess) {
+ // Don't kill the home process along with tasks from the same package.
+ continue;
+ }
if (pr.setSchedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE) {
killUnneededProcessLocked(pr, "remove task");
} else {