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: Renamed URLInputPreference and adjusted layout design Created Sept. 15, 2017, 12:36 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,25 +89,26 @@ 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(), 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 url)
diegocarloslima 2017/09/22 17:43:42 I would suggest changing from `String url` to `Str
jens 2017/09/26 10:25:02 Acknowledged.
{
WhitelistedWebsitesPreferenceCategory.this.whitelistWebsite(url);
}
});
this.addPreference(urlPreference);
}
private void whitelistWebsite(String url)

Powered by Google App Engine
This is Rietveld