Merge commit '287952c35e148811c106bc0f5036eabf20f71562' into gingerbread-plus-aosp
* commit '287952c35e148811c106bc0f5036eabf20f71562':
Fix issue #3022508: Crash during media scan
Don't kill processes for excessive wake lock use, even if they
are in the background, as long as they have running services.
Also fix some problems with this, such as not noting the kill
in battery stats.
And add killing of processes for cpu usage as well, along with
some optimizations to computing CPU usage.
And fix BatteryWaster to be better behaving for testing these
cases.
Add new "monitor" command to am to watch as the activity manager
does stuff (so we can catch things at the point of ANR).
Finally some miscellaneous debug output for the stuff here, as
well as in progress debugging of an ANR.
Change-Id: Ib32f55ca50fb7486b4be4eb5e695f8f60c882cd1
Merge commit '22cd420bfa431b4ad55e699afadf109dcc54f201' into gingerbread-plus-aosp
* commit '22cd420bfa431b4ad55e699afadf109dcc54f201':
Improve debug output when an ANR happens.
- Collect data at better times.
- Collect per-thread CPU usage as soon as possible after the ANR, and print
in log.
- Based on new per-thread CPU usage, limit the number of processes we
collect stacks from to not include inactive not interesting procs.
- Improve the way ProcessStats compute and reports its data.
Change-Id: I12b17fb47d593d175be69bb792c1f57179bf4fdf
More CPU speed stepping happening with newer devices, so we need
to qualify CPU time with the CPU speed, since power consumption
varies greatly by speed. Apps that peg the CPU should get a higher
penaltly.
Also, fix for 2062930: NPE at VolumePreference.onKey()
Track the foreground CPU time of an activity so that we can tell if apps are
spending more time in the background compared to foreground.
Update power profile values for screen backlight and GPS.
Fix some javadoc bugs (milliseconds vs. microseconds).