From 0eda159e45914f690a6f82dff509ecc162d3e793 Mon Sep 17 00:00:00 2001 From: SangYong Park Date: Mon, 2 Jul 2018 20:11:40 +0900 Subject: [PATCH] Block to work add-on in settings app add-on settings app should work properly without add-on's interference. Change-Id: Ic284835cd929374708c8c58b49764339d59bb9a5 Signed-off-by: SangYong Park --- tizen/src/browser/api/wrt_api_core.cc | 6 ++++++ tizen/src/browser/api/wrt_api_core.h | 1 + wrt/src/runtime.js | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tizen/src/browser/api/wrt_api_core.cc b/tizen/src/browser/api/wrt_api_core.cc index 5e1a0d5..c171f64 100644 --- a/tizen/src/browser/api/wrt_api_core.cc +++ b/tizen/src/browser/api/wrt_api_core.cc @@ -26,6 +26,11 @@ WebRuntime::~WebRuntime() { instance_ = nullptr; } +std::string WebRuntime::AppID() const { + auto app_data = common::ApplicationDataManager::GetCurrentAppData(); + return app_data->app_id(); +} + std::string WebRuntime::GetMessage() const { return "message from C++"; } @@ -111,6 +116,7 @@ void WebRuntime::BuildPrototype( prototype->SetClassName(mate::StringToV8(isolate, "WRT")); // TODO: Needs adding necessary interface methods mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) + .SetProperty("appID", &WebRuntime::AppID) .SetMethod("getMessage", &WebRuntime::GetMessage) .SetMethod("getPath", &WebRuntime::GetPath) .SetMethod("isTizenWebApp", &WebRuntime::isTizenWebApp) diff --git a/tizen/src/browser/api/wrt_api_core.h b/tizen/src/browser/api/wrt_api_core.h index 6c27987..99eb3c0 100644 --- a/tizen/src/browser/api/wrt_api_core.h +++ b/tizen/src/browser/api/wrt_api_core.h @@ -22,6 +22,7 @@ class WebRuntime : public mate::EventEmitter { ~WebRuntime() override; private: + std::string AppID() const; std::string GetMessage() const; std::string GetPath() const; bool isTizenWebApp() const; diff --git a/wrt/src/runtime.js b/wrt/src/runtime.js index 4d34751..d0e5460 100755 --- a/wrt/src/runtime.js +++ b/wrt/src/runtime.js @@ -66,7 +66,7 @@ class Runtime { app.on('ready', function(event) { runtime_debug('ready'); _this.extensionManager = new ExtensionManager(EXTENSIONS_PATH); - if (!options.noExtensions) { + if (!options.noExtensions && wrt.appID !== 'NVPDzvckj9.RuntimeAddonSetting') { _this.extensionManager.build(); } _this.extensionManager.activateAll(app); -- 2.7.4