diff options
| author | Michael Kolb <kolby@google.com> | 2011-05-27 15:50:54 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-27 15:50:54 -0700 |
| commit | 9465f4db222d280118ecd9a45261a62389dda520 (patch) | |
| tree | 24c496fac3c955cae58a0a675a6cdb1d76db12ec /src/com/android/browser/Controller.java | |
| parent | ce4dbb68de9fe867d69b37f27e1d214381ecefca (diff) | |
| parent | 4bd767d2f4ce166a44687170c6af18e242447205 (diff) | |
Merge "long axis scrolling for nav screen"
Diffstat (limited to 'src/com/android/browser/Controller.java')
| -rw-r--r-- | src/com/android/browser/Controller.java | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 5b259a94..e089f5dd 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -16,12 +16,6 @@ package com.android.browser; -import com.android.browser.IntentHandler.UrlData; -import com.android.browser.UI.DropdownChangeListener; -import com.android.browser.provider.BrowserProvider; -import com.android.browser.search.SearchEngine; -import com.android.common.Search; - import android.app.Activity; import android.app.DownloadManager; import android.app.SearchManager; @@ -81,6 +75,12 @@ import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.Toast; +import com.android.browser.IntentHandler.UrlData; +import com.android.browser.UI.DropdownChangeListener; +import com.android.browser.provider.BrowserProvider; +import com.android.browser.search.SearchEngine; +import com.android.common.Search; + import java.io.ByteArrayOutputStream; import java.io.File; import java.net.URLEncoder; @@ -1235,8 +1235,8 @@ public class Controller } } - protected void onMenuKey() { - mUi.onMenuKey(); + protected boolean onMenuKey() { + return mUi.onMenuKey(); } // menu handling and state @@ -2467,8 +2467,12 @@ public class Controller // Even if MENU is already held down, we need to call to super to open // the IME on long press. if (KeyEvent.KEYCODE_MENU == keyCode) { - event.startTracking(); - return true; + if (mOptionsMenuHandler != null) { + return false; + } else { + event.startTracking(); + return true; + } } if (!noModifiers && ((KeyEvent.KEYCODE_MENU == keyCode) @@ -2596,8 +2600,7 @@ public class Controller if (KeyEvent.KEYCODE_MENU == keyCode) { mMenuIsDown = false; if (event.isTracking() && !event.isCanceled()) { - onMenuKey(); - return true; + return onMenuKey(); } } if (!event.hasNoModifiers()) return false; |
