AI 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.
  BUG=1743326

Automated import of CL 143748
This commit is contained in:
Dianne Hackborn
2009-03-31 12:11:48 -07:00
committed by The Android Open Source Project
parent 3f46f0a0cd
commit 65c8e11a31
9 changed files with 623 additions and 80 deletions

View File

@@ -5085,6 +5085,11 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
} else {
eventType = LocalPowerManager.OTHER_EVENT;
}
try {
mBatteryStats.noteInputEvent();
} catch (RemoteException e) {
// Ignore
}
mPowerManager.userActivity(curTime, false, eventType);
switch (ev.classType) {
case RawInputEvent.CLASS_KEYBOARD: