Fix issue that voice recording file is crashed 14/157614/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:37:44 +0000 (18:37 +0900)
Change-Id: Ic17b9e6938dc62f93d84604bd3383e8cb1bef0f1
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
src/voice-recorder.cpp
src/w-input-stt-voice.cpp

index ef2c0174c7feb26383b58d4fd554cffe1a537f5a..23139dfbc67776e11fa0dc1ef0714ef7afa6ae60 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 7ce7973cd968530ac23dca9aeebf79a71a8911fd..5e3f576f5ff92eddca0019d462218b6772bb6026 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();