add patch
[framework/osp/web.git] / src / controls / FWebCtrl_AppControlListener.cpp
index 16e4ade..5b2929e 100755 (executable)
@@ -122,19 +122,19 @@ _MediaSelectionListener::~_MediaSelectionListener(void)
 void
 _MediaSelectionListener::OnAppControlCompleteResponseReceived(const Tizen::App::AppId& providerId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pAppData)
 {
-       SysTryReturnVoidResult(NID_WEB_CTRL, pAppData &&  providerId == L"tizen.filemanager" && operationId == L"http://tizen.org/appcontrol/operation/pick", E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments to _MediaSelectionListener::OnAppControlCompleted");
-
        Eina_List* pSelectedFileNames = null;
+       ArrayList* pSelectedFiles = null;
        int fileCount = 0;
 
-       ArrayList *pSelectedFiles = dynamic_cast< ArrayList* >(const_cast< Object* >(pAppData->GetValue(String("http://tizen.org/appcontrol/data/selected"))));
+       SysTryCatch(NID_WEB_CTRL, pAppData, , E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments to _MediaSelectionListener::OnAppControlCompleted");
+       pSelectedFiles = dynamic_cast< ArrayList* >(const_cast< Object* >(pAppData->GetValue(String("http://tizen.org/appcontrol/data/selected"))));
        SysTryCatch(NID_WEB_CTRL, pSelectedFiles, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
 
        fileCount = pSelectedFiles->GetCount();
 
        for (int i = 0; i < fileCount; i++)
        {
-               std::unique_ptr<String> pFile((String*)pSelectedFiles->GetAt(i));
+               String* pFile = static_cast<String*>(pSelectedFiles->GetAt(i));
                SysTryCatch(NID_WEB_CTRL, pFile, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
 
                std::unique_ptr<ByteBuffer> pByteBuf(StringUtil::StringToUtf8N(*pFile));