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); |