package o;

import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.widget.EditText;
import com.google.android.gms.common.R;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class QV extends AbstractC1052dw {
    public final int e;
    public EditText f;
    public final ViewOnClickListenerC0604Xh g;

    public QV(C0957cw c0957cw, int i) {
        super(c0957cw);
        this.e = R.drawable.design_password_eye;
        this.g = new ViewOnClickListenerC0604Xh(4, this);
        if (i != 0) {
            this.e = i;
        }
    }

    @Override // o.AbstractC1052dw
    public final void b() {
        p();
    }

    @Override // o.AbstractC1052dw
    public final int c() {
        return R.string.password_toggle_content_description;
    }

    @Override // o.AbstractC1052dw
    public final int d() {
        return this.e;
    }

    @Override // o.AbstractC1052dw
    public final View.OnClickListener f() {
        return this.g;
    }

    @Override // o.AbstractC1052dw
    public final boolean j() {
        return true;
    }

    @Override // o.AbstractC1052dw
    public final boolean k() {
        EditText editText = this.f;
        return !(editText != null && (editText.getTransformationMethod() instanceof PasswordTransformationMethod));
    }

    @Override // o.AbstractC1052dw
    public final void l(EditText editText) {
        this.f = editText;
        p();
    }

    @Override // o.AbstractC1052dw
    public final void q() {
        EditText editText = this.f;
        if (editText != null) {
            if (editText.getInputType() == 16 || editText.getInputType() == 128 || editText.getInputType() == 144 || editText.getInputType() == 224) {
                this.f.setTransformationMethod(PasswordTransformationMethod.getInstance());
            }
        }
    }

    @Override // o.AbstractC1052dw
    public final void r() {
        EditText editText = this.f;
        if (editText != null) {
            editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        }
    }
}
