Fixed Tablet UI video playback fullscreen mode

Tablet UI was showing tab bar in video playback full screen
mode. Additionally, it was showing title bar (URL bar) in portrait
mode. This change removes both these bars.

Change-Id: Ic17bccac4434ac1134e2bd5a1a81f518042508c3
diff --git a/res/values-sw600dp-port/bools.xml b/res/values-sw600dp-port/bools.xml
deleted file mode 100644
index 245b2a0..0000000
--- a/res/values-sw600dp-port/bools.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2012 The Android Open Source Project Licensed under the
-    Apache License, Version 2.0 (the "License"); you may not use this file
-    except in compliance with the License. You may obtain a copy of the
-    License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
-    applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-    CONDITIONS OF ANY KIND, either express or implied. See the License for
-    the specific language governing permissions and limitations under the
-    License.
--->
-<resources
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- hide the title bar -->
-    <bool name="hide_title">false</bool>
-</resources>
diff --git a/res/values-sw600dp/bools.xml b/res/values-sw600dp/bools.xml
index 50f87a7..6860179 100644
--- a/res/values-sw600dp/bools.xml
+++ b/res/values-sw600dp/bools.xml
@@ -16,4 +16,5 @@
     <!-- Browser menu toggles -->
     <bool name="menu_show_navigation">false</bool>
     <bool name="menu_show_bookmarks">false</bool>
+    <bool name="hide_title">false</bool>
 </resources>
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 3be4674..e6e9337 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -879,8 +879,10 @@
                     topControlsOffsetYPix -= 1;
                     mTitleBar.getParent().requestTransparentRegion(mTitleBar);
                 }
-                mTitleBar.setTranslationY(topControlsOffsetYPix);
             }
+            // This was done to get HTML5 fullscreen API to work with fixed mode since
+            // topcontrols are used to implement HTML5 fullscreen
+            mTitleBar.setTranslationY(topControlsOffsetYPix);
         }
     }
 
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java
index a87b045..603ce08 100644
--- a/src/com/android/browser/XLargeUi.java
+++ b/src/com/android/browser/XLargeUi.java
@@ -31,6 +31,9 @@
 import android.view.KeyEvent;
 import android.view.Menu;
 import android.view.MenuItem;
+import android.view.View;
+import android.webkit.WebChromeClient;
+
 import org.codeaurora.swe.WebView;
 
 import com.android.browser.R;
@@ -154,6 +157,14 @@
         mTitleBar.setSkipTitleBarAnimations(false);
     }
 
+    @Override
+    public void showCustomView(View view, int requestedOrientation,
+                               WebChromeClient.CustomViewCallback callback) {
+        super.showCustomView(view, requestedOrientation, callback);
+        if (mActionBar != null)
+            mActionBar.hide();
+    }
+
     protected void onRemoveTabCompleted(Tab tab) {
         checkHideActionBar();
     }
@@ -212,6 +223,8 @@
     public void onHideCustomView() {
         super.onHideCustomView();
         checkHideActionBar();
+        if (mActionBar != null)
+            mActionBar.show();
     }
 
     @Override