[CB-683] Pause and resume events should route through fireDocumentEvent so we get the event object passed into the handler
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/08a32272 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/08a32272 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/08a32272 Branch: refs/heads/master Commit: 08a32272d37174b15d9e53cb2c2ca1ff2bfdc5d0 Parents: b2f49b1 Author: Fil Maj <maj....@gmail.com> Authored: Thu May 10 16:40:41 2012 -0700 Committer: Fil Maj <maj....@gmail.com> Committed: Thu May 10 16:40:41 2012 -0700 ---------------------------------------------------------------------- framework/src/org/apache/cordova/DroidGap.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/08a32272/framework/src/org/apache/cordova/DroidGap.java ---------------------------------------------------------------------- diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index 107eb52..5e2586d 100755 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -813,7 +813,7 @@ public class DroidGap extends Activity implements CordovaInterface { } // Send pause event to JavaScript - this.appView.loadUrl("javascript:try{cordova.require('cordova/channel').onPause.fire();}catch(e){console.log('exception firing pause event from native');};"); + this.appView.loadUrl("javascript:try{cordova.fireDocumentEvent('pause');}catch(e){console.log('exception firing pause event from native');};"); // Forward to plugins if (this.pluginManager != null) { @@ -858,7 +858,7 @@ public class DroidGap extends Activity implements CordovaInterface { } // Send resume event to JavaScript - this.appView.loadUrl("javascript:try{cordova.require('cordova/channel').onResume.fire();}catch(e){console.log('exception firing resume event from native');};"); + this.appView.loadUrl("javascript:try{cordova.fireDocumentEvent('resume');}catch(e){console.log('exception firing resume event from native');};"); // Forward to plugins if (this.pluginManager != null) {