[UTC][motion][Non-ACR][Fix for motion_gesture_stop_recognition utc]
authorAbhishek Vijay <abhishek.v@samsung.com>
Tue, 19 Jun 2018 13:55:06 +0000 (19:25 +0530)
committerAmritanshu Pandia <a.pandia1@samsung.com>
Wed, 20 Jun 2018 07:28:33 +0000 (07:28 +0000)
Change-Id: Ic148642e542dc0bb7889ff805792217bad78bb43
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
src/utc/motion/utc-motion-gesture.c

index a7ccddf..0c333b2 100755 (executable)
@@ -289,20 +289,32 @@ int utc_motion_gesture_stop_recognition_p(void)
        int error = GESTURE_ERROR_NONE;
 
        error = gesture_start_recognition(handle, gesture_type, GESTURE_OPTION_DEFAULT, gesture_cb, NULL);
-       if (is_supported) {
-               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
-       } else {
-               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
-       }
-
-       error = gesture_stop_recognition(handle);
 
        if(is_supported)
        {
-               if (support) {
+               if (support)
+               {
                        assert_eq(error, GESTURE_ERROR_NONE);
-               } else {
-                       assert_eq(error, GESTURE_ERROR_NOT_STARTED);
+                       error = gesture_stop_recognition(handle);
+                       if(is_supported)
+                       {
+                               if (support)
+                               {
+                                       assert_eq(error, GESTURE_ERROR_NONE);
+                               }
+                               else
+                               {
+                                       assert_eq(error, GESTURE_ERROR_NOT_STARTED);
+                               }
+                       }
+                       else
+                       {
+                               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+                       }
+               }
+               else
+               {
+                       assert_eq(error, GESTURE_ERROR_NOT_SUPPORTED);
                }
        }
        else