OSDN Git Service

ShortcutManager: API changes for DR
authorMakoto Onuki <omakoto@google.com>
Wed, 11 May 2016 23:51:01 +0000 (16:51 -0700)
committerMakoto Onuki <omakoto@google.com>
Mon, 16 May 2016 23:25:50 +0000 (16:25 -0700)
commit20c95f854e54b71caa49f0efe07d47d1e6afd435
treefc77e3a45cafc7b9206e1f6009b9515a148657af
parentf4e28327422c56881133d244fb9c0dffb04cc716
ShortcutManager: API changes for DR

See https://goto.google.com/shortcutmanager-spec-dr for
the details.

This CL contains changes to ShortcutInfo and all the new API
entry points, but not the implementation of the new APIs.

- ShortcutInfo.activityComponent is now mandatory.
- Publishers can now disable shortcuts.  ShortcutInfo can now have
"disabled message".
- ShortcutInfo now supports string resources for all the String
fields.
  -> When launcher fetches shortcuts, ShortcutService will
  automatically load resources and expose as strings.
- LauncherApps now supports getShortcutIconDrawable() and
getShortcutBadgedIconDrawable() to be consistent with
LauncherActivityInfo.

- ShortcutInfo.weight is replaced with "rank".

- Added ShortcutManager.reportShortcutUsed(), which will be used for
usage tracking / suggestion.

Bug 28536054
Bug 28536066
Bug 28564134
Bug 28594168

Change-Id: Ib8245b39bb1e753991a9de89c0b73accacd90355
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/content/pm/IShortcutService.aidl
core/java/android/content/pm/LauncherApps.java
core/java/android/content/pm/ShortcutInfo.java
core/java/android/content/pm/ShortcutManager.java
services/core/java/com/android/server/pm/ShortcutPackage.java
services/core/java/com/android/server/pm/ShortcutService.java
services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest.java
services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ShortcutManagerTestUtils.java