Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/WhitelistedWebsitesPreferenceCategory.java

Issue 29524668: Issue 3916 - Supporting Adding filter lists via URL (Closed)
Patch Set: Use TAG constant for log, fix in MoreBlockingPreferenceCategory Created Oct. 10, 2017, 1:57 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/WhitelistedWebsitesPreferenceCategory.java
===================================================================
--- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/WhitelistedWebsitesPreferenceCategory.java
+++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/WhitelistedWebsitesPreferenceCategory.java
@@ -89,27 +89,28 @@ public class WhitelistedWebsitesPreferen
public void onClick(DialogInterface dialog, int which)
{
removeWhitelistedWebsite(url);
}
});
this.addPreference(whitelistedWebsitePreference);
}
- final UrlInputOpenerPreference urlPreference = new UrlInputOpenerPreference(this.getContext());
+ final InputValidatorDialogPreference urlPreference = new InputValidatorDialogPreference(this.getContext());
+ urlPreference.setValidationType(InputValidatorDialogPreference.ValidationType.DOMAIN);
urlPreference.setTitle(R.string.whitelisted_websites_add_button);
urlPreference.setDialogTitle(R.string.whitelist_website_dialog_title);
urlPreference.setDialogMessage(R.string.whitelist_website_dialog_message);
urlPreference.getEditText().setHint(R.string.whitelist_website_dialog_hint);
- urlPreference.setOnUrlReadyListener(new UrlInputOpenerPreference.OnUrlReadyListener()
+ urlPreference.setOnInputReadyListener(new InputValidatorDialogPreference.OnInputReadyListener()
{
@Override
- public void onUrlReady(String url)
+ public void onInputReady(String input)
{
- WhitelistedWebsitesPreferenceCategory.this.whitelistWebsite(url);
+ WhitelistedWebsitesPreferenceCategory.this.whitelistWebsite(input);
}
});
this.addPreference(urlPreference);
}
private void whitelistWebsite(String url)
{
this.whitelistedWebsites.add(url);

Powered by Google App Engine
This is Rietveld