From 8ad2af7e5b28f71e7bdfc1bb097937c6c1d22b18 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 17 Mar 2015 17:00:24 -0700 Subject: First stab at device idle mode. Introduce a new device idle controller service that monitor's the device state and determines when to go in to idle mode. When in idle mode, all we do right now is turn off network access the same as we do for power save mode. Many more things should come in the future -- stopping the alarm manager from scheduling (most) alarms, telling GmsCore for it to stop doing stuff, etc. Battery stats now has state tracking for devie idle mode, as well as events for the reasons we can come out of idle mode (significant motion or the device becoming active). Also added new events noting when packages are installed. Renamed the "low power" event in battery stats to "power save" because the former was just way too confusing. Finally, fix buffer size reading kernel wake locks. (Stupidly, just increasing the buffer size. Ideally we should try to be smarter and grow our buffer to fit the data available, but I'll leave that for another time.) Change-Id: I0be2062466c83ee9d890c6cf5a228d9cc4090eca --- services/java/com/android/server/SystemServer.java | 1 + 1 file changed, 1 insertion(+) (limited to 'services/java/com/android/server') diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index a0c7f86..ed55c56 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -960,6 +960,7 @@ public final class SystemServer { if (!disableNonCoreServices) { mSystemServiceManager.startService(MediaProjectionManagerService.class); + mSystemServiceManager.startService(DeviceIdleController.class); } // Before things start rolling, be sure we have decided whether -- cgit v1.1