History log of /frameworks/base/services/usage/java/com/android/server/usage/AppIdleHistory.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/usage/java/com/android/server/usage/AppIdleHistory.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/usage/java/com/android/server/usage/AppIdleHistory.java
bdda1e076eb30bf88749a1a349f9bb6f52434ecd 14-Mar-2016 Amith Yamasani <yamasani@google.com> Clear app idle state for removed packages

On a package being added or removed, remove
app idle state for the app.

Bug: 27570398
Bug: 26182816
Change-Id: I14bdc1f951bbd99bda8111bea56f8c9dda04148d
/frameworks/base/services/usage/java/com/android/server/usage/AppIdleHistory.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/usage/java/com/android/server/usage/AppIdleHistory.java
6776849dc5ff851a225745393f082b702754e278 09-Jun-2015 Amith Yamasani <yamasani@google.com> Report app standby state to batterystats

Also reduce idle checks to the target user if possible.
Optimized calls to some internal methods

Bug: 21639147
Change-Id: If1faf26f862e5c4ca905f2603a4ba52a8d1af954
/frameworks/base/services/usage/java/com/android/server/usage/AppIdleHistory.java
0a11e69428d4c00dfcb368c1eb4e60ad8e0dc918 09-May-2015 Amith Yamasani <yamasani@google.com> Track app idle history and dump it

"dumpsys usagestats history" will show the
active state of each app for the last 100 hours,
if the device hasn't rebooted.

Bug: 20066058
Change-Id: I703e5bc121298e4363c202da56fffb0b8534bcaf
/frameworks/base/services/usage/java/com/android/server/usage/AppIdleHistory.java