Insufficient ProcessRecord cleanup when persistent process is killed
When persistent process with Service restarts, ActivityManagerService
does not reset ProcessRecord#hasClientActivites to false
(because ProcessRecord of persistent process is continued using
after killing).
It disturbs updating LRU list in ActivityManagerService, and then,
when new process calls ActivityManagerProxy#publishContentProviders,
SecurityException happens because of no entry in the list.
Bug: 13517358
Change-Id: I46b064f71a4f7025ade1bf117801352a7ab22e6a
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 91565e3..97696a5 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -12435,6 +12435,7 @@
app.foregroundActivities = false;
app.hasShownUi = false;
app.hasAboveClient = false;
+ app.hasClientActivities = false;
mServices.killServicesLocked(app, allowRestart);