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:
Andrew Grieve
2012-08-23 15:34:10 -04:00
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;
} }