Skip to content
Commit 4dedfc8b authored by Pinyao Ting's avatar Pinyao Ting
Browse files

Fixes an issue in shortcut persistence.

Currently after reboot the shortcuts previously saved in AppSearch could
be lost since ShortcutService never calls AppSearchSession#close.
Closing the session upon device shutdown fixes the issue.

Also, removes the exception where calling AppSearchSession#close gives
rise to IllegalArgumentException when the call wasn't made from a binder
thread. Since ShortcutService runs in the system process, it is expected
that calling AppSearchSession#close doesn't goes through binder.

Bug: 183982287
Test: flash, pin shortcuts, reboot, observe
Test: atest ShortcutManagerTest1 ShortcutManagerTest2
ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5
ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8
ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11
Test: atest CtsShortcutManagerTestCases

Change-Id: I61bc4354735770630965ca4f81314d23671165d0
parent 4546fb3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment