mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user