History log of /frameworks/base/services/tests/servicestests/src/com/android/server/usage/AppIdleHistoryTests.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
61d5fd7fee3250bdf4b6ddfbccbd6bceae9436c6 24-Feb-2017 Amith Yamasani <yamasani@google.com> Reduce screen on delay during UsageStats rollover

Decoupled the app idle book-keeping from usage stats lock, by
introducing an mAppIdleLock. This is used for all state related
to app idle. In some cases, the locks will be nested, with
mLock being acquired first and then mAppIdleLock.

This should fix the situation where a rollover, which writes to
disk and could take several seconds when the system is swamped,
like when the device just came out of idle and the screen was
turned on (like this run-on sentence), causes calls from other
services for app-idle status to be blocked. This was resulting
in a long time to turn on the screen.

Also fixed a dump indentation issue.

Bug: 34627115
Bug: 34961340
Test: Manual, force into idle, increased rollover frequency,
and tested screen on time.

Change-Id: Ie8b44e6f07f82d8a31f1b733a403dd9b6dc310f6
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/AppIdleHistoryTests.java
f2d87eba750d15093c996c1dbae7b755a7462478 18-Aug-2016 Adam Lesinski <adamlesinski@google.com> AppIdleHistory: Only write screen on durations during regular sync

Stop writing to disk every time the display goes off. Only write to
disk periodically.

Consequences

Previously, if the device rebooted after the screen duration was written
to disk, apps would appear more stale than they actually were.

Now apps will always look fresher, which is a better scenario.

Bug:30807864
Change-Id: Ia69a2e51fc9e397789215b449fae56fa3e29c74a
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/AppIdleHistoryTests.java
a93542f9d341897f3206f775fd5720663b17504f 04-Feb-2016 Amith Yamasani <yamasani@google.com> Rewrite app standby stats

Don't mix up with usage stats. Keep a separate db and history
based on elapsed time and screen on time.

Unit tests for AppIdleHistory class.

Bug: 26989006
Change-Id: If343785b46da1db67f7c1c1263854c2732a232c6
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/AppIdleHistoryTests.java