mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 23:42:53 +08:00
Issue 107: always send resume event to JS.
This commit is contained in:
parent
fb2c25c6c6
commit
8d73b364f2
@ -621,6 +621,9 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
// Send resume event to JavaScript
|
||||||
|
this.appView.loadUrl("javascript:try{PhoneGap.onResume.fire();}catch(e){};");
|
||||||
|
|
||||||
// If app doesn't want to run in background
|
// If app doesn't want to run in background
|
||||||
if (!this.keepRunning || this.activityResultKeepRunning) {
|
if (!this.keepRunning || this.activityResultKeepRunning) {
|
||||||
|
|
||||||
@ -633,9 +636,6 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
// Forward to plugins
|
// Forward to plugins
|
||||||
this.pluginManager.onResume();
|
this.pluginManager.onResume();
|
||||||
|
|
||||||
// Send resume event to JavaScript
|
|
||||||
this.appView.loadUrl("javascript:try{PhoneGap.onResume.fire();}catch(e){};");
|
|
||||||
|
|
||||||
// Resume JavaScript timers (including setInterval)
|
// Resume JavaScript timers (including setInterval)
|
||||||
this.appView.resumeTimers();
|
this.appView.resumeTimers();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user