Fix talkback speak "double tap to activate" on LabeledSeekBarPreference

- SeekBarPreference should be unselectable
- remove unnecessary handling of Summary
- set currect Title color when preference is enabled and unselectable

Bug: 230553896
Test: robotest
Change-Id: Ie5d819088dc3c435005ddd00e232b2f6992b234a
This commit is contained in:
Edgar Wang
2022-05-19 09:20:30 +08:00
parent 27aa5f9d94
commit 2b0d9cfc5d
5 changed files with 13 additions and 49 deletions

View File

@@ -78,12 +78,7 @@ public class SeekBarPreference extends RestrictedPreference
com.android.internal.R.layout.preference_widget_seekbar);
a.recycle();
a = context.obtainStyledAttributes(
attrs, com.android.internal.R.styleable.Preference, defStyleAttr, defStyleRes);
final boolean isSelectable = a.getBoolean(
com.android.settings.R.styleable.Preference_android_selectable, false);
setSelectable(isSelectable);
a.recycle();
setSelectable(false);
setLayoutResource(layoutResId);
}
@@ -170,11 +165,6 @@ public class SeekBarPreference extends RestrictedPreference
});
}
@Override
public CharSequence getSummary() {
return null;
}
@Override
protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
setProgress(restoreValue ? getPersistedInt(mProgress)