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()) {
|
if (!isInitialized()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOG.d(TAG, "Handle the pause");
|
|
||||||
sendJavascriptEvent("pause");
|
|
||||||
pluginManager.onPause(keepRunning);
|
pluginManager.onPause(keepRunning);
|
||||||
|
sendJavascriptEvent("pause");
|
||||||
|
|
||||||
// If app doesn't want to run in background
|
// If app doesn't want to run in background
|
||||||
if (!keepRunning) {
|
if (!keepRunning) {
|
||||||
@ -444,8 +443,8 @@ public class CordovaWebViewImpl implements CordovaWebView {
|
|||||||
|
|
||||||
// Resume JavaScript timers. This affects all webviews within the app!
|
// Resume JavaScript timers. This affects all webviews within the app!
|
||||||
engine.setPaused(false);
|
engine.setPaused(false);
|
||||||
sendJavascriptEvent("resume");
|
|
||||||
this.pluginManager.onResume(keepRunning);
|
this.pluginManager.onResume(keepRunning);
|
||||||
|
sendJavascriptEvent("resume");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user