Skip to content

Commit

Permalink
CB-1289: The menubutton event fires twice
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Aug 28, 2012
1 parent 07439ff commit e078223
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions framework/src/org/apache/cordova/DroidGap.java
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ protected void onPause() {
super.onPause();

LOG.d(TAG, "Paused the application!");

// Don't process pause if shutting down, since onDestroy() will be called
if (this.activityState == ACTIVITY_EXITING) {
return;
Expand Down Expand Up @@ -811,7 +811,7 @@ public void setActivityResultCallback(IPlugin plugin) {
*/
public void onReceivedError(final int errorCode, final String description, final String failingUrl) {
final DroidGap me = this;

// If errorUrl specified, then load it
final String errorUrl = me.getStringProperty("errorUrl", null);
if ((errorUrl != null) && (errorUrl.startsWith("file://") || errorUrl.indexOf(me.baseUrl) == 0 || this.appView.isUrlWhiteListed(errorUrl)) && (!failingUrl.equals(errorUrl))) {
Expand Down Expand Up @@ -1032,20 +1032,4 @@ else if ("exit".equals(id)) {
}
return null;
}


/*
* (non-Javadoc)
* @see android.app.Activity#onKeyUp(int, android.view.KeyEvent)
*/

@Override
public boolean onKeyUp(int keyCode, KeyEvent event)
{
if (appView.canGoBack() || keyCode != KeyEvent.KEYCODE_BACK)
return appView.onKeyUp(keyCode, event);
else
return super.onKeyUp(keyCode, event);
}

}

0 comments on commit e078223

Please sign in to comment.