mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
CB-1289: The menubutton event fires twice
This commit is contained in:
parent
07439ff99c
commit
e07822350e
@ -602,7 +602,7 @@ public class DroidGap extends Activity implements CordovaInterface {
|
|||||||
super.onPause();
|
super.onPause();
|
||||||
|
|
||||||
LOG.d(TAG, "Paused the application!");
|
LOG.d(TAG, "Paused the application!");
|
||||||
|
|
||||||
// Don't process pause if shutting down, since onDestroy() will be called
|
// Don't process pause if shutting down, since onDestroy() will be called
|
||||||
if (this.activityState == ACTIVITY_EXITING) {
|
if (this.activityState == ACTIVITY_EXITING) {
|
||||||
return;
|
return;
|
||||||
@ -811,7 +811,7 @@ public class DroidGap extends Activity implements CordovaInterface {
|
|||||||
*/
|
*/
|
||||||
public void onReceivedError(final int errorCode, final String description, final String failingUrl) {
|
public void onReceivedError(final int errorCode, final String description, final String failingUrl) {
|
||||||
final DroidGap me = this;
|
final DroidGap me = this;
|
||||||
|
|
||||||
// If errorUrl specified, then load it
|
// If errorUrl specified, then load it
|
||||||
final String errorUrl = me.getStringProperty("errorUrl", null);
|
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))) {
|
if ((errorUrl != null) && (errorUrl.startsWith("file://") || errorUrl.indexOf(me.baseUrl) == 0 || this.appView.isUrlWhiteListed(errorUrl)) && (!failingUrl.equals(errorUrl))) {
|
||||||
@ -1032,20 +1032,4 @@ public class DroidGap extends Activity implements CordovaInterface {
|
|||||||
}
|
}
|
||||||
return null;
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user