You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/01/28 16:30:45 UTC

[1/2] android commit: CB-5917 Add a loadUrlIntoView overload that doesn't recreate plugins.

Updated Branches:
  refs/heads/master 5b2a73e3e -> ac2034561


CB-5917 Add a loadUrlIntoView overload that doesn't recreate plugins.


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/ac203456
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/ac203456
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/ac203456

Branch: refs/heads/master
Commit: ac2034561ddf626027c87434a3994636d448e0a0
Parents: c42cd42
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jan 28 10:29:56 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jan 28 10:30:39 2014 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaWebView.java | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/ac203456/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 093a376..36d628d 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -445,17 +445,22 @@ public class CordovaWebView extends WebView {
         }
     }
 
+    public void loadUrlIntoView(final String url) {
+        loadUrlIntoView(url, true);
+    }
+
     /**
      * Load the url into the webview.
      *
      * @param url
      */
-    public void loadUrlIntoView(final String url) {
+    public void loadUrlIntoView(final String url, boolean recreatePlugins) {
         LOG.d(TAG, ">>> loadUrl(" + url + ")");
 
-        this.url = url;
-        this.pluginManager.init();
-
+        if (recreatePlugins) {
+            this.url = url;
+            this.pluginManager.init();
+        }
 
         // Create a timeout timer for loadUrl
         final CordovaWebView me = this;


[2/2] android commit: Use thread pool for load timeout.

Posted by ag...@apache.org.
Use thread pool for load timeout.


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/c42cd423
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/c42cd423
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/c42cd423

Branch: refs/heads/master
Commit: c42cd4233dab2a35813a1c595ad1b54184a10303
Parents: 5b2a73e
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jan 28 10:30:11 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jan 28 10:30:39 2014 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaWebView.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/c42cd423/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 10c46c0..093a376 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -494,8 +494,7 @@ public class CordovaWebView extends WebView {
         // Load url
         this.cordova.getActivity().runOnUiThread(new Runnable() {
             public void run() {
-                Thread thread = new Thread(timeoutCheck);
-                thread.start();
+                cordova.getThreadPool().execute(timeoutCheck);
                 me.loadUrlNow(url);
             }
         });