Always call plugin's onPause/onResume with multitasking flag when these lifecycle events occur in activity. It is up to the plugin to handle as necessary.

This commit is contained in:
Bryce Curtis
2011-06-23 23:22:48 -05:00
committed by Joe Bowser
parent 435c903baf
commit 05eacf4792
4 changed files with 22 additions and 10 deletions
+2 -2
View File
@@ -628,7 +628,7 @@ public class DroidGap extends PhonegapActivity {
this.appView.loadUrl("javascript:try{PhoneGap.onPause.fire();}catch(e){};");
// Forward to plugins
this.pluginManager.onPause();
this.pluginManager.onPause(this.keepRunning);
// If app doesn't want to run in background
if (!this.keepRunning) {
@@ -663,7 +663,7 @@ public class DroidGap extends PhonegapActivity {
this.appView.loadUrl("javascript:try{PhoneGap.onResume.fire();}catch(e){};");
// Forward to plugins
this.pluginManager.onResume();
this.pluginManager.onResume(this.keepRunning || this.activityResultKeepRunning);
// If app doesn't want to run in background
if (!this.keepRunning || this.activityResultKeepRunning) {