|
@@ -367,7 +367,11 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
367
|
367
|
@ReactProp(name = "incognito")
|
368
|
368
|
public void setIncognito(WebView view, boolean enabled) {
|
369
|
369
|
// Remove all previous cookies
|
370
|
|
- CookieManager.getInstance().removeAllCookies(null);
|
|
370
|
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
|
371
|
+ CookieManager.getInstance().removeAllCookies(null);
|
|
372
|
+ } else {
|
|
373
|
+ CookieManager.getInstance().removeAllCookie();
|
|
374
|
+ }
|
371
|
375
|
|
372
|
376
|
// Disable caching
|
373
|
377
|
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
|