modified code which add path key and string value internally 26/13626/1 accepted/tizen/mobile/20131216.220321 submit/tizen/20131211.051116
authorjs1002.kim <js1002.kim@samsung.com>
Thu, 31 Oct 2013 02:38:29 +0000 (11:38 +0900)
committerSunwook Bae <sunwook45.bae@samsung.com>
Wed, 11 Dec 2013 04:59:48 +0000 (13:59 +0900)
Change-Id: Ib474d64709b62dd44fb5163c596e6db6940c4526
Signed-off-by: js1002.kim <js1002.kim@samsung.com>
src/camera-app-control/CameraAppControlDllEntry.cpp [changed mode: 0644->0755]
src/filemanager-app-control/FileManagerAppControlDllEntry.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 864caf7..5a2ae6e
@@ -165,7 +165,23 @@ _AppControlPlugin::OnAppControlResult(void* b, int requestCode, service_result_e
        case BUNDLE_TYPE_STR_ARRAY:
                {
                        ArrayList* pArray = _AppMessageImpl::GetValueArrayN(pBundle, SERVICE_DATA_SELECTED);
-                       pResult->Add(new (std::nothrow) String(L"path"), pArray);
+                       if (pArray)
+                       {
+                               const int count = pArray->GetCount();
+                               if (count > 0)
+                               {
+                                       String tmp;
+
+                                       tmp = * static_cast<String*>(pArray->GetAt(0));
+                                       for (int i = 1; i < count; i++)
+                                       {
+                                               tmp.Append(L';');
+                                               tmp.Append(* static_cast<String*>(pArray->GetAt(i)));
+                                       }
+
+                                       pResult->Add(new (std::nothrow) String(L"path"), new (std::nothrow) String(tmp));
+                               }
+                       }
                }
                break;
        case BUNDLE_TYPE_NONE:
old mode 100644 (file)
new mode 100755 (executable)
index 91de53a..ef9c6cd
@@ -159,18 +159,18 @@ _AppControlPlugin::OnAppControlResult(void* b, int requestCode, service_result_e
 
        type = bundle_get_type(pBundle, SERVICE_DATA_SELECTED);
        switch (type)
-       {   
+       {
        case BUNDLE_TYPE_STR:
-               {   
+               {
                        const char* pFile = appsvc_get_data(pBundle, SERVICE_DATA_SELECTED);
                        if (pFile)
-                       {   
+                       {
                                pResult->Add(new (std::nothrow) String(L"path"), new (std::nothrow) String(pFile));
-                       }   
-               }   
+                       }
+               }
                break;
        case BUNDLE_TYPE_STR_ARRAY:
-               {   
+               {
                        ArrayList* pArray = _AppMessageImpl::GetValueArrayN(pBundle, SERVICE_DATA_SELECTED);
                        if (pArray)
                        {
@@ -182,19 +182,19 @@ _AppControlPlugin::OnAppControlResult(void* b, int requestCode, service_result_e
                                        tmp = * static_cast<String*>(pArray->GetAt(0));
                                        for (int i = 1; i < count; i++)
                                        {
-                                               tmp += L';';
-                                               tmp = * static_cast<String*>(pArray->GetAt(i));
+                                               tmp.Append(L';');
+                                               tmp.Append(* static_cast<String*>(pArray->GetAt(i)));
                                        }
 
                                        pResult->Add(new (std::nothrow) String(L"path"), new (std::nothrow) String(tmp));
                                }
                        }
-               }   
+               }
                break;
        case BUNDLE_TYPE_NONE:
        default:
                break;
-       }   
+       }
 
        _AppControlManager::GetInstance()->FinishAppControl(__req, res, pResult);