Merge "Avoid checking the restricted items in the list." into nyc-dev

This commit is contained in:
Sudheer Shanka
2016-03-04 22:27:44 +00:00
committed by Android (Google) Code Review
2 changed files with 35 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ListAdapter;
import android.widget.ListView;
public class NotificationLockscreenPreference extends RestrictedListPreference {
@@ -101,8 +102,11 @@ public class NotificationLockscreenPreference extends RestrictedListPreference {
@Override
public void onClick(DialogInterface dialog, int which) {
mInner.onClick(dialog, which);
ListView listView = ((AlertDialog) dialog).getListView();
int selectedPosition = listView.getCheckedItemPosition();
if (mView != null) {
mView.setVisibility(checkboxVisibilityForSelectedIndex(which, mShowRemoteInput));
mView.setVisibility(
checkboxVisibilityForSelectedIndex(selectedPosition, mShowRemoteInput));
}
}