forked from github/cordova-android
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:
parent
38a8d7742e
commit
0669edddae
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user