summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSagar Dhawan <sdhawan@codeaurora.org>2015-09-16 14:38:33 -0700
committerjrizzoli <joey@cyanogenmoditalia.it>2015-10-04 20:55:35 +0200
commit76142239426593a99c03e6c5e1d30aee8b1f9539 (patch)
tree9ed2189244a9e11b14caa22339c8e09d88e201c0
parentc28a21dff607058df367cb8d98663bea84da7a68 (diff)
downloadandroid_packages_apps_Gello-76142239426593a99c03e6c5e1d30aee8b1f9539.tar.gz
android_packages_apps_Gello-76142239426593a99c03e6c5e1d30aee8b1f9539.tar.bz2
android_packages_apps_Gello-76142239426593a99c03e6c5e1d30aee8b1f9539.zip
Fix system Navigation bar covering menu when fullscreen
Fixed one case of the navigation bar covering the app menu popup. Needed to make the popup non-modal before showing it and modal immediately after so that it can be interacted with. This will happen only when Immersive mode is in use since testing doesn't work with non-modal popups. CR-Fixed: 903500 Change-Id: Ia265d434a96822e8c1095e89aa42f67a335a13ff
-rw-r--r--src/src/com/android/browser/BrowserPreferencesPage.java5
-rw-r--r--src/src/com/android/browser/appmenu/AppMenu.java7
2 files changed, 11 insertions, 1 deletions
diff --git a/src/src/com/android/browser/BrowserPreferencesPage.java b/src/src/com/android/browser/BrowserPreferencesPage.java
index 46fde6a0..e0e7095b 100644
--- a/src/src/com/android/browser/BrowserPreferencesPage.java
+++ b/src/src/com/android/browser/BrowserPreferencesPage.java
@@ -79,8 +79,11 @@ public class BrowserPreferencesPage extends Activity {
}
Bundle extras = intent.getExtras();
- if (extras == null)
+ if (extras == null){
+ getFragmentManager().beginTransaction().replace(android.R.id.content,
+ new GeneralPreferencesFragment()).commit();
return;
+ }
String fragment = (String) extras.getCharSequence(PreferenceActivity.EXTRA_SHOW_FRAGMENT);
if (fragment != null) {
diff --git a/src/src/com/android/browser/appmenu/AppMenu.java b/src/src/com/android/browser/appmenu/AppMenu.java
index 8453464c..f0b9a5ac 100644
--- a/src/src/com/android/browser/appmenu/AppMenu.java
+++ b/src/src/com/android/browser/appmenu/AppMenu.java
@@ -26,6 +26,8 @@ import android.widget.PopupWindow;
import android.widget.PopupWindow.OnDismissListener;
import org.chromium.base.SysUtils;
+
+import com.android.browser.BrowserSettings;
import com.android.browser.R;
import java.util.ArrayList;
@@ -159,7 +161,12 @@ public class AppMenu implements OnItemClickListener, OnKeyListener {
setMenuHeight(menuItems.size(), visibleDisplayFrame, screenHeight, sizingPadding);
setPopupOffset(mPopup, mCurrentScreenRotation, visibleDisplayFrame, sizingPadding);
mPopup.setOnItemClickListener(this);
+ boolean isImmersive = BrowserSettings.getInstance().useFullscreen();
+ if (isImmersive)
+ mPopup.setModal(false); //Disable modal here(it's required until this point)
mPopup.show();
+ if (isImmersive)
+ mPopup.setModal(true); //Set modal after show, so that Immersive Mode doesn't break
mPopup.getListView().setItemsCanFocus(true);
mPopup.getListView().setOnKeyListener(this);