Fix convertInterruptedCode() 19/125219/1
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 13 Apr 2017 05:16:11 +0000 (14:16 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 14 Apr 2017 07:21:28 +0000 (00:21 -0700)
[Version] 0.3.74
[Profile] Common
[Issue Type] Backward compatibility

Change-Id: I2fbe48dcf447089ed1096ce750bb7db75d4f90e5
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
(cherry picked from commit 54c7a443738deaf9fa3421b8372ed071fa457a76)

packaging/capi-media-audio-io.spec
src/cpp/CAudioSessionHandler.cpp

index c90734d..3041dfe 100644 (file)
@@ -1,6 +1,6 @@
 Name:           capi-media-audio-io
 Summary:        An Audio Input & Audio Output library in Tizen Native API
-Version:        0.3.73
+Version:        0.3.74
 Release:        0
 Group:          Multimedia/API
 License:        Apache-2.0
index f31675d..0fe1271 100644 (file)
@@ -479,7 +479,7 @@ void CAudioSessionHandler::disableSessionHandler() throw(CAudioError) {
  * class IAudioSessionEventListener
  */
 IAudioSessionEventListener::EInterruptCode IAudioSessionEventListener::convertInterruptedCode(int code, const char *reason_for_change) {
-    EInterruptCode e = EInterruptCode::INTERRUPT_COMPLETED;
+    EInterruptCode e = EInterruptCode::INTERRUPT_BY_MEDIA;
 
     switch (code) {
     case FOCUS_IS_ACQUIRED:
@@ -494,13 +494,13 @@ IAudioSessionEventListener::EInterruptCode IAudioSessionEventListener::convertIn
         if (!strcmp(reason_for_change, "alarm"))              e = EInterruptCode::INTERRUPT_BY_ALARM;
         if (!strcmp(reason_for_change, "notification"))       e = EInterruptCode::INTERRUPT_BY_NOTIFICATION;
         if (!strcmp(reason_for_change, "emergency"))          e = EInterruptCode::INTERRUPT_BY_EMERGENCY;
-        if (!strcmp(reason_for_change, "voice-information"))  e = EInterruptCode::INTERRUPT_BY_MEDIA;  //for what?
-        if (!strcmp(reason_for_change, "voice-recognition"))  e = EInterruptCode::INTERRUPT_BY_MEDIA;  //for what?
-        if (!strcmp(reason_for_change, "ringtone-voip"))      e = EInterruptCode::INTERRUPT_BY_MEDIA;  //for what?
-        if (!strcmp(reason_for_change, "ringtone-call"))      e = EInterruptCode::INTERRUPT_BY_MEDIA;  //for what?
-        if (!strcmp(reason_for_change, "voip"))               e = EInterruptCode::INTERRUPT_BY_MEDIA;  //for what?
-        if (!strcmp(reason_for_change, "call-voice"))         e = EInterruptCode::INTERRUPT_BY_MEDIA;  //for what?
-        if (!strcmp(reason_for_change, "call-video"))         e = EInterruptCode::INTERRUPT_BY_MEDIA;  //for what?
+        if (!strcmp(reason_for_change, "voice-information"))  e = EInterruptCode::INTERRUPT_BY_MEDIA;
+        if (!strcmp(reason_for_change, "voice-recognition"))  e = EInterruptCode::INTERRUPT_BY_MEDIA;
+        if (!strcmp(reason_for_change, "ringtone-voip"))      e = EInterruptCode::INTERRUPT_BY_CALL;
+        if (!strcmp(reason_for_change, "ringtone-call"))      e = EInterruptCode::INTERRUPT_BY_CALL;
+        if (!strcmp(reason_for_change, "voip"))               e = EInterruptCode::INTERRUPT_BY_CALL;
+        if (!strcmp(reason_for_change, "call-voice"))         e = EInterruptCode::INTERRUPT_BY_CALL;
+        if (!strcmp(reason_for_change, "call-video"))         e = EInterruptCode::INTERRUPT_BY_CALL;
         break;
     }