Skip to content

Commit 1834a48

Browse files
ADFA-4887: reset auto-hide on touch down/up only (not every MOVE)
Gate the user-interaction hook to ACTION_DOWN/ACTION_UP so a pan/tilt doesn't re-post the nav-bar hide dozens of times a second; ACTION_UP marks the last touch.
1 parent 33dd024 commit 1834a48

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎controller/app/src/main/java/org/iiab/controller/portal/presentation/GestureWebView.java‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ public class GestureWebView extends WebView {
4444
public boolean onTouchEvent(MotionEvent event) {
4545
final int pointers = event.getPointerCount();
4646

47-
if (onUserInteraction != null) onUserInteraction.run();
47+
// Reset the host's UI timers on touch start/end only (not every MOVE) so a pan/tilt doesn't
48+
// re-post the auto-hide dozens of times a second; ACTION_UP effectively marks the last touch.
49+
final int action = event.getActionMasked();
50+
if (onUserInteraction != null && (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_UP)) {
51+
onUserInteraction.run();
52+
}
4853

4954
// Two or more fingers: keep the gesture for the web content (the map),
5055
// so an ancestor (pager/scroll) can't hijack a tilt/rotate/pinch.

0 commit comments

Comments
 (0)