mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
CB-3384 Bugfix - Non null Mimetype is not required for WebResourceResponse
This commit is contained in:
parent
78efe2a960
commit
048107e378
@ -56,9 +56,9 @@ public class IceCreamCordovaWebViewClient extends CordovaWebViewClient {
|
|||||||
|
|
||||||
if(ret == null) {
|
if(ret == null) {
|
||||||
try {
|
try {
|
||||||
InputStream is;
|
InputStream is = dataResource.getInputStream();
|
||||||
String mimeType;
|
if(is != null) {
|
||||||
if((is = dataResource.getInputStream()) != null && (mimeType = dataResource.getMimeType()) != null) {
|
String mimeType = dataResource.getMimeType();
|
||||||
// If we don't know how to open this file, let the browser continue loading
|
// 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(mimeType, "UTF-8", is);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user