Force to unlock work challenge before reply inline notification

Bug: 28036566
Change-Id: Ida63ce5003b7e3ec79e1575815d70d1350ffed2d
This commit is contained in:
Ricky Wai
2016-04-12 11:56:50 +01:00
parent cf87fd5bed
commit 9b753da2b7
3 changed files with 15 additions and 3 deletions

View File

@@ -37,11 +37,16 @@ public class NotificationLockscreenPreference extends RestrictedListPreference {
private int mInitialIndex;
private Listener mListener;
private boolean mShowRemoteInput;
private boolean mRemoteInputCheckBoxEnabled = true;
public NotificationLockscreenPreference(Context context, AttributeSet attrs) {
super(context, attrs);
}
public void setRemoteInputCheckBoxEnabled(boolean enabled) {
mRemoteInputCheckBoxEnabled = enabled;
}
@Override
protected void onPrepareDialogBuilder(AlertDialog.Builder builder,
DialogInterface.OnClickListener innerListener) {
@@ -85,8 +90,10 @@ public class NotificationLockscreenPreference extends RestrictedListPreference {
return false;
}
private static int checkboxVisibilityForSelectedIndex(int selected, boolean showRemoteAtAll) {
return selected == 1 && showRemoteAtAll ? View.VISIBLE : View.GONE;
private int checkboxVisibilityForSelectedIndex(int selected,
boolean showRemoteAtAll) {
return selected == 1 && showRemoteAtAll && mRemoteInputCheckBoxEnabled ? View.VISIBLE
: View.GONE;
}
private class Listener implements DialogInterface.OnClickListener,