OSDN Git Service

Increase Binder Proxy Limit to 6000 for SYSTEM
authorMichael Wachenschwanz <mwachens@google.com>
Wed, 6 Jun 2018 22:04:22 +0000 (15:04 -0700)
committerMichael Wachenschwanz <mwachens@google.com>
Thu, 7 Jun 2018 17:23:07 +0000 (17:23 +0000)
Workaround for issue with SysUi creating too many Binder Proxies.
Increasing the limit reduces the chance of a SysUi restart but increases the risk of a misbehaving app consuming system resources

Bug:109701487
Test: manual (generate 6000 Binder Proxies)
Change-Id: I11929cf41f9126bb095abb095c723dd892a51cb4

services/core/java/com/android/server/am/ActivityManagerService.java

index 2458234..6d81163 100644 (file)
@@ -15311,6 +15311,7 @@ public class ActivityManagerService extends IActivityManager.Stub
             mStackSupervisor.resumeFocusedStackTopActivityLocked();
             mUserController.sendUserSwitchBroadcasts(-1, currentUserId);
 
+            BinderInternal.nSetBinderProxyCountWatermarks(6000,5500);
             BinderInternal.nSetBinderProxyCountEnabled(true);
             BinderInternal.setBinderProxyCountCallback(
                     new BinderInternal.BinderProxyLimitListener() {