return TRUE;
/* skip error to avoid duplicated posting */
- if ((player->storage_info[MMPLAYER_PATH_VOD].state <= STORAGE_STATE_REMOVED) ||
- (player->storage_info[MMPLAYER_PATH_TEXT].state <= STORAGE_STATE_REMOVED)) {
+ if (((player->storage_info[MMPLAYER_PATH_VOD].type == STORAGE_TYPE_EXTERNAL) &&
+ (player->storage_info[MMPLAYER_PATH_VOD].state <= STORAGE_STATE_REMOVED)) ||
+ ((player->storage_info[MMPLAYER_PATH_TEXT].type == STORAGE_TYPE_EXTERNAL) &&
+ (player->storage_info[MMPLAYER_PATH_TEXT].state <= STORAGE_STATE_REMOVED))) {
/* The error will be handled by mused.
* @ref _mmplayer_manage_external_storage_state() */
if (strncmp(file_path, "file://", strlen("file://")) == 0)
file_path = path+7; /* remove file prefix */
- if (strncmp(file_path, MEDIA_PATH_EXTERNAL, strlen(MEDIA_PATH_EXTERNAL)) == 0)
+ if (strncmp(file_path, MEDIA_PATH_EXTERNAL, strlen(MEDIA_PATH_EXTERNAL)) == 0) {
storage_info->type = STORAGE_TYPE_EXTERNAL;
- else
- storage_info->type = STORAGE_TYPE_INTERNAL;
- memset(storage_info->path, 0x00, MM_MAX_URL_LEN);
- g_snprintf(storage_info->path, MM_MAX_URL_LEN, "%s", file_path);
+ memset(storage_info->path, 0x00, MM_MAX_URL_LEN);
+ g_snprintf(storage_info->path, MM_MAX_URL_LEN, "%s", file_path);
- ret = storage_foreach_device_supported((storage_device_supported_cb)_util_storage_supported_cb, storage_info);
- if (ret != STORAGE_ERROR_NONE) {
- LOGE("failed to check supported storage 0x%x", ret);
- return false;
- }
+ ret = storage_foreach_device_supported((storage_device_supported_cb)_util_storage_supported_cb, storage_info);
+ if (ret != STORAGE_ERROR_NONE) {
+ LOGE("failed to check supported storage 0x%x", ret);
+ return false;
+ }
- if ((storage_info->type == STORAGE_TYPE_EXTERNAL) &&
- (storage_info->state <= STORAGE_STATE_REMOVED)) {
- LOGE("need to check the external storage state %d:%d", storage_info->id, storage_info->state);
- return false;
+ if (storage_info->state <= STORAGE_STATE_REMOVED) {
+ LOGE("need to check the external storage state %d:%d", storage_info->id, storage_info->state);
+ return false;
+ }
+ } else {
+ storage_info->type = STORAGE_TYPE_INTERNAL;
+ storage_info->state = STORAGE_STATE_MOUNTED;
}
LOGD("storage info %d:%d:%d", storage_info->type, storage_info->id, storage_info->state);