package o; import android.text.InputFilter; import android.text.Spanned; /* loaded from: classes2.dex */ final class rUP implements InputFilter { private int e; public rUP(int i) { this.e = i; } @Override // android.text.InputFilter public final CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) { try { StringBuilder sb = new StringBuilder(spanned); sb.replace(i3, i4, charSequence.subSequence(i, i2).toString()); if (Integer.parseInt(sb.toString()) <= this.e) { return null; } return ""; } catch (NumberFormatException unused) { return ""; } } }