cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject [3/3] cordova-plugin-inappbrowser git commit: CB-6702 InAppBrowser hangs when opening more than one instance
Date Mon, 01 Feb 2016 11:00:59 GMT
CB-6702 InAppBrowser hangs when opening more than one instance

github close #144


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/73ed40fe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/73ed40fe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/73ed40fe

Branch: refs/heads/master
Commit: 73ed40fe0753ac9870333784c216cdb821402989
Parents: 4d9e488
Author: sgrebnov <v-segreb@microsoft.com>
Authored: Thu Jan 28 17:16:32 2016 +0300
Committer: sgrebnov <v-segreb@microsoft.com>
Committed: Mon Feb 1 14:00:52 2016 +0300

----------------------------------------------------------------------
 src/android/InAppBrowser.java | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/73ed40fe/src/android/InAppBrowser.java
----------------------------------------------------------------------
diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java
index a3b4a0d..6612a66 100644
--- a/src/android/InAppBrowser.java
+++ b/src/android/InAppBrowser.java
@@ -377,6 +377,7 @@ public class InAppBrowser extends CordovaPlugin {
                     public void onPageFinished(WebView view, String url) {
                         if (dialog != null) {
                             dialog.dismiss();
+                            dialog = null;
                         }
                     }
                 });
@@ -520,6 +521,12 @@ public class InAppBrowser extends CordovaPlugin {
 
             @SuppressLint("NewApi")
             public void run() {
+
+                // CB-6702 InAppBrowser hangs when opening more than one instance
+                if (dialog != null) {
+                    dialog.dismiss();
+                };
+
                 // Let's create the main dialog
                 dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar);
                 dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message