CameraServiceProxy: Add CameraStatsLoggingService, event dumping
- Collect camera usage events (facing, client, duration)
- Create a JobService that triggers roughly daily to dump events
Test: Verify that 'adb shell cmd jobscheduler run android 13254266'
prints out all camera usage since last run
Bug: 32449509
Change-Id: I13172e6e68f5cdb94685a112c74d270d1dda45bf
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index eca285a..c9be3a2 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -775,13 +775,6 @@
mContentResolver = context.getContentResolver();
- if (!disableCameraService) {
- Slog.i(TAG, "Camera Service Proxy");
- traceBeginAndSlog("StartCameraServiceProxy");
- mSystemServiceManager.startService(CameraServiceProxy.class);
- traceEnd();
- }
-
// The AccountManager must come before the ContentService
traceBeginAndSlog("StartAccountManagerService");
mSystemServiceManager.startService(ACCOUNT_SERVICE_CLASS);
@@ -1531,6 +1524,12 @@
}
}
+ if (!disableCameraService) {
+ traceBeginAndSlog("StartCameraServiceProxy");
+ mSystemServiceManager.startService(CameraServiceProxy.class);
+ traceEnd();
+ }
+
// Before things start rolling, be sure we have decided whether
// we are in safe mode.
final boolean safeMode = wm.detectSafeMode();