Block to work add-on in settings app 25/183125/1
authorSangYong Park <sy302.park@samsung.com>
Mon, 2 Jul 2018 11:11:40 +0000 (20:11 +0900)
committerSangYong Park <sy302.park@samsung.com>
Mon, 2 Jul 2018 11:18:00 +0000 (20:18 +0900)
add-on settings app should work properly without add-on's interference.

Change-Id: Ic284835cd929374708c8c58b49764339d59bb9a5
Signed-off-by: SangYong Park <sy302.park@samsung.com>
tizen/src/browser/api/wrt_api_core.cc
tizen/src/browser/api/wrt_api_core.h
wrt/src/runtime.js

index 5e1a0d5..c171f64 100644 (file)
@@ -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)
index 6c27987..99eb3c0 100644 (file)
@@ -22,6 +22,7 @@ class WebRuntime : public mate::EventEmitter<WebRuntime> {
   ~WebRuntime() override;
 
  private:
+  std::string AppID() const;
   std::string GetMessage() const;
   std::string GetPath() const;
   bool isTizenWebApp() const;
index 4d34751..d0e5460 100755 (executable)
@@ -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);