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