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

Various fixes in ShortcutService

1. Currently AppSearchSession#setSchema is only invoked when the schema
hasn't been created. The correct logic should be, call setSchema if the
schema version on the device is older than current.

2. Add null check on the call-site of ShortcutPackage#getShortcutById,
the return value is generally non-null (on misses it simply return an
empty list), the only case it can be null is when there was an
exception thrown from AppSearch.

3. Update ShortcutManagerTest10 in comply with security fix in
LauncherAppService#getShortcutConfigActivityIntent

Bug: 151359749
Test: atest ShortcutManagerTest1 ShortcutManagerTest2
    ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5
    ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8
    ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11
    ShortcutManagerTest12
Test: atest CtsShortcutManagerTestCases
Change-Id: I214b0e9c8030f45cff5e6451733bf853f6303030
parent 252d85cf
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