if (attrs) {
ret = __mmcamcorder_check_valid_pair(handle, err_attr_name, attribute_name, var_args);
} else {
- _mmcam_dbg_err("handle 0x%x, attrs is NULL, attr name [%s]", handle, attribute_name);
+ _mmcam_dbg_err("handle %p, attrs is NULL, attr name [%s]", handle, attribute_name);
ret = MM_ERROR_CAMCORDER_NOT_INITIALIZED;
}
}
}
- if (item == NULL) {
- _mmcam_dbg_warn("failed to find tilt control channel");
- }
+ _mmcam_dbg_warn("failed to find tilt control channel");
}
return FALSE;
}
}
- if (item == NULL) {
- _mmcam_dbg_warn("failed to find pan control channel");
- }
+ _mmcam_dbg_warn("failed to find pan control channel");
}
return FALSE;
}
}
- if (item == NULL) {
- _mmcam_dbg_warn("failed to find tilt control channel");
- }
+ _mmcam_dbg_warn("failed to find tilt control channel");
}
return FALSE;
hcamcorder->sound_focus_register = FALSE;
_mmcam_dbg_warn("no need to use sound focus internally");
} else {
+ /* check my session type : allow only media & call series here */
+ if ((hcamcorder->session_type != MM_SESSION_TYPE_MEDIA) &&
+ (hcamcorder->session_type != MM_SESSION_TYPE_MEDIA_RECORD) &&
+ (hcamcorder->session_type != MM_SESSION_TYPE_CALL) &&
+ (hcamcorder->session_type != MM_SESSION_TYPE_VIDEOCALL) &&
+ (hcamcorder->session_type != MM_SESSION_TYPE_VOIP)) {
+ _mmcam_dbg_err("Blocked by session policy, my session_type[%s]", hcamcorder->session_type);
+ hcamcorder->error_code = MM_ERROR_POLICY_BLOCKED;
+ return FALSE;
+ }
+
ret = mm_sound_focus_get_id(&hcamcorder->sound_focus_id);
if (ret != MM_ERROR_NONE) {
_mmcam_dbg_err("mm_sound_focus_get_id failed");