CB-578 - Adding a test of pause and resume to make sure that they're being called. Need to elaborate on this

This commit is contained in:
Joe Bowser
2012-08-03 14:07:01 -07:00
parent 81ab0a414f
commit d3dc94c04b
4 changed files with 33 additions and 2 deletions
@@ -57,6 +57,7 @@ public class CordovaWebView extends WebView {
public PluginManager pluginManager;
public CallbackServer callbackServer;
private boolean paused;
/** Actvities and other important classes **/
@@ -817,6 +818,7 @@ public class CordovaWebView extends WebView {
// Pause JavaScript timers (including setInterval)
this.pauseTimers();
}
paused = true;
}
@@ -836,6 +838,7 @@ public class CordovaWebView extends WebView {
// Resume JavaScript timers (including setInterval)
this.resumeTimers();
}
paused = false;
}
public void handleDestroy()
@@ -859,6 +862,11 @@ public class CordovaWebView extends WebView {
this.pluginManager.onNewIntent(intent);
}
}
public boolean isPaused()
{
return paused;
}
public boolean hadKeyEvent() {
return handleButton;