mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 20:33:07 +08:00
Fix JS timers being disabled on pause and never re-enabled.
Was broken in this change:
b234b0bded
This commit is contained in:
parent
b00cd9b557
commit
b30f5d782d
@ -835,7 +835,7 @@ public class CordovaWebView extends WebView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If app doesn't want to run in background
|
// If app doesn't want to run in background
|
||||||
if (keepRunning) {
|
if (!keepRunning) {
|
||||||
// Pause JavaScript timers (including setInterval)
|
// Pause JavaScript timers (including setInterval)
|
||||||
this.pauseTimers();
|
this.pauseTimers();
|
||||||
}
|
}
|
||||||
@ -854,11 +854,8 @@ public class CordovaWebView extends WebView {
|
|||||||
this.pluginManager.onResume(keepRunning);
|
this.pluginManager.onResume(keepRunning);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If app doesn't want to run in background
|
// Resume JavaScript timers (including setInterval)
|
||||||
if (!keepRunning || activityResultKeepRunning) {
|
this.resumeTimers();
|
||||||
// Resume JavaScript timers (including setInterval)
|
|
||||||
this.resumeTimers();
|
|
||||||
}
|
|
||||||
paused = false;
|
paused = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user