Check web app's view mode when exiting fullscreen 73/107873/2
authorSanjana Venkatachalam <sanjana.v@samsung.com>
Fri, 30 Dec 2016 09:21:29 +0000 (14:51 +0530)
committerjaekuk lee <juku1999@samsung.com>
Tue, 3 Jan 2017 13:55:45 +0000 (05:55 -0800)
[Issue#]   PLM P161223-02573
[Problem]  Indicator is visible when user exits fullscreen after watching a video in
           Hotstar web app even if viewmodes="fullscreen" is mentioned in config.xml
[Cause]    When exit fullscreen callback is received, indicator is shown even if viewmode
           of webapp is fullscreen
[Solution] Indicator is not shown if viewmode of webapp is fullscreen

[Verification]
        1) Build and install crosswalk-tizen rpm
        2) Launch Hotstar webapp and play any video
        3) Open fullscreen mode and exit fullscreen
        4) Indicator should not be visible

Change-Id: Ic7452d3da8f7e53ef4768b3f8ed619504fbc208e

runtime/browser/native_window.cc
runtime/browser/native_window.h
runtime/browser/web_application.cc

index 5712dff4ccccdff856fa086dbc3b13008c3ff268..9350c660190d75aca75a81d649d9f1357ca23864 100755 (executable)
@@ -72,6 +72,7 @@ NativeWindow::NativeWindow()
     : window_(NULL),
       window_type_(Type::NORMAL),
       initialized_(false),
+      currentViewModeFullScreen_(false),
       focus_(NULL),
       content_(NULL),
       rotation_(0),
@@ -271,6 +272,10 @@ void NativeWindow::SetAutoRotation() {
   rotation_ = elm_win_rotation_get(window_);
 }
 
+void NativeWindow::SetCurrentViewModeFullScreen(bool mode) {
+  currentViewModeFullScreen_ = mode;
+}
+
 void NativeWindow::Show() {
   evas_object_show(window_);
 }
@@ -285,7 +290,7 @@ void NativeWindow::InActive() {
 
 void NativeWindow::FullScreen(bool enable) {
   elm_win_indicator_opacity_set(window_,
-      enable ? ELM_WIN_INDICATOR_TRANSPARENT : ELM_WIN_INDICATOR_OPAQUE);
+      (enable || currentViewModeFullScreen_) ? ELM_WIN_INDICATOR_TRANSPARENT : ELM_WIN_INDICATOR_OPAQUE);
 }
 
 #ifdef MANUAL_ROTATE_FEATURE_SUPPORT
index e939a017ce600b899c908ae697ca040b4a654a02..7d23aa0e5b8bfb911953fa8e759fcc58fdad111c 100755 (executable)
@@ -50,6 +50,7 @@ class NativeWindow {
   void SetRotationLock(int degree);
   void SetRotationLock(ScreenOrientation orientation);
   void SetAutoRotation();
+  void SetCurrentViewModeFullScreen(bool mode);
   int AddRotationHandler(RotationHandler handler);
   void RemoveRotationHandler(int id);
   int rotation() const { return rotation_; }
@@ -78,6 +79,7 @@ class NativeWindow {
   void DidFocusChanged(bool got);
 
   bool initialized_;
+  bool currentViewModeFullScreen_;
   Evas_Object* focus_;
   Evas_Object* content_;
   int rotation_;
index 856c8abcc51acb8018c07222def9765d8171783a..540b4e8557edb4d313062508b2f86de792831fe0 100755 (executable)
@@ -441,6 +441,7 @@ bool WebApplication::Initialize() {
 
   if (app_data_->widget_info() != NULL &&
         app_data_->widget_info()->view_modes() == "fullscreen") {
+      window_->SetCurrentViewModeFullScreen(true);
       window_->FullScreen(true);
   }