Skip to content
Commit b39a82aa authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

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
parent 5e56f8b9
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