Loading src/com/android/settings/notification/ConfigureNotificationSettings.java +2 −0 Original line number Diff line number Diff line Loading @@ -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() { Loading src/com/android/settings/notification/NotificationLockscreenPreference.java +9 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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, Loading src/com/android/settings/notification/RedactionInterstitial.java +4 −1 Original line number Diff line number Diff line Loading @@ -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); } } } Loading
src/com/android/settings/notification/ConfigureNotificationSettings.java +2 −0 Original line number Diff line number Diff line Loading @@ -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() { Loading
src/com/android/settings/notification/NotificationLockscreenPreference.java +9 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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, Loading
src/com/android/settings/notification/RedactionInterstitial.java +4 −1 Original line number Diff line number Diff line Loading @@ -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); } } }