mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 03:53:09 +08:00
Issue 107: Always send pause event to JS.
This commit is contained in:
parent
47ca081f36
commit
fb2c25c6c6
@ -600,16 +600,15 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
*/
|
*/
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
// Send pause event to JavaScript
|
||||||
|
this.appView.loadUrl("javascript:try{PhoneGap.onPause.fire();}catch(e){};");
|
||||||
|
|
||||||
// If app doesn't want to run in background
|
// If app doesn't want to run in background
|
||||||
if (!this.keepRunning) {
|
if (!this.keepRunning) {
|
||||||
|
|
||||||
// Forward to plugins
|
// Forward to plugins
|
||||||
this.pluginManager.onPause();
|
this.pluginManager.onPause();
|
||||||
|
|
||||||
// Send pause event to JavaScript
|
|
||||||
this.appView.loadUrl("javascript:try{PhoneGap.onPause.fire();}catch(e){};");
|
|
||||||
|
|
||||||
// Pause JavaScript timers (including setInterval)
|
// Pause JavaScript timers (including setInterval)
|
||||||
this.appView.pauseTimers();
|
this.appView.pauseTimers();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user