cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject [09/50] git commit: CB-7018 Fix setButtonPlumbedToJs never un-listening
Date Thu, 28 Aug 2014 19:03:23 GMT
CB-7018 Fix setButtonPlumbedToJs never un-listening


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/519cd39e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/519cd39e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/519cd39e

Branch: refs/heads/master
Commit: 519cd39e3841f595ca4887d561f45cc7a35d0602
Parents: 5a61009
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Fri Jul 18 13:46:29 2014 -0400
Committer: Archana Naik <naika@lab126.com>
Committed: Wed Jul 30 18:10:48 2014 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaWebView.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/519cd39e/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 042c5c2..8171b18 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -824,13 +824,17 @@ public class CordovaWebView extends AmazonWebView {
         return super.onKeyUp(keyCode, event);
     }
 
-    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);


Mime
View raw message