Using onLongPress from detectTapGestures in LockscreenTouchHandling.
When using the custom detectLongPressGesture detector, the long-press gesture is directed to both KeyguardQuickAffordanceViewBinder#OnLongClickListener and KeyguardTouchHandlingViewModel#onLongPress. The modifier depends on a timer, rather than the consumption of down events by lower surfaces in the UI hierarchy, making it difficult to separate responsibilities of gesture handling. Using the onLongPress callback of detectTapGestures, long-press events are directed to single UIs and resolves the conflict. Test: manual. Verified long-press is handled by shortcuts when long-pressing their icons and that the lockscreen does not react to the event. Test: manual. Verified long-press continues to behave as expected on any other surface of the lockscreen Test: manual. Disabled long-press in vendor/unbundled_google/packages/SystemUIGoogle/res/values/config.xml and verified that taps and double taps are still processed by the lockscreen Bug: 436334214 Flag: com.android.systemui.scene_container Change-Id: Idcfcc5bc0df1990bcbaf7c55c6304ca4b23408ef
Loading
Please register or sign in to comment