Merge "Force to unlock work challenge before reply inline notification" into nyc-dev
This commit is contained in:
@@ -241,6 +241,8 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment {
|
||||
|
||||
mLockscreenProfile.setEntries(entries.toArray(new CharSequence[entries.size()]));
|
||||
mLockscreenProfile.setEntryValues(values.toArray(new CharSequence[values.size()]));
|
||||
// Work profile does not support this settings as we do not have a policy to enforce it yet
|
||||
mLockscreenProfile.setRemoteInputCheckBoxEnabled(false);
|
||||
updateLockscreenNotificationsForProfile();
|
||||
if (mLockscreenProfile.getEntries().length > 1) {
|
||||
mLockscreenProfile.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
||||
|
@@ -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,
|
||||
|
@@ -186,7 +186,10 @@ public class RedactionInterstitial extends SettingsActivity {
|
||||
|
||||
private void updateRemoteInputCheckboxVisibility() {
|
||||
boolean visible = mRadioGroup.getCheckedRadioButtonId() == R.id.show_all;
|
||||
mRemoteInputCheckbox.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
|
||||
boolean isManagedProfile = Utils.isManagedProfile(UserManager.get(getPrefContext()),
|
||||
mUserId);
|
||||
mRemoteInputCheckbox
|
||||
.setVisibility((visible && !isManagedProfile) ? View.VISIBLE : View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user