OSDN Git Service

Rescan apps after restore and re-publish manifest shortcuts
authorMakoto Onuki <omakoto@google.com>
Tue, 9 Aug 2016 21:43:55 +0000 (14:43 -0700)
committerMakoto Onuki <omakoto@google.com>
Tue, 9 Aug 2016 21:43:55 +0000 (14:43 -0700)
commit377b7970ad70e87f8137ea7d9e7a6b00de1826ae
treebc45d66125ec873c1a8ecd43d9d91c23a204335a
parent04029362301ca48fb84cbd5a5d92b85bc6014018
Rescan apps after restore and re-publish manifest shortcuts

Originally when I wrote backup & restore for ShortcutManager,
there was no manifest shortcuts, so there was no need to
handle preintalled apps specially.

However, now we have manifest shortcuts, which are published
when the user is unlocked, by the time restore happens preinstalled
apps may already have manifest shortcuts, which will be overwritten
by the restored shortcuts.

So we need to re-publish manifest shortcuts after restore.

Bug 30746028

Change-Id: I6afbae7790c9ed38483637f33c381ecb6f854677
services/core/java/com/android/server/pm/ShortcutService.java
services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java