8c6f3c507fc77d07ab0c8edd2ff835801cc71e4d |
|
24-May-2017 |
Bookatz <bookatz@google.com> |
Fix batterystat Counter misreporting when charging The BatteryStatsImpl.Counter would previously increment the count even when the timeBase was off. Then, when the timeBase was turned back on, the count would be decreased back to the correct value. Thus, when the timeBase was on, the reported count would be correct, but when the timeBase was off, the reported count would be wrong (too high). Here, we fix this. We also make some other minor improvements. Bug: 36728346 Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java Change-Id: I2fa566a8a4cad4cdff0e6caef37b1eef36a3f5c4
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|
956f36bfe2bcb16080336572e6042ae1ab66c5be |
|
28-Apr-2017 |
Bookatz <bookatz@google.com> |
Add BLE results counter to batterystats Batterystats provides an API to count the number of BLE scan results. Bug: 37720787 Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java Change-Id: Idcb7494b39e88dcbfbb3da1ebe90b8a2f8f4d55c
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|
4a3eda992b70601e26a76d9492b2f9381cf0fe51 |
|
10-Apr-2017 |
Bookatz <bookatz@google.com> |
Fix double-detach DualTimer bug DualTimer attempted to detach its subTimer twice when reset(true) was called, once explicitly and once via a call to the main timer. This fixes that problem by getting rid of the explicit detach in reset. Bug: 37208694 Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java and manually looked for "Removed unknown observer" error in logcat. Change-Id: Ic5ff7d799d46236a74ab0825e108bef40bac0360
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|
ceebafe41a127c18213ca39ddf692ae1cbfb100e |
|
06-Apr-2017 |
Bookatz <bookatz@google.com> |
Fix counting problems in StopwatchTimer. Changed StopwatchTimer so that its count only increases if the timer is started when its time base is running. Previously, if the time base was off, the timer was started, the time base was turned on, and then the timer was stopped, the count would be increased; now, it will not (because the time base was off when the timer started). Moreover, this likely fixes the count==-1 bug that previously could occur, since the count will no longer be decremented if the timer is stopped after a reset. Fixes: 36730213 Bug: 30099724 Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java Change-Id: Iad195e431618629ce432074e0c1bd217f9818cb1
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|
867c0d72af63b67cd0abce8a0f40e94e04193aa6 |
|
08-Mar-2017 |
Bookatz <bookatz@google.com> |
Collect background stats: bluetooth, wifi, sensors Added background times and counts for an app's bluetooth scans, wifi scans, and sensor usage. Note that the original times for these three are pooled (i.e. represent the blame apportioned to an app for using these, rather than the actual time an app used these). Since background times are not pooled, and are therefore incomparable to the original times, an extra time, to represent the actual time, had to also be added in the form of 'total duration' to which background times can be compared. Note that this total duration is now a feature of all DurationTimers and can be used, e.g., to track actual wakelock time (not just apportioned wakelock times). The total duration is the time used since reset, and does not give other 'which' times (such as 'since unplugged'). Bug: 35679958 Bug: 35677312 Bug: 35673525 Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java Change-Id: I4b6943f76517cf5cc9420684857a5592cc7495be
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|
ab9ad195d1e873f7569dec45c4e627a4e8ba67e4 |
|
06-Dec-2016 |
Amith Yamasani <yamasani@google.com> |
Track background sensor usage Keep an additional counter for background access of sensors. Increment the count when sensor is accessed while process is in the background state. Bug: 33553631 Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsSensorTest.java Change-Id: I87d7dbdaf4c34aa9dd9c7e13134d8f5f759f4e2b
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|
92fd23fc6217add0d781b38619fa635add4e15e6 |
|
25-Jul-2016 |
Joe Onorato <joeo@google.com> |
Have BatteryStats track and report the running wakelocks. The times reported are in the screen off / on battery time base. Bug: 29546924 Change-Id: I025b2959becb256a26cf531e944786d4e9a59149
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|
98f0d4692c6634ff5d4ffbbc150d405da66c4c38 |
|
20-Apr-2016 |
Adam Lesinski <adamlesinski@google.com> |
Record in progress count when parceling Timer The total time is computed before parceling, but the total count is not. Bug:27747854 Change-Id: If3afdca9605f74d96a54fb9df17f6df761b99e55
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|
abded113bde548734600dc1b6e4ce2e94f48e32e |
|
09-Feb-2016 |
Joe Onorato <joeo@google.com> |
Add unit tests for BatteryStatsImpl. - Add a Clocks interface to wrap SystemClock.uptimeMillis and SystemClock.elapsedRealtime. - Make the inner classes static so they can be created independently, which meant passing explicit pointers to the BatteryStatsImpl and the Uid objects in a lot of places. - Make several fields protected so they can be accessed by the tests (they are still @hidden) - Add a test suite for the battery stats. - Add the tests Change-Id: I4e45afedc64f7050985c28a7eb4f5c1ddbaa63fa
/frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
|