@Test public void shouldInterceptRequest() throws Exception { trackingProtectionWebViewClient.notifyCurrentURL("http: }
@Override public WebResourceResponse shouldInterceptRequest(final WebView view, final String request) { if (!blockingEnabled) { return super.shouldInterceptRequest(view, request); } final Uri resourceUri = Uri.parse(request); final String scheme = resourceUri.getScheme(); final String path = resourceUri.getPath(); if (path != null && path.endsWith("/favicon.ico")) { return new WebResourceResponse(null, null, null); } return super.shouldInterceptRequest(view, request); }
TrackingProtectionWebViewClient extends WebViewClient { @Override public WebResourceResponse shouldInterceptRequest(final WebView view, final String request) { if (!blockingEnabled) { return super.shouldInterceptRequest(view, request); } final Uri resourceUri = Uri.parse(request); final String scheme = resourceUri.getScheme(); final String path = resourceUri.getPath(); if (path != null && path.endsWith("/favicon.ico")) { return new WebResourceResponse(null, null, null); } return super.shouldInterceptRequest(view, request); } }
TrackingProtectionWebViewClient extends WebViewClient { @Override public WebResourceResponse shouldInterceptRequest(final WebView view, final String request) { if (!blockingEnabled) { return super.shouldInterceptRequest(view, request); } final Uri resourceUri = Uri.parse(request); final String scheme = resourceUri.getScheme(); final String path = resourceUri.getPath(); if (path != null && path.endsWith("/favicon.ico")) { return new WebResourceResponse(null, null, null); } return super.shouldInterceptRequest(view, request); } TrackingProtectionWebViewClient(final Context context); }
TrackingProtectionWebViewClient extends WebViewClient { @Override public WebResourceResponse shouldInterceptRequest(final WebView view, final String request) { if (!blockingEnabled) { return super.shouldInterceptRequest(view, request); } final Uri resourceUri = Uri.parse(request); final String scheme = resourceUri.getScheme(); final String path = resourceUri.getPath(); if (path != null && path.endsWith("/favicon.ico")) { return new WebResourceResponse(null, null, null); } return super.shouldInterceptRequest(view, request); } TrackingProtectionWebViewClient(final Context context); static void triggerPreload(final Context context); void setBlockingEnabled(boolean enabled); boolean isBlockingEnabled(); @Override WebResourceResponse shouldInterceptRequest(final WebView view, final String request); void notifyCurrentURL(final String url); @Override void onPageStarted(WebView view, String url, Bitmap favicon); }
TrackingProtectionWebViewClient extends WebViewClient { @Override public WebResourceResponse shouldInterceptRequest(final WebView view, final String request) { if (!blockingEnabled) { return super.shouldInterceptRequest(view, request); } final Uri resourceUri = Uri.parse(request); final String scheme = resourceUri.getScheme(); final String path = resourceUri.getPath(); if (path != null && path.endsWith("/favicon.ico")) { return new WebResourceResponse(null, null, null); } return super.shouldInterceptRequest(view, request); } TrackingProtectionWebViewClient(final Context context); static void triggerPreload(final Context context); void setBlockingEnabled(boolean enabled); boolean isBlockingEnabled(); @Override WebResourceResponse shouldInterceptRequest(final WebView view, final String request); void notifyCurrentURL(final String url); @Override void onPageStarted(WebView view, String url, Bitmap favicon);  }