Merge "Update view state of the items in listpreference."

This commit is contained in:
Sudheer Shanka
2016-01-28 19:59:58 +00:00
committed by Android (Google) Code Review

View File

@@ -146,11 +146,10 @@ public class RestrictedListPreference extends CustomListPreference {
ImageView padlock = (ImageView) root.findViewById(R.id.restricted_lock_icon);
if (isRestrictedForEntry(entry)) {
text.setEnabled(false);
text.setChecked(false);
padlock.setVisibility(View.VISIBLE);
} else {
if (position == mSelectedIndex) {
text.setChecked(true);
}
text.setChecked(position == mSelectedIndex);
text.setEnabled(true);
padlock.setVisibility(View.GONE);
}