Fix IME assertion issue when stt creation is failed 64/134864/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 20 Jun 2017 07:15:22 +0000 (16:15 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 21 Jun 2017 02:04:11 +0000 (11:04 +0900)
Change-Id: I42b5110996c48ada6c236deba8352fe395836a93
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/SttManager.cpp

index 02d6279..199bfe9 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include <assert.h>
 #include <vconf.h>
 #include <vconf-keys.h>
 #include <sound_manager.h>
@@ -79,8 +78,7 @@ SttManager::SttManager(ISttFeedback& feedback)
         EnableFeedback();
     }
     catch(SttException &e) {
-        LOGD("reason : %s", e.what());
-        assert(0);
+        LOGW("reason : %s", e.what());
     }
 }
 
@@ -92,7 +90,7 @@ SttManager::~SttManager() {
         UnPrepare();
     }
     catch(SttException &e) {
-        LOGD("reason : %s", e.what());
+        LOGW("reason : %s", e.what());
         stt_destroy(handle);
     }
 
@@ -426,7 +424,7 @@ void SttManager::on_error(
     stt_h handle,
     stt_error_e reason,
     void *user_data) {
-    LOGD("stt-daemon error (%d)", reason);
+    LOGW("stt-daemon error (%d)", reason);
 
     if (!user_data)
         throw SttException((int)STT_ERROR_INVALID_PARAMETER, "invalid self reference");
@@ -526,7 +524,7 @@ void SttManager::EnableSilenceDetection(bool enabled) {
 
     int ret = stt_set_silence_detection(handle, s_option);
     if (STT_ERROR_NONE != ret) {
-        LOGD("error(%d) = %s", ret, ErrorString((stt_error_e) ret));
+        LOGW("error(%d) = %s", ret, ErrorString((stt_error_e) ret));
     } else {
         LOGD("stt_set_silence_detection Successful");
     }