You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2013/08/28 23:19:59 UTC
git commit: CB-4586: Making loadUrl run on the UI thread for close
dialog to stop the WebView error
Updated Branches:
refs/heads/master be364c081 -> 8b52796a8
CB-4586: Making loadUrl run on the UI thread for close dialog to stop the WebView error
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/8b52796a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/8b52796a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/8b52796a
Branch: refs/heads/master
Commit: 8b52796a8959aa96ed986ef520e1f94df3650715
Parents: be364c0
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Aug 28 14:20:01 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Aug 28 14:20:01 2013 -0700
----------------------------------------------------------------------
src/android/InAppBrowser.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/8b52796a/src/android/InAppBrowser.java
----------------------------------------------------------------------
diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java
index a4f6b8b..0dd1094 100644
--- a/src/android/InAppBrowser.java
+++ b/src/android/InAppBrowser.java
@@ -313,7 +313,17 @@ public class InAppBrowser extends CordovaPlugin {
*/
private void closeDialog() {
try {
- this.inAppWebView.loadUrl("about:blank");
+ final WebView childView = this.inAppWebView;
+ Runnable runnable = new Runnable() {
+
+ @Override
+ public void run() {
+ childView.loadUrl("about:blank");
+ }
+
+ };
+
+ this.cordova.getActivity().runOnUiThread(runnable);
JSONObject obj = new JSONObject();
obj.put("type", EXIT_EVENT);