Fix NPE in WebView using data URIs on Android 5+
@@ -45,7 +45,7 @@ public class HoneycombWebViewClient extends FroyoWebViewClient<WebViewer> {
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
Log.d(TAG, "scheme = " + request.getUrl().getScheme());
- if (request.getUrl().getAuthority().equals("localhost")
+ if ("localhost".equals(request.getUrl().getAuthority())
|| request.getUrl().toString().startsWith(ASSET_PREFIX)) {
return handleAppRequest(request.getUrl().toString());
}
