package androidx.preference;

import android.R;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.AbsSavedState;
import android.view.ContextMenu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.preference.PreferenceGroup;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import p037.p041.p042.LayoutInflaterFactory2C1494;
import p037.p041.p043.p044.C1527;
import p037.p065.p078.C1920;
import p037.p065.p078.p079.C1947;
import p037.p106.AbstractC2271;
import p037.p106.C2282;
import p037.p106.C2285;
import p037.p106.C2287;
import p037.p106.C2293;
import p037.p106.C2294;
import p037.p106.C2296;
import p037.p106.C2297;
import p037.p106.C2298;
import p037.p106.C2300;
import p138.p139.p143.p144.C2803;

/* JADX INFO: loaded from: classes.dex */
public class Preference implements Comparable<Preference> {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public Context f1006;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public C2287 f1007;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public AbstractC2271 f1008;

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

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

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

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

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

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public CharSequence f1014;

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public CharSequence f1015;

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

    /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
    public Drawable f1017;

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

    /* JADX INFO: renamed from: ސ, reason: contains not printable characters */
    public Intent f1019;

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

    /* JADX INFO: renamed from: ޒ, reason: contains not printable characters */
    public Bundle f1021;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /* JADX INFO: renamed from: ޥ, reason: contains not printable characters */
    public InterfaceC0162 f1040;

    /* JADX INFO: renamed from: ޱ, reason: contains not printable characters */
    public List<Preference> f1041;

    /* JADX INFO: renamed from: ࢠ, reason: contains not printable characters */
    public PreferenceGroup f1042;

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

    /* JADX INFO: renamed from: ࢣ, reason: contains not printable characters */
    public ViewOnCreateContextMenuListenerC0164 f1044;

    /* JADX INFO: renamed from: ࢤ, reason: contains not printable characters */
    public InterfaceC0165 f1045;

    /* JADX INFO: renamed from: ࢥ, reason: contains not printable characters */
    public final View.OnClickListener f1046;

    /* JADX INFO: renamed from: androidx.preference.Preference$֏, reason: contains not printable characters */
    public class ViewOnClickListenerC0159 implements View.OnClickListener {
        public ViewOnClickListenerC0159() {
        }

        @Override // android.view.View.OnClickListener
        public void onClick(View view) {
            Preference.this.mo359(view);
        }
    }

    /* JADX INFO: renamed from: androidx.preference.Preference$ؠ, reason: contains not printable characters */
    public static class C0160 extends AbsSavedState {
        public static final Parcelable.Creator<C0160> CREATOR = new C0161();

        /* JADX INFO: renamed from: androidx.preference.Preference$ؠ$֏, reason: contains not printable characters */
        public static class C0161 implements Parcelable.Creator<C0160> {
            @Override // android.os.Parcelable.Creator
            public C0160 createFromParcel(Parcel parcel) {
                return new C0160(parcel);
            }

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

        public C0160(Parcel parcel) {
            super(parcel);
        }

        public C0160(Parcelable parcelable) {
            super(parcelable);
        }
    }

    /* JADX INFO: renamed from: androidx.preference.Preference$ހ, reason: contains not printable characters */
    public interface InterfaceC0162 {
    }

    /* JADX INFO: renamed from: androidx.preference.Preference$ށ, reason: contains not printable characters */
    public interface InterfaceC0163 {
    }

    /* JADX INFO: renamed from: androidx.preference.Preference$ނ, reason: contains not printable characters */
    public static class ViewOnCreateContextMenuListenerC0164 implements View.OnCreateContextMenuListener, MenuItem.OnMenuItemClickListener {

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

        public ViewOnCreateContextMenuListenerC0164(Preference preference) {
            this.f1048 = preference;
        }

        @Override // android.view.View.OnCreateContextMenuListener
        public void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo contextMenuInfo) {
            CharSequence charSequenceMo375 = this.f1048.mo375();
            if (!this.f1048.f1036 || TextUtils.isEmpty(charSequenceMo375)) {
                return;
            }
            contextMenu.setHeaderTitle(charSequenceMo375);
            contextMenu.add(0, 0, 0, C2298.copy).setOnMenuItemClickListener(this);
        }

        @Override // android.view.MenuItem.OnMenuItemClickListener
        public boolean onMenuItemClick(MenuItem menuItem) {
            ClipboardManager clipboardManager = (ClipboardManager) this.f1048.f1006.getSystemService("clipboard");
            CharSequence charSequenceMo375 = this.f1048.mo375();
            clipboardManager.setPrimaryClip(ClipData.newPlainText("Preference", charSequenceMo375));
            Context context = this.f1048.f1006;
            Toast.makeText(context, context.getString(C2298.preference_copied, charSequenceMo375), 0).show();
            return true;
        }
    }

    /* JADX INFO: renamed from: androidx.preference.Preference$ރ, reason: contains not printable characters */
    public interface InterfaceC0165<T extends Preference> {
        /* JADX INFO: renamed from: ֏ */
        CharSequence mo371(T t);
    }

    public Preference(Context context) {
        this(context, null);
    }

    public Preference(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, LayoutInflaterFactory2C1494.C1505.m2871(context, C2294.preferenceStyle, R.attr.preferenceStyle));
    }

    public Preference(Context context, AttributeSet attributeSet, int i) {
        this(context, attributeSet, i, 0);
    }

    public Preference(Context context, AttributeSet attributeSet, int i, int i2) {
        this.f1012 = Integer.MAX_VALUE;
        this.f1013 = 0;
        this.f1022 = true;
        this.f1023 = true;
        this.f1025 = true;
        this.f1028 = true;
        this.f1029 = true;
        this.f1030 = true;
        this.f1031 = true;
        this.f1032 = true;
        this.f1034 = true;
        this.f1037 = true;
        this.f1038 = C2297.preference;
        this.f1046 = new ViewOnClickListenerC0159();
        this.f1006 = context;
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C2300.Preference, i, i2);
        this.f1016 = LayoutInflaterFactory2C1494.C1505.m2873(typedArrayObtainStyledAttributes, C2300.Preference_icon, C2300.Preference_android_icon, 0);
        int i3 = C2300.Preference_key;
        int i4 = C2300.Preference_android_key;
        String string = typedArrayObtainStyledAttributes.getString(i3);
        this.f1018 = string == null ? typedArrayObtainStyledAttributes.getString(i4) : string;
        int i5 = C2300.Preference_title;
        int i6 = C2300.Preference_android_title;
        CharSequence text = typedArrayObtainStyledAttributes.getText(i5);
        this.f1014 = text == null ? typedArrayObtainStyledAttributes.getText(i6) : text;
        int i7 = C2300.Preference_summary;
        int i8 = C2300.Preference_android_summary;
        CharSequence text2 = typedArrayObtainStyledAttributes.getText(i7);
        this.f1015 = text2 == null ? typedArrayObtainStyledAttributes.getText(i8) : text2;
        this.f1012 = typedArrayObtainStyledAttributes.getInt(C2300.Preference_order, typedArrayObtainStyledAttributes.getInt(C2300.Preference_android_order, Integer.MAX_VALUE));
        int i9 = C2300.Preference_fragment;
        int i10 = C2300.Preference_android_fragment;
        String string2 = typedArrayObtainStyledAttributes.getString(i9);
        this.f1020 = string2 == null ? typedArrayObtainStyledAttributes.getString(i10) : string2;
        this.f1038 = typedArrayObtainStyledAttributes.getResourceId(C2300.Preference_layout, typedArrayObtainStyledAttributes.getResourceId(C2300.Preference_android_layout, C2297.preference));
        this.f1039 = typedArrayObtainStyledAttributes.getResourceId(C2300.Preference_widgetLayout, typedArrayObtainStyledAttributes.getResourceId(C2300.Preference_android_widgetLayout, 0));
        this.f1022 = typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_enabled, typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_android_enabled, true));
        this.f1023 = typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_selectable, typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_android_selectable, true));
        this.f1025 = typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_persistent, typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_android_persistent, true));
        int i11 = C2300.Preference_dependency;
        int i12 = C2300.Preference_android_dependency;
        String string3 = typedArrayObtainStyledAttributes.getString(i11);
        this.f1026 = string3 == null ? typedArrayObtainStyledAttributes.getString(i12) : string3;
        int i13 = C2300.Preference_allowDividerAbove;
        this.f1031 = typedArrayObtainStyledAttributes.getBoolean(i13, typedArrayObtainStyledAttributes.getBoolean(i13, this.f1023));
        int i14 = C2300.Preference_allowDividerBelow;
        this.f1032 = typedArrayObtainStyledAttributes.getBoolean(i14, typedArrayObtainStyledAttributes.getBoolean(i14, this.f1023));
        if (typedArrayObtainStyledAttributes.hasValue(C2300.Preference_defaultValue)) {
            this.f1027 = mo365(typedArrayObtainStyledAttributes, C2300.Preference_defaultValue);
        } else if (typedArrayObtainStyledAttributes.hasValue(C2300.Preference_android_defaultValue)) {
            this.f1027 = mo365(typedArrayObtainStyledAttributes, C2300.Preference_android_defaultValue);
        }
        this.f1037 = typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_shouldDisableView, typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_android_shouldDisableView, true));
        boolean zHasValue = typedArrayObtainStyledAttributes.hasValue(C2300.Preference_singleLineTitle);
        this.f1033 = zHasValue;
        if (zHasValue) {
            this.f1034 = typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_singleLineTitle, typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_android_singleLineTitle, true));
        }
        this.f1035 = typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_iconSpaceReserved, typedArrayObtainStyledAttributes.getBoolean(C2300.Preference_android_iconSpaceReserved, false));
        int i15 = C2300.Preference_isPreferenceVisible;
        this.f1030 = typedArrayObtainStyledAttributes.getBoolean(i15, typedArrayObtainStyledAttributes.getBoolean(i15, true));
        int i16 = C2300.Preference_enableCopying;
        this.f1036 = typedArrayObtainStyledAttributes.getBoolean(i16, typedArrayObtainStyledAttributes.getBoolean(i16, false));
        typedArrayObtainStyledAttributes.recycle();
    }

    @Override // java.lang.Comparable
    public int compareTo(Preference preference) {
        Preference preference2 = preference;
        int i = this.f1012;
        int i2 = preference2.f1012;
        if (i != i2) {
            return i - i2;
        }
        CharSequence charSequence = this.f1014;
        CharSequence charSequence2 = preference2.f1014;
        if (charSequence == charSequence2) {
            return 0;
        }
        if (charSequence == null) {
            return 1;
        }
        if (charSequence2 == null) {
            return -1;
        }
        return charSequence.toString().compareToIgnoreCase(preference2.f1014.toString());
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        CharSequence charSequence = this.f1014;
        if (!TextUtils.isEmpty(charSequence)) {
            sb.append(charSequence);
            sb.append(' ');
        }
        CharSequence charSequenceMo375 = mo375();
        if (!TextUtils.isEmpty(charSequenceMo375)) {
            sb.append(charSequenceMo375);
            sb.append(' ');
        }
        if (sb.length() > 0) {
            sb.setLength(sb.length() - 1);
        }
        return sb.toString();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public int m378(int i) {
        return (m404() && m398() == null) ? this.f1007.m4336().getInt(this.f1018, i) : i;
    }

    /* JADX INFO: renamed from: ֏ */
    public Object mo365(TypedArray typedArray, int i) {
        return null;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public String m379(String str) {
        if (!m404()) {
            return str;
        }
        AbstractC2271 abstractC2271M398 = m398();
        return abstractC2271M398 != null ? abstractC2271M398.mo2024(this.f1018, str) : this.f1007.m4336().getString(this.f1018, str);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public Set<String> m380(Set<String> set) {
        return (m404() && m398() == null) ? this.f1007.m4336().getStringSet(this.f1018, set) : set;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m381(Drawable drawable) {
        if (this.f1017 != drawable) {
            this.f1017 = drawable;
            this.f1016 = 0;
            mo364();
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo382(Bundle bundle) {
        Parcelable parcelable;
        if (!m399() || (parcelable = bundle.getParcelable(this.f1018)) == null) {
            return;
        }
        this.f1043 = false;
        mo366(parcelable);
        if (!this.f1043) {
            throw new IllegalStateException("Derived class did not call super.onRestoreInstanceState()");
        }
    }

    /* JADX INFO: renamed from: ֏ */
    public void mo366(Parcelable parcelable) {
        this.f1043 = true;
        if (parcelable != AbsSavedState.EMPTY_STATE && parcelable != null) {
            throw new IllegalArgumentException("Wrong state class -- expecting Preference State");
        }
    }

    /* JADX INFO: renamed from: ֏ */
    public void mo359(View view) {
        Intent intent;
        C2287.InterfaceC2290 interfaceC2290;
        if (mo400() && this.f1023) {
            mo362();
            InterfaceC0163 interfaceC0163 = this.f1011;
            if (interfaceC0163 == null) {
                C2287 c2287 = this.f1007;
                if ((c2287 == null || (interfaceC2290 = c2287.f7290) == null || !interfaceC2290.mo1837(this)) && (intent = this.f1019) != null) {
                    this.f1006.startActivity(intent);
                    return;
                }
                return;
            }
            C2285 c2285 = (C2285) interfaceC0163;
            c2285.f7274.m410(Integer.MAX_VALUE);
            C2282 c2282 = c2285.f7275;
            c2282.f7268.removeCallbacks(c2282.f7269);
            c2282.f7268.post(c2282.f7269);
            PreferenceGroup.InterfaceC0167 interfaceC0167 = c2285.f7274.f1056;
            if (interfaceC0167 != null) {
                interfaceC0167.m415();
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m383(View view, boolean z) {
        view.setEnabled(z);
        if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;
            for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) {
                m383(viewGroup.getChildAt(childCount), z);
            }
        }
    }

    /* JADX INFO: renamed from: ֏ */
    public void mo372(CharSequence charSequence) {
        if (this.f1045 != null) {
            throw new IllegalStateException("Preference already has a SummaryProvider set.");
        }
        if (TextUtils.equals(this.f1015, charSequence)) {
            return;
        }
        this.f1015 = charSequence;
        mo364();
    }

    /* JADX INFO: renamed from: ֏ */
    public void mo367(Object obj) {
    }

    @Deprecated
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo384(C1947 c1947) {
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m385(C2287 c2287) {
        this.f1007 = c2287;
        if (!this.f1010) {
            this.f1009 = c2287.m4335();
        }
        if (m398() != null) {
            mo367(this.f1027);
            return;
        }
        if (m404()) {
            if (((this.f1007 == null || m398() != null) ? null : this.f1007.m4336()).contains(this.f1018)) {
                mo367((Object) null);
                return;
            }
        }
        Object obj = this.f1027;
        if (obj != null) {
            mo367(obj);
        }
    }

    /* JADX INFO: renamed from: ֏ */
    public void mo360(C2293 c2293) {
        Integer numValueOf;
        View view = c2293.f1326;
        view.setOnClickListener(this.f1046);
        view.setId(this.f1013);
        TextView textView = (TextView) c2293.m4338(R.id.summary);
        if (textView != null) {
            CharSequence charSequenceMo375 = mo375();
            if (TextUtils.isEmpty(charSequenceMo375)) {
                textView.setVisibility(8);
                numValueOf = null;
            } else {
                textView.setText(charSequenceMo375);
                textView.setVisibility(0);
                numValueOf = Integer.valueOf(textView.getCurrentTextColor());
            }
        } else {
            numValueOf = null;
        }
        TextView textView2 = (TextView) c2293.m4338(R.id.title);
        if (textView2 != null) {
            CharSequence charSequence = this.f1014;
            if (TextUtils.isEmpty(charSequence)) {
                textView2.setVisibility(8);
            } else {
                textView2.setText(charSequence);
                textView2.setVisibility(0);
                if (this.f1033) {
                    textView2.setSingleLine(this.f1034);
                }
                if (!this.f1023 && mo400() && numValueOf != null) {
                    textView2.setTextColor(numValueOf.intValue());
                }
            }
        }
        ImageView imageView = (ImageView) c2293.m4338(R.id.icon);
        if (imageView != null) {
            if (this.f1016 != 0 || this.f1017 != null) {
                if (this.f1017 == null) {
                    this.f1017 = C1527.m3025(this.f1006, this.f1016);
                }
                Drawable drawable = this.f1017;
                if (drawable != null) {
                    imageView.setImageDrawable(drawable);
                }
            }
            if (this.f1017 != null) {
                imageView.setVisibility(0);
            } else {
                imageView.setVisibility(this.f1035 ? 4 : 8);
            }
        }
        View viewM4338 = c2293.m4338(C2296.icon_frame);
        if (viewM4338 == null) {
            viewM4338 = c2293.m4338(R.id.icon_frame);
        }
        if (viewM4338 != null) {
            if (this.f1017 != null) {
                viewM4338.setVisibility(0);
            } else {
                viewM4338.setVisibility(this.f1035 ? 4 : 8);
            }
        }
        if (this.f1037) {
            m383(view, mo400());
        } else {
            m383(view, true);
        }
        boolean z = this.f1023;
        view.setFocusable(z);
        view.setClickable(z);
        c2293.f7298 = this.f1031;
        c2293.f7299 = this.f1032;
        boolean z2 = this.f1036;
        if (z2 && this.f1044 == null) {
            this.f1044 = new ViewOnCreateContextMenuListenerC0164(this);
        }
        view.setOnCreateContextMenuListener(z2 ? this.f1044 : null);
        view.setLongClickable(z2);
        if (!z2 || z) {
            return;
        }
        C1920.m3744(view, (Drawable) null);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public boolean m386(boolean z) {
        return (m404() && m398() == null) ? this.f1007.m4336().getBoolean(this.f1018, z) : z;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void m387(int i) {
        if (i != this.f1012) {
            this.f1012 = i;
            m401();
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void mo388(Bundle bundle) {
        if (m399()) {
            this.f1043 = false;
            Parcelable parcelableMo369 = mo369();
            if (!this.f1043) {
                throw new IllegalStateException("Derived class did not call super.onSaveInstanceState()");
            }
            if (parcelableMo369 != null) {
                bundle.putParcelable(this.f1018, parcelableMo369);
            }
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void m389(CharSequence charSequence) {
        if ((charSequence != null || this.f1014 == null) && (charSequence == null || charSequence.equals(this.f1014))) {
            return;
        }
        this.f1014 = charSequence;
        mo364();
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void mo390(boolean z) {
        List<Preference> list = this.f1041;
        if (list == null) {
            return;
        }
        int size = list.size();
        for (int i = 0; i < size; i++) {
            Preference preference = list.get(i);
            if (preference.f1028 == z) {
                preference.f1028 = !z;
                preference.mo390(preference.mo370());
                preference.mo364();
            }
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public boolean m391(String str) {
        if (!m404()) {
            return false;
        }
        if (TextUtils.equals(str, m379((String) null))) {
            return true;
        }
        AbstractC2271 abstractC2271M398 = m398();
        if (abstractC2271M398 != null) {
            abstractC2271M398.mo2025(this.f1018, str);
        } else {
            SharedPreferences.Editor editorM4333 = this.f1007.m4333();
            editorM4333.putString(this.f1018, str);
            if (!this.f1007.f7286) {
                editorM4333.apply();
            }
        }
        return true;
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public void m392(String str) {
        this.f1018 = str;
        if (!this.f1024 || m399()) {
            return;
        }
        if (TextUtils.isEmpty(this.f1018)) {
            throw new IllegalStateException("Preference does not have a key assigned.");
        }
        this.f1024 = true;
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public void m393(boolean z) {
        if (this.f1022 != z) {
            this.f1022 = z;
            mo390(mo370());
            mo364();
        }
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public void m394(boolean z) {
        if (this.f1035 != z) {
            this.f1035 = z;
            mo364();
        }
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final void m395(boolean z) {
        if (this.f1030 != z) {
            this.f1030 = z;
            InterfaceC0162 interfaceC0162 = this.f1040;
            if (interfaceC0162 != null) {
                C2282 c2282 = (C2282) interfaceC0162;
                c2282.f7268.removeCallbacks(c2282.f7269);
                c2282.f7268.post(c2282.f7269);
            }
        }
    }

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public Bundle m396() {
        if (this.f1021 == null) {
            this.f1021 = new Bundle();
        }
        return this.f1021;
    }

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public long mo397() {
        return this.f1009;
    }

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public AbstractC2271 m398() {
        AbstractC2271 abstractC2271 = this.f1008;
        if (abstractC2271 != null) {
            return abstractC2271;
        }
        if (this.f1007 != null) {
        }
        return null;
    }

    /* JADX INFO: renamed from: ކ */
    public CharSequence mo375() {
        InterfaceC0165 interfaceC0165 = this.f1045;
        return interfaceC0165 != null ? interfaceC0165.mo371(this) : this.f1015;
    }

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public boolean m399() {
        return !TextUtils.isEmpty(this.f1018);
    }

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public boolean mo400() {
        return this.f1022 && this.f1028 && this.f1029;
    }

    /* JADX INFO: renamed from: ތ */
    public void mo364() {
        InterfaceC0162 interfaceC0162 = this.f1040;
        if (interfaceC0162 != null) {
            C2282 c2282 = (C2282) interfaceC0162;
            int iIndexOf = c2282.f7266.indexOf(this);
            if (iIndexOf != -1) {
                c2282.f1232.m601(iIndexOf, 1, this);
            }
        }
    }

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public void m401() {
        InterfaceC0162 interfaceC0162 = this.f1040;
        if (interfaceC0162 != null) {
            C2282 c2282 = (C2282) interfaceC0162;
            c2282.f7268.removeCallbacks(c2282.f7269);
            c2282.f7268.post(c2282.f7269);
        }
    }

    /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
    public void mo402() {
        PreferenceScreen preferenceScreen;
        if (TextUtils.isEmpty(this.f1026)) {
            return;
        }
        String str = this.f1026;
        C2287 c2287 = this.f1007;
        Preference preferenceM409 = null;
        if (c2287 != null && (preferenceScreen = c2287.f7289) != null) {
            preferenceM409 = preferenceScreen.m409((CharSequence) str);
        }
        if (preferenceM409 == null) {
            StringBuilder sbM4889 = C2803.m4889("Dependency \"");
            sbM4889.append(this.f1026);
            sbM4889.append("\" not found for preference \"");
            sbM4889.append(this.f1018);
            sbM4889.append("\" (title: \"");
            sbM4889.append((Object) this.f1014);
            sbM4889.append("\"");
            throw new IllegalStateException(sbM4889.toString());
        }
        if (preferenceM409.f1041 == null) {
            preferenceM409.f1041 = new ArrayList();
        }
        preferenceM409.f1041.add(this);
        boolean zMo370 = preferenceM409.mo370();
        if (this.f1028 == zMo370) {
            this.f1028 = !zMo370;
            mo390(mo370());
            mo364();
        }
    }

    /* JADX INFO: renamed from: ޏ */
    public void mo362() {
    }

    /* JADX INFO: renamed from: ސ, reason: contains not printable characters */
    public void mo403() {
        m405();
    }

    /* JADX INFO: renamed from: ޑ */
    public Parcelable mo369() {
        this.f1043 = true;
        return AbsSavedState.EMPTY_STATE;
    }

    /* JADX INFO: renamed from: ޒ */
    public boolean mo370() {
        return !mo400();
    }

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public boolean m404() {
        return this.f1007 != null && this.f1025 && m399();
    }

    /* JADX INFO: renamed from: ޔ, reason: contains not printable characters */
    public final void m405() {
        List<Preference> list;
        PreferenceScreen preferenceScreen;
        String str = this.f1026;
        if (str != null) {
            C2287 c2287 = this.f1007;
            Preference preferenceM409 = null;
            if (c2287 != null && (preferenceScreen = c2287.f7289) != null) {
                preferenceM409 = preferenceScreen.m409((CharSequence) str);
            }
            if (preferenceM409 == null || (list = preferenceM409.f1041) == null) {
                return;
            }
            list.remove(this);
        }
    }
}
