Fix crash when a shortcut update for notes happens before user unlocked
* Ensure NoteTaskController is updated and valid state when the system
is initialized (after direct boot user is unlocked).
* NoteTaskController now double check if the user is unlocked before
triggering a shortcut update (onRoleHolderChanged).
* If by any reason an event is lost, we check again in the next boot.
Test: atest SystemUITests:NoteTaskControllerTest
Test: atest SystemUITests:NoteTaskInitializerTest
Flag: not needed
Fixes: b/275852881
Change-Id: Ib3c9d66abf9074c50cdc79ef93fa8d162e9608cb
4 files changed