diff --git a/framework/src/org/apache/cordova/AndroidWebView.java b/framework/src/org/apache/cordova/AndroidWebView.java index 135920cd..bd733845 100755 --- a/framework/src/org/apache/cordova/AndroidWebView.java +++ b/framework/src/org/apache/cordova/AndroidWebView.java @@ -539,13 +539,17 @@ public class AndroidWebView extends WebView implements CordovaWebView { } @Override - public void setButtonPlumbedToJs(int keyCode, boolean value) { + public void setButtonPlumbedToJs(int keyCode, boolean override) { switch (keyCode) { case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_BACK: // TODO: Why are search and menu buttons handled separately? - boundKeyCodes.add(keyCode); + if (override) { + boundKeyCodes.add(keyCode); + } else { + boundKeyCodes.remove(keyCode); + } return; default: throw new IllegalArgumentException("Unsupported keycode: " + keyCode);