incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject android commit: CB-1409: Clicking the menu button crashes Jellybean
Date Tue, 11 Sep 2012 13:04:58 GMT
Updated Branches:
  refs/heads/master a29340523 -> a42f095ce


CB-1409: Clicking the menu button crashes Jellybean


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/a42f095c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/a42f095c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/a42f095c

Branch: refs/heads/master
Commit: a42f095cefdd53a12f20872c1de7809ed7db0740
Parents: a293405
Author: Simon MacDonald <simon.macdonald@gmail.com>
Authored: Tue Sep 11 09:04:42 2012 -0400
Committer: Simon MacDonald <simon.macdonald@gmail.com>
Committed: Tue Sep 11 09:04:42 2012 -0400

----------------------------------------------------------------------
 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/a42f095c/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 2b70e8a..9827ed5 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -1001,10 +1001,10 @@ public class DroidGap extends Activity implements CordovaInterface
{
     public boolean onKeyUp(int keyCode, KeyEvent event)
     {
     	//Determine if the focus is on the current view or not
-    	if(appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
-    			keyCode == KeyEvent.KEYCODE_BACK)
-    	{
-    		return appView.onKeyUp(keyCode, event);
+    	if (appView.getHitTestResult() != null && 
+    	    appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
+    	    keyCode == KeyEvent.KEYCODE_BACK) {
+    	    		return appView.onKeyUp(keyCode, event);
     	}
     	else
     		return super.onKeyUp(keyCode, event);


Mime
View raw message