Bug 868052 - Show dynamic toolbar when hardware menu button is pressed (on all devices this time). r=lucasr, r=sriram, a=bajaj
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Wed, 29 May 2013 16:07:12 -0700
changeset 142797 9a6f07b8abbf292e69a30555b758e16aa7772746
parent 142796 83d8259caa7b551d47a712fcf3f0e506a9d8c0e3
child 142798 1e5d085c9b129e5122b62dc8cc51a8ec6c9f787f
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr, sriram, bajaj
bugs868052
milestone23.0a2
Bug 868052 - Show dynamic toolbar when hardware menu button is pressed (on all devices this time). r=lucasr, r=sriram, a=bajaj
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -587,18 +587,18 @@ abstract public class GeckoApp
         if (Build.VERSION.SDK_INT >= 11) {
             mMenuPanel.removeAllViews();
             mMenuPanel.addView((GeckoMenu) mMenu);
         }
     }
  
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
-        // Custom Menu should be opened when hardware menu key is pressed.
-        if (Build.VERSION.SDK_INT >= 11 && keyCode == KeyEvent.KEYCODE_MENU) {
+        // Handle hardware menu key presses separately so that we can show a custom menu in some cases.
+        if (keyCode == KeyEvent.KEYCODE_MENU) {
             openOptionsMenu();
             return true;
         }
 
         return super.onKeyDown(keyCode, event);
     }
 
     protected void shareCurrentUrl() {