Adding idle maintenance service.
It is beneficial that there is a mechanism on the platform
to notify applications whether it is safe to perform somehow
expensive operations while the user is not using the device.
Thus, user experience will not be degraded. An example is
discarding of unused blocks on a mounted file system instead
of doing this on every write operation.
bug:8056794
Change-Id: I708bad9d3ce6c8f1d5a1c05c0abf46f81a3d464b
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 39ee47e..949c2ed 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -255,7 +255,7 @@
}
ActivityManagerService.setSystemProcess();
-
+
Slog.i(TAG, "User Service");
ServiceManager.addService(Context.USER_SERVICE,
UserManagerService.getInstance());
@@ -736,6 +736,13 @@
reportWtf("starting DreamManagerService", e);
}
}
+
+ try {
+ Slog.i(TAG, "IdleMaintenanceService");
+ new IdleMaintenanceService(context);
+ } catch (Throwable e) {
+ reportWtf("starting IdleMaintenanceService", e);
+ }
}
// Before things start rolling, be sure we have decided whether