package defpackage;

import android.os.Bundle;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
import androidx.preference.DialogPreference;
import androidx.preference.EditTextPreference;
import ar.tvplayer.tv.R;

/* renamed from: ᵙʾʿ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public class C2565 extends C5037 {

    /* renamed from: ˆʕ, reason: contains not printable characters */
    public int f9968;

    /* renamed from: ᵦᵳˎ, reason: contains not printable characters */
    public CharSequence f9969;

    /* renamed from: ᵪᵛʿ, reason: contains not printable characters */
    public CharSequence f9970;

    /* renamed from: ᵳᵮᵸ, reason: contains not printable characters */
    public int f9971;

    /* renamed from: ᵴᵯᵴⁱ, reason: contains not printable characters */
    public CharSequence f9972;

    @Override // defpackage.AbstractComponentCallbacksC3693
    /* renamed from: ˎᵶᵹ */
    public final void mo1064(Bundle bundle) {
        bundle.putCharSequence("LeanbackEditPreferenceDialog.title", this.f9972);
        bundle.putCharSequence("LeanbackEditPreferenceDialog.message", this.f9970);
        bundle.putCharSequence("LeanbackEditPreferenceDialog.text", this.f9969);
        bundle.putInt("LeanbackEditPreferenceDialog.inputType", this.f9968);
        bundle.putInt("LeanbackEditPreferenceDialog.imeOptions", this.f9971);
    }

    @Override // defpackage.AbstractComponentCallbacksC3693
    /* renamed from: ᵎʾ */
    public final View mo1066(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        TypedValue typedValue = new TypedValue();
        m8294().getTheme().resolveAttribute(R.attr._11_res_0x7f040512, typedValue, true);
        int i = typedValue.resourceId;
        if (i == 0) {
            i = R.style._11_res_0x7f1401b9;
        }
        View viewInflate = layoutInflater.cloneInContext(new ContextThemeWrapper(m8294(), i)).inflate(R.layout._11_res_0x7f0e00d3, viewGroup, false);
        if (!TextUtils.isEmpty(this.f9972)) {
            ((TextView) viewInflate.findViewById(R.id._11_res_0x7f0b011a)).setText(this.f9972);
        }
        if (!TextUtils.isEmpty(this.f9970)) {
            TextView textView = (TextView) viewInflate.findViewById(android.R.id.message);
            textView.setVisibility(0);
            textView.setText(this.f9970);
        }
        EditText editText = (EditText) viewInflate.findViewById(android.R.id.edit);
        editText.setInputType(this.f9968);
        editText.setImeOptions(this.f9971);
        if (!TextUtils.isEmpty(this.f9969)) {
            editText.setText(this.f9969);
        }
        editText.setOnEditorActionListener(new C4015(1, this));
        return viewInflate;
    }

    @Override // defpackage.AbstractComponentCallbacksC3693
    /* renamed from: ᵯᵽ */
    public final void mo1069() {
        this.f13788 = true;
        EditText editText = (EditText) this.f13752.findViewById(android.R.id.edit);
        InputMethodManager inputMethodManager = (InputMethodManager) m8294().getSystemService("input_method");
        editText.requestFocus();
        inputMethodManager.showSoftInput(editText, 0);
    }

    @Override // defpackage.C5037, defpackage.AbstractComponentCallbacksC3693
    /* renamed from: ᵺᵜᵰ */
    public final void mo1071(Bundle bundle) {
        super.mo1071(bundle);
        if (bundle != null) {
            this.f9972 = bundle.getCharSequence("LeanbackEditPreferenceDialog.title");
            this.f9970 = bundle.getCharSequence("LeanbackEditPreferenceDialog.message");
            this.f9969 = bundle.getCharSequence("LeanbackEditPreferenceDialog.text");
            this.f9968 = bundle.getInt("LeanbackEditPreferenceDialog.inputType", 1);
            this.f9971 = bundle.getInt("LeanbackEditPreferenceDialog.imeOptions", 2);
            return;
        }
        DialogPreference dialogPreferenceM10506 = m10506();
        CharSequence charSequence = dialogPreferenceM10506.f725;
        this.f9972 = charSequence;
        String str = dialogPreferenceM10506.f726;
        this.f9970 = str;
        if (!(dialogPreferenceM10506 instanceof EditTextPreference)) {
            ᵹˉᵞ.ˌᵜᵹᵩ("Preference must be a EditTextPreference");
            return;
        }
        this.f9972 = charSequence;
        this.f9970 = str;
        this.f9969 = ((EditTextPreference) dialogPreferenceM10506).f732;
        this.f9968 = dialogPreferenceM10506.m461().getInt("input_type", 1);
        this.f9971 = dialogPreferenceM10506.m461().getInt("ime_option", 2);
    }
}
