From ad217d4db0dbf7e1b863068c99df16dfa31c12da Mon Sep 17 00:00:00 2001 From: Sudheer Shanka Date: Tue, 11 Sep 2018 16:07:37 -0700 Subject: [PATCH] Increate netpolicy history size. This is going to increase system_server's memory footprint by ~40KB but without increasing this size, we're not able to capture more than a couple of seconds of events which makes it difficult to understand what's going on in the bugs like b/114466242, b/112485285. Bug: 111890351 Test: manual Change-Id: I4484d6535adf869921e6cba32d0564934448c3b1 --- .../core/java/com/android/server/net/NetworkPolicyLogger.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/net/NetworkPolicyLogger.java b/services/core/java/com/android/server/net/NetworkPolicyLogger.java index b4bc7f507701d..452b699667b7e 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyLogger.java +++ b/services/core/java/com/android/server/net/NetworkPolicyLogger.java @@ -46,9 +46,9 @@ public class NetworkPolicyLogger { static final boolean LOGV = Log.isLoggable(TAG, Log.VERBOSE); private static final int MAX_LOG_SIZE = - ActivityManager.isLowRamDeviceStatic() ? 20 : 50; + ActivityManager.isLowRamDeviceStatic() ? 100 : 400; private static final int MAX_NETWORK_BLOCKED_LOG_SIZE = - ActivityManager.isLowRamDeviceStatic() ? 50 : 100; + ActivityManager.isLowRamDeviceStatic() ? 100 : 400; private static final int EVENT_TYPE_GENERIC = 0; private static final int EVENT_NETWORK_BLOCKED = 1;