incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: Adding support for data uri
Date Thu, 06 Sep 2012 19:19:58 GMT
Updated Branches:
  refs/heads/master 331024414 -> 48881d081


Adding support for data uri


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

Branch: refs/heads/master
Commit: 48881d081a8d517082273797da344f77a11b5fbc
Parents: 3310244
Author: Joe Bowser <bowserj@apache.org>
Authored: Thu Sep 6 12:19:42 2012 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu Sep 6 12:19:42 2012 -0700

----------------------------------------------------------------------
 .../org/apache/cordova/CordovaWebViewClient.java   |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/48881d08/framework/src/org/apache/cordova/CordovaWebViewClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebViewClient.java b/framework/src/org/apache/cordova/CordovaWebViewClient.java
index 28e754a..596411f 100755
--- a/framework/src/org/apache/cordova/CordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java
@@ -206,9 +206,9 @@ public class CordovaWebViewClient extends WebViewClient {
 
             // If our app or file:, then load into a new Cordova webview container by starting
a new instance of our activity.
             // Our app continues to run.  When BACK is pressed, our app is redisplayed.
-            if (url.startsWith("file://") || url.indexOf(this.appView.baseUrl) == 0 || this.appView.isUrlWhiteListed(url))
{
+            if (url.startsWith("file://") || url.startsWith("data:") || url.indexOf(this.appView.baseUrl)
== 0 || this.appView.isUrlWhiteListed(url)) {
                 //This will fix iFrames
-                if (appView.useBrowserHistory)
+                if (appView.useBrowserHistory || url.startsWith("data:"))
                     return false;
                 else
                     this.appView.loadUrl(url);


Mime
View raw message