mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 20:33:07 +08:00
CB-1409: Clicking the menu button crashes Jellybean
This commit is contained in:
parent
a29340523f
commit
a42f095cef
@ -1001,10 +1001,10 @@ public class DroidGap extends Activity implements CordovaInterface {
|
|||||||
public boolean onKeyUp(int keyCode, KeyEvent event)
|
public boolean onKeyUp(int keyCode, KeyEvent event)
|
||||||
{
|
{
|
||||||
//Determine if the focus is on the current view or not
|
//Determine if the focus is on the current view or not
|
||||||
if(appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
|
if (appView.getHitTestResult() != null &&
|
||||||
keyCode == KeyEvent.KEYCODE_BACK)
|
appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
|
||||||
{
|
keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
return appView.onKeyUp(keyCode, event);
|
return appView.onKeyUp(keyCode, event);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return super.onKeyUp(keyCode, event);
|
return super.onKeyUp(keyCode, event);
|
||||||
|
Loading…
Reference in New Issue
Block a user