Skip request modality when grid mode is in 1st depth 90/281790/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Wed, 21 Sep 2022 10:21:55 +0000 (19:21 +0900)
committerTizen AI <ai.tzn.sec@samsung.com>
Thu, 22 Sep 2022 03:12:19 +0000 (12:12 +0900)
Change-Id: Ic5d0cd3751c36ac5a682787cb29c60b59a08d168
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
src/mmimgr/iu/VoiceTouchEngine.cpp

index b2592a2..8931d60 100644 (file)
@@ -274,12 +274,19 @@ Eina_Bool VoiceTouchEngine::findCommandCallback(void *data)
        engine->makeClickedItemResult(command, timestamp, provider);
        engine->invokeOutputResultCallback(provider.jsonToString());
 
-       if (command != nullptr) {
-               _I("[VoiceTouchEngine] Command. object ID(%s)", command->objectId.c_str());
-               engine->makeTouchModality(*command, timestamp);
-               engine->invokeOutputModalityCallback(&engine->__touchModality);
+       if (command == nullptr) {
+               return ECORE_CALLBACK_CANCEL;
        }
 
+       if (engine->__currentMode == VOICE_TOUCH_MODE_GRID && engine->__currentGridInfo.currentStep == 0) {
+               _I("[VoiceTouchEngine] Grid first step. Skip modality request");
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       _I("[VoiceTouchEngine] Command. object ID(%s)", command->objectId.c_str());
+       engine->makeTouchModality(*command, timestamp);
+       engine->invokeOutputModalityCallback(&engine->__touchModality);
+
        return ECORE_CALLBACK_CANCEL;
 }