fix filemanager appcontrol result handling
authorYoung Ik Cho <youngik.cho@samsung.com>
Tue, 16 Apr 2013 05:20:30 +0000 (14:20 +0900)
committerYoung Ik Cho <youngik.cho@samsung.com>
Tue, 16 Apr 2013 05:20:30 +0000 (14:20 +0900)
Change-Id: I86ac5b705c4fa9d47368571e53a114be216eb74c
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
src/filemanager-app-control/FileManagerAppControlDllEntry.cpp

index 861580c..68b5cee 100644 (file)
@@ -158,7 +158,23 @@ OnAppControlResult(void* b, int requestCode, service_result_e res, void* userDat
        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 += L';';
+                                               tmp = * static_cast<String*>(pArray->GetAt(i));
+                                       }
+
+                                       pResult->Add(new (std::nothrow) String(L"path"), new (std::nothrow) String(tmp));
+                               }
+                       }
                }   
                break;
        case BUNDLE_TYPE_NONE: