* 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:
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;
}