From 0fe3c2565833914b7e30df1dc82e3e26fa6de978 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Fri, 19 Sep 2014 15:09:39 -0700 Subject: [PATCH] Fix issue #17574819: Chrome browser process is killed in background... ...due to dying renderer process Don't kill processes if they are bound to a service but not impacting oom adjustment. Change-Id: I1cc44e633feaeaad6e996b79a6cfd7b386c04095 --- services/core/java/com/android/server/am/ActiveServices.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index d38074fb74966..85e0f62256d12 100755 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -2116,7 +2116,8 @@ public final class ActiveServices { boolean hasCreate = false; for (int conni=abind.connections.size()-1; conni>=0; conni--) { ConnectionRecord conn = abind.connections.valueAt(conni); - if ((conn.flags&Context.BIND_AUTO_CREATE) != 0) { + if ((conn.flags&(Context.BIND_AUTO_CREATE|Context.BIND_ALLOW_OOM_MANAGEMENT + |Context.BIND_WAIVE_PRIORITY)) == Context.BIND_AUTO_CREATE) { hasCreate = true; break; }