package p000.p001.p002.p008.p009;

import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import ar.tvplayer.core.data.prefs.ؠ;
import ar.tvplayer.core.data.prefs.ރ;
import ar.tvplayer.core.util.CommonUtilsKt;
import ar.tvplayer.tv.base.ui.CustomPinPicker;
import java.util.HashMap;
import kotlin.TypeCastException;
import p000.p001.p002.p008.C0911;
import p000.p001.p002.p008.C0912;
import p000.p001.p002.p008.C0913;
import p000.p001.p002.p008.C0915;
import p000.p001.p002.p008.C0916;
import p000.p001.p021.p022.C1219;
import p025.p026.C1340;
import p025.p026.C1356;
import p025.p026.InterfaceC1327;
import p037.p041.p042.LayoutInflaterFactory2C1494;
import p037.p041.p043.p044.C1527;
import p037.p065.p078.C1910;
import p037.p089.p090.AbstractC2014;
import p037.p099.InterfaceC2219;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p242.p246.p251.C4303;
import p402.C6549;
import p402.InterfaceC6538;
import p402.InterfaceC6540;
import p402.p405.InterfaceC6575;
import p402.p405.p406.EnumC6586;
import p402.p405.p407.p408.AbstractC6597;
import p402.p405.p407.p408.InterfaceC6593;
import p402.p411.p412.InterfaceC6603;
import p402.p411.p412.InterfaceC6614;
import p402.p411.p412.InterfaceC6618;
import p402.p411.p413.AbstractC6636;
import p402.p411.p413.C6635;

/* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6540
public final class C0743 extends C0775 {

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public final InterfaceC6538 f3220 = C4303.m7065((InterfaceC6603) new C0750());

    /* JADX INFO: renamed from: ޔ, reason: contains not printable characters */
    public final Runnable f3221 = new RunnableC0753();

    /* JADX INFO: renamed from: ޕ, reason: contains not printable characters */
    public EnumC0749 f3222 = EnumC0749.ENTER_PIN;

    /* JADX INFO: renamed from: ޖ, reason: contains not printable characters */
    public String f3223 = "";

    /* JADX INFO: renamed from: ޗ, reason: contains not printable characters */
    public boolean f3224;

    /* JADX INFO: renamed from: ޘ, reason: contains not printable characters */
    public String f3225;

    /* JADX INFO: renamed from: ޙ, reason: contains not printable characters */
    public int f3226;

    /* JADX INFO: renamed from: ޚ, reason: contains not printable characters */
    public long f3227;

    /* JADX INFO: renamed from: ޛ, reason: contains not printable characters */
    public HashMap f3228;

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$֏, reason: contains not printable characters */
    /* JADX INFO: compiled from: java-style lambda group */
    public static final class ViewOnKeyListenerC0744 implements View.OnKeyListener {

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public final /* synthetic */ int f3229;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public final /* synthetic */ Object f3230;

        public ViewOnKeyListenerC0744(int i, Object obj) {
            this.f3229 = i;
            this.f3230 = obj;
        }

        @Override // android.view.View.OnKeyListener
        public final boolean onKey(View view, int i, KeyEvent keyEvent) {
            int i2 = this.f3229;
            if (i2 != 0 && i2 != 1 && i2 != 2) {
                throw null;
            }
            return C0743.m2046((C0743) this.f3230, keyEvent);
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ؠ, reason: contains not printable characters */
    /* JADX INFO: compiled from: java-style lambda group */
    public static final class ViewOnClickListenerC0745 implements View.OnClickListener {

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public final /* synthetic */ int f3231;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public final /* synthetic */ Object f3232;

        public ViewOnClickListenerC0745(int i, Object obj) {
            this.f3231 = i;
            this.f3232 = obj;
        }

        @Override // android.view.View.OnClickListener
        public final void onClick(View view) {
            int i = this.f3231;
            if (i == 0) {
                CustomPinPicker customPinPickerM2048 = ((C0743) this.f3232).m2048(C0912.pinPicker);
                C6635.m9823((Object) customPinPickerM2048, "pinPicker");
                String pin = customPinPickerM2048.getPin();
                C6635.m9823((Object) pin, "pin");
                if (pin.length() > 0) {
                    C0743.m2047((C0743) this.f3232, pin);
                    return;
                }
                return;
            }
            if (i == 1) {
                C0743 c0743 = (C0743) this.f3232;
                c0743.f3224 = !c0743.f3224;
                ((ImageButton) c0743.m2048(C0912.btnPinToggle)).setImageDrawable(c0743.f3224 ? C1527.m3025(c0743.requireContext(), C0911.ic_eye_white) : C1527.m3025(c0743.requireContext(), C0911.ic_eye_off_white));
                c0743.m2056();
                return;
            }
            if (i != 2) {
                throw null;
            }
            C0743 c07432 = (C0743) this.f3232;
            if (c07432.f3223.length() > 0) {
                String str = c07432.f3223;
                if (str == null) {
                    C6635.m9824("$this$dropLast");
                    throw null;
                }
                int length = str.length() - 1;
                if (length < 0) {
                    length = 0;
                }
                if (!(length >= 0)) {
                    throw new IllegalArgumentException(("Requested character count " + length + " is less than zero.").toString());
                }
                int length2 = str.length();
                if (length > length2) {
                    length = length2;
                }
                String strSubstring = str.substring(0, length);
                C6635.m9823((Object) strSubstring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
                c07432.f3223 = strSubstring;
                c07432.m2056();
            }
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ހ, reason: contains not printable characters */
    @InterfaceC6540
    public static final class C0746 implements Parcelable {
        public static final Parcelable.Creator CREATOR = new C0747();

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public final boolean f3233;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public final int f3234;

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public final boolean f3235;

        /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
        public final boolean f3236;

        /* JADX INFO: renamed from: އ, reason: contains not printable characters */
        public final String f3237;

        /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ހ$֏, reason: contains not printable characters */
        public static class C0747 implements Parcelable.Creator {
            @Override // android.os.Parcelable.Creator
            public final Object createFromParcel(Parcel parcel) {
                if (parcel == null) {
                    C6635.m9824("in");
                    throw null;
                }
                return new C0746(parcel.readInt() != 0, parcel.readInt(), parcel.readInt() != 0, parcel.readInt() != 0, parcel.readString());
            }

            @Override // android.os.Parcelable.Creator
            public final Object[] newArray(int i) {
                return new C0746[i];
            }
        }

        public C0746(boolean z, int i, boolean z2, boolean z3, String str) {
            if (str == null) {
                C6635.m9824("data");
                throw null;
            }
            this.f3233 = z;
            this.f3234 = i;
            this.f3235 = z2;
            this.f3236 = z3;
            this.f3237 = str;
        }

        @Override // android.os.Parcelable
        public int describeContents() {
            return 0;
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof C0746)) {
                return false;
            }
            C0746 c0746 = (C0746) obj;
            return this.f3233 == c0746.f3233 && this.f3234 == c0746.f3234 && this.f3235 == c0746.f3235 && this.f3236 == c0746.f3236 && C6635.m9825((Object) this.f3237, (Object) c0746.f3237);
        }

        /* JADX WARN: Multi-variable type inference failed */
        /* JADX WARN: Type inference failed for: r0v1, types: [int] */
        /* JADX WARN: Type inference failed for: r0v10 */
        /* JADX WARN: Type inference failed for: r0v11 */
        /* JADX WARN: Type inference failed for: r1v0 */
        /* JADX WARN: Type inference failed for: r1v1, types: [int] */
        /* JADX WARN: Type inference failed for: r1v6 */
        /* JADX WARN: Type inference failed for: r2v2, types: [int] */
        /* JADX WARN: Type inference failed for: r2v4 */
        /* JADX WARN: Type inference failed for: r2v5 */
        public int hashCode() {
            boolean z = this.f3233;
            ?? r0 = z;
            if (z) {
                r0 = 1;
            }
            int i = ((r0 * 31) + this.f3234) * 31;
            boolean z2 = this.f3235;
            ?? r2 = z2;
            if (z2) {
                r2 = 1;
            }
            int i2 = (i + r2) * 31;
            boolean z3 = this.f3236;
            int i3 = (i2 + (z3 ? 1 : z3)) * 31;
            String str = this.f3237;
            return i3 + (str != null ? str.hashCode() : 0);
        }

        public String toString() {
            StringBuilder sbM4889 = C2803.m4889("Args(checkVsChangePin=");
            sbM4889.append(this.f3233);
            sbM4889.append(", requestCode=");
            sbM4889.append(this.f3234);
            sbM4889.append(", isForChannel=");
            sbM4889.append(this.f3235);
            sbM4889.append(", ignoreFirstClick=");
            sbM4889.append(this.f3236);
            sbM4889.append(", data=");
            return C2803.m4884(sbM4889, this.f3237, ")");
        }

        @Override // android.os.Parcelable
        public void writeToParcel(Parcel parcel, int i) {
            if (parcel == null) {
                C6635.m9824("parcel");
                throw null;
            }
            parcel.writeInt(this.f3233 ? 1 : 0);
            parcel.writeInt(this.f3234);
            parcel.writeInt(this.f3235 ? 1 : 0);
            parcel.writeInt(this.f3236 ? 1 : 0);
            parcel.writeString(this.f3237);
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ށ, reason: contains not printable characters */
    public interface InterfaceC0748 {
        /* JADX INFO: renamed from: ֏ */
        void mo1747(int i, boolean z, String str);

        /* JADX INFO: renamed from: އ, reason: contains not printable characters */
        void mo2058();
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ނ, reason: contains not printable characters */
    public enum EnumC0749 {
        ENTER_PIN,
        NEW_PIN,
        OLD_PIN
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ރ, reason: contains not printable characters */
    public static final class C0750 extends AbstractC6636 implements InterfaceC6603<C0746> {
        public C0750() {
            super(0);
        }

        @Override // p402.p411.p412.InterfaceC6603
        /* JADX INFO: renamed from: ނ */
        public C0746 mo1543() {
            return (C0746) CommonUtilsKt.֏(C0743.this);
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ބ, reason: contains not printable characters */
    @InterfaceC6593(c = "ar.tvplayer.tv.base.ui.PinDialog$onPinButtonClicked$1", f = "PinDialog.kt", l = {163}, m = "invokeSuspend")
    public static final class C0751 extends AbstractC6597 implements InterfaceC6618<InterfaceC1327, InterfaceC6575<? super C6549>, Object> {

        /* JADX INFO: renamed from: އ, reason: contains not printable characters */
        public InterfaceC1327 f3243;

        /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
        public Object f3244;

        /* JADX INFO: renamed from: މ, reason: contains not printable characters */
        public int f3245;

        public C0751(InterfaceC6575 interfaceC6575) {
            super(2, interfaceC6575);
        }

        @Override // p402.p405.p407.p408.AbstractC6589
        /* JADX INFO: renamed from: ֏ */
        public final InterfaceC6575<C6549> mo837(Object obj, InterfaceC6575<?> interfaceC6575) {
            if (interfaceC6575 == null) {
                C6635.m9824("completion");
                throw null;
            }
            C0751 c0751 = C0743.this.new C0751(interfaceC6575);
            c0751.f3243 = (InterfaceC1327) obj;
            return c0751;
        }

        @Override // p402.p411.p412.InterfaceC6618
        /* JADX INFO: renamed from: ؠ */
        public final Object mo838(InterfaceC1327 interfaceC1327, InterfaceC6575<? super C6549> interfaceC6575) {
            return ((C0751) mo837(interfaceC1327, interfaceC6575)).mo839(C6549.f19328);
        }

        @Override // p402.p405.p407.p408.AbstractC6589
        /* JADX INFO: renamed from: ށ */
        public final Object mo839(Object obj) {
            EnumC6586 enumC6586 = EnumC6586.COROUTINE_SUSPENDED;
            int i = this.f3245;
            if (i == 0) {
                C4303.m7198(obj);
                this.f3244 = this.f3243;
                this.f3245 = 1;
                if (C4303.m7005(100L, this) == enumC6586) {
                    return enumC6586;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                C4303.m7198(obj);
            }
            C0743 c0743 = C0743.this;
            C0743.m2047(c0743, c0743.f3223);
            return C6549.f19328;
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ޅ, reason: contains not printable characters */
    public static final class ViewOnClickListenerC0752 implements View.OnClickListener {

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public final /* synthetic */ Button f3247;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public final /* synthetic */ C0743 f3248;

        public ViewOnClickListenerC0752(Button button, C0743 c0743) {
            this.f3247 = button;
            this.f3248 = c0743;
        }

        @Override // android.view.View.OnClickListener
        public final void onClick(View view) {
            C0743 c0743 = this.f3248;
            Button button = this.f3247;
            C6635.m9823((Object) button, "button");
            c0743.m2049(button.getText().toString());
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ؠ$ކ, reason: contains not printable characters */
    public static final class RunnableC0753 implements Runnable {
        public RunnableC0753() {
        }

        @Override // java.lang.Runnable
        public final void run() {
            C0743.this.m2057();
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static final /* synthetic */ boolean m2046(C0743 c0743, KeyEvent keyEvent) {
        if (c0743 == null) {
            throw null;
        }
        if (keyEvent == null || ރ.ߠ.ޛ() == 0 || keyEvent.getAction() != 1 || keyEvent.getKeyCode() < 7 || keyEvent.getKeyCode() > 16) {
            return false;
        }
        c0743.m2049(new String[]{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}[keyEvent.getKeyCode() - 7]);
        return true;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static final /* synthetic */ void m2047(C0743 c0743, String str) {
        if (c0743 == null) {
            throw null;
        }
        String str2 = ރ.ߠ.ޚ();
        int iOrdinal = c0743.f3222.ordinal();
        if (iOrdinal == 0) {
            if ((str2.length() == 0) || C6635.m9825((Object) str, (Object) str2)) {
                c0743.m2051(false);
                return;
            } else {
                c0743.m2055();
                c0743.m2054();
                return;
            }
        }
        if (iOrdinal != 1) {
            if (iOrdinal != 2) {
                return;
            }
            c0743.m2055();
            if (!C6635.m9825((Object) str, (Object) str2)) {
                c0743.m2054();
                return;
            }
            c0743.f3222 = EnumC0749.NEW_PIN;
            TextView textView = (TextView) c0743.m2048(C0912.tvTitle);
            C6635.m9823((Object) textView, "tvTitle");
            textView.setText(c0743.getString(C0915.settings_enter_new_pin));
            return;
        }
        c0743.m2055();
        String str3 = c0743.f3225;
        if (str3 == null) {
            c0743.f3225 = str;
            TextView textView2 = (TextView) c0743.m2048(C0912.tvTitle);
            C6635.m9823((Object) textView2, "tvTitle");
            textView2.setText(c0743.getString(C0915.settings_confirm_pin));
            return;
        }
        if (!C6635.m9825((Object) str, (Object) str3)) {
            TextView textView3 = (TextView) c0743.m2048(C0912.tvTitle);
            C6635.m9823((Object) textView3, "tvTitle");
            textView3.setText(str2.length() == 0 ? c0743.getString(C0915.settings_create_pin) : c0743.getString(C0915.settings_enter_new_pin));
            c0743.f3225 = null;
            C1219.m2512(c0743.getContext(), C0915.settings_pin_not_match);
            return;
        }
        ރ r1 = ރ.ߠ;
        if (r1 == null) {
            throw null;
        }
        if (str == null) {
            C6635.m9824("value");
            throw null;
        }
        if (r1 == null) {
            throw null;
        }
        ރ.ӏ.m9836(r1, ރ.ށ[159], str);
        c0743.m2051(true);
    }

    @Override // p037.p089.p090.DialogInterfaceOnCancelListenerC1992, androidx.fragment.app.Fragment
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (AbstractC2014.m3899(2)) {
            Log.d("FragmentManager", "Setting style and theme for DialogFragment " + this + " to 1, 0");
        }
        this.f6554 = 1;
        this.f3222 = m2052().f3233 ? EnumC0749.ENTER_PIN : EnumC0749.NEW_PIN;
        ރ r4 = ރ.ߠ;
        if (r4 == null) {
            throw null;
        }
        this.f3227 = ((Number) ރ.ι.m9835(r4, ރ.ށ[164])).longValue();
    }

    @Override // p000.p001.p002.p008.p009.C0775, androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        if (layoutInflater != null) {
            super.onCreateView(layoutInflater, viewGroup, bundle);
            return layoutInflater.inflate(C0913.dialog_pin, viewGroup, false);
        }
        C6635.m9824("inflater");
        throw null;
    }

    @Override // p000.p001.p002.p008.p009.C0775, p037.p089.p090.DialogInterfaceOnCancelListenerC1992, androidx.fragment.app.Fragment
    public /* synthetic */ void onDestroyView() {
        super.onDestroyView();
        HashMap map = this.f3228;
        if (map != null) {
            map.clear();
        }
    }

    @Override // p000.p001.p002.p008.p009.C0775, p037.p089.p090.DialogInterfaceOnCancelListenerC1992, android.content.DialogInterface.OnDismissListener
    public void onDismiss(DialogInterface dialogInterface) {
        if (dialogInterface == null) {
            C6635.m9824("dialog");
            throw null;
        }
        super.onDismiss(dialogInterface);
        InterfaceC0748 interfaceC0748M2053 = m2053();
        if (interfaceC0748M2053 != null) {
            interfaceC0748M2053.mo2058();
        }
    }

    @Override // p000.p001.p002.p008.p009.C0775, p037.p089.p090.DialogInterfaceOnCancelListenerC1992, androidx.fragment.app.Fragment
    public void onStart() {
        Window window;
        super.onStart();
        Dialog dialog = this.f6561;
        if (dialog == null || (window = dialog.getWindow()) == null) {
            return;
        }
        window.setLayout(C1219.m2502(this, 340), -2);
    }

    @Override // androidx.fragment.app.Fragment
    public void onViewCreated(View view, Bundle bundle) {
        if (view == null) {
            C6635.m9824("view");
            throw null;
        }
        if (ރ.ߠ.ޚ().length() == 0) {
            this.f3222 = EnumC0749.NEW_PIN;
        } else if (this.f3222 == EnumC0749.NEW_PIN) {
            this.f3222 = EnumC0749.OLD_PIN;
        }
        int iOrdinal = this.f3222.ordinal();
        if (iOrdinal == 0) {
            TextView textView = (TextView) m2048(C0912.tvTitle);
            C6635.m9823((Object) textView, "tvTitle");
            textView.setText(getString(C0915.settings_enter_pin));
        } else if (iOrdinal == 1) {
            TextView textView2 = (TextView) m2048(C0912.tvTitle);
            C6635.m9823((Object) textView2, "tvTitle");
            textView2.setText(getString(C0915.settings_create_pin));
        } else if (iOrdinal == 2) {
            TextView textView3 = (TextView) m2048(C0912.tvTitle);
            C6635.m9823((Object) textView3, "tvTitle");
            textView3.setText(getString(C0915.settings_enter_current_pin));
        }
        if (this.f3222 != EnumC0749.NEW_PIN) {
            m2057();
        }
        if (ރ.ߠ.ޛ() == 0) {
            CustomPinPicker customPinPickerM2048 = m2048(C0912.pinPicker);
            C6635.m9823((Object) customPinPickerM2048, "pinPicker");
            customPinPickerM2048.setVisibility(0);
            ConstraintLayout constraintLayout = (ConstraintLayout) m2048(C0912.layoutKeyboard);
            C6635.m9823((Object) constraintLayout, "layoutKeyboard");
            constraintLayout.setVisibility(8);
            m2048(C0912.pinPicker).requestFocus();
            CustomPinPicker customPinPickerM20482 = m2048(C0912.pinPicker);
            C6635.m9823((Object) customPinPickerM20482, "pinPicker");
            customPinPickerM20482.setActivated(true);
            m2048(C0912.pinPicker).setIgnoreFirstClick(m2052().f3236);
            m2048(C0912.pinPicker).setOnClickListener(new ViewOnClickListenerC0745(0, this));
            return;
        }
        CustomPinPicker customPinPickerM20483 = m2048(C0912.pinPicker);
        C6635.m9823((Object) customPinPickerM20483, "pinPicker");
        customPinPickerM20483.setVisibility(8);
        ConstraintLayout constraintLayout2 = (ConstraintLayout) m2048(C0912.layoutKeyboard);
        C6635.m9823((Object) constraintLayout2, "layoutKeyboard");
        constraintLayout2.setVisibility(0);
        ((Button) m2048(C0912.btn5)).requestFocus();
        Button[] buttonArr = {(Button) m2048(C0912.btn1), (Button) m2048(C0912.btn2), (Button) m2048(C0912.btn3), (Button) m2048(C0912.btn4), (Button) m2048(C0912.btn5), (Button) m2048(C0912.btn6), (Button) m2048(C0912.btn7), (Button) m2048(C0912.btn8), (Button) m2048(C0912.btn9), (Button) m2048(C0912.btn0)};
        for (int i = 0; i < 10; i++) {
            Button button = buttonArr[i];
            button.setOnClickListener(new ViewOnClickListenerC0752(button, this));
            button.setOnKeyListener(new ViewOnKeyListenerC0744(0, this));
        }
        ((ImageButton) m2048(C0912.btnPinToggle)).setOnClickListener(new ViewOnClickListenerC0745(1, this));
        ((ImageButton) m2048(C0912.btnPinToggle)).setOnKeyListener(new ViewOnKeyListenerC0744(1, this));
        ((ImageButton) m2048(C0912.btnBackspace)).setOnClickListener(new ViewOnClickListenerC0745(2, this));
        ((ImageButton) m2048(C0912.btnBackspace)).setOnKeyListener(new ViewOnKeyListenerC0744(2, this));
        m2056();
    }

    @Override // p037.p089.p090.DialogInterfaceOnCancelListenerC1992
    /* JADX INFO: renamed from: ֏ */
    public Dialog mo1839(Bundle bundle) {
        WindowManager.LayoutParams attributes;
        Dialog dialogMo1839 = super.mo1839(bundle);
        Window window = dialogMo1839.getWindow();
        if (window != null && (attributes = window.getAttributes()) != null) {
            attributes.windowAnimations = C0916.Animation_TvPlayer_Dialog;
        }
        C6635.m9823((Object) dialogMo1839, "super.onCreateDialog(sav…TvPlayer_Dialog\n        }");
        return dialogMo1839;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public View m2048(int i) {
        if (this.f3228 == null) {
            this.f3228 = new HashMap();
        }
        View view = (View) this.f3228.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View view2 = this.mView;
        if (view2 == null) {
            return null;
        }
        View viewFindViewById = view2.findViewById(i);
        this.f3228.put(Integer.valueOf(i), viewFindViewById);
        return viewFindViewById;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m2049(String str) {
        this.f3223 = C2803.m4879(this.f3223, str);
        m2056();
        if (this.f3223.length() == 4) {
            C4303.m7160(C1356.f4507, C1340.m2665().mo2725(), null, new C0751(null), 2, null);
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final char m2050(int i) {
        if (i >= this.f3223.length()) {
            return (char) 8212;
        }
        if (this.f3224) {
            return this.f3223.charAt(i);
        }
        return '*';
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m2051(boolean z) {
        if (!ރ.ߠ.ފ() || m2052().f3235) {
            ރ r0 = ރ.ߠ;
            long jCurrentTimeMillis = System.currentTimeMillis();
            if (r0 == null) {
                throw null;
            }
            long jLongValue = Long.valueOf(jCurrentTimeMillis).longValue();
            ރ r2 = ރ.ߠ;
            if (r2 == null) {
                throw null;
            }
            ރ.ւ.m9836(r2, ރ.ށ[163], Long.valueOf(jLongValue));
            C6549 c6549 = C6549.f19328;
        }
        InterfaceC0748 interfaceC0748M2053 = m2053();
        if (interfaceC0748M2053 != null) {
            interfaceC0748M2053.mo1747(m2052().f3234, z, m2052().f3237);
        }
        m3879();
    }

    @Override // p000.p001.p002.p008.p009.C0775
    /* JADX INFO: renamed from: މ */
    public void mo1840() {
        HashMap map = this.f3228;
        if (map != null) {
            map.clear();
        }
    }

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public final C0746 m2052() {
        return (C0746) this.f3220.getValue();
    }

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public final InterfaceC0748 m2053() {
        InterfaceC2219 interfaceC2219 = this.mParentFragment;
        if (interfaceC2219 != null && (interfaceC2219 instanceof InterfaceC0748)) {
            if (interfaceC2219 != null) {
                return (InterfaceC0748) interfaceC2219;
            }
            throw new TypeCastException("null cannot be cast to non-null type ar.tvplayer.tv.base.ui.PinDialog.Listener");
        }
        if (!(getActivity() instanceof InterfaceC0748)) {
            return null;
        }
        C1910.InterfaceC1911 activity = getActivity();
        if (activity != null) {
            return (InterfaceC0748) activity;
        }
        throw new TypeCastException("null cannot be cast to non-null type ar.tvplayer.tv.base.ui.PinDialog.Listener");
    }

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public final void m2054() {
        int i = this.f3226 + 1;
        this.f3226 = i;
        if (i < 5) {
            C1219.m2512(getContext(), C0915.settings_pin_wrong);
            return;
        }
        long jCurrentTimeMillis = System.currentTimeMillis() + ((long) 60000);
        this.f3227 = jCurrentTimeMillis;
        if (ރ.ߠ == null) {
            throw null;
        }
        LayoutInflaterFactory2C1494.C1505.m2937(jCurrentTimeMillis, (InterfaceC6614<? super Long, C6549>) ؠ.ބ);
        m2057();
    }

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public final void m2055() {
        CustomPinPicker customPinPickerM2048 = m2048(C0912.pinPicker);
        int columnsCount = customPinPickerM2048.getColumnsCount();
        for (int i = 0; i < columnsCount; i++) {
            customPinPickerM2048.m319(i, 0, false);
        }
        customPinPickerM2048.setSelectedColumn(0);
        this.f3223 = "";
        m2056();
    }

    /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
    public final void m2056() {
        TextView textView = (TextView) m2048(C0912.tvPinDigit1);
        C6635.m9823((Object) textView, "tvPinDigit1");
        textView.setText(String.valueOf(m2050(0)));
        TextView textView2 = (TextView) m2048(C0912.tvPinDigit2);
        C6635.m9823((Object) textView2, "tvPinDigit2");
        textView2.setText(String.valueOf(m2050(1)));
        TextView textView3 = (TextView) m2048(C0912.tvPinDigit3);
        C6635.m9823((Object) textView3, "tvPinDigit3");
        textView3.setText(String.valueOf(m2050(2)));
        TextView textView4 = (TextView) m2048(C0912.tvPinDigit4);
        C6635.m9823((Object) textView4, "tvPinDigit4");
        textView4.setText(String.valueOf(m2050(3)));
    }

    /* JADX INFO: renamed from: ޏ, reason: contains not printable characters */
    public final void m2057() {
        if (getActivity() == null) {
            View view = this.mView;
            if (view != null) {
                view.removeCallbacks(this.f3221);
                return;
            }
            return;
        }
        int iCurrentTimeMillis = (int) ((this.f3227 - System.currentTimeMillis()) / ((long) 1000));
        if (iCurrentTimeMillis < 1) {
            LinearLayout linearLayout = (LinearLayout) m2048(C0912.layoutEnterPin);
            C6635.m9823((Object) linearLayout, "layoutEnterPin");
            linearLayout.setVisibility(0);
            TextView textView = (TextView) m2048(C0912.tvWrongPin);
            C6635.m9823((Object) textView, "tvWrongPin");
            textView.setVisibility(4);
            this.f3226 = 0;
            return;
        }
        LinearLayout linearLayout2 = (LinearLayout) m2048(C0912.layoutEnterPin);
        C6635.m9823((Object) linearLayout2, "layoutEnterPin");
        linearLayout2.setVisibility(4);
        TextView textView2 = (TextView) m2048(C0912.tvWrongPin);
        C6635.m9823((Object) textView2, "tvWrongPin");
        textView2.setVisibility(0);
        TextView textView3 = (TextView) m2048(C0912.tvWrongPin);
        C6635.m9823((Object) textView3, "tvWrongPin");
        textView3.setText(getString(C0915.settings_pin_countdown, Integer.valueOf(iCurrentTimeMillis)));
        View view2 = this.mView;
        if (view2 != null) {
            view2.postDelayed(this.f3221, 1000L);
        }
    }
}
