bool isRefreshNeed = __is_exist_in_candidates(asrResult, __REFRESH_WINDOW_INFO);
if (isRefreshNeed) {
_I("[VoiceTouchEngine] Request to refresh clickable object information.");
+ setAndSendPreDefinedCommandResult(timestamp, MMI_VOICE_TOUCH_OPERATION_PRESS_BACK);
__invoke_event_for_refreshing_window();
return true;
}
auto operationIterator = __OPERATION_REQUEST.find(asrResult);
if (operationIterator != __OPERATION_REQUEST.end()) {
int operation = operationIterator->second;
+ setAndSendPreDefinedCommandResult(timestamp, operation);
makeOperation(timestamp, operation);
invokeOutputModalityCallback(&__touchModality);
return true;
setTouchModality(item, timestamp);
}
+void VoiceTouchEngine::setAndSendPreDefinedCommandResult(int timestamp, int operation)
+{
+ _I("[VoiceTouchEngine] Set pre-defined command result into output. timestamp(%d). operation(%d)", timestamp, operation);
+
+ if (operation != MMI_VOICE_TOUCH_OPERATION_PRESS_BACK) {
+ _D("[VoiceTouchEngine] Skip making result. timestamp(%d). operation(%d)", timestamp, operation);
+ return;
+ }
+
+ JsonProvider provider;
+ ClickableItem item;
+ item.coordX = -1;
+ item.coordY = -1;
+ item.width = -1;
+ item.height = -1;
+ item.index = -1;
+ item.objectId = "";
+ item.label = "";
+
+ setSelectedItemResult(item, timestamp, provider);
+
+ _I("[VoiceTouchEngine] Set pre-defined command result into output. timestamp(%d). operation(%d)", timestamp, operation);
+ invokeOutputResultCallback(provider.jsonToString());
+}
+
+
void VoiceTouchEngine::makeOperation(int timestamp, int operation)
{
_I("[VoiceTouchEngine] Make operation. timestamp(%d). operation(%d)", timestamp, operation);
void makeTouchModality(const ClickableItem &item, int timestamp);
void setTouchModality(const ClickableItem &item, int timestamp);
+ void setAndSendPreDefinedCommandResult(int timestamp, int operation);
void makeOperation(int timestamp, int operation);
void setOperationModality(int timestamp, int operation);