Shortcut integration with AppSearch (Part 10)
1. Persists enabled pinned shortcuts in xml.
Before the integration there are existing logic which persists shortcuts
in xml file, which makes it a good candidate for a cache layer on top of
AppSearch so that when launcher is loading the workspace, the later no
longer needs to wait for the former to finish initialization.
2. Postpone package rescan
When the device is rebooted for the very first time after the initial
restore, it would trigger a rescan on all the packages that was
installed on the device before the reboot. Since the device just
finished a restore, the number of new packages is large and
re-publishing manifest shortcuts from these packages could take a while.
In this CL we move the rescan to a background thread to prevent launcher
from being blocked when loading the workspace.
Bug: 151359749
Test: atest ShortcutManagerTest1 ShortcutManagerTest2
ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5
ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8
ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11
ShortcutManagerTest12
Test: atest CtsShortcutManagerTestCases
Change-Id: I612c8ad49f3408d80fbb6d64f948e95ae6641899
3 files changed