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

Commit 2db11209 authored by Feng Cao's avatar Feng Cao
Browse files

Fix a bug to handle the touch ACTION_DOWN properly when inline suggestion view is obscured

* if the user taps quickly such that there is only ACTION_DOWN and
  ACTION_UP, without ACTION_MOVE, it'd be possible that the
  isSecure check is not  respected. This patch fixes that case.

Test: atest android.autofillservice.cts.inline
Bug: 157772682
Bug: 158038231

Change-Id: Icd21bf2f88259673bb9b20e46e63672648495eac
parent e60e6524
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -58,7 +58,9 @@ public class InlineSuggestionRoot extends FrameLayout {
            case MotionEvent.ACTION_DOWN: {
                mDownX = event.getX();
                mDownY = event.getY();
            } break;
            }
            // Intentionally fall through to the next case so that when the window is obscured
            // we transfer the touch to the remote IME window and don't handle it locally.

            case MotionEvent.ACTION_MOVE: {
                final float distance = MathUtils.dist(mDownX, mDownY,