From a36aa4468025350d6563b950aafaec69096626e1 Mon Sep 17 00:00:00 2001 From: Guneet K Date: Mon, 14 May 2018 15:12:22 +0530 Subject: [PATCH 01/16] coverity error handling This patch makes handle_ a data member of XWalkExtension class. dlclose(handle_) is called from XWalkExtension class destructor to prevent resource leak. Coverity:109521 Change-Id: I24ae7763809536b3b5ad486c7f45c7c40a9dc528 Signed-off-by: Guneet K --- extensions/common/xwalk_extension.cc | 13 ++++++++----- extensions/common/xwalk_extension.h | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extensions/common/xwalk_extension.cc b/extensions/common/xwalk_extension.cc index a5f9292..f1ecfa5 100755 --- a/extensions/common/xwalk_extension.cc +++ b/extensions/common/xwalk_extension.cc @@ -20,6 +20,7 @@ XWalkExtension::XWalkExtension(const std::string& path, library_path_(path), xw_extension_(0), lazy_loading_(false), + handle_(nullptr), delegate_(delegate), created_instance_callback_(NULL), destroyed_instance_callback_(NULL), @@ -39,6 +40,7 @@ XWalkExtension::XWalkExtension(const std::string& path, name_(name), entry_points_(entry_points), lazy_loading_(true), + handle_(nullptr), delegate_(delegate), created_instance_callback_(NULL), destroyed_instance_callback_(NULL), @@ -54,25 +56,26 @@ XWalkExtension::~XWalkExtension() { if (shutdown_callback_) shutdown_callback_(xw_extension_); XWalkExtensionAdapter::GetInstance()->UnregisterExtension(this); + dlclose(handle_); } bool XWalkExtension::Initialize() { if (initialized_) return true; - void* handle = dlopen(library_path_.c_str(), RTLD_LAZY); - if (!handle) { + handle_ = dlopen(library_path_.c_str(), RTLD_LAZY); + if (!handle_) { LOGGER(ERROR) << "Error loading extension '" << library_path_ << "' : " << dlerror(); return false; } XW_Initialize_Func initialize = reinterpret_cast( - dlsym(handle, "XW_Initialize")); + dlsym(handle_, "XW_Initialize")); if (!initialize) { LOGGER(ERROR) << "Error loading extension '" << library_path_ << "' : couldn't get XW_Initialize function."; - dlclose(handle); + dlclose(handle_); return false; } @@ -84,7 +87,7 @@ bool XWalkExtension::Initialize() { if (ret != XW_OK) { LOGGER(ERROR) << "Error loading extension '" << library_path_ << "' : XW_Initialize() returned error value."; - dlclose(handle); + dlclose(handle_); return false; } diff --git a/extensions/common/xwalk_extension.h b/extensions/common/xwalk_extension.h index c7aaf83..6b19630 100755 --- a/extensions/common/xwalk_extension.h +++ b/extensions/common/xwalk_extension.h @@ -66,6 +66,7 @@ class XWalkExtension { std::string javascript_api_; StringVector entry_points_; bool lazy_loading_; + void *handle_; XWalkExtensionDelegate* delegate_; -- 2.7.4 From c8c1a1c5d78776c99fff97a1c86ab041bb5a29ec Mon Sep 17 00:00:00 2001 From: Guneet K Date: Mon, 14 May 2018 16:08:34 +0530 Subject: [PATCH 02/16] coverity error handling This patch makes handle_ a data member of XWalkExtensionManager class. dlclose(handle_) is called from XWalkExtensionManager class destructor to prevent resource leak. coverity:109521 Change-Id: I4751e38e50b491dc54a893d5c9d1da4e41ab90f0 Signed-off-by: Guneet K --- extensions/common/xwalk_extension_manager.cc | 9 ++++++--- extensions/common/xwalk_extension_manager.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/extensions/common/xwalk_extension_manager.cc b/extensions/common/xwalk_extension_manager.cc index 130eca8..f0e3084 100755 --- a/extensions/common/xwalk_extension_manager.cc +++ b/extensions/common/xwalk_extension_manager.cc @@ -55,15 +55,18 @@ XWalkExtensionManager::XWalkExtensionManager() { } XWalkExtensionManager::~XWalkExtensionManager() { + for (auto dlhandle : handle_) + dlclose(dlhandle); } void XWalkExtensionManager::PreloadExtensions() { for (int i = 0; kPreloadLibs[i]; i++) { LOGGER(DEBUG) << "Preload libs : " << kPreloadLibs[i]; - void* handle = dlopen(kPreloadLibs[i], RTLD_NOW|RTLD_GLOBAL); - if (handle == nullptr) { + void *dlhandle = dlopen(kPreloadLibs[i], RTLD_NOW|RTLD_GLOBAL); + if (dlhandle == nullptr) LOGGER(WARN) << "Fail to load libs : " << dlerror(); - } + else + handle_.push_back(dlhandle); } } diff --git a/extensions/common/xwalk_extension_manager.h b/extensions/common/xwalk_extension_manager.h index cfbdede..786edfc 100755 --- a/extensions/common/xwalk_extension_manager.h +++ b/extensions/common/xwalk_extension_manager.h @@ -40,6 +40,7 @@ class XWalkExtensionManager : public XWalkExtension::XWalkExtensionDelegate { StringSet extension_symbols_; ExtensionMap extensions_; + std::vector handle_; }; } // namespace extensions -- 2.7.4 From d9b1c47c315d6c8f74b5ce60683ddc923987a59a Mon Sep 17 00:00:00 2001 From: Guneet K Date: Wed, 16 May 2018 18:06:30 +0530 Subject: [PATCH 03/16] Hotfix for "App Not Launch" Issue This patch removes the initialization of window using wrt-loader. The initialization of window happens at actual launch time. Change-Id: I6e1c16defbf5cf9283184cdc5cf056136e8a555f Signed-off-by: Guneet K --- runtime/browser/preload_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/browser/preload_manager.cc b/runtime/browser/preload_manager.cc index 53317ae..fe1cce7 100755 --- a/runtime/browser/preload_manager.cc +++ b/runtime/browser/preload_manager.cc @@ -49,7 +49,7 @@ void PreloadManager::CreateCacheComponet() { ewk_context_new_with_injected_bundle_path(INJECTED_BUNDLE_PATH); context = context; // To prevent build warning cached_window_.reset(new NativeAppWindow()); - cached_window_->Initialize(); + //cached_window_->Initialize(); } NativeWindow* PreloadManager::GetCachedNativeWindow() { -- 2.7.4 From 57b3ac78e6d2dd5545147874a01684bed7a3b203 Mon Sep 17 00:00:00 2001 From: YongGeol Jung Date: Wed, 16 May 2018 07:35:26 -0700 Subject: [PATCH 04/16] [hotfix] Fix js callback crash issue. JS callback causes crash if current |context| of |isolate| is null. To prevent this, make new |context| for |isolate|. Change-Id: I212beb06dfe9dfab310b71d1dbb594c3abb3c4c9 Signed-off-by: YongGeol Jung --- extensions/renderer/runtime_ipc_client.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/renderer/runtime_ipc_client.cc b/extensions/renderer/runtime_ipc_client.cc index 6b96828..3835b32 100644 --- a/extensions/renderer/runtime_ipc_client.cc +++ b/extensions/renderer/runtime_ipc_client.cc @@ -43,6 +43,13 @@ void RuntimeIPCClient::JSCallback::Call(v8::Isolate* isolate, if (!callback_.IsEmpty()) { v8::HandleScope handle_scope(isolate); v8::TryCatch try_catch(isolate); + v8::Local context(isolate->GetCurrentContext()); + if (context.IsEmpty()) { + // If there's no JavaScript on the stack, we have to make a new Context. + context = v8::Context::New(isolate); + } + v8::Context::Scope scope(context); + v8::Handle func = v8::Local::New(isolate, callback_); func->Call(func, 1, args); -- 2.7.4 From 7f56f6ccb8f03d6162b5b2d19742bb35ac52e785 Mon Sep 17 00:00:00 2001 From: "surya.kumar7" Date: Wed, 28 Feb 2018 13:00:23 +0530 Subject: [PATCH 05/16] Print dlerror() for debugging dlopen() fails for numerous reasons and returns NULL in such cases. Logging the error will be useful for inspecting the failure reason. Change-Id: Idc21de1165537160baf1c7dfbb76a2b3c3cfe2d8 Signed-off-by: surya.kumar7 --- loader/wrt_loader.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loader/wrt_loader.cc b/loader/wrt_loader.cc index 14ea066..d42d69d 100644 --- a/loader/wrt_loader.cc +++ b/loader/wrt_loader.cc @@ -21,7 +21,7 @@ int main(int argc, char* argv[]) { void* handle = dlopen("/usr/bin/xwalk_runtime", RTLD_NOW); if (!handle) { - dlog_print(DLOG_DEBUG, "XWALK", "Error loading xwalk_runtime"); + dlog_print(DLOG_ERROR, "XWALK", "Error loading xwalk_runtime: %s", dlerror()); return false; } @@ -29,7 +29,7 @@ int main(int argc, char* argv[]) { MAIN_FUNC real_main = reinterpret_cast(dlsym(handle, "main")); if (!real_main) { - dlog_print(DLOG_DEBUG, "XWALK", "Error loading real_main"); + dlog_print(DLOG_ERROR, "XWALK", "Error loading real_main: %s", dlerror()); return false; } -- 2.7.4 From 60a66619fd827b006d2f09d8d2f8f74498220cfd Mon Sep 17 00:00:00 2001 From: Prathmesh Date: Fri, 25 May 2018 15:33:22 +0530 Subject: [PATCH 06/16] Fix application launch issue. Added a default timer in case if the Rendered is not called from engine. Show window on timer fired Ref Patches:http://slp-info.sec.samsung.net/gerrit/#/c/3105521 http://slp-info.sec.samsung.net/gerrit/#/c/3101926 Change-Id: I28dc0192acee6ed3dbb6686aaa668552ddde2835 Signed-off-by: Prathmesh --- common/app_control.h | 2 +- runtime/browser/ui_runtime.cc | 1 + runtime/browser/web_application.cc | 48 ++++++++++++++++++++++++++++++++++---- runtime/browser/web_application.h | 10 ++++++++ 4 files changed, 56 insertions(+), 5 deletions(-) diff --git a/common/app_control.h b/common/app_control.h index 573d24a..e0f5a4c 100644 --- a/common/app_control.h +++ b/common/app_control.h @@ -57,8 +57,8 @@ class AppControl { bool LaunchRequest(); private: - app_control_h app_control_; bundle* app_control_bundle_; + app_control_h app_control_; }; } // namespace common diff --git a/runtime/browser/ui_runtime.cc b/runtime/browser/ui_runtime.cc index 7a6188f..bb0e11a 100755 --- a/runtime/browser/ui_runtime.cc +++ b/runtime/browser/ui_runtime.cc @@ -135,6 +135,7 @@ bool UiRuntime::OnCreate() { setlocale(LC_ALL, ""); bindtextdomain(kTextDomainRuntime, kTextLocalePath); + application_->SetTimeoutFirstFrameDelay(); return true; } diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index cfe9b0c..9039ca7 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -61,6 +61,7 @@ #define SESSION_COUNTER_INTERVAL 0.1 #define MAIN_LOOP_INTERVAL 1 +static const float FirstFrameDelayWaitTime = 2.0f; using namespace extensions; namespace runtime { @@ -121,7 +122,7 @@ const char* kLocationPrivilege = "http://tizen.org/privilege/location"; const char* kRecordPrivilege = "http://tizen.org/privilege/recorder"; const char* kStoragePrivilege = "http://tizen.org/privilege/unlimitedstorage"; const char* kUsermediaPrivilege = "http://tizen.org/privilege/mediacapture"; -const char* kNotiIconFile = "noti_icon.png"; +//const char* kNotiIconFile = "noti_icon.png"; const char* kFileScheme = "file://"; const char* kVisibilitySuspendFeature = "visibility,suspend"; @@ -297,13 +298,15 @@ WebApplication::WebApplication( lang_changed_mode_(false), is_terminate_called_(false), is_close_page_called_(false), + is_window_inactive_(false), ewk_context_( ewk_context_new_with_injected_bundle_path(INJECTED_BUNDLE_PATH)), has_ownership_of_ewk_context_(true), window_(window), appid_(app_data->app_id()), app_data_(app_data), - locale_manager_(new common::LocaleManager()) { + locale_manager_(new common::LocaleManager()), + firstframe_delay_timer_(NULL) { Initialize(); } @@ -317,12 +320,14 @@ WebApplication::WebApplication( lang_changed_mode_(false), is_terminate_called_(false), is_close_page_called_(false), + is_window_inactive_(false), ewk_context_(context), has_ownership_of_ewk_context_(false), window_(window), appid_(app_data->app_id()), app_data_(app_data), - locale_manager_(new common::LocaleManager()) { + locale_manager_(new common::LocaleManager()), + firstframe_delay_timer_(NULL) { Initialize(); } @@ -647,6 +652,7 @@ void WebApplication::Resume() { if (view_stack_.size() > 0 && view_stack_.front() != NULL) view_stack_.front()->SetVisibility(true); + is_window_inactive_ = false; if (app_data_->setting_info() != NULL && app_data_->setting_info()->background_support_enabled()) { return; @@ -662,6 +668,7 @@ void WebApplication::Suspend() { if (view_stack_.size() > 0 && view_stack_.front() != NULL) view_stack_.front()->SetVisibility(false); + is_window_inactive_ = true; if (app_data_->setting_info() != NULL && app_data_->setting_info()->background_support_enabled()) { LOGGER(DEBUG) << "gone background (backgroud support enabed)"; @@ -675,6 +682,7 @@ void WebApplication::Suspend() { } void WebApplication::Terminate() { + is_window_inactive_ = false; // Just process closing page once. if (is_terminate_called_ || is_close_page_called_) return; @@ -704,6 +712,7 @@ void WebApplication::ProcessClosingPage() { ecore_main_loop_begin(); ecore_timer_del(main_loop.timer); ecore_timer_del(session_counter.timer); + UnsetTimeout(); } void WebApplication::ClosePage() { @@ -1206,8 +1215,12 @@ void WebApplication::OnRendered(WebView* view) { LOGGER(DEBUG) << "Rendered"; splash_screen_->HideSplashScreen(SplashScreen::HideReason::RENDERED); + if (firstframe_delay_timer_) { + UnsetTimeout(); + } + // Do not show(), active() for language change - if(lang_changed_mode_ == false){ + if(lang_changed_mode_ == false && is_window_inactive_ == false) { // Show window after frame rendered. if (common::getProfile() == common::kPROFILE_MOBILE) { if (common::utils::StartsWith(view->GetUrl(), kFileScheme)) { @@ -1519,4 +1532,31 @@ void WebApplication::OnUsermediaPermissionRequest( popup->Show(); } +void WebApplication::SetTimeoutFirstFrameDelay() { + LOGGER(DEBUG); + firstframe_delay_timer_ = ecore_timer_add( + FirstFrameDelayWaitTime, + FirstFrameDelayTimerCallback, this); +} + +Eina_Bool WebApplication::FirstFrameDelayTimerCallback(void* data) { + LOGGER(DEBUG) << "FrameRendered not obtained from engine. Show window"; + WebApplication* This = static_cast(data); + /* Do not show(), active() when window is already in background */ + if(This->is_window_inactive_ == false) { + This->window_->Show(); + This->window_->Active(); + } + This->firstframe_delay_timer_ = NULL; + return ECORE_CALLBACK_CANCEL; +} + +void WebApplication::UnsetTimeout() { + LOGGER(DEBUG); + if (firstframe_delay_timer_) { + ecore_timer_del(firstframe_delay_timer_); + firstframe_delay_timer_ = NULL; + } +} + } // namespace runtime diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index 99e56d0..a724a09 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -60,6 +60,11 @@ class WebApplication : public WebView::EventListener { std::string data_path() const { return app_data_path_; } bool launched() const { return launched_; } std::list view_stack() const { return view_stack_; } + /* + * @function SetTimeoutFirstFrameDelay + * @desc Sets a fixed timer of 2 sec from the app create time + */ + void SetTimeoutFirstFrameDelay(); virtual void OnCreatedNewWebView(WebView* view, WebView* new_view); virtual void OnClosedWebView(WebView* view); @@ -131,12 +136,16 @@ class WebApplication : public WebView::EventListener { bool tizenWebKitCompatibilityEnabled() const { return (m_major && m_major < 3); } } m_tizenCompatibilitySettings; + static Eina_Bool FirstFrameDelayTimerCallback(void* data); + void UnsetTimeout(); + bool launched_; bool debug_mode_; bool verbose_mode_; bool lang_changed_mode_; bool is_terminate_called_; bool is_close_page_called_; + bool is_window_inactive_; Ewk_Context* ewk_context_; bool has_ownership_of_ewk_context_; NativeWindow* window_; @@ -151,6 +160,7 @@ class WebApplication : public WebView::EventListener { std::string csp_rule_; std::string csp_report_rule_; VCWebView* vc_webview_; + Ecore_Timer* firstframe_delay_timer_; }; } // namespace runtime -- 2.7.4 From fc5cd3021777786b51fed198a44fd54124b2d5d4 Mon Sep 17 00:00:00 2001 From: "k2.nagaraju" Date: Mon, 4 Jun 2018 14:49:15 +0530 Subject: [PATCH 07/16] Runtime object creation code cleanup. Change-Id: I6abd9fa5e506099def2ca41143887dbb9f7edccc Signed-off-by: k2.nagaraju --- runtime/browser/runtime.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/runtime/browser/runtime.cc b/runtime/browser/runtime.cc index 8e68210..01af3bf 100644 --- a/runtime/browser/runtime.cc +++ b/runtime/browser/runtime.cc @@ -41,24 +41,19 @@ Runtime::~Runtime() { std::unique_ptr Runtime::MakeRuntime( common::ApplicationData* app_data) { - if (app_data->app_type() == common::ApplicationData::UI) { - return std::unique_ptr(new UiRuntime(app_data)); - } #ifdef IME_FEATURE_SUPPORT - else if (TIZEN_FEATURE_web_ime_support && - app_data->app_type() == common::ApplicationData::IME) { + if (TIZEN_FEATURE_web_ime_support && + app_data->app_type() == common::ApplicationData::IME) { return std::unique_ptr(new ImeRuntime(app_data)); } #endif // IME_FEATURE_SUPPORT #ifdef WATCH_FACE_FEATURE_SUPPORT - else if (TIZEN_FEATURE_watch_face_support && - app_data->app_type() == common::ApplicationData::WATCH) { + if (TIZEN_FEATURE_watch_face_support && + app_data->app_type() == common::ApplicationData::WATCH) { return std::unique_ptr(new WatchRuntime(app_data)); } #endif // WATCH_FACE_FEATURE_SUPPORT - else { - return std::unique_ptr(new UiRuntime(app_data)); - } + return std::unique_ptr(new UiRuntime(app_data)); } void Runtime::ProcessClosingPage(WebApplication* application) { -- 2.7.4 From 0ac321d81ee989f42adf03ebed1ada53a73fe960 Mon Sep 17 00:00:00 2001 From: Prathmesh Date: Fri, 22 Jun 2018 10:00:03 +0530 Subject: [PATCH 08/16] Show window on frame rendered after appcontrol reset - Currently window is shown after reset once appcontrol is received. Due to this sometimes old contents are visible first then new contents are rendered - If the app is reset on app-control then do show the window right away. Rather the window will be shown once frame rendered is received Change-Id: Ice201a6c6ff35430186abcad917af767fb1ccdaf Signed-off-by: Prathmesh --- runtime/browser/web_application.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 9039ca7..e9c9c33 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -626,7 +626,11 @@ void WebApplication::AppControl( if (!verbose_mode_ && appcontrol->data(kVerboseKey) == "true") { verbose_mode_ = true; } - window_->Active(); + + // If app was reset then show window after new frame + // is rendered. Else old page will be displayed + if (!do_reset) + window_->Active(); } void WebApplication::SendAppControlEvent() { -- 2.7.4 From 3a8f307a04aefd6c7c2049aea130a0004c8a6e0a Mon Sep 17 00:00:00 2001 From: jaekuk lee Date: Fri, 22 Jun 2018 06:21:44 +0000 Subject: [PATCH 09/16] Revert "Show window on frame rendered after appcontrol reset" This reverts commit 0ac321d81ee989f42adf03ebed1ada53a73fe960. Change-Id: Icc64ab6ef123581210cbc552eff33a645727b670 --- runtime/browser/web_application.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index e9c9c33..9039ca7 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -626,11 +626,7 @@ void WebApplication::AppControl( if (!verbose_mode_ && appcontrol->data(kVerboseKey) == "true") { verbose_mode_ = true; } - - // If app was reset then show window after new frame - // is rendered. Else old page will be displayed - if (!do_reset) - window_->Active(); + window_->Active(); } void WebApplication::SendAppControlEvent() { -- 2.7.4 From a65c5d3b06f018bb826d6c4e0d508f2c8a2aaab8 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Fri, 6 Jul 2018 09:23:00 +0900 Subject: [PATCH 10/16] Changed EFL_UTIL_NOTIFICATION_LEVEL_3 to EFL_UTIL_NOTIFICATION_LEVEL_TOP Change-Id: I052067a177e95513ddc09e52fac5368611755126 Signed-off-by: jaekuk, lee --- runtime/browser/notification_window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 runtime/browser/notification_window.cc diff --git a/runtime/browser/notification_window.cc b/runtime/browser/notification_window.cc old mode 100644 new mode 100755 index e701601..3ff7f3e --- a/runtime/browser/notification_window.cc +++ b/runtime/browser/notification_window.cc @@ -28,7 +28,7 @@ Evas_Object* NotificationWindow::CreateWindowInternal() { elm_config_accel_preference_set("opengl"); Evas_Object* window = elm_win_add(NULL, "xwalk-window", ELM_WIN_NOTIFICATION); efl_util_set_notification_window_level(window, - EFL_UTIL_NOTIFICATION_LEVEL_3); + EFL_UTIL_NOTIFICATION_LEVEL_TOP); SetAlwaysOnTop(window, true); return window; } -- 2.7.4 From d4211b0eeb7d2a5e03dbd2982f2be35b0ac3d030 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Fri, 6 Jul 2018 09:23:00 +0900 Subject: [PATCH 11/16] Change EFL_UTIL_NOTIFICATION_LEVEL_3 to EFL_UTIL_NOTIFICATION_LEVEL_TOP http://mosaic.sec.samsung.net/kms/comty.do?comtyId=2305148&menuId=2305189&postId=43363033&page=view&type=LIST Change-Id: I052067a177e95513ddc09e52fac5368611755126 Signed-off-by: jaekuk, lee --- runtime/browser/notification_window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 runtime/browser/notification_window.cc diff --git a/runtime/browser/notification_window.cc b/runtime/browser/notification_window.cc old mode 100644 new mode 100755 index e701601..3ff7f3e --- a/runtime/browser/notification_window.cc +++ b/runtime/browser/notification_window.cc @@ -28,7 +28,7 @@ Evas_Object* NotificationWindow::CreateWindowInternal() { elm_config_accel_preference_set("opengl"); Evas_Object* window = elm_win_add(NULL, "xwalk-window", ELM_WIN_NOTIFICATION); efl_util_set_notification_window_level(window, - EFL_UTIL_NOTIFICATION_LEVEL_3); + EFL_UTIL_NOTIFICATION_LEVEL_TOP); SetAlwaysOnTop(window, true); return window; } -- 2.7.4 From 99b64b8ae3f78a5a48b9c30d0da3a2d590f25f5b Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Tue, 4 Sep 2018 19:23:17 +0900 Subject: [PATCH 12/16] Fixed crash issue occurred when terminating App using HOME Key Change-Id: Iecdadb9e2baf5c41b8389576dc7103ac63534b9a Signed-off-by: jaekuk, lee --- runtime/browser/web_application.cc | 26 +++++++++++++++----------- runtime/browser/web_application.h | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 9039ca7..2b8eb4a 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -775,7 +775,7 @@ void WebApplication::OnCreatedNewWebView(WebView* /*view*/, WebView* new_view) { vc_webview_->vc_webview_set_view(new_view->evas_object()); } -void WebApplication::RemoveWebViewFromStack(WebView* view) { +void WebApplication::RemoveWebViewFromStack(WebView* view, bool is_closed_webview_called) { if (view_stack_.size() == 0) return; @@ -815,13 +815,17 @@ void WebApplication::RemoveWebViewFromStack(WebView* view) { vc_webview_->vc_webview_set_view(view_stack_.front()->evas_object()); } - // Delete after the callback context(for ewk view) was not used - ecore_idler_add([](void* view) { - WebView* obj = static_cast(view); - delete obj; - return EINA_FALSE; - }, - view); + if (is_closed_webview_called) + delete view; + else { + // Delete after the callback context(for ewk view) was not used + ecore_idler_add([](void* view) { + WebView* obj = static_cast(view); + delete obj; + return EINA_FALSE; + }, + view); + } } Eina_Bool WebApplication::CheckPluginSession(void* user_data) @@ -842,7 +846,7 @@ Eina_Bool WebApplication::CheckPluginSession(void* user_data) void WebApplication::OnClosedWebView(WebView* view) { // Reply to javascript dialog for preventing freeze issue. view->ReplyToJavascriptDialog(); - RemoveWebViewFromStack(view); + RemoveWebViewFromStack(view, true); #if defined(TIZEN_PRODUCT_TV) LOGGER(DEBUG) << "plugin_session_count : " << @@ -1011,7 +1015,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { LOGGER(DEBUG) << "Terminate"; Terminate(); } else { - RemoveWebViewFromStack(view_stack_.front()); + RemoveWebViewFromStack(view_stack_.front(), false); } } } @@ -1031,7 +1035,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { LOGGER(DEBUG) << "Terminate"; Terminate(); } else { - RemoveWebViewFromStack(view_stack_.front()); + RemoveWebViewFromStack(view_stack_.front(), false); } } diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index a724a09..af4fce2 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -125,7 +125,7 @@ class WebApplication : public WebView::EventListener { void LaunchInspector(common::AppControl* appcontrol); void SetupWebView(WebView* view); void SetupWebViewCompatibilitySettings(WebView* view); - void RemoveWebViewFromStack(WebView* view); + void RemoveWebViewFromStack(WebView* view, bool is_closed_webview_called); void SetupTizenVersion(); bool tizenWebKitCompatibilityEnabled() const; -- 2.7.4 From 694c67133f73409973a008246b44ed035a490ff1 Mon Sep 17 00:00:00 2001 From: jaekuk lee Date: Mon, 17 Sep 2018 06:33:41 +0000 Subject: [PATCH 13/16] Revert "Fixed crash issue occurred when terminating App using HOME Key" This reverts commit 99b64b8ae3f78a5a48b9c30d0da3a2d590f25f5b. Change-Id: I5f2a7d21035cf966353e80d5ab13c1afd1e5dca9 --- runtime/browser/web_application.cc | 26 +++++++++++--------------- runtime/browser/web_application.h | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 2b8eb4a..9039ca7 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -775,7 +775,7 @@ void WebApplication::OnCreatedNewWebView(WebView* /*view*/, WebView* new_view) { vc_webview_->vc_webview_set_view(new_view->evas_object()); } -void WebApplication::RemoveWebViewFromStack(WebView* view, bool is_closed_webview_called) { +void WebApplication::RemoveWebViewFromStack(WebView* view) { if (view_stack_.size() == 0) return; @@ -815,17 +815,13 @@ void WebApplication::RemoveWebViewFromStack(WebView* view, bool is_closed_webvie vc_webview_->vc_webview_set_view(view_stack_.front()->evas_object()); } - if (is_closed_webview_called) - delete view; - else { - // Delete after the callback context(for ewk view) was not used - ecore_idler_add([](void* view) { - WebView* obj = static_cast(view); - delete obj; - return EINA_FALSE; - }, - view); - } + // Delete after the callback context(for ewk view) was not used + ecore_idler_add([](void* view) { + WebView* obj = static_cast(view); + delete obj; + return EINA_FALSE; + }, + view); } Eina_Bool WebApplication::CheckPluginSession(void* user_data) @@ -846,7 +842,7 @@ Eina_Bool WebApplication::CheckPluginSession(void* user_data) void WebApplication::OnClosedWebView(WebView* view) { // Reply to javascript dialog for preventing freeze issue. view->ReplyToJavascriptDialog(); - RemoveWebViewFromStack(view, true); + RemoveWebViewFromStack(view); #if defined(TIZEN_PRODUCT_TV) LOGGER(DEBUG) << "plugin_session_count : " << @@ -1015,7 +1011,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { LOGGER(DEBUG) << "Terminate"; Terminate(); } else { - RemoveWebViewFromStack(view_stack_.front(), false); + RemoveWebViewFromStack(view_stack_.front()); } } } @@ -1035,7 +1031,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { LOGGER(DEBUG) << "Terminate"; Terminate(); } else { - RemoveWebViewFromStack(view_stack_.front(), false); + RemoveWebViewFromStack(view_stack_.front()); } } diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index af4fce2..a724a09 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -125,7 +125,7 @@ class WebApplication : public WebView::EventListener { void LaunchInspector(common::AppControl* appcontrol); void SetupWebView(WebView* view); void SetupWebViewCompatibilitySettings(WebView* view); - void RemoveWebViewFromStack(WebView* view, bool is_closed_webview_called); + void RemoveWebViewFromStack(WebView* view); void SetupTizenVersion(); bool tizenWebKitCompatibilityEnabled() const; -- 2.7.4 From f9350cd970c80b677ebfe3b7dbb9990fd198a042 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Mon, 17 Sep 2018 15:45:55 +0900 Subject: [PATCH 14/16] Fixed crash issue occurred when terminating App using HOME Key To resolve the issue that ecore_idler_add() isn't called, Add ecore timer checking plugin_session_count. Change-Id: I6e95f205eb79bf3eac8472e5d77af44788d0ed09 Signed-off-by: jaekuk, lee --- runtime/browser/web_application.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 9039ca7..c74d4be 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -801,12 +801,6 @@ void WebApplication::RemoveWebViewFromStack(WebView* view) { auto extension_server = XWalkExtensionServer::GetInstance(); LOGGER(DEBUG) << "Shutdown extension server"; extension_server->Shutdown(); -#if !defined(TIZEN_PRODUCT_TV) - // Hide the window object for preventing the white screen - // during termination of web application. - evas_object_hide(window_->evas_object()); - Exit(); -#endif } else if (current != view_stack_.front()) { view_stack_.front()->SetVisibility(true); window_->SetContent(view_stack_.front()->evas_object()); @@ -844,7 +838,6 @@ void WebApplication::OnClosedWebView(WebView* view) { view->ReplyToJavascriptDialog(); RemoveWebViewFromStack(view); -#if defined(TIZEN_PRODUCT_TV) LOGGER(DEBUG) << "plugin_session_count : " << XWalkExtensionRendererController::plugin_session_count; @@ -857,7 +850,6 @@ void WebApplication::OnClosedWebView(WebView* view) { CheckPluginSession, &session_counter); if (!session_counter.timer) LOGGER(ERROR) << "It's failed to create session_counter timer"; -#endif } void WebApplication::OnReceivedWrtMessage(WebView* view, -- 2.7.4 From dc27f53837151ae4081f3568c2e7c0e0e8af5d4d Mon Sep 17 00:00:00 2001 From: Guneet K Date: Thu, 1 Feb 2018 19:08:51 +0530 Subject: [PATCH 15/16] [compatibility] Implemented window resize for non circular apps Apps with 320x320 and square apps are not displayed properly. View is truncated. Resize the view to 320x320 so that maximum possible view is displayed in visible area. These kind of apps are identified by profile tag. --------------------------------------------- | SlNo| Profile | Value | Display | --------------------------------------------- | 1 | Not Present | NA | 320x320 | | 2 | Present | mobile | 320x320 | | 3 | Present | NULL | 320x320 | | 4 | Present | wearable | 360x360 | --------------------------------------------- [Reference] http://slp-info.sec.samsung.net/gerrit/#/c/3119525/ Change-Id: Id39ce8f39c939de083e1ae2a7bc9efcaae8ca39a Signed-off-by: Guneet K Signed-off-by: deepti --- common/application_data.cc | 10 ++++++++++ common/application_data.h | 7 +++++++ common/platform_info.h | 2 ++ runtime/browser/native_window.cc | 13 +++++++++++-- runtime/browser/native_window.h | 7 +++++++ runtime/browser/preload_manager.cc | 4 +++- runtime/browser/ui_runtime.cc | 24 +++++++++++++++++++---- runtime/browser/watch_runtime.cc | 18 +++++++++++++++-- runtime/browser/web_application.cc | 12 ++++++++++++ runtime/browser/web_application.h | 1 + runtime/resources/xwalk_tizen.edc | 40 +++++++++++++++++++++++++++++++++----- runtime/runtime.gyp | 3 ++- 12 files changed, 126 insertions(+), 15 deletions(-) diff --git a/common/application_data.cc b/common/application_data.cc index a205ecc..cbcd2ad 100755 --- a/common/application_data.cc +++ b/common/application_data.cc @@ -122,6 +122,11 @@ std::shared_ptr return csp_report_info_; } +std::shared_ptr + ApplicationData::profile_tag_info() const { + return profile_tag_info_; +} + const std::string ApplicationData::pkg_id() const { if (pkg_id_.empty()) { app_info_h app_info; @@ -244,6 +249,11 @@ bool ApplicationData::LoadManifestData() { widget_config_parser->GetManifestData( wgt::parse::CSPInfo::Report_only_key())); + profile_tag_info_ = + std::static_pointer_cast( + widget_config_parser->GetManifestData( + wgt::parse::ProfileTagInfo::Key())); + // Set default empty object if (widget_info_.get() == NULL) { widget_info_.reset(new wgt::parse::WidgetInfo); diff --git a/common/application_data.h b/common/application_data.h index aa910e2..4419123 100755 --- a/common/application_data.h +++ b/common/application_data.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -78,6 +79,8 @@ class ApplicationData { csp_info() const; std::shared_ptr csp_report_info() const; + std::shared_ptr + profile_tag_info() const; const std::string application_path() const { return application_path_; } const std::string pkg_id() const; @@ -111,6 +114,10 @@ class ApplicationData { csp_info_; std::shared_ptr csp_report_info_; + + std::shared_ptr + profile_tag_info_; + ApplicationData::AppType GetAppType(); std::string application_path_; diff --git a/common/platform_info.h b/common/platform_info.h index 009c6f7..20732f7 100644 --- a/common/platform_info.h +++ b/common/platform_info.h @@ -38,6 +38,8 @@ enum _profile { (common::getProfile() & ((common::kPROFILE_WEARABLE))) #define TIZEN_FEATURE_rotary_event_support \ (common::getProfile() & ((common::kPROFILE_WEARABLE))) +#define TIZEN_FEATURE_display_resize_support \ + (common::getProfile() & ((common::kPROFILE_WEARABLE))) extern enum _profile getProfile(void); diff --git a/runtime/browser/native_window.cc b/runtime/browser/native_window.cc index 5bbbc4d..7ca946e 100755 --- a/runtime/browser/native_window.cc +++ b/runtime/browser/native_window.cc @@ -80,9 +80,11 @@ NativeWindow::NativeWindow() top_layout_(NULL), rotation_(0), handler_id_(0), - natural_orientation_(ScreenOrientation::LANDSCAPE_PRIMARY) { + natural_orientation_(ScreenOrientation::PORTRAIT_PRIMARY), + display_shape_type_(Shape::STANDARD){ } + NativeWindow::~NativeWindow() { if (window_) evas_object_del(window_); @@ -126,7 +128,14 @@ void NativeWindow::Initialize() { // top layout Evas_Object* top_layout = elm_layout_add(conformant); - elm_layout_file_set(top_layout, kEdjePath, "web-application"); + if (display_shape_type_ == Shape::SQUARE) { + LOGGER(DEBUG) << "Device shape square"; + elm_layout_file_set(top_layout, kEdjePath, "web-applicationsview"); + } else { + LOGGER(DEBUG) << "Device shape standard"; + elm_layout_file_set(top_layout, kEdjePath, "web-application"); + } + EVAS_SIZE_EXPAND_FILL(top_layout); elm_object_content_set(conformant, top_layout); evas_object_show(top_layout); diff --git a/runtime/browser/native_window.h b/runtime/browser/native_window.h index 3cd094d..981f2d5 100755 --- a/runtime/browser/native_window.h +++ b/runtime/browser/native_window.h @@ -38,6 +38,10 @@ class NativeWindow { NORMAL = 0, NOTIFICATION = 1 }; + enum class Shape { + STANDARD = 0, + SQUARE = 1 + }; typedef std::function RotationHandler; NativeWindow(); virtual ~NativeWindow(); @@ -65,6 +69,8 @@ class NativeWindow { Type type() const { return window_type_;} void EnableManualRotation(bool enable); void ManualRotationDone(); + void SetDisplayShape(Shape disp_shape) { display_shape_type_ = disp_shape; } + Shape GetDisplayShape() { return display_shape_type_; } void SignalEmit(const char* emission, const char* source); void UpdateProgress(double value); @@ -89,6 +95,7 @@ class NativeWindow { int rotation_; int handler_id_; ScreenOrientation natural_orientation_; + Shape display_shape_type_; std::map handler_table_; }; diff --git a/runtime/browser/preload_manager.cc b/runtime/browser/preload_manager.cc index fe1cce7..a8c482a 100755 --- a/runtime/browser/preload_manager.cc +++ b/runtime/browser/preload_manager.cc @@ -21,6 +21,7 @@ #include #include +#include "common/platform_info.h" #include "common/logger.h" #include "runtime/browser/native_app_window.h" #include "extensions/common/xwalk_extension_server.h" @@ -49,7 +50,8 @@ void PreloadManager::CreateCacheComponet() { ewk_context_new_with_injected_bundle_path(INJECTED_BUNDLE_PATH); context = context; // To prevent build warning cached_window_.reset(new NativeAppWindow()); - //cached_window_->Initialize(); + if (!TIZEN_FEATURE_display_resize_support) + cached_window_->Initialize(); } NativeWindow* PreloadManager::GetCachedNativeWindow() { diff --git a/runtime/browser/ui_runtime.cc b/runtime/browser/ui_runtime.cc index bb0e11a..45a465a 100755 --- a/runtime/browser/ui_runtime.cc +++ b/runtime/browser/ui_runtime.cc @@ -27,6 +27,7 @@ #include "common/app_db.h" #include "common/command_line.h" #include "common/logger.h" +#include "common/platform_info.h" #include "common/profiler.h" #include "runtime/common/constants.h" #include "runtime/browser/native_app_window.h" @@ -40,9 +41,9 @@ namespace { const char kCategoryAlwaysOnTop[] = "http://tizen.org/category/always_on_top"; -static NativeWindow* CreateNativeWindow(NativeWindow::Type windowType) { +static NativeWindow* CreateNativeWindow(NativeWindow::Type windowType, + NativeWindow::Shape win_shape) { SCOPE_PROFILE(); - NativeWindow* window; switch (windowType) { @@ -58,6 +59,7 @@ static NativeWindow* CreateNativeWindow(NativeWindow::Type windowType) { } break; } + window->SetDisplayShape(win_shape); window->Initialize(); return window; @@ -76,6 +78,19 @@ bool AlwaysTopRequested(common::AppControl* appcontrol) { return appcontrol->data("always_on_top") == "true"; } +const char kConfigProfile[] = "mobile"; +NativeWindow::Shape GetWindowType(common::ApplicationData* app_data) { + // As profile tag is not present app will be treated as square app + if (!app_data->profile_tag_info()) { + return NativeWindow::Shape::SQUARE; + } + std::string type = app_data->profile_tag_info()->GetProfileType(); + if (!type.compare(kConfigProfile)) { + return NativeWindow::Shape::SQUARE; + } + return NativeWindow::Shape::STANDARD; +} + } // namespace UiRuntime::UiRuntime(common::ApplicationData* app_data) @@ -100,8 +115,9 @@ void UiRuntime::ResetWebApplication(NativeWindow::Type windowType) { application_.reset(); native_window_.reset(); - - native_window_.reset(CreateNativeWindow(windowType)); + if (TIZEN_FEATURE_display_resize_support) + native_window_.reset(CreateNativeWindow(windowType, GetWindowType(app_data_))); + else native_window_.reset(CreateNativeWindow(windowType, NativeWindow::Shape::STANDARD)); LOGGER(DEBUG) << "runtime.cc Created native window"; application_.reset(new WebApplication(native_window_.get(), app_data_, diff --git a/runtime/browser/watch_runtime.cc b/runtime/browser/watch_runtime.cc index 39302ca..749e4f9 100755 --- a/runtime/browser/watch_runtime.cc +++ b/runtime/browser/watch_runtime.cc @@ -35,7 +35,7 @@ namespace runtime { namespace { -static NativeWindow* CreateNativeWindow() { +static NativeWindow* CreateNativeWindow(NativeWindow::Shape win_shape) { SCOPE_PROFILE(); NativeWindow* window = NULL; auto cached = PreloadManager::GetInstance()->GetCachedNativeWindow(); @@ -43,11 +43,25 @@ static NativeWindow* CreateNativeWindow() { delete cached; } window = new NativeWatchWindow(); + window->SetDisplayShape(win_shape); window->Initialize(); return window; } +const char kConfigProfile[] = "mobile"; +NativeWindow::Shape GetWindowType(common::ApplicationData* app_data) { + // As profile tag is not present app will be treated as square app + if (!app_data->profile_tag_info()) { + return NativeWindow::Shape::SQUARE; + } + std::string type = app_data->profile_tag_info()->GetProfileType(); + if (!type.compare(kConfigProfile)) { + return NativeWindow::Shape::SQUARE; + } + return NativeWindow::Shape::STANDARD; +} + } // namespace WatchRuntime::WatchRuntime(common::ApplicationData* app_data) @@ -85,7 +99,7 @@ bool WatchRuntime::OnCreate() { appdb->Remove(kAppDBRuntimeSection, kAppDBRuntimeBundle); // Init WebApplication - native_window_ = CreateNativeWindow(); + native_window_ = CreateNativeWindow(GetWindowType(app_data_)); STEP_PROFILE_START("WebApplication Create"); application_ = new WebApplication(native_window_, app_data_); STEP_PROFILE_END("WebApplication Create"); diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index c74d4be..c5f0c0a 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -515,6 +515,8 @@ void WebApplication::Launch(std::unique_ptr appcontrol) { WebView* view = new WebView(window_, ewk_context_); SetupWebView(view); SetupWebViewCompatibilitySettings(view); + if (TIZEN_FEATURE_display_resize_support) + SetDisplayEffect(view); std::unique_ptr res = resource_manager_->GetStartResource(appcontrol.get()); @@ -1273,6 +1275,16 @@ void WebApplication::SetupWebViewCompatibilitySettings(WebView* view) { } } +void WebApplication::SetDisplayEffect(WebView* view) { + if (window_->GetDisplayShape() == NativeWindow::Shape::SQUARE) { + // Currently blur effect API is called on view, which is not + // correct. Needs to be moved to context. Once new API is + // provided on context below code will get changed. + LOGGER(DEBUG) << "WebApplication::Set Blur effect"; + ewk_view_mirrored_blur_set(view->evas_object(), true); + } +} + bool WebApplication::OnDidNavigation(WebView* /*view*/, const std::string& url) { // scheme handling diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index a724a09..5b247b2 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -125,6 +125,7 @@ class WebApplication : public WebView::EventListener { void LaunchInspector(common::AppControl* appcontrol); void SetupWebView(WebView* view); void SetupWebViewCompatibilitySettings(WebView* view); + void SetDisplayEffect(WebView* view); void RemoveWebViewFromStack(WebView* view); void SetupTizenVersion(); diff --git a/runtime/resources/xwalk_tizen.edc b/runtime/resources/xwalk_tizen.edc index a48c190..c612e64 100755 --- a/runtime/resources/xwalk_tizen.edc +++ b/runtime/resources/xwalk_tizen.edc @@ -25,11 +25,6 @@ collections { type: SWALLOW; description { state: "default" 0.0; - fixed: 1 1; - rel1 { relative: 0.0 0.0; to: base; } - rel2 { relative: 1.0 1.0; to: base; } - align: 0.0 0.0; - } /* ratio 1x1 (only for gear3) */ description { @@ -95,6 +90,41 @@ collections { }//end of group group { + name: "web-applicationsview"; + inherit: "web-application"; + parts{ + part { + name: "elm.swallow.content"; + scale: 0; + type: SWALLOW; + description { + state: "default" 0.0; + //rel1 { offset: 20 20; } + //rel2 { offset: -20 -20; } + min: 320 320; + max: 320 320; + fixed: 1 1; + } + // Below code will also do the same + /*description { + state: "default" 0.0; + rel1 { offset: 20 20; } + rel2 { offset: -20 -20; } + }*/ + + /* ratio 1x1 (only for gear3) */ + description { + state: "ratio1x1" 0.0; + fixed: 1 1; + aspect: 1 1; + aspect_preference: BOTH; + align: 0.5 0.5; + } + } + } + } + + group { name: "PopupTextEntrySet"; parts{ part { diff --git a/runtime/runtime.gyp b/runtime/runtime.gyp index 5772a35..e56deee 100755 --- a/runtime/runtime.gyp +++ b/runtime/runtime.gyp @@ -70,7 +70,8 @@ 'defines': ['TIZEN_PRODUCT_TV'], }], ['tizen_model_formfactor == "circle"', { - 'defines': ['MODEL_FORMFACTOR_CIRCLE'], + 'defines': ['MODEL_FORMFACTOR_CIRCLE', + 'DISPLAY_RESIZE_SUPPORT'], }], ['tizen_feature_rotary_event_support == 1', { 'defines': ['ROTARY_EVENT_FEATURE_SUPPORT'], -- 2.7.4 From 2420a5dcf10f068ae639807a19b0e096282afa23 Mon Sep 17 00:00:00 2001 From: guneet khosla Date: Fri, 28 Sep 2018 16:40:52 +0530 Subject: [PATCH 16/16] Disable cached_window_->Initialize() Disable cached_window_->Initialize() for all profiles. Earlier Initialized was being called for TV and TM1 profiles. Change-Id: Idf3be7d046c7925dfaa5057360da8aa2b8a9650c Signed-off-by: guneet khosla --- runtime/browser/preload_manager.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runtime/browser/preload_manager.cc b/runtime/browser/preload_manager.cc index a8c482a..fe1cce7 100755 --- a/runtime/browser/preload_manager.cc +++ b/runtime/browser/preload_manager.cc @@ -21,7 +21,6 @@ #include #include -#include "common/platform_info.h" #include "common/logger.h" #include "runtime/browser/native_app_window.h" #include "extensions/common/xwalk_extension_server.h" @@ -50,8 +49,7 @@ void PreloadManager::CreateCacheComponet() { ewk_context_new_with_injected_bundle_path(INJECTED_BUNDLE_PATH); context = context; // To prevent build warning cached_window_.reset(new NativeAppWindow()); - if (!TIZEN_FEATURE_display_resize_support) - cached_window_->Initialize(); + //cached_window_->Initialize(); } NativeWindow* PreloadManager::GetCachedNativeWindow() { -- 2.7.4