You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by na...@apache.org on 2014/02/03 19:37:40 UTC
[27/33] git commit: CB-5917 Add a loadUrlIntoView overload that
doesn't recreate plugins.
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/6185492b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/6185492b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/6185492b
Branch: refs/heads/master
Commit: 6185492b4d3f6eb47938b256ed9f3e7a81fe0e7e
Parents: 0cea5d3
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jan 28 10:29:56 2014 -0500
Committer: Archana Naik <na...@lab126.com>
Committed: Fri Jan 31 15:15:45 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/6185492b/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);