OSDN Git Service

Introducing ShortcutManager
authorMakoto Onuki <omakoto@google.com>
Fri, 4 Mar 2016 21:39:41 +0000 (13:39 -0800)
committerMakoto Onuki <omakoto@google.com>
Fri, 4 Mar 2016 23:24:49 +0000 (15:24 -0800)
commit6f7362d92573e4ae693bc513dca586d6a4eb087b
tree447b82040ff02bfb73f2e4524051873de5ca1adb
parentb74926232ee601851e08cd5d0f0386afcb0bef3e
Introducing ShortcutManager

What's supported:
- Most APIs are implemented, except for SM.updateShortcuts(),
the icon APIs in LA, and LA.startShortcut().
- Persisting information, except for icons
- Throttling

In addition, now PersistableBundle has a public copy
constructor from a Bundle. (Do we want to @hide it?)

TODOs:
- Add icon support
- Implement missing APIs
- Listen to PACKAGE_* broadcasts and do clean-up
- Support multi-launcher apps (pinned shortcuts per launcher)
- Dev option to reset throttling
- Load throttling config from Settings
- Backup & restore
- Figure out LauncherApps permissions (BIND_APPWIDGETS??)
- Other minor TODOs in the code
- Better javadoc

Note: This requires Idf2f9ae816e1f3d822a6286a4cf738c14e29a45e

Bug 27325877

Change-Id: Ia5aa555a4759df5f79a859338f1dc5e624cd0e35
26 files changed:
Android.mk
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/app/SystemServiceRegistry.java
core/java/android/content/Context.java
core/java/android/content/pm/ILauncherApps.aidl
core/java/android/content/pm/IOnAppsChangedListener.aidl
core/java/android/content/pm/IShortcutService.aidl [new file with mode: 0644]
core/java/android/content/pm/LauncherApps.java
core/java/android/content/pm/ShortcutInfo.aidl [new file with mode: 0644]
core/java/android/content/pm/ShortcutInfo.java [new file with mode: 0644]
core/java/android/content/pm/ShortcutManager.java [new file with mode: 0644]
core/java/android/content/pm/ShortcutServiceInternal.java [new file with mode: 0644]
core/java/android/os/BaseBundle.java
core/java/android/os/PersistableBundle.java
services/core/java/com/android/server/pm/LauncherAppsService.java
services/core/java/com/android/server/pm/ShortcutService.java [new file with mode: 0644]
services/devicepolicy/java/com/android/server/devicepolicy/Owners.java
services/java/com/android/server/SystemServer.java
services/tests/servicestests/AndroidManifest.xml
services/tests/servicestests/res/drawable/icon1.png [new file with mode: 0644]
services/tests/servicestests/res/drawable/icon2.png [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/pm/ShortcutInfoTest.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/testutis/TestUtils.java [new file with mode: 0644]