|
|
|
|
367
|
@ReactProp(name = "incognito")
|
367
|
@ReactProp(name = "incognito")
|
368
|
public void setIncognito(WebView view, boolean enabled) {
|
368
|
public void setIncognito(WebView view, boolean enabled) {
|
369
|
// Remove all previous cookies
|
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
|
// Disable caching
|
376
|
// Disable caching
|
373
|
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
|
377
|
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
|