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

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

Issue 29449609: Issue 5242 - Adjust setIcon() methods in UrlInputOpenerPreference (Closed)
Patch Set: Theres actually no need at all for overriding setIcon Created May 31, 2017, 2:53 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/UrlInputOpenerPreference.java
===================================================================
--- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/UrlInputOpenerPreference.java
+++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/UrlInputOpenerPreference.java
@@ -14,22 +14,18 @@
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
package org.adblockplus.sbrowser.contentblocker;
import android.app.AlertDialog;
import android.content.Context;
-import android.graphics.drawable.Drawable;
-import android.os.Build;
import android.os.Bundle;
import android.preference.EditTextPreference;
-import android.support.annotation.DrawableRes;
-import android.support.v4.content.ContextCompat;
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.util.Patterns;
import android.view.KeyEvent;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
@@ -117,30 +113,16 @@ public class UrlInputOpenerPreference ex
{
Toast.makeText(getContext(), R.string.whitelist_website_invalid_url_error, Toast.LENGTH_SHORT).show();
}
return true;
}
return false;
}
- public void setIcon(@DrawableRes int iconResId)
- {
- final Drawable drawable = ContextCompat.getDrawable(getContext(), iconResId);
- setIcon(drawable);
- }
-
- public void setIcon(Drawable icon)
- {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
- {
- super.setIcon(icon);
- }
- }
-
public void setOnUrlReadyListener(OnUrlReadyListener listener)
{
this.onUrlReadyListener = listener;
}
private boolean isValidUrl()
{
return Patterns.WEB_URL.matcher(getUrl()).matches();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld