(1/n) Remove usage of isKeyGestureSupported() from KeyGestureController
isKeyGestureSupported is synchronous API that makes system server dependent on handler and can cause ANR if handlers misbehave. It was added as a stop gap for multi-key gestures that require some SysUI info like keyguard state, display state, etc, to decide if the key needs to be consumed or not at the start of the gesture. With this refactor: - Use Display state for Default display as a replacement for mDefaultDisplayPolicy.isAwake() which was added initially to ensure the shortcut chords are only trigerred if default display is on. In subsequent CLs: - WM policy added an API to check isKeyguardLocked() and we will use that for checking keyguard status - Move A11yShortcutController to KGC to circumvent the need of the isShortcutAvailable() API Test: atest KeyGestureControllerTests Bug: 358569822 Bug: 383602794 Flag: EXEMPT refactor Change-Id: I000c6a46ae0e17495db5fa5f0f039940549bc243
Loading
Please register or sign in to comment
