CB-3384 Bugfix - Non null Mimetype is not required for WebResourceResponse

This commit is contained in:
Shravan Narayan 2013-05-16 22:40:16 -04:00 committed by Andrew Grieve
parent 78efe2a960
commit 048107e378

View File

@ -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);
} }