OSDN Git Service

Initial implementation: Broadcasts on app launch.
authorDaniel Sandler <dsandler@android.com>
Mon, 5 Aug 2013 06:12:05 +0000 (02:12 -0400)
committerDaniel Sandler <dsandler@android.com>
Tue, 6 Aug 2013 04:18:38 +0000 (00:18 -0400)
commitff02d49e464c2fe92ba625a3046f31aa042e5d32
tree8b766db2f5690e011fa0c2c2b3c235c593c9fdc4
parent482a5b6ed389ef943990277e461444626c34ebf2
Initial implementation: Broadcasts on app launch.

Look for com.android.launcher3.action.LAUNCH to be sent when
an icon is clicked in Launcher. (Restricted to
com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS
which is a signature permission right now.

This is specifically tracking apps launched via shortcut
icon; any other method of launching apps (notifications,
recents, internal navigation, etc.) is outside of Launcher's
purview and hence not broadcast.

The broadcast currently includes, in the "intent" extra, the
Uri flattening of the specific shortcut clicked.

The file /data/data/<pkg>/files/launches.log contains a
binary log of all such launches, including additional info
like screen# that should probably be in the broadcast too.

This info is summarized in .../stats.log, which encodes a
simple histogram of app launches since basically forever.
This should probably be done over a sliding window, which
will require more processing on startup.

Bug: 10031590
Change-Id: Ifc5921d5dc20701c67678cbfdc89b03cacd62028
AndroidManifest.xml
src/com/android/launcher3/Launcher.java
src/com/android/launcher3/Stats.java [new file with mode: 0644]