SWE: Fix missing video in fullscreen mode
- Reduce the number of view layers for fullscreen view
- Hide the title bar when going fullscreen
Issues-fixed: SWE-2695
Change-Id: Ieb677e421215fbb3aa345d158d079dc38c2a28ee
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 0508e67..6056cf5 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -91,7 +91,6 @@
protected FrameLayout mContentView;
protected FrameLayout mCustomViewContainer;
- protected FrameLayout mFullscreenContainer;
private FrameLayout mFixedTitlebarContainer;
private View mCustomView;
@@ -585,11 +584,9 @@
mOriginalOrientation = mActivity.getRequestedOrientation();
FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView();
- mFullscreenContainer = new FullscreenHolder(mActivity);
- mFullscreenContainer.addView(view, COVER_SCREEN_PARAMS);
- decor.addView(mFullscreenContainer, COVER_SCREEN_PARAMS);
+ decor.addView(view, COVER_SCREEN_PARAMS);
mCustomView = view;
- setFullscreen(true);
+ showFullscreen(true);
((BrowserWebView) getWebView()).setVisibility(View.INVISIBLE);
mCustomViewCallback = callback;
mActivity.setRequestedOrientation(requestedOrientation);
@@ -600,10 +597,9 @@
((BrowserWebView) getWebView()).setVisibility(View.VISIBLE);
if (mCustomView == null)
return;
- setFullscreen(false);
+ showFullscreen(false);
FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView();
- decor.removeView(mFullscreenContainer);
- mFullscreenContainer = null;
+ decor.removeView(mCustomView);
mCustomView = null;
mCustomViewCallback.onCustomViewHidden();
// Show the content view.
@@ -810,7 +806,7 @@
win.setAttributes(winParams);
}
- //make full screen bu showing/hiding topbar and system status bar
+ //make full screen by showing/hiding topbar and system status bar
public void showFullscreen(boolean fullScreen) {
//Hide/show system ui bar as needed
if (!BrowserSettings.getInstance().useFullscreen())
@@ -906,20 +902,6 @@
mUiController.hideCustomView();
}
- static class FullscreenHolder extends FrameLayout {
-
- public FullscreenHolder(Context ctx) {
- super(ctx);
- setBackgroundColor(ctx.getResources().getColor(R.color.black));
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent evt) {
- return true;
- }
-
- }
-
public void setContentViewMarginTop(int margin) {
LinearLayout.LayoutParams params =
(LinearLayout.LayoutParams) mContentView.getLayoutParams();