package z3;

import D1.N;
import android.graphics.drawable.Drawable;
import android.text.method.PasswordTransformationMethod;
import android.widget.EditText;
import com.google.android.material.textfield.TextInputLayout;
import com.martsnew.tv.R;
import java.util.LinkedHashSet;

/* JADX INFO: loaded from: classes.dex */
public final class p extends m {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final h f19344d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final C1792a f19345e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final b f19346f;

    public p(TextInputLayout textInputLayout) {
        super(textInputLayout);
        this.f19344d = new h(this, 1);
        this.f19345e = new C1792a(this, 2);
        this.f19346f = new b(this, 2);
    }

    public static boolean d(p pVar) {
        EditText editText = pVar.f19316a.getEditText();
        return editText != null && (editText.getTransformationMethod() instanceof PasswordTransformationMethod);
    }

    @Override // z3.m
    public final void a() {
        Drawable drawableL = android.support.v4.media.session.a.l(this.f19317b, R.drawable.design_password_eye);
        TextInputLayout textInputLayout = this.f19316a;
        textInputLayout.setEndIconDrawable(drawableL);
        textInputLayout.setEndIconContentDescription(textInputLayout.getResources().getText(R.string.password_toggle_content_description));
        textInputLayout.setEndIconOnClickListener(new N(8, this));
        LinkedHashSet linkedHashSet = textInputLayout.f10376u0;
        C1792a c1792a = this.f19345e;
        linkedHashSet.add(c1792a);
        if (textInputLayout.f10375u != null) {
            c1792a.a(textInputLayout);
        }
        textInputLayout.f10384y0.add(this.f19346f);
        EditText editText = textInputLayout.getEditText();
        if (editText != null) {
            if (editText.getInputType() == 16 || editText.getInputType() == 128 || editText.getInputType() == 144 || editText.getInputType() == 224) {
                editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
            }
        }
    }
}
