From eff08c4ffe41e0a52ddd2c8c9d968482bae5935d Mon Sep 17 00:00:00 2001 From: Akira Numata Date: Thu, 13 Mar 2014 13:36:31 +0900 Subject: [PATCH] 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 --- services/java/com/android/server/am/ActivityManagerService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 91565e37b4970..97696a5d8fbfc 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -12435,6 +12435,7 @@ public final class ActivityManagerService extends ActivityManagerNative app.foregroundActivities = false; app.hasShownUi = false; app.hasAboveClient = false; + app.hasClientActivities = false; mServices.killServicesLocked(app, allowRestart);