From a7778b065428af7f23605053f939a668dd297182 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Tue, 28 Jun 2016 10:38:59 -0700 Subject: Fixed whitelistManager set on unbindServiceLocked() It must call updateWhitelistManagerLocked() because the app might have other services with the whitelistManager set, in which case the process record should not have whitelistManager reset. Fixes: 29480440 Change-Id: I268278c646aaa89a352f02178b294c02c3c11d35 --- services/core/java/com/android/server/am/ActiveServices.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index d9148817881b..ee2fa51c8666 100755 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -1148,9 +1148,7 @@ public final class ActiveServices { if (r.binding.service.app != null) { if (r.binding.service.app.whitelistManager) { - // Must reset flag here because on computeOomAdjLocked() the service - // connection will be gone... - r.binding.service.app.whitelistManager = false; + updateWhitelistManagerLocked(r.binding.service.app); } // This could have made the service less important. if ((r.flags&Context.BIND_TREAT_LIKE_ACTIVITY) != 0) { -- cgit v1.2.3-59-g8ed1b