Notify plugins of pause/resume before queing JS event (no-op)

This is actually already the order things happen in since JS events are async. Might as well be clearer about it.
This commit is contained in:
Andrew Grieve 2015-03-25 22:01:57 -04:00
parent 38a8d7742e
commit 0669edddae

View File

@ -426,9 +426,8 @@ public class CordovaWebViewImpl implements CordovaWebView {
if (!isInitialized()) {
return;
}
LOG.d(TAG, "Handle the pause");
sendJavascriptEvent("pause");
pluginManager.onPause(keepRunning);
sendJavascriptEvent("pause");
// If app doesn't want to run in background
if (!keepRunning) {
@ -444,8 +443,8 @@ public class CordovaWebViewImpl implements CordovaWebView {
// Resume JavaScript timers. This affects all webviews within the app!
engine.setPaused(false);
sendJavascriptEvent("resume");
this.pluginManager.onResume(keepRunning);
sendJavascriptEvent("resume");
}
@Override