Fix JS timers being disabled on pause and never re-enabled.

Was broken in this change:
b234b0bded
This commit is contained in:
Andrew Grieve 2012-08-23 15:34:10 -04:00
parent b00cd9b557
commit b30f5d782d

View File

@ -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;
}