Bug 1134192 - Prevent the options menu from opening in fullscreen mode. r=mfinkle
authorMichael Comella <michael.l.comella@gmail.com>
Mon, 23 Feb 2015 13:12:01 -0800
changeset 245736 0a3ff6c99a9bf9850a2038b4dc4e74546bf7b1f3
parent 245735 5eab6df483fb6d716e7816288742eac69bb25d3b
child 245737 5448050404c59576081a8e16ebbe3725fe41836c
child 245753 4aad4f99b867973adbcc78b346e8e13fcf081a9c
child 245816 b335bcef11b22856e681e8f84c6b9659b6b7c8f4
push id794
push usermichael.l.comella@gmail.com
push dateWed, 25 Feb 2015 00:14:18 +0000
reviewersmfinkle
bugs1134192
milestone39.0a1
Bug 1134192 - Prevent the options menu from opening in fullscreen mode. r=mfinkle
mobile/android/base/BrowserApp.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -67,16 +67,17 @@ import org.mozilla.gecko.tabs.TabHistory
 import org.mozilla.gecko.tabs.TabHistoryFragment;
 import org.mozilla.gecko.tabs.TabHistoryPage;
 import org.mozilla.gecko.tabs.TabsPanel;
 import org.mozilla.gecko.tabs.TabHistoryController.OnShowTabHistory;
 import org.mozilla.gecko.toolbar.AutocompleteHandler;
 import org.mozilla.gecko.toolbar.BrowserToolbar;
 import org.mozilla.gecko.toolbar.BrowserToolbar.TabEditingState;
 import org.mozilla.gecko.toolbar.ToolbarProgressView;
+import org.mozilla.gecko.util.ActivityUtils;
 import org.mozilla.gecko.util.Clipboard;
 import org.mozilla.gecko.util.EventCallback;
 import org.mozilla.gecko.util.GamepadUtils;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.util.MenuUtils;
 import org.mozilla.gecko.util.NativeEventListener;
 import org.mozilla.gecko.util.NativeJSObject;
@@ -2880,16 +2881,20 @@ public class BrowserApp extends GeckoApp
     @Override
     public void openOptionsMenu() {
         // Disable menu access (for hardware buttons) when the software menu button is inaccessible.
         // Note that the software button is always accessible on new tablet.
         if (mBrowserToolbar.isEditing() && !HardwareUtils.isTablet()) {
             return;
         }
 
+        if (ActivityUtils.isFullScreen(this)) {
+            return;
+        }
+
         if (areTabsShown()) {
             mTabsPanel.showMenu();
             return;
         }
 
         // Scroll custom menu to the top
         if (mMenuPanel != null)
             mMenuPanel.scrollTo(0, 0);