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

Skip to content
Commit bf250af7 authored by Daniel Hsieh's avatar Daniel Hsieh
Browse files

Makes GesturesObserver#clear as a private method.

In the previous version, GesturesObserver#clear would be called by
MagnificationGesturesObserver, making the matchers' state be clear by
outside class. It would make the matchers' state not consistency in
GesturesObserver#onMotionEvent. Especially, when the matcher is
completed and becomes STATE_GESTURE_COMPLETED, it would be clear as
STATE_CLEAR by MagnificationGesturesObserver#clear which would trigger
GesturesObserver#clear. It would make the GesturesObserver keep going to
check other matchers since matcher.getState() !=
GestureMatcher.STATE_GESTURE_COMPLETED and wouldn't early return.

Therefore, we make GesturesObserver#clear as a private method and make
it to manager its matchers' state.

Bug: 206061247
Test: atest GesturesObserverTest
      atest MagnificationGesturesObserverTest
      atest MagnificationGestureHandlerTest
      atest WindowMagnificationGestureHandlerTest
Change-Id: I19294e231f969d7dd54b50dc9a2deb36d06b532a
parent c515a0ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment