From 32b72756f384b470de0336127189f5f34a1439e8 Mon Sep 17 00:00:00 2001 From: sgrebnov Date: Mon, 20 Jul 2015 14:14:50 +0300 Subject: [PATCH] CB-9382 [Android] Fix KeepRunning setting when Plugin activity is showed. This closes #200 --- framework/src/org/apache/cordova/CordovaActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index 7a855af8..5c3bc508 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -235,7 +235,10 @@ public class CordovaActivity extends Activity { LOG.d(TAG, "Paused the activity."); if (this.appView != null) { - this.appView.handlePause(this.keepRunning); + // CB-9382 If there is an activity that started for result and main activity is waiting for callback + // result, we shoudn't stop WebView Javascript timers, as activity for result might be using them + boolean keepRunning = this.keepRunning || this.cordovaInterface.activityResultCallback != null; + this.appView.handlePause(keepRunning); } }