_device_install_storage(MTP_ADDREM_INTERNAL);
__send_events_from_device_to_pc(MTP_INTERNAL_STORE_ID,
PTP_EVENTCODE_STOREADDED, 0, 0);
-
- _util_media_content_connect();
} else if (MTP_PHONE_LOCK_ON == current_val) {
_device_uninstall_storage(MTP_ADDREM_INTERNAL);
__send_events_from_device_to_pc(MTP_INTERNAL_STORE_ID,
PTP_EVENTCODE_STOREREMOVED, 0, 0);
-
- _util_media_content_disconnect();
}
return;
/* Internal Storage */
if (MTP_PHONE_LOCK_OFF == _util_get_local_lock_status()) {
- mtp_int32 ret;
char inter_path[MTP_MAX_PATHNAME_SIZE + 1] = { 0 };
- ret = _util_media_content_connect();
- if (FALSE == ret) {
- ERR("media_content_connect() Fail");
- goto MTP_INIT_FAIL;
- }
-
_util_get_internal_path(inter_path);
if (access(inter_path, F_OK) < 0) {
if (FALSE == _util_dir_create((const mtp_char *)inter_path, &error)) {
return MTP_ERROR_GENERAL;
}
+ ret = _util_media_content_connect();
+ if (true != ret) {
+ ERR("media_content_connect() Fail(%d)", ret);
+ return MTP_ERROR_GENERAL;
+ }
+
ret = _main_init();
if (MTP_ERROR_NONE != ret) {
ERR("_main_init() Fail(%d)", ret);