AI 143800: am: CL 143748 Fix issue #1743326 (More battery stats)
Adds stats for:
- Number of raw user events that have happened in the system.
- Number of times user activity has been reported, dividied by UID and type of activity.
- Duration of screen brightness levels in 4 buckets.
- Per-UID tracking of who has turned on Wifi and how long we can attribute it being on because of them.
Original author: hackbod
Merged from: //branches/cupcake/...
Automated import of CL 143800
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 2e16157..270d15f 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -5085,6 +5085,11 @@
} else {
eventType = LocalPowerManager.OTHER_EVENT;
}
+ try {
+ mBatteryStats.noteInputEvent();
+ } catch (RemoteException e) {
+ // Ignore
+ }
mPowerManager.userActivity(curTime, false, eventType);
switch (ev.classType) {
case RawInputEvent.CLASS_KEYBOARD: