Shortcut integration with AppSearch (Part 9)
1. Close AppSearchSession after use. When the device is shutdown with open AppSearchSession, if the data is not properly persisted to disk, it would lead to a recovery upon reboot, which could hurt boot performance. We cannot rely on shutdown signal to close existing session because the broadcast is not guranteed. Since session creation is light-weight, it is more performant to simply close the session everytime after use. 2. Refrain from calling setup schema on boot. To improve the performance of device start up, we want to avoid calling AppSearchSession#setSchema unnecessarily since it could hurt performance. In this CL we saved the version of the schema in the xml file which can serve as an indicator of whether schema setup is required. Bug: 151359749 Test: atest ShortcutManagerTest1 ShortcutManagerTest2 ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5 ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8 ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11 ShortcutManagerTest12 Test: atest CtsShortcutManagerTestCases Change-Id: I2d6b66cef0c152ad99611dec3dee32a473bef4a9
Loading
Please register or sign in to comment