Add background_support value in AppDB for runtime
authorJongHeon Choi <j-h.choi@samsung.com>
Thu, 18 Aug 2016 07:36:45 +0000 (16:36 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Thu, 18 Aug 2016 07:36:55 +0000 (16:36 +0900)
runtime/browser/ime_runtime.cc
runtime/browser/ui_runtime.cc
runtime/browser/watch_runtime.cc
runtime/common/constants.cc
runtime/common/constants.h

index e588314..8254687 100644 (file)
@@ -128,6 +128,11 @@ void ImeRuntime::OnCreate() {
   common::AppDB* appdb = common::AppDB::GetInstance();
   appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeName, "xwalk-tizen");
   appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeAppID, appid);
+  if (app_data_->setting_info()->background_support_enabled()) {
+    appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeBackgroundSupport, "true");
+  } else {
+    appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeBackgroundSupport, "false");
+  }
   appdb->Remove(kAppDBRuntimeSection, kAppDBRuntimeBundle);
 
   // Init ImeApplication
index 6784937..09c0a75 100755 (executable)
@@ -127,6 +127,11 @@ bool UiRuntime::OnCreate() {
   common::AppDB* appdb = common::AppDB::GetInstance();
   appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeName, "xwalk-tizen");
   appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeAppID, appid);
+  if (app_data_->setting_info()->background_support_enabled()) {
+    appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeBackgroundSupport, "true");
+  } else {
+    appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeBackgroundSupport, "false");
+  }
   appdb->Remove(kAppDBRuntimeSection, kAppDBRuntimeBundle);
 
   ResetWebApplication(NativeWindow::Type::NORMAL);
index 26294b5..5d8ac68 100644 (file)
@@ -79,6 +79,11 @@ bool WatchRuntime::OnCreate() {
   common::AppDB* appdb = common::AppDB::GetInstance();
   appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeName, "xwalk-tizen");
   appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeAppID, appid);
+  if (app_data_->setting_info()->background_support_enabled()) {
+    appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeBackgroundSupport, "true");
+  } else {
+    appdb->Set(kAppDBRuntimeSection, kAppDBRuntimeBackgroundSupport, "false");
+  }
   appdb->Remove(kAppDBRuntimeSection, kAppDBRuntimeBundle);
 
   // Init WebApplication
index edde736..0a77f8d 100644 (file)
@@ -24,6 +24,7 @@ const char kAppDBRuntimeSection[] = "Runtime";
 const char kAppDBRuntimeAppID[] = "app_id";
 const char kAppDBRuntimeName[] = "runtime_name";
 const char kAppDBRuntimeBundle[] = "encoded_bundle";
+const char kAppDBRuntimeBackgroundSupport[] = "background_support";
 
 const char kTextLocalePath[] = "/usr/share/locale";
 const char kTextDomainRuntime[] = "xwalk";
index 72f6ac0..ff8aca7 100644 (file)
@@ -25,6 +25,7 @@ extern const char kAppDBRuntimeSection[];
 extern const char kAppDBRuntimeAppID[];
 extern const char kAppDBRuntimeName[];
 extern const char kAppDBRuntimeBundle[];
+extern const char kAppDBRuntimeBackgroundSupport[];
 
 extern const char kTextLocalePath[];
 extern const char kTextDomainRuntime[];