Fix logical bug on Pan MotionEventAge 14/276514/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Mon, 20 Jun 2022 01:23:51 +0000 (10:23 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Mon, 20 Jun 2022 01:23:51 +0000 (10:23 +0900)
Fix incorrect operation direction of age check-up.

Change-Id: Ia76f9cdda639c0417da1002906e63a02f97d1b67
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp
dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp

index b1314ea..5039ef6 100644 (file)
@@ -408,9 +408,9 @@ int UtcDaliPanGestureSetMaximumMotionEventAge(void)
   detector.Attach(actor);
   detector.DetectedSignal().Connect(&application, functor);
 
-  detector.SetMaximumMotionEventAge(minTime / 2);
+  detector.SetMaximumMotionEventAge(minTime * 2);
 
-  DALI_TEST_EQUALS(minTime / 2, detector.GetMaximumMotionEventAge(), TEST_LOCATION);
+  DALI_TEST_EQUALS(minTime * 2, detector.GetMaximumMotionEventAge(), TEST_LOCATION);
 
   END_TEST;
 }
index 2a2e08e..b847ddf 100644 (file)
@@ -476,7 +476,7 @@ void PanGestureProcessor::UpdateDetection()
       }
 
       uint32_t maximumAge = detector->GetMaximumMotionEventAge();
-      if(maximumAge > maximumMotionEventAge)
+      if(maximumAge < maximumMotionEventAge)
       {
         maximumMotionEventAge = maximumAge;
       }