Fix issue that voice recording file is crashed 15/157615/1
authorsungwook79.park <sungwook79.park@samsung.com>
Wed, 25 Oct 2017 09:37:44 +0000 (18:37 +0900)
committersungwook79.park <sungwook79.park@samsung.com>
Wed, 25 Oct 2017 09:41:58 +0000 (18:41 +0900)
Change-Id: Ic17b9e6938dc62f93d84604bd3383e8cb1bef0f1
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
src/voice-recorder.cpp
src/w-input-stt-voice.cpp

index ef2c017..23139df 100644 (file)
@@ -18,7 +18,7 @@
 #include <app_common.h>
 #include <app.h>
 #include <media_content.h>
-#include <dlog.h>
+#include "Debug.h"
 #include <storage.h>
 #include "voice-recorder.h"
 
index 7ce7973..5e3f576 100755 (executable)
@@ -452,11 +452,13 @@ static void on_confirm_button_clicked_cb(void *data, Evas_Object *obj, void *eve
        }
 
        SECURE_LOGD("result_text = %s", result_text.c_str());
+       stop_voice_recorder();
 
        char *filePath = NULL;
        voice_recorder *vr = _voice_recorder_get_data();
-       if (!vr)
+       if (vr)
                filePath = vr->file_path;
+
        char *path[] = {filePath, };
        reply_to_sender_by_callback(result_text.c_str(), "voice", (const char **)path, NULL);
        destroy_voice();