Add unknown scheme handler
authorJihoon Chung <jihoon.chung@samsung.com>
Thu, 14 Mar 2013 10:11:57 +0000 (19:11 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Fri, 15 Mar 2013 03:51:44 +0000 (12:51 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Add unknown scheme handler
In case of unknown scheme, send uri to app-control
[SCMRequest] N/A

Change-Id: Ie148d28b29765d293b051242b2e1731e4d6952b5

src/view/common/scheme_action_map.cpp

index 175f3ef..a86b728 100644 (file)
@@ -199,6 +199,18 @@ bool HandleUri(const char* uri,
     Scheme::Type type = scheme.GetType();
     if (type < Scheme::FILE || type >= Scheme::COUNT) {
         LogError("Invalid scheme: " << name);
+        // case of unknown scheme, send to app-control
+        // This is temporary soultion. "invalid" scheme should be handled by
+        // scheme map data
+        bundle* bundleData = bundle_create();
+        appsvc_set_operation(bundleData, APPSVC_OPERATION_VIEW);
+        appsvc_set_uri(bundleData, uri);
+        CONTROLLER_POST_EVENT(
+            ApplicationLauncher,
+            ApplicationLauncherEvents::LaunchApplicationByAppService(
+                bundleData,
+                NULL,
+                NULL));
         return false;
     }