Fixed an issue the triple tap did not work. 66/258466/13
authorJoogab Yun <joogab.yun@samsung.com>
Tue, 18 May 2021 10:04:13 +0000 (19:04 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Wed, 26 May 2021 02:06:31 +0000 (11:06 +0900)
commit145b3b796944b5599bf8d3792b383cf7fd0c279d
treef7dd044e2ebd00515bb36ff1b50c0405ccd61b56
parent0851912ab7b5f6685893d971add6730b7cd44b31
Fixed an issue the triple tap did not work.

The mState value is wrong.
So, only single and double taps are possible,
and no more taps are called.

And it removes unreachable code.

   uint32_t deltaBetweenTouchDownTouchUp = event.time - mTouchTime;

   if(deltaBetweenTouchDownTouchUp < MAXIMUM_TIME_ALLOWED)
   {
     // mLastTapTime is equal to or greater than mTouchTime;
     // so If deltaBetweenTouchDownTouchUp is less than MAXIMUM_TIME_ALLOWED
     // then timeDelta is never it cannot be greater than MAXIMUM_TIME_ALLOWED.

     uint32_t timeDelta = event.time - mLastTapTime;
     if(timeDelta > MAXIMUM_TIME_ALLOWED)
     {
       // unreachable block
     }
   }

Change-Id: Icd719bda146a82f0b25cb123e36395c9b5aa8f5f
automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp
dali/internal/event/events/tap-gesture/tap-gesture-recognizer.cpp