History log of /frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2dfb91412c27581d27b7eba172912d2893d69abe 23-Jul-2015 Adam Lesinski <adamlesinski@google.com> UsageStats: Reduce log spam during time change

With lots of usage stats files, the log gets spammy
when the time changes and we are moving files around.

Bug:22549399
Change-Id: I9da39399b090066d52568dea6fc5b59aba063c5a
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
e03f17c82eac7b6ce55e434fab29c7c428b46baa 23-Jul-2015 Adam Lesinski <adamlesinski@google.com> UsageStats: Gracefully handle corrupt filenames

Not sure how useful this is, since renames should be atomic. If the filesystem
is corrupt I'm sure other parts of the system will break. Good to be safe though!

Bug:22172659
Change-Id: Iad339be2869d170bcf736c59feb93830a51905e1
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
55717a613c23fc6b05cab86c3b0de283a027e9f6 04-Apr-2015 Amith Yamasani <yamasani@google.com> Mark apps as not-idle at least once

On a fresh boot or update to M, mark existing apps
as being used if there is no existing entry in the
usage stats. On subsequent OTAs, make sure that at
least the new system apps are marked as used.

Reduce idle threshold to 1 day.

Bug: 20066058
Change-Id: I9a273c051d04432877bacd381c85bf6e721c1a85
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
3a0831bfe6e69a2ad11b9f6fae04fb27daa40a88 02-Mar-2015 Adam Lesinski <adamlesinski@google.com> Fix issue where pruned UsageStats files would not be removed from index

This would cause an exception to be thrown when querying stats
that included a deleted file and cause only in-memory stats to be
returned.

This change now re-indexes after deleting files.

Furthermore, we continue reading UsageStats files in order
to return more useful data if some other issue (file corruption)
leads us to fail reading a file.

Change-Id: I4a52739624d68e719e3d7d324a0b16709a62ac7a
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
0fb25fae8f664f7c9f4cb7e29b03824a16becd5c 08-Nov-2014 Adam Lesinski <adamlesinski@google.com> UsageStatsService: Update file index to prevent double checkin

We seem to have renamed a file as checked-in twice, which means
we checked it in twice and created a malformed name with the suffix
"-c-c" instead of the correct suffix "-c".

Bug:18280677
Change-Id: Ie3164010898a333e5d9b97151d285ea376de799e
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
32e580604d7b0a093750178127693a804bea134c 04-Nov-2014 Adam Lesinski <adamlesinski@google.com> Fix bug where checking-in more than once would cause an infinite loop in UsageStatsService

- Forgot to increment loop variable :S

Bug:18239732
Change-Id: Ie37a83584d7849108dbfd3bd4cbb595520d488b1
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
1bb18c435dbf967f3a9bc9d680411471b8bab4ac 18-Aug-2014 Adam Lesinski <adamlesinski@google.com> Add dumpsys output to UsageStatsService, along with --checkin support

Bug:17814138
Change-Id: If414ae5f4b8e4a2838f63f52d80e764915cee934
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
a39871ef5e9bf6703f18af0725484b06f5c78216 29-Sep-2014 Brian Carlstrom <bdc@google.com> Use VMRuntime.isBootClassPathOnDisk

Bug: 17679443
Change-Id: If53c236058a7237d735c2344a715cf0a36301f9b
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
66143fa5b34eea7413335111838fb692987b611a 11-Sep-2014 Adam Lesinski <adamlesinski@google.com> UsageStats should deal with changing time

When the system time is changed, the UsageStats API
will modify all existing entries to correspond with the
new time change. If the time changed when the device was
off, stats in the future will be deleted.

Change-Id: Ica3e9917d4d1a180f97700e52ab390e3673e1e82
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
37a46b48dcb7e34ee3669cfb2ed78af08bfca3c7 06-Sep-2014 Adam Lesinski <adamlesinski@google.com> Store time offsets for UsageStats XML

This will make adjusting for time changes easier
in the future.

Change-Id: I49d2dda4cc6dcb1378a58c814849924f585e0417
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
d26bea3a1498d1b327ae37cc796fb8cd67e9c977 04-Sep-2014 Adam Lesinski <adamlesinski@google.com> Returns UsageEvents from previous days

- Avoid writing to disk when querying UsageStats.
- Use new UnixCalendar to avoid issues with Locale and TimeZone.

Bug: 16951313

Change-Id: I2473b8ef8dc1e2f6be22d4c689b96e346bdcafd5
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
7f61e96db7c90c1f4418359672aa4656aebee500 03-Sep-2014 Adam Lesinski <adamlesinski@google.com> Add Configuration changes to UsageStats

Bug:17354208
Change-Id: I9b2f595e51b656607e30e798926cfb7e25134944
/frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.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/services/usage/java/com/android/server/usage/UsageStatsDatabase.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/services/usage/java/com/android/server/usage/UsageStatsDatabase.java