cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject [03/32] git commit: CB-5917 Add a loadUrlIntoView overload that doesn't recreate plugins.
Date Mon, 03 Feb 2014 20:26:04 GMT
CB-5917 Add a loadUrlIntoView overload that doesn't recreate plugins.


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

Branch: refs/heads/3.4.x
Commit: a3d4b909cfffd1a2931ae45592d4f35163253842
Parents: 6c09caa
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Jan 28 10:29:56 2014 -0500
Committer: Archana Naik <naika@lab126.com>
Committed: Mon Feb 3 11:09:46 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a3d4b909/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 b26d4b8..1a835c4 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -528,20 +528,27 @@ public class CordovaWebView extends AmazonWebView {
         }
     }
 
+    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 + ")");
+ 
+        if (recreatePlugins) {
+            this.url = url;
+            this.pluginManager.init();
+        }
 
-        this.url = url;
-        this.pluginManager.init();
-        
         // Got rid of the timers logic to check for errors/non-responding webpages.
         // Timers were creating threading issues and NPE in some cases where app needed to
load more urls or navigate back and forth a lot.
         // PS. this change exists only on amazon-fireos platform.
+        // Load url
         this.cordova.getActivity().runOnUiThread(new Runnable() {
         	public void run() {
         	    CordovaWebView.this.loadUrlNow(url);


Mime
View raw message