History log of /frameworks/base/core/java/android/app/usage/TimeSparseArray.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
60aa35b756707a16d310c222a36edbcef9d56ed4 25-Apr-2018 Suprabh Shukla <suprabh@google.com> Using a list to store usage events

Moving UsageEvent.Event objects to an array list sorted on the event
timestamps as there can be multiple events with the same timestamps.

Test: atest android.app.usage.EventListTest
Existing tests:
atest android.app.usage.cts.UsageStatsTest

Bug: 74406113
Change-Id: Idc7f2a8db6e5a9499b3b0b74efbf014b17fa495f
/frameworks/base/core/java/android/app/usage/TimeSparseArray.java
8664e9561312c2288fa1ac541ea3d10ef0e4f52d 04-Apr-2018 Daniel Cardenas <danielcar@google.com> Reduce log spam in TimeSparseArray

Change-Id: I8574f9e84be4e27be3946ed361475691d6ea03e0
Fixes: 77587733
Test: Build, excersize elfin device, monitor for logspam
/frameworks/base/core/java/android/app/usage/TimeSparseArray.java
a2cf00a011e634f98b7e86ee025bfe489ec15f4f 28-Mar-2018 Suprabh Shukla <suprabh@google.com> Optimizing TimeSparseArray#put in case of collisions

Adding a linear check instead of binary searching everytime. Logging
only when the displacement is greater than 10 millis.

Test: python system/extras/boottime_tools/bootanalyze/bootanalyze.py\
-r -c system/extras/boottime_tools/bootanalyze/config.yaml -n 10
and
atest android.app.usage.TimeSparseArrayTest

Bug: 76435713
Change-Id: I8f4df59e84fc196d0f63f9433d01ebc759f104c4
/frameworks/base/core/java/android/app/usage/TimeSparseArray.java
2811d92483d8cad0c69309ce4f2ca42866fb1774 23-Mar-2018 Suprabh Shukla <suprabh@google.com> Guarding collisions in TimeSparseArray

TimeSparseArray - used to store UsageEvents - can keep at most one event
per millisecond, which can result in an event being replaced by another
event that occurred close enough that the system records it at the same
millisecond.

Test: atest android.app.usage.TimeSparseArrayTest

Fixes: 73832306
Change-Id: I860a101ab098f65d5c5832758832f43572865690
/frameworks/base/core/java/android/app/usage/TimeSparseArray.java
3516800b611a79339a3c188332d13a26e9086b09 22-Jul-2014 Adam Lesinski <adamlesinski@google.com> Second iteration of the UsageStats API

Based on feedback from API council, updated the API.
Also added support for querying the event log.

Change-Id: Ibaa008b9e5bd145acdfe8e20c25c2ed2d96be123
/frameworks/base/core/java/android/app/usage/TimeSparseArray.java
0debc9aff4c0cbc28e083a948081d91b0f171319 17-Jul-2014 Adam Lesinski <adamlesinski@google.com> First iteration of a public UsageStats API

UsageStats API that allows apps to get a list of packages that have been
recently used, along with basic stats like how long they have been in
the foreground and the most recent time they were running.

Bug: 15165667

Change-Id: I2a2d1ff69bd0b5703ac3d9de1780df42ad90d439
/frameworks/base/core/java/android/app/usage/TimeSparseArray.java