Updating ad server list, removing unnecessary code in adblock
This commit is contained in:
parent
d5c8479a41
commit
4539536eb5
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,6 @@ public class AdBlock {
|
||||
private static final String EMPTY = "";
|
||||
private final Set<String> mBlockedDomainsList = new HashSet<>();
|
||||
private boolean mBlockAds;
|
||||
private static final Locale mLocale = Locale.getDefault();
|
||||
|
||||
@Inject PreferenceManager mPreferenceManager;
|
||||
|
||||
@ -67,7 +66,7 @@ public class AdBlock {
|
||||
asset.open(BLOCKED_DOMAINS_LIST_FILE_NAME)));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
mBlockedDomainsList.add(line.trim().toLowerCase(mLocale));
|
||||
mBlockedDomainsList.add(line.trim());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.wtf(TAG, "Reading blocked domains list from file '"
|
||||
@ -99,7 +98,7 @@ public class AdBlock {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean isOnBlacklist = mBlockedDomainsList.contains(domain.toLowerCase(mLocale));
|
||||
boolean isOnBlacklist = mBlockedDomainsList.contains(domain);
|
||||
if (isOnBlacklist) {
|
||||
Log.d(TAG, "URL '" + url + "' is an ad");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user