Remove unused shortcut title to improve the boot time performance
The title field of ModifierShortcutManager$ShortcutInfo is not used. Because making this string requires font access, we cannot remove the Typeface.loadPreinstalledSystemFontMap function call in system_server which takes non trivial amount of time. Removing this field improves 2 seconds of the boot performance on Wear devices. More background: WindowManagerService loads shortcut label which requires system font initialization. However, the system font initialization happens after WindowManagerService startup, so system_server loads Typeface only with preinstalled system fonts for this purpose. Bug: 288189927 Test: Manually confirmed the shortcut still works. Test: Manually confirmed the shortcut description still appears by Meta+? Test: gts-tradefed run gts-dev -m GtsFontHostTestCases Test: atest atest UpdatableFontDirTest Test: atest UpdatableSystemFontTest Test: atest GtsFontHostTestCases Test: atest FontManagerTest Change-Id: Ib01e96fa7cef7e9bac17a2f8a7d1942fcff5a407
Loading
Please register or sign in to comment