cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [2/6] android commit: Revert "DataResource bugfix WebviewClient logs error for http urls."
Date Thu, 06 Jun 2013 21:36:04 GMT
Revert "DataResource bugfix WebviewClient logs error for http urls."

This reverts commit 8f91ebf194baa8028367e9e41f2e5ee2ff099b88.
Reverting all DataResource changes for the 2.8.0 release.

Conflicts:

	framework/src/org/apache/cordova/FileHelper.java
	framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java


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

Branch: refs/heads/master
Commit: 2f9c512b5942ae2c04002fe8c5581b6d514b8c52
Parents: 43172cf
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Mon May 27 22:21:50 2013 -0400
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu Jun 6 14:08:52 2013 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/FileHelper.java   |    2 +-
 .../cordova/IceCreamCordovaWebViewClient.java      |    8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2f9c512b/framework/src/org/apache/cordova/FileHelper.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/FileHelper.java b/framework/src/org/apache/cordova/FileHelper.java
index 0d13c12..69c7f48 100644
--- a/framework/src/org/apache/cordova/FileHelper.java
+++ b/framework/src/org/apache/cordova/FileHelper.java
@@ -107,7 +107,7 @@ public class FileHelper {
                 return new FileInputStream(getRealPath(uriString, cordova));
             }
         } else {
-            return null;
+            return new FileInputStream(getRealPath(uriString, cordova));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2f9c512b/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java b/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
index d68b6b8..4b3408c 100644
--- a/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
@@ -19,7 +19,6 @@
 package org.apache.cordova;
 
 import java.io.IOException;
-import java.io.InputStream;
 
 import org.apache.cordova.api.CordovaInterface;
 import org.apache.cordova.api.DataResource;
@@ -56,12 +55,7 @@ public class IceCreamCordovaWebViewClient extends CordovaWebViewClient
{
 
         if(ret == null) {
             try {
-                InputStream is = dataResource.getInputStream();
-                if(is != null) {
-                    String mimeType = dataResource.getMimeType();
-                    // If we don't know how to open this file, let the browser continue loading
-                    ret = new WebResourceResponse(mimeType, "UTF-8", is);
-                }
+               ret = new WebResourceResponse(dataResource.getMimeType(), "UTF-8", dataResource.getInputStream());
             } catch(IOException e) {
                 LOG.e("IceCreamCordovaWebViewClient", "Error occurred while loading a file.",
e);
             }


Mime
View raw message