mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 12:03:28 +08:00
Revert "DataResource bugfix WebviewClient logs error for http urls."
This reverts commit 8f91ebf194
.
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
This commit is contained in:
parent
43172cf530
commit
2f9c512b59
@ -107,7 +107,7 @@ public class FileHelper {
|
||||
return new FileInputStream(getRealPath(uriString, cordova));
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
return new FileInputStream(getRealPath(uriString, cordova));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user