You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bc...@apache.org on 2012/03/23 21:17:19 UTC

android commit: [CB-367] Back button event should fire on key up not key down Also changed menu key and search key to be consistent.

Updated Branches:
  refs/heads/master a688319ea -> 9d2659833


[CB-367] Back button event should fire on key up not key down
Also changed menu key and search key to be consistent.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/9d265983
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/9d265983
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/9d265983

Branch: refs/heads/master
Commit: 9d265983346942d1af2b7c307e9dc5ff344c3ee8
Parents: a688319
Author: Bryce Curtis <cu...@gmail.com>
Authored: Fri Mar 23 15:17:09 2012 -0500
Committer: Bryce Curtis <cu...@gmail.com>
Committed: Fri Mar 23 15:17:09 2012 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/DroidGap.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/9d265983/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java
index 4d1ae72..c48bf50 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -1078,9 +1078,9 @@ public class DroidGap extends Activity implements CordovaInterface {
      * @param event
      */
     @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
+    public boolean onKeyUp(int keyCode, KeyEvent event) {
         if (this.appView == null) {
-            return super.onKeyDown(keyCode, event);
+            return super.onKeyUp(keyCode, event);
         }
 
         // If back key
@@ -1103,7 +1103,7 @@ public class DroidGap extends Activity implements CordovaInterface {
                 // If not, then invoke behavior of super class
                 else {
                     this.activityState = ACTIVITY_EXITING;
-                    return super.onKeyDown(keyCode, event);
+                    return super.onKeyUp(keyCode, event);
                 }
             }
         }
@@ -1111,7 +1111,7 @@ public class DroidGap extends Activity implements CordovaInterface {
         // If menu key
         else if (keyCode == KeyEvent.KEYCODE_MENU) {
             this.appView.loadUrl("javascript:cordova.fireDocumentEvent('menubutton');");
-            return super.onKeyDown(keyCode, event);
+            return super.onKeyUp(keyCode, event);
         }
 
         // If search key