Resume web app not reset for main operation.
authorJongHeon Choi <j-h.choi@samsung.com>
Fri, 30 Sep 2016 04:08:24 +0000 (13:08 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Fri, 30 Sep 2016 04:13:23 +0000 (13:13 +0900)
runtime/browser/web_application.cc

index 89483e1..3f4f5de 100644 (file)
@@ -127,6 +127,7 @@ const char* kDBPrivateSection = "private";
 const char* kDefaultCSPRule =
     "default-src *; script-src 'self'; style-src 'self'; object-src 'none';";
 const char* kResWgtPath = "res/wgt/";
+const char* kAppControlMain = "http://tizen.org/appcontrol/operation/main";
 
 bool FindPrivilege(common::ApplicationData* app_data,
                    const std::string& privilege) {
@@ -456,6 +457,15 @@ void WebApplication::AppControl(
     }
   }
 
+  // handle http://tizen.org/appcontrol/operation/main operation specially.
+  // only menu-screen app can send launch request with main operation.
+  // in this case, web app should have to resume web app not reset.
+  if (do_reset && (appcontrol->operation() == kAppControlMain)){
+    LOGGER(DEBUG) << "resume app for main operation";
+    do_reset = false;
+    SendAppControlEvent();
+  }
+
   if (do_reset) {
     // Reset to context
     ClearViewStack();