Fix crash when cookies preference is default
This commit is contained in:
parent
685105abc9
commit
c76c21026c
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ Date: Sat, 28 Dec 2019 10:23:04 +0100
|
|||
Subject: Show site settings for cookies, javascript and ads
|
||||
|
||||
Avoid displaying info about intrusive ads
|
||||
Fix crash when cookies preference is default
|
||||
---
|
||||
.../site_settings/SingleWebsiteSettings.java | 52 +++++++++----------
|
||||
.../browser_ui/site_settings/Website.java | 14 +++--
|
||||
|
@ -66,7 +67,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
|||
+ Integer currentValue =
|
||||
+ mSite.getContentSetting(browserContextHandle, ContentSettingsType.COOKIES);
|
||||
+ // Always show the cookies permission
|
||||
+ if (currentValue == null) {
|
||||
+ if (currentValue == null || currentValue == ContentSettingValues.DEFAULT) {
|
||||
+ currentValue = WebsitePreferenceBridge.isCategoryEnabled(
|
||||
+ browserContextHandle, ContentSettingsType.COOKIES)
|
||||
+ ? ContentSettingValues.ALLOW
|
||||
|
|
Loading…
Add table
Reference in a new issue