Skip to content

Commit 813ed68

Browse files
committed
[Android] refactored shields blockers
1 parent 54e4665 commit 813ed68

File tree

5 files changed

+67
-318
lines changed

5 files changed

+67
-318
lines changed

android/java/org/chromium/chrome/browser/app/BraveActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,6 @@ private void checkForYandexSE() {
479479
private void checkForNotificationData() {
480480
Intent notifIntent = getIntent();
481481
if (notifIntent != null && notifIntent.getStringExtra(RetentionNotificationUtil.NOTIFICATION_TYPE) != null) {
482-
Log.e("NTP", notifIntent.getStringExtra(RetentionNotificationUtil.NOTIFICATION_TYPE));
483482
String notificationType = notifIntent.getStringExtra(RetentionNotificationUtil.NOTIFICATION_TYPE);
484483
switch (notificationType) {
485484
case RetentionNotificationUtil.HOUR_3:

android/java/org/chromium/chrome/browser/preferences/website/BraveShieldsContentSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public static void setShieldsValue(Profile profile, String host, String resource
9696
} else if (resourceIndentifier.equals(RESOURCE_IDENTIFIER_COOKIES)) {
9797
BraveShieldsContentSettingsJni.get().setCookieControlType(settingOption, host, profile);
9898
} else if (resourceIndentifier.equals(RESOURCE_IDENTIFIER_TRACKERS)) {
99-
BraveShieldsContentSettingsJni.get().setCosmeticFilteringControlType(settingOption, host, profile);
99+
BraveShieldsContentSettingsJni.get().setCosmeticFilteringControlType(
100+
settingOption, host, profile);
100101
}
101102
}
102103

@@ -121,6 +122,9 @@ public static String getShieldsValue(Profile profile, String host, String resour
121122
settings = BraveShieldsContentSettingsJni.get().getFingerprintingControlType(host, profile);
122123
} else if (resourceIndentifier.equals(RESOURCE_IDENTIFIER_COOKIES)) {
123124
settings = BraveShieldsContentSettingsJni.get().getCookieControlType(host, profile);
125+
} else if (resourceIndentifier.equals(RESOURCE_IDENTIFIER_TRACKERS)) {
126+
settings = BraveShieldsContentSettingsJni.get().getCosmeticFilteringControlType(
127+
host, profile);
124128
}
125129
return settings;
126130
}
@@ -164,6 +168,6 @@ interface Natives {
164168
String getNoScriptControlType(String url, Profile profile);
165169

166170
void setCosmeticFilteringControlType(String type, String url, Profile profile);
167-
171+
String getCosmeticFilteringControlType(String url, Profile profile);
168172
}
169173
}

0 commit comments

Comments
 (0)