Prevent defect fix and Minor issue fix
[apps/osp/Gallery.git] / src / GlFileListForm.cpp
index f0a5acf..95fc7b1 100644 (file)
@@ -169,11 +169,12 @@ FileListForm::OnActionPerformed(const Control& source, int actionId)
 
        case IDA_FOOTER_CAMERA:
        {
+               const String mimeType = APPCONTROL_MIME_IMAGE_JPG;
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
                pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_CAMERA_ALLOW_SWITCH), new (std::nothrow) String(APPCONTROL_DATA_TRUE));
                __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA, APPCONTROL_OPERATION_ID_CREATE_CONTENT,
-                               null, new (std::nothrow) String(APPCONTROL_MIME_IMAGE_JPG), pDataList, this);
+                               null, &mimeType, pDataList, this);
        }
        break;
 
@@ -305,13 +306,14 @@ FileListForm::OnSlideSettingPopUpItemSelected(int index)
                        pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
                }
 
+               const String mimeType = APPCONTROL_MIME_IMAGE_ALL;
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
                pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
                pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
                r = __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, null,
-                               new (std::nothrow) String(APPCONTROL_MIME_IMAGE_ALL), pDataList, null);
+                               &mimeType, pDataList, null);
 
                if (r == E_MAX_EXCEEDED)
                {