mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
CB-11935 Does a best-effort attempt to pause any processing that can be paused safely, such as animations and geolocation.
This closes #337
This commit is contained in:
parent
9544783b5e
commit
37384c583d
@ -315,8 +315,10 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
|||||||
@Override
|
@Override
|
||||||
public void setPaused(boolean value) {
|
public void setPaused(boolean value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
webView.onPause();
|
||||||
webView.pauseTimers();
|
webView.pauseTimers();
|
||||||
} else {
|
} else {
|
||||||
|
webView.onResume();
|
||||||
webView.resumeTimers();
|
webView.resumeTimers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user