Bug 708626 - Pressing physical volume button dismisses keyboard, doesn't adjust ringer volume. r=blassey
authorAlex Pakhotin <alexp@mozilla.com>
Fri, 16 Dec 2011 13:19:48 -0800
changeset 82827 fb3fd223b5d8cb82c507cd86c7b5e298b055f7f3
parent 82826 9d6469ffd57761204107d889275dc8b79a4c98ea
child 82828 43aeb296b99e47d73b7c17571eebb5b640cb9c8f
push id21705
push usermbrubeck@mozilla.com
push dateSat, 17 Dec 2011 17:01:50 +0000
treeherdermozilla-central@d4aad9645f77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs708626
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 708626 - Pressing physical volume button dismisses keyboard, doesn't adjust ringer volume. r=blassey
mobile/android/base/AwesomeBar.java
--- a/mobile/android/base/AwesomeBar.java
+++ b/mobile/android/base/AwesomeBar.java
@@ -301,17 +301,19 @@ public class AwesomeBar extends Activity
         if (keyCode == KeyEvent.KEYCODE_BACK ||
             keyCode == KeyEvent.KEYCODE_MENU ||
             keyCode == KeyEvent.KEYCODE_SEARCH ||
             keyCode == KeyEvent.KEYCODE_DPAD_UP ||
             keyCode == KeyEvent.KEYCODE_DPAD_DOWN ||
             keyCode == KeyEvent.KEYCODE_DPAD_LEFT ||
             keyCode == KeyEvent.KEYCODE_DPAD_RIGHT ||
             keyCode == KeyEvent.KEYCODE_DPAD_CENTER ||
-            keyCode == KeyEvent.KEYCODE_DEL) {
+            keyCode == KeyEvent.KEYCODE_DEL ||
+            keyCode == KeyEvent.KEYCODE_VOLUME_UP ||
+            keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
             return super.onKeyDown(keyCode, event);
         } else {
             int selStart = -1;
             int selEnd = -1;
             if (mText.hasSelection()) {
                 selStart = mText.getSelectionStart();
                 selEnd = mText.getSelectionEnd();
             }