From 09562b562e3cacf18983400502ae0129ae2a6d2e Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Mon, 20 Jun 2022 10:23:51 +0900 Subject: [PATCH] Fix logical bug on Pan MotionEventAge Fix incorrect operation direction of age check-up. Change-Id: Ia76f9cdda639c0417da1002906e63a02f97d1b67 Signed-off-by: Eunki, Hong --- automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp | 4 ++-- dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp index b1314ea..5039ef6 100644 --- a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp @@ -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; } diff --git a/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp b/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp index 2a2e08e..b847ddf 100644 --- a/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp +++ b/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp @@ -476,7 +476,7 @@ void PanGestureProcessor::UpdateDetection() } uint32_t maximumAge = detector->GetMaximumMotionEventAge(); - if(maximumAge > maximumMotionEventAge) + if(maximumAge < maximumMotionEventAge) { maximumMotionEventAge = maximumAge; } -- 2.7.4