History log of /frameworks/base/services/java/com/android/server/am/UsageStatsService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1afd1c90ebe789b8d3a137004127a50d2db7e3b5 19-Mar-2010 Dianne Hackborn <hackbod@google.com> Maybe fix issue #2457218: Corrupt batterystats.bin file preventing phone boot - LIBtt68127

No steps to repro, but makes the code more robust by using the standard
JournaledFile class and doing sanity checks on the input it reads.

This required moving the JournaledFile class in to the framework (and
we really should get rid of either it or AtomicFile, but they have
different recovery semantics so that is tough). Also went through and
cleaned up the file management in various places.

Change-Id: Ieb7268d8435e77dff66b6e67bb63b62e5dea572e
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
8a9b22056b13477f59df934928c00c58b5871c95 27-Feb-2010 Joe Onorato <joeo@android.com> Switch the services library to using the new Slog
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
be1c422a73cf70e1478a13463de5ab929991c619 04-Dec-2009 Suchi Amalapurapu <asuchitra@google.com> If the usage stats file doesn't exist in the first place there is no need to
backup and short return.
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
8550f255232eb4e4852466c5297fdc125887f5af 30-Sep-2009 Suchi Amalapurapu <asuchitra@google.com> Check if rename of backed up file fails before persisting new changes.
If not these system services will end up with inconsistent settings files
when the device runs out of storage.
Delete mangled settings file in PackageManager if the current write fails
so that we don't end up overwriting the backed up version with the
mangled version
Include null check when retrieving fwd locked resource for an existing package
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
6639bb65c5ebb9493afba6d701a22223ac45ba04 13-Aug-2009 Christian Sonntag <cxs@dhcp-172-31-153-155.sfo.corp.google.com> Add a more compact representation of usage stats.

We are replaceing the package name in the activity name with a * iff the activity is in the
same package, otherwise the activity name is pritned out in full.
This small change will remove a lot of bytes (in the order of kilobytes for a real log) from the logged data on the network and downstream processing,
since the package name is repeated in almost all cases.

An exampe of the new format is here:
DUMP OF SERVICE usagestats:
D:4,20090813
P:com.android.launcher,4,155456
A:*.Launcher,4,0,0,0,0,0,0,0,0,0,2
P:com.android.browser,1,6724
A:*.BrowserActivity,1,0,0,0,0,0,0,0,0,0,0
A:*.CombinedBookmarkHistoryActivity,1,0,0,0,0,0,0,0,0,0,1
P:com.google.android.apps.maps,1,2219
A:com.google.android.maps.MapsActivity,1,0,0,0,0,0,0,0,0,0,0
P:com.android.contacts,1,0
A:*.DialtactsActivity,1,0,0,0,0,0,0,0,0,0,1
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
9fdbf6ae465f90b50ca5feb320215b98018c9937 19-Jul-2009 Dianne Hackborn <hackbod@google.com> Issue #1884058 (Need to only record frequency and duration for selected Google apps)

Quick and dirty solution: a new --packages argument allows you to specify an explicit
set of packages to include in the dump. There is also now a new GServices setting
that can provide a value for it.
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
760ec4a095567457707abe764cf4dfda0ed84032 18-Jun-2009 Dianne Hackborn <hackbod@google.com> Fix issue #1924851

We now only increment the launch count when we are launching from one package
to another. Also the individual components in a package now have a count
of the number of times they have been entered, which likewise is only updated
when going to one component from another.

This requires a new data format (all old data is wiped) and new checkin
dump format (tools must be updated to read it).
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
55280a91884b9256e8db6af6a09f28b3feeaa9d8 08-May-2009 Dianne Hackborn <hackbod@google.com> Improve shutdown process to send broadcast for applications.

This introduces a new class in the base platform for performing a clean
shutdown (which was copied from the classes in the policies). It
includes new features to send a shutdown broadcast for applications
to do cleanup, and ot have the activity manager pause the current
activity before proceeding with the shutdown. These facilities are
also use to write at the most recent stat files for sync, battery
and user activity.
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
f210d6b75e2c0fe60b90c074ff9f615c1137f23e 14-Apr-2009 Dianne Hackborn <hackbod@google.com> Let's do bug #1769910 actually right.

My original implementation was computing averages and medians. Now we do binning, as requested. So much simpler, too! In addition, it fixes a bug where when hoping across activities we were only accounting for the last activity as the total time; now we count the time from the start of the initial activity.

This also includes some reduction and optimization of the activity manager dumpsys output.
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
6447ca30b8e41c22c7214f201120327057e356dc 08-Apr-2009 Dianne Hackborn <hackbod@google.com> Fix issue #1769910 (Track activity launch times)

The usage stats service now collects per-activity launch time stats. There are a number of fixes and improvements to its statistics management and collection; it now operates its calendar in GMT and ensures that for checkin purposes it always reports one day and only one complete day to the checkin service.

Also change the checkin option from "-c" to "--checkin" since it is really a special thing.
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/services/java/com/android/server/am/UsageStatsService.java