Add setting to allow RemoteInput on keyguard

Bug: 26440855
Change-Id: I57e02876c615f558eee279f2dc7edca8b28fc495
This commit is contained in:
Adrian Roos
2016-02-22 13:03:42 -08:00
parent b671780528
commit d553f4f9a9
8 changed files with 215 additions and 25 deletions

View File

@@ -149,8 +149,12 @@ public class RestrictedListPreference extends CustomListPreference {
text.setChecked(false);
padlock.setVisibility(View.VISIBLE);
} else {
text.setChecked(position == mSelectedIndex);
text.setEnabled(true);
if (mSelectedIndex != -1) {
text.setChecked(position == mSelectedIndex);
}
if (!text.isEnabled()) {
text.setEnabled(true);
}
padlock.setVisibility(View.GONE);
}
return root;
@@ -199,13 +203,15 @@ public class RestrictedListPreference extends CustomListPreference {
setClickedDialogEntryIndex(which);
}
/*
* Clicking on an item simulates the positive button
* click, and dismisses the dialog.
*/
RestrictedListPreferenceDialogFragment.this.onClick(dialog,
DialogInterface.BUTTON_POSITIVE);
dialog.dismiss();
if (getCustomizablePreference().isAutoClosePreference()) {
/*
* Clicking on an item simulates the positive button
* click, and dismisses the dialog.
*/
RestrictedListPreferenceDialogFragment.this.onClick(dialog,
DialogInterface.BUTTON_POSITIVE);
dialog.dismiss();
}
}
};
}