Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5ad26a8 authored by Juan Sebastian Martinez's avatar Juan Sebastian Martinez
Browse files

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
parent 27b310ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment