package com.appara.core.ui.preference; 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.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.appara.core.BLLog; import com.appara.core.android.BLUtils; import com.appara.core.ui.preference.PreferenceManager; import com.appara.framework.R; import java.util.ArrayList; import java.util.List; import java.util.Set; public class Preference implements Comparable<Preference> { public static final String ADNROID_NAMESPACE = "http://schemas.android.com/apk/res/android"; public static final int DEFAULT_ORDER = Integer.MAX_VALUE; private boolean A; private a B; private List<Preference> C; private boolean D; private String E; private String F; private Drawable G; private boolean H; /* renamed from: a reason: collision with root package name */ private Context f2460a; /* renamed from: b reason: collision with root package name */ private PreferenceManager f2461b; private long c; private OnPreferenceChangeListener d; private OnPreferenceClickListener e; private int f; private CharSequence g; private int h; private CharSequence i; private int j; private Drawable k; /* renamed from: l reason: collision with root package name */ private String f2462l; private Intent m; protected boolean mArrawShow; private String n; private Bundle o; private boolean p; private boolean q; private boolean r; private boolean s; private String t; private Object u; private boolean v; private boolean w; private boolean x; private int y; private int z; public static class BaseSavedState extends AbsSavedState { public static final Parcelable.Creator<BaseSavedState> CREATOR = new a(); static class a implements Parcelable.Creator<BaseSavedState> { a() { } @Override // android.os.Parcelable.Creator public final BaseSavedState createFromParcel(Parcel parcel) { return new BaseSavedState(parcel); } @Override // android.os.Parcelable.Creator public final BaseSavedState[] newArray(int i) { return new BaseSavedState[i]; } } public BaseSavedState(Parcel parcel) { super(parcel); } public BaseSavedState(Parcelable parcelable) { super(parcelable); } } public interface OnPreferenceChangeListener { boolean onPreferenceChange(Preference preference, Object obj); } public interface OnPreferenceClickListener { boolean onPreferenceClick(Preference preference); } /* access modifiers changed from: package-private */ public interface a { void a(Preference preference); void b(Preference preference); } public Preference(Context context) { this(context, null); } public Preference(Context context, AttributeSet attributeSet) { this(context, attributeSet, 16842894); } public Preference(Context context, AttributeSet attributeSet, int i2) { int i3; int i4; int i5; int i6; int i7; this.f = DEFAULT_ORDER; this.p = true; this.q = true; this.s = true; this.v = true; this.w = true; this.x = true; this.y = R.layout.araapp_framework_preference; this.A = true; this.mArrawShow = true; this.f2460a = context; Object invokeStaticPublicValue = BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference"); if (invokeStaticPublicValue != null) { TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, (int[]) invokeStaticPublicValue, i2, 0); int intValue = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_icon")).intValue(); int intValue2 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_key")).intValue(); int intValue3 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_title")).intValue(); int intValue4 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_summary")).intValue(); int intValue5 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_order")).intValue(); int intValue6 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_fragment")).intValue(); int intValue7 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_layout")).intValue(); int intValue8 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_widgetLayout")).intValue(); int intValue9 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_enabled")).intValue(); int intValue10 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_selectable")).intValue(); int intValue11 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_persistent")).intValue(); int intValue12 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_dependency")).intValue(); int intValue13 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_defaultValue")).intValue(); int intValue14 = ((Integer) BLUtils.invokeStaticPublicValue("com.android.internal.R$styleable", "Preference_shouldDisableView")).intValue(); int indexCount = obtainStyledAttributes.getIndexCount(); while (indexCount >= 0) { int index = obtainStyledAttributes.getIndex(indexCount); if (index == intValue) { i3 = intValue; this.j = obtainStyledAttributes.getResourceId(index, 0); } else { i3 = intValue; if (index == intValue2) { this.f2462l = obtainStyledAttributes.getString(index); } else { if (index == intValue3) { i5 = intValue2; this.h = obtainStyledAttributes.getResourceId(index, 0); this.g = obtainStyledAttributes.getString(index); } else { i5 = intValue2; if (index == intValue4) { this.i = obtainStyledAttributes.getString(index); } else if (index == intValue5) { this.f = obtainStyledAttributes.getInt(index, this.f); } else if (index == intValue6) { this.n = obtainStyledAttributes.getString(index); } else if (index == intValue7) { this.y = obtainStyledAttributes.getResourceId(index, this.y); } else if (index == intValue8) { this.z = obtainStyledAttributes.getResourceId(index, this.z); } else if (index == intValue9) { this.p = obtainStyledAttributes.getBoolean(index, true); } else if (index == intValue10) { this.q = obtainStyledAttributes.getBoolean(index, true); } else if (index == intValue11) { this.s = obtainStyledAttributes.getBoolean(index, this.s); } else if (index == intValue12) { this.t = obtainStyledAttributes.getString(index); } else { i6 = intValue13; if (index == i6) { this.u = onGetDefaultValue(obtainStyledAttributes, index); i7 = intValue14; i4 = intValue12; indexCount--; intValue12 = i4; intValue14 = i7; intValue13 = i6; intValue2 = i5; intValue = i3; } else { i7 = intValue14; if (index == i7) { i4 = intValue12; this.x = obtainStyledAttributes.getBoolean(index, this.x); indexCount--; intValue12 = i4; intValue14 = i7; intValue13 = i6; intValue2 = i5; intValue = i3; } i4 = intValue12; indexCount--; intValue12 = i4; intValue14 = i7; intValue13 = i6; intValue2 = i5; intValue = i3; } } } i6 = intValue13; i7 = intValue14; i4 = intValue12; indexCount--; intValue12 = i4; intValue14 = i7; intValue13 = i6; intValue2 = i5; intValue = i3; } } i7 = intValue14; i5 = intValue2; i6 = intValue13; i4 = intValue12; indexCount--; intValue12 = i4; intValue14 = i7; intValue13 = i6; intValue2 = i5; intValue = i3; } obtainStyledAttributes.recycle(); if (!getClass().getName().startsWith(PreferenceManager.METADATA_KEY_PREFERENCES) && !getClass().getName().startsWith("com.android")) { this.A = false; } } } private void a(SharedPreferences.Editor editor) { if (this.f2461b.g()) { try { editor.apply(); } catch (AbstractMethodError unused) { editor.commit(); } } } private void a(View view, boolean z2) { view.setEnabled(z2); if (view instanceof ViewGroup) { ViewGroup viewGroup = (ViewGroup) view; for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) { a(viewGroup.getChildAt(childCount), z2); } } } private void a(Preference preference) { if (this.C == null) { this.C = new ArrayList(); } this.C.add(preference); preference.onDependencyChanged(this, shouldDisableDependents()); } private void b(Preference preference) { List<Preference> list = this.C; if (list != null) { list.remove(preference); } } public static int compareToIgnoreCase(CharSequence charSequence, CharSequence charSequence2) { int length = charSequence.length(); int length2 = charSequence2.length(); int i2 = 0; int i3 = length < length2 ? length : length2; int i4 = 0; while (i2 < i3) { int i5 = i2 + 1; int i6 = i4 + 1; int lowerCase = Character.toLowerCase(charSequence.charAt(i2)) - Character.toLowerCase(charSequence2.charAt(i4)); if (lowerCase != 0) { return lowerCase; } i2 = i5; i4 = i6; } return length - length2; } private void e() { if (!shouldPersist() || !getSharedPreferences().contains(this.f2462l)) { Object obj = this.u; if (obj != null) { onSetInitialValue(false, obj); return; } return; } onSetInitialValue(true, null); } private void f() { if (!TextUtils.isEmpty(this.t)) { Preference findPreferenceInHierarchy = findPreferenceInHierarchy(this.t); if (findPreferenceInHierarchy != null) { findPreferenceInHierarchy.a(this); return; } throw new IllegalStateException("Dependency \"" + this.t + "\" not found for preference \"" + this.f2462l + "\" (title: \"" + ((Object) this.g) + "\""); } } private void g() { Preference findPreferenceInHierarchy; String str = this.t; if (str != null && (findPreferenceInHierarchy = findPreferenceInHierarchy(str)) != null) { findPreferenceInHierarchy.b(this); } } /* access modifiers changed from: package-private */ public final void a(a aVar) { this.B = aVar; } /* access modifiers changed from: package-private */ public boolean a() { return this.A; } /* access modifiers changed from: package-private */ public StringBuilder b() { StringBuilder sb = new StringBuilder(); CharSequence title = getTitle(); if (!TextUtils.isEmpty(title)) { sb.append(title); sb.append(' '); } CharSequence summary = getSummary(); if (!TextUtils.isEmpty(summary)) { sb.append(summary); sb.append(' '); } if (sb.length() > 0) { sb.setLength(sb.length() - 1); } return sb; } /* access modifiers changed from: package-private */ public long c() { return this.c; } /* access modifiers changed from: protected */ public boolean callChangeListener(Object obj) { OnPreferenceChangeListener onPreferenceChangeListener = this.d; if (onPreferenceChangeListener == null) { return true; } return onPreferenceChangeListener.onPreferenceChange(this, obj); } public int compareTo(Preference preference) { int i2 = this.f; int i3 = preference.f; if (i2 != i3) { return i2 - i3; } CharSequence charSequence = this.g; CharSequence charSequence2 = preference.g; if (charSequence == charSequence2) { return 0; } if (charSequence == null) { return 1; } if (charSequence2 == null) { return -1; } return compareToIgnoreCase(charSequence, charSequence2); } /* access modifiers changed from: package-private */ public void d() { if (this.f2462l != null) { this.r = true; return; } throw new IllegalStateException("Preference does not have a key assigned."); } /* access modifiers changed from: package-private */ public void dispatchRestoreInstanceState(Bundle bundle) { Parcelable parcelable; if (hasKey() && (parcelable = bundle.getParcelable(this.f2462l)) != null) { this.D = false; onRestoreInstanceState(parcelable); if (!this.D) { throw new IllegalStateException("Derived class did not call super.onRestoreInstanceState()"); } } } /* access modifiers changed from: package-private */ public void dispatchSaveInstanceState(Bundle bundle) { if (hasKey()) { this.D = false; Parcelable onSaveInstanceState = onSaveInstanceState(); if (!this.D) { throw new IllegalStateException("Derived class did not call super.onSaveInstanceState()"); } else if (onSaveInstanceState != null) { bundle.putParcelable(this.f2462l, onSaveInstanceState); } } } /* access modifiers changed from: protected */ public Preference findPreferenceInHierarchy(String str) { PreferenceManager preferenceManager; if (TextUtils.isEmpty(str) || (preferenceManager = this.f2461b) == null) { return null; } return preferenceManager.findPreference(str); } public Context getContext() { return this.f2460a; } public String getDependency() { return this.t; } public SharedPreferences.Editor getEditor() { PreferenceManager preferenceManager = this.f2461b; if (preferenceManager == null) { return null; } return preferenceManager.c(); } public Bundle getExtras() { if (this.o == null) { this.o = new Bundle(); } return this.o; } public String getFragment() { return this.n; } public Drawable getIcon() { return this.k; } public Intent getIntent() { return this.m; } public String getKey() { return this.f2462l; } public int getLayoutResource() { return this.y; } public OnPreferenceChangeListener getOnPreferenceChangeListener() { return this.d; } public OnPreferenceClickListener getOnPreferenceClickListener() { return this.e; } public int getOrder() { return this.f; } /* access modifiers changed from: protected */ public boolean getPersistedBoolean(boolean z2) { return !shouldPersist() ? z2 : this.f2461b.getSharedPreferences().getBoolean(this.f2462l, z2); } /* access modifiers changed from: protected */ public float getPersistedFloat(float f2) { return !shouldPersist() ? f2 : this.f2461b.getSharedPreferences().getFloat(this.f2462l, f2); } /* access modifiers changed from: protected */ public int getPersistedInt(int i2) { return !shouldPersist() ? i2 : this.f2461b.getSharedPreferences().getInt(this.f2462l, i2); } /* access modifiers changed from: protected */ public long getPersistedLong(long j2) { return !shouldPersist() ? j2 : this.f2461b.getSharedPreferences().getLong(this.f2462l, j2); } /* access modifiers changed from: protected */ public String getPersistedString(String str) { return !shouldPersist() ? str : this.f2461b.getSharedPreferences().getString(this.f2462l, str); } /* access modifiers changed from: protected */ public Set<String> getPersistedStringSet(Set<String> set) { return !shouldPersist() ? set : this.f2461b.getSharedPreferences().getStringSet(this.f2462l, set); } public PreferenceManager getPreferenceManager() { return this.f2461b; } public SharedPreferences getSharedPreferences() { PreferenceManager preferenceManager = this.f2461b; if (preferenceManager == null) { return null; } return preferenceManager.getSharedPreferences(); } public boolean getShouldDisableView() { return this.x; } public CharSequence getSummary() { return this.i; } public CharSequence getTitle() { return this.g; } public int getTitleRes() { return this.h; } public View getView(View view, ViewGroup viewGroup) { if (view == null) { view = onCreateView(viewGroup); } onBindView(view); return view; } public int getWidgetLayoutResource() { return this.z; } public boolean hasIcon() { return this.k != null; } public boolean hasKey() { return !TextUtils.isEmpty(this.f2462l); } public boolean isEnabled() { return this.p && this.v && this.w; } public boolean isPersistent() { return this.s; } public boolean isSelectable() { return this.q; } /* access modifiers changed from: protected */ public void notifyChanged() { a aVar = this.B; if (aVar != null) { aVar.a(this); } } public void notifyDependencyChange(boolean z2) { List<Preference> list = this.C; if (list != null) { int size = list.size(); for (int i2 = 0; i2 < size; i2++) { list.get(i2).onDependencyChanged(this, z2); } } } /* access modifiers changed from: protected */ public void notifyHierarchyChanged() { BLLog.d("notifyHierarchyChanged"); if (this.B != null) { BLLog.d("mListener:" + this.B); this.B.b(this); } } /* access modifiers changed from: protected */ public void onAttachedToActivity() { f(); } /* access modifiers changed from: protected */ public void onAttachedToHierarchy(PreferenceManager preferenceManager) { this.f2461b = preferenceManager; this.c = preferenceManager.d(); e(); } /* access modifiers changed from: protected */ public void onBindView(View view) { ViewGroup viewGroup; TextView textView = (TextView) view.findViewById(16908310); if (textView != null) { CharSequence title = getTitle(); if (!TextUtils.isEmpty(title)) { textView.setText(title); textView.setVisibility(0); } else { textView.setVisibility(8); } } TextView textView2 = (TextView) view.findViewById(16908304); if (textView2 != null) { CharSequence summary = getSummary(); if (!TextUtils.isEmpty(summary)) { textView2.setText(summary); textView2.setVisibility(0); } else { textView2.setVisibility(8); } } ImageView imageView = (ImageView) view.findViewById(16908294); if (imageView != null) { if (!(this.j == 0 && this.k == null)) { if (this.k == null) { this.k = getContext().getResources().getDrawable(this.j); } Drawable drawable = this.k; if (drawable != null) { imageView.setImageDrawable(drawable); imageView.setAlpha(!this.p ? 0.5f : 1.0f); } } imageView.setVisibility(this.k != null ? 0 : 8); } View findViewById = view.findViewById(R.id.right_arrow); if (findViewById != null) { if (this.mArrawShow) { findViewById.setVisibility(0); } else { findViewById.setVisibility(8); } } BLLog.d("mCount:" + this.E); TextView textView3 = (TextView) view.findViewById(16908331); ImageView imageView2 = (ImageView) view.findViewById(16908296); BLLog.d("countView:".concat(String.valueOf(textView3))); String str = this.E; if (str == null) { if (textView3 != null) { textView3.setVisibility(8); } if (imageView2 != null) { imageView2.setVisibility(8); } } else if ("dot".equals(str) && imageView2 != null) { imageView2.setVisibility(0); } else if (textView3 != null) { textView3.setText(this.E); textView3.setVisibility(0); } if (!(this.z == 0 || (viewGroup = (ViewGroup) view.findViewById(16908312)) == null)) { TextView textView4 = (TextView) viewGroup.findViewById(16908308); if (textView4 != null) { String str2 = this.F; if (str2 != null) { textView4.setText(str2); textView4.setVisibility(0); } else { textView4.setVisibility(8); } } ImageView imageView3 = (ImageView) viewGroup.findViewById(16908295); if (imageView3 != null) { Drawable drawable2 = this.G; if (drawable2 != null) { imageView3.setImageDrawable(drawable2); imageView3.setVisibility(0); } else { imageView3.setVisibility(8); } } ImageView imageView4 = (ImageView) viewGroup.findViewById(16908296); if (imageView4 != null) { if (this.H) { imageView4.setImageResource(R.drawable.araapp_framework_unread_dot_small); if (imageView3 == null || imageView3.getVisibility() == 8) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) imageView4.getLayoutParams(); layoutParams.addRule(15); layoutParams.leftMargin = BLUtils.dip2px(this.f2460a, 10.0f); } imageView4.setVisibility(0); } else { imageView4.setVisibility(8); } } } if (this.x) { a(view, isEnabled()); } } /* access modifiers changed from: protected */ public void onClick() { } /* access modifiers changed from: protected */ public View onCreateView(ViewGroup viewGroup) { LayoutInflater layoutInflater = (LayoutInflater) this.f2460a.getSystemService("layout_inflater"); View inflate = layoutInflater.inflate(this.y, viewGroup, false); ViewGroup viewGroup2 = (ViewGroup) inflate.findViewById(16908312); if (viewGroup2 != null) { int i2 = this.z; if (i2 != 0) { layoutInflater.inflate(i2, viewGroup2); } else { viewGroup2.setVisibility(8); } } return inflate; } public boolean onCustomBindView(View view) { return false; } public void onDependencyChanged(Preference preference, boolean z2) { if (this.v == z2) { this.v = !z2; notifyDependencyChange(shouldDisableDependents()); notifyChanged(); } } /* access modifiers changed from: protected */ public Object onGetDefaultValue(TypedArray typedArray, int i2) { return null; } public boolean onKey(View view, int i2, KeyEvent keyEvent) { return false; } public void onParentChanged(Preference preference, boolean z2) { if (this.w == z2) { this.w = !z2; notifyDependencyChange(shouldDisableDependents()); notifyChanged(); } } /* access modifiers changed from: protected */ public void onPrepareForRemoval() { g(); } /* access modifiers changed from: protected */ public void onRestoreInstanceState(Parcelable parcelable) { this.D = true; if (parcelable != AbsSavedState.EMPTY_STATE && parcelable != null) { throw new IllegalArgumentException("Wrong state class -- expecting Preference State"); } } /* access modifiers changed from: protected */ public Parcelable onSaveInstanceState() { this.D = true; return AbsSavedState.EMPTY_STATE; } /* access modifiers changed from: protected */ public void onSetInitialValue(boolean z2, Object obj) { } public Bundle peekExtras() { return this.o; } public void performClick(PreferenceScreen preferenceScreen) { if (isEnabled()) { onClick(); OnPreferenceClickListener onPreferenceClickListener = this.e; if (onPreferenceClickListener == null || !onPreferenceClickListener.onPreferenceClick(this)) { PreferenceManager preferenceManager = getPreferenceManager(); if (preferenceManager != null) { PreferenceManager.a e2 = preferenceManager.e(); if (!(preferenceScreen == null || e2 == null || !e2.onPreferenceTreeClick(preferenceScreen, this))) { return; } } if (this.m != null) { BLUtils.safeStartActivity(getContext(), this.m); } } } } /* access modifiers changed from: protected */ public boolean persistBoolean(boolean z2) { if (!shouldPersist()) { return false; } if (z2 == getPersistedBoolean(!z2)) { return true; } SharedPreferences.Editor c2 = this.f2461b.c(); c2.putBoolean(this.f2462l, z2); a(c2); return true; } /* access modifiers changed from: protected */ public boolean persistFloat(float f2) { if (!shouldPersist()) { return false; } if (f2 == getPersistedFloat(Float.NaN)) { return true; } SharedPreferences.Editor c2 = this.f2461b.c(); c2.putFloat(this.f2462l, f2); a(c2); return true; } /* access modifiers changed from: protected */ public boolean persistInt(int i2) { if (!shouldPersist()) { return false; } if (i2 == getPersistedInt(i2 ^ -1)) { return true; } SharedPreferences.Editor c2 = this.f2461b.c(); c2.putInt(this.f2462l, i2); a(c2); return true; } /* access modifiers changed from: protected */ public boolean persistLong(long j2) { if (!shouldPersist()) { return false; } if (j2 == getPersistedLong(-1 ^ j2)) { return true; } SharedPreferences.Editor c2 = this.f2461b.c(); c2.putLong(this.f2462l, j2); a(c2); return true; } /* access modifiers changed from: protected */ public boolean persistString(String str) { if (!shouldPersist()) { return false; } if (str == getPersistedString(null)) { return true; } SharedPreferences.Editor c2 = this.f2461b.c(); c2.putString(this.f2462l, str); a(c2); return true; } /* access modifiers changed from: protected */ public boolean persistStringSet(Set<String> set) { if (!shouldPersist()) { return false; } if (set.equals(getPersistedStringSet(null))) { return true; } SharedPreferences.Editor c2 = this.f2461b.c(); c2.putStringSet(this.f2462l, set); a(c2); return true; } public void restoreHierarchyState(Bundle bundle) { dispatchRestoreInstanceState(bundle); } public void saveHierarchyState(Bundle bundle) { dispatchSaveInstanceState(bundle); } public void setArrawShow(boolean z2) { this.mArrawShow = z2; notifyChanged(); } public void setCount(String str) { if ((str == null && this.E != null) || (str != null && !str.equals(this.E))) { this.E = str; notifyChanged(); } } public void setDefaultValue(Object obj) { this.u = obj; } public void setDependency(String str) { g(); this.t = str; f(); } public void setEnabled(boolean z2) { if (this.p != z2) { this.p = z2; notifyDependencyChange(shouldDisableDependents()); notifyChanged(); } } public void setFragment(String str) { this.n = str; } public void setIcon(int i2) { this.j = i2; setIcon(this.f2460a.getResources().getDrawable(i2)); } public void setIcon(Drawable drawable) { if ((drawable == null && this.k != null) || (drawable != null && this.k != drawable)) { this.k = drawable; notifyChanged(); } } public void setIntent(Intent intent) { this.m = intent; } public void setKey(String str) { this.f2462l = str; if (this.r && !hasKey()) { d(); } } public void setLayoutResource(int i2) { if (i2 != this.y) { this.A = false; } this.y = i2; } public void setOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener) { this.d = onPreferenceChangeListener; } public void setOnPreferenceClickListener(OnPreferenceClickListener onPreferenceClickListener) { this.e = onPreferenceClickListener; } public void setOrder(int i2) { if (i2 != this.f) { this.f = i2; notifyHierarchyChanged(); } } public void setParent(PreferenceGroup preferenceGroup) { } public void setPersistent(boolean z2) { this.s = z2; } public void setSelectable(boolean z2) { if (this.q != z2) { this.q = z2; notifyChanged(); } } public void setShouldDisableView(boolean z2) { this.x = z2; notifyChanged(); } public void setSummary(int i2) { setSummary(this.f2460a.getString(i2)); } public void setSummary(CharSequence charSequence) { if ((charSequence == null && this.i != null) || (charSequence != null && !charSequence.equals(this.i))) { this.i = charSequence; notifyChanged(); } } public void setTitle(int i2) { setTitle(this.f2460a.getString(i2)); this.h = i2; } public void setTitle(CharSequence charSequence) { if ((charSequence == null && this.g != null) || (charSequence != null && !charSequence.equals(this.g))) { this.h = 0; this.g = charSequence; notifyChanged(); } } public void setWidgetLayoutResource(int i2) { if (i2 != this.z) { this.A = false; } this.z = i2; } public boolean shouldCommit() { PreferenceManager preferenceManager = this.f2461b; if (preferenceManager == null) { return false; } return preferenceManager.g(); } public boolean shouldDisableDependents() { return !isEnabled(); } /* access modifiers changed from: protected */ public boolean shouldPersist() { return this.f2461b != null && isPersistent() && hasKey(); } public String toString() { return b().toString(); } }