From 3bfcf1e1ec954cf64d4951634dcfb88b4d27edba Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Thu, 18 Aug 2016 16:36:45 +0900 Subject: [PATCH] Add background_support value in AppDB for runtime --- runtime/browser/ime_runtime.cc | 5 +++++ runtime/browser/ui_runtime.cc | 5 +++++ runtime/browser/watch_runtime.cc | 5 +++++ runtime/common/constants.cc | 1 + runtime/common/constants.h | 1 + 5 files changed, 17 insertions(+) diff --git a/runtime/browser/ime_runtime.cc b/runtime/browser/ime_runtime.cc index e588314..8254687 100644 --- a/runtime/browser/ime_runtime.cc +++ b/runtime/browser/ime_runtime.cc @@ -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 diff --git a/runtime/browser/ui_runtime.cc b/runtime/browser/ui_runtime.cc index 6784937..09c0a75 100755 --- a/runtime/browser/ui_runtime.cc +++ b/runtime/browser/ui_runtime.cc @@ -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); diff --git a/runtime/browser/watch_runtime.cc b/runtime/browser/watch_runtime.cc index 26294b5..5d8ac68 100644 --- a/runtime/browser/watch_runtime.cc +++ b/runtime/browser/watch_runtime.cc @@ -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 diff --git a/runtime/common/constants.cc b/runtime/common/constants.cc index edde736..0a77f8d 100644 --- a/runtime/common/constants.cc +++ b/runtime/common/constants.cc @@ -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"; diff --git a/runtime/common/constants.h b/runtime/common/constants.h index 72f6ac0..ff8aca7 100644 --- a/runtime/common/constants.h +++ b/runtime/common/constants.h @@ -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[]; -- 2.7.4