diff options
| author | 2017-01-19 20:25:03 -0700 | |
|---|---|---|
| committer | 2017-01-19 20:25:06 -0700 | |
| commit | 063c454b07f7d4079731c60cff1ba4bf97d1f7ef (patch) | |
| tree | c5dcec9474cea58952c0db0073582ab449598575 /services/usage/java | |
| parent | f96e22429cc5ce90b534581b83dd7c8bd099be13 (diff) | |
Disable kernel UID updates until update lands.
Current prebuilt kernel can result in the framework banging its head
against the wall writing the first duplicate update; it does this by
returning 0 for write().
We can revert this or flip the flag once an updated kernel lands.
Test: builds, boots
Bug: 33755020
Change-Id: Idb3e5ad40e2e6681848b47ce2b29dff9db3d4f6f
Diffstat (limited to 'services/usage/java')
| -rw-r--r-- | services/usage/java/com/android/server/usage/UsageStatsService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java index d243bf23ac93..6dfb48bfbcf9 100644 --- a/services/usage/java/com/android/server/usage/UsageStatsService.java +++ b/services/usage/java/com/android/server/usage/UsageStatsService.java @@ -106,6 +106,7 @@ public class UsageStatsService extends SystemService implements private static final long FLUSH_INTERVAL = COMPRESS_TIME ? TEN_SECONDS : TWENTY_MINUTES; private static final long TIME_CHANGE_THRESHOLD_MILLIS = 2 * 1000; // Two seconds. + private static final boolean ENABLE_KERNEL_UPDATES = false; private static final File KERNEL_COUNTER_FILE = new File("/proc/uid_procstat/set"); long mAppIdleScreenThresholdMillis; @@ -241,7 +242,7 @@ public class UsageStatsService extends SystemService implements postOneTimeCheckIdleStates(); } - if (KERNEL_COUNTER_FILE.exists()) { + if (ENABLE_KERNEL_UPDATES && KERNEL_COUNTER_FILE.exists()) { try { ActivityManager.getService().registerUidObserver(mUidObserver, ActivityManager.UID_OBSERVER_PROCSTATE |