.class Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate; .super Lcom/google/android/material/textfield/EndIconDelegate; .source "PasswordToggleEndIconDelegate.java" # instance fields .field private final onEditTextAttachedListener:Lcom/google/android/material/textfield/TextInputLayout$OnEditTextAttachedListener; .field private final onEndIconChangedListener:Lcom/google/android/material/textfield/TextInputLayout$OnEndIconChangedListener; .field private final textWatcher:Landroid/text/TextWatcher; # direct methods .method public constructor (Lcom/google/android/material/textfield/TextInputLayout;)V .locals 0 .param p1 # Lcom/google/android/material/textfield/TextInputLayout; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .line 1 invoke-direct {p0, p1}, Lcom/google/android/material/textfield/EndIconDelegate;->(Lcom/google/android/material/textfield/TextInputLayout;)V .line 2 new-instance p1, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate$1; invoke-direct {p1, p0}, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate$1;->(Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;)V iput-object p1, p0, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;->textWatcher:Landroid/text/TextWatcher; .line 3 new-instance p1, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate$2; invoke-direct {p1, p0}, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate$2;->(Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;)V iput-object p1, p0, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;->onEditTextAttachedListener:Lcom/google/android/material/textfield/TextInputLayout$OnEditTextAttachedListener; .line 4 new-instance p1, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate$3; invoke-direct {p1, p0}, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate$3;->(Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;)V iput-object p1, p0, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;->onEndIconChangedListener:Lcom/google/android/material/textfield/TextInputLayout$OnEndIconChangedListener; return-void .end method .method public static synthetic access$000(Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;)Z .locals 0 .line 1 invoke-direct {p0}, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;->hasPasswordTransformation()Z move-result p0 return p0 .end method .method public static synthetic access$100(Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;)Landroid/text/TextWatcher; .locals 0 .line 1 iget-object p0, p0, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;->textWatcher:Landroid/text/TextWatcher; return-object p0 .end method .method private hasPasswordTransformation()Z .locals 1 .line 1 iget-object v0, p0, Lcom/google/android/material/textfield/EndIconDelegate;->textInputLayout:Lcom/google/android/material/textfield/TextInputLayout; invoke-virtual {v0}, Lcom/google/android/material/textfield/TextInputLayout;->getEditText()Landroid/widget/EditText; move-result-object v0 if-eqz v0, :cond_0 .line 2 invoke-virtual {v0}, Landroid/widget/EditText;->getTransformationMethod()Landroid/text/method/TransformationMethod; move-result-object v0 instance-of v0, v0, Landroid/text/method/PasswordTransformationMethod; if-eqz v0, :cond_0 const/4 v0, 0x1 goto :goto_0 :cond_0 const/4 v0, 0x0 :goto_0 return v0 .end method .method private static isInputTypePassword(Landroid/widget/EditText;)Z .locals 2 if-eqz p0, :cond_1 .line 1 invoke-virtual {p0}, Landroid/widget/EditText;->getInputType()I move-result v0 const/16 v1, 0x10 if-eq v0, v1, :cond_0 .line 2 invoke-virtual {p0}, Landroid/widget/EditText;->getInputType()I move-result v0 const/16 v1, 0x80 if-eq v0, v1, :cond_0 .line 3 invoke-virtual {p0}, Landroid/widget/EditText;->getInputType()I move-result v0 const/16 v1, 0x90 if-eq v0, v1, :cond_0 .line 4 invoke-virtual {p0}, Landroid/widget/EditText;->getInputType()I move-result p0 const/16 v0, 0xe0 if-ne p0, v0, :cond_1 :cond_0 const/4 p0, 0x1 goto :goto_0 :cond_1 const/4 p0, 0x0 :goto_0 return p0 .end method # virtual methods .method public initialize()V .locals 3 .line 1 iget-object v0, p0, Lcom/google/android/material/textfield/EndIconDelegate;->textInputLayout:Lcom/google/android/material/textfield/TextInputLayout; iget-object v1, p0, Lcom/google/android/material/textfield/EndIconDelegate;->context:Landroid/content/Context; sget v2, Lcom/google/android/material/R$drawable;->design_password_eye:I .line 2 invoke-static {v1, v2}, Lg/a;->d(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; move-result-object v1 .line 3 invoke-virtual {v0, v1}, Lcom/google/android/material/textfield/TextInputLayout;->setEndIconDrawable(Landroid/graphics/drawable/Drawable;)V .line 4 iget-object v0, p0, Lcom/google/android/material/textfield/EndIconDelegate;->textInputLayout:Lcom/google/android/material/textfield/TextInputLayout; .line 5 invoke-virtual {v0}, Landroid/widget/LinearLayout;->getResources()Landroid/content/res/Resources; move-result-object v1 sget v2, Lcom/google/android/material/R$string;->password_toggle_content_description:I invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence; move-result-object v1 .line 6 invoke-virtual {v0, v1}, Lcom/google/android/material/textfield/TextInputLayout;->setEndIconContentDescription(Ljava/lang/CharSequence;)V .line 7 iget-object v0, p0, Lcom/google/android/material/textfield/EndIconDelegate;->textInputLayout:Lcom/google/android/material/textfield/TextInputLayout; new-instance v1, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate$4; invoke-direct {v1, p0}, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate$4;->(Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;)V invoke-virtual {v0, v1}, Lcom/google/android/material/textfield/TextInputLayout;->setEndIconOnClickListener(Landroid/view/View$OnClickListener;)V .line 8 iget-object v0, p0, Lcom/google/android/material/textfield/EndIconDelegate;->textInputLayout:Lcom/google/android/material/textfield/TextInputLayout; iget-object v1, p0, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;->onEditTextAttachedListener:Lcom/google/android/material/textfield/TextInputLayout$OnEditTextAttachedListener; invoke-virtual {v0, v1}, Lcom/google/android/material/textfield/TextInputLayout;->addOnEditTextAttachedListener(Lcom/google/android/material/textfield/TextInputLayout$OnEditTextAttachedListener;)V .line 9 iget-object v0, p0, Lcom/google/android/material/textfield/EndIconDelegate;->textInputLayout:Lcom/google/android/material/textfield/TextInputLayout; iget-object v1, p0, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;->onEndIconChangedListener:Lcom/google/android/material/textfield/TextInputLayout$OnEndIconChangedListener; invoke-virtual {v0, v1}, Lcom/google/android/material/textfield/TextInputLayout;->addOnEndIconChangedListener(Lcom/google/android/material/textfield/TextInputLayout$OnEndIconChangedListener;)V .line 10 iget-object v0, p0, Lcom/google/android/material/textfield/EndIconDelegate;->textInputLayout:Lcom/google/android/material/textfield/TextInputLayout; invoke-virtual {v0}, Lcom/google/android/material/textfield/TextInputLayout;->getEditText()Landroid/widget/EditText; move-result-object v0 .line 11 invoke-static {v0}, Lcom/google/android/material/textfield/PasswordToggleEndIconDelegate;->isInputTypePassword(Landroid/widget/EditText;)Z move-result v1 if-eqz v1, :cond_0 .line 12 invoke-static {}, Landroid/text/method/PasswordTransformationMethod;->getInstance()Landroid/text/method/PasswordTransformationMethod; move-result-object v1 invoke-virtual {v0, v1}, Landroid/widget/EditText;->setTransformationMethod(Landroid/text/method/TransformationMethod;)V :cond_0 return-void .end method