Can't open the file from download link in the Quickpanel 83/79383/3
authorHyeKyoung Hwang <cookie@samsung.com>
Mon, 11 Jul 2016 06:49:00 +0000 (15:49 +0900)
committerHye Kyoung Hwang <cookie@samsung.com>
Mon, 11 Jul 2016 07:59:08 +0000 (00:59 -0700)
[ Issue ] http://suprem.sec.samsung.net/jira/browse/TSAM-6252
[ Problem]There is no url name, it can't find the proper app in the app_control
[ Solution] In case of check the mime type, and remove the url name
            If there is no file:/// , the Webvie can't open the file.
            So just "/opt/" path, it add the file://
[Verify] Check the save link and open the file

Change-Id: Icb090645c5125d0e53d9cd040edffbfa75e085c3
Signed-off-by: HyeKyoung Hwang <cookie@samsung.com>
core/main.cpp
manifest.xml.in.mb

index 736c4607124b8a8f154ac87d44ed542e268aabe4..8aae1ff8ebf0c8df10336d1c0051a3be66a814e5 100755 (executable)
@@ -139,6 +139,14 @@ static void app_control(app_control_h app_control, void* app_data){
     std::string uri = request_uri != NULL ? std::string(request_uri) : DEFAULT_URL;
     std::string caller = request_caller != NULL ? std::string(request_caller) : DEFAULT_CALLER;
 
+    if((operation && !strcmp(operation, "http://tizen.org/appcontrol/operation/view")) && (request_uri != NULL)) {
+        if (request_uri) {
+            if (!strncmp(request_uri, "/opt/", strlen("/opt/"))) {
+                uri = std::string("file://") + uri;
+            }
+        }
+    }
+
     BROWSER_LOGD("[%s] uri=%s", __func__, uri.c_str());
     free(request_uri);
     free(request_mime_type);
index abfcfc3ebe02d625b73e47a91610e2ba6768443d..d61b65de8c192a9a477a69f308e2abadbc08c283 100755 (executable)
         </app-control>
         <app-control>
             <operation name="http://tizen.org/appcontrol/operation/view" />
-            <uri name="file" />
             <mime name="application/x-shockwave-flash" />
         </app-control>
         <app-control>
             <operation name="http://tizen.org/appcontrol/operation/view" />
-            <uri name="file" />
             <mime name="image/svg+xml" />
         </app-control>
         <app-control>
             <operation name="http://tizen.org/appcontrol/operation/view" />
-            <uri name="file" />
             <mime name="text/html" />
         </app-control>
         <app-control>
             <operation name="http://tizen.org/appcontrol/operation/view" />
-            <uri name="file" />
             <mime name="application/xml" />
         </app-control>
     </ui-application>