Loading res/layout/redaction_interstitial.xml +0 −9 Original line number Diff line number Diff line Loading @@ -65,13 +65,4 @@ </RadioGroup> <com.android.settings.RestrictedCheckBox android:id="@+id/lockscreen_remote_input" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/RedactionItemAndLabel" android:layout_marginStart="?android:attr/listPreferredItemPaddingStart" android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd" android:text="@string/lockscreen_remote_input" /> </LinearLayout> No newline at end of file res/layout/setup_redaction_interstitial.xml +0 −10 Original line number Diff line number Diff line Loading @@ -71,16 +71,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/lock_screen_notifications_summary_disable" /> <!-- Place the checkbox inside RadioGroup and use SuwRadioButton style instead of SuwCheckBox style so that the checkbox and text is aligned with radio buttons. --> <com.android.settings.RestrictedCheckBox android:id="@+id/lockscreen_remote_input" style="@style/SuwRadioButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/redaction_vertical_margins" android:text="@string/lockscreen_remote_input" /> </RadioGroup> </LinearLayout> Loading res/xml/configure_notification_settings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ android:title="@string/notification_pulse_title" /> <!-- When device is locked --> <com.android.settings.notification.NotificationLockscreenPreference <com.android.settings.notification.RestrictedDropDownPreference android:key="lock_screen_notifications" android:title="@string/lock_screen_notifications_title" android:summary="%s" /> Loading res/xml/configure_notification_settings_profile.xml +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ <PreferenceCategory android:title="@string/profile_section_header" > <com.android.settings.notification.NotificationLockscreenPreference <com.android.settings.notification.RestrictedDropDownPreference android:key="lock_screen_notifications_profile" android:title="@string/lock_screen_notifications_title" android:summary="%s" /> Loading src/com/android/settings/notification/ConfigureNotificationSettings.java +16 −17 Original line number Diff line number Diff line Loading @@ -57,8 +57,8 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { private Context mContext; private TwoStatePreference mNotificationPulse; private NotificationLockscreenPreference mLockscreen; private NotificationLockscreenPreference mLockscreenProfile; private RestrictedDropDownPreference mLockscreen; private RestrictedDropDownPreference mLockscreenProfile; private boolean mSecure; private boolean mSecureProfile; private int mLockscreenSelectedValue; Loading Loading @@ -148,7 +148,7 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { } private void initLockscreenNotifications() { mLockscreen = (NotificationLockscreenPreference) getPreferenceScreen().findPreference( mLockscreen = (RestrictedDropDownPreference) getPreferenceScreen().findPreference( KEY_LOCK_SCREEN_NOTIFICATIONS); if (mLockscreen == null) { Log.i(TAG, "Preference not found: " + KEY_LOCK_SCREEN_NOTIFICATIONS); Loading Loading @@ -178,9 +178,6 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { KEYGUARD_DISABLE_SECURE_NOTIFICATIONS); } mLockscreen.setRemoteInputRestricted(RestrictedLockUtils.checkIfKeyguardFeaturesDisabled( mContext, DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT, UserHandle.myUserId())); mLockscreen.setEntries(entries.toArray(new CharSequence[entries.size()])); mLockscreen.setEntryValues(values.toArray(new CharSequence[values.size()])); updateLockscreenNotifications(); Loading Loading @@ -211,13 +208,12 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { // === Lockscreen (public / private) notifications === private void initLockscreenNotificationsForProfile() { mLockscreenProfile = (NotificationLockscreenPreference) getPreferenceScreen() mLockscreenProfile = (RestrictedDropDownPreference) getPreferenceScreen() .findPreference(KEY_LOCK_SCREEN_PROFILE_NOTIFICATIONS); if (mLockscreenProfile == null) { Log.i(TAG, "Preference not found: " + KEY_LOCK_SCREEN_PROFILE_NOTIFICATIONS); return; } mLockscreenProfile.setUserId(mProfileChallengeUserId); ArrayList<CharSequence> entries = new ArrayList<>(); ArrayList<CharSequence> values = new ArrayList<>(); entries.add(getString(R.string.lock_screen_notifications_summary_disable_profile)); Loading @@ -243,14 +239,14 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { KEYGUARD_DISABLE_SECURE_NOTIFICATIONS); } mLockscreen.setRemoteInputRestricted(RestrictedLockUtils.checkIfKeyguardFeaturesDisabled( mContext, DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT, mProfileChallengeUserId)); mLockscreenProfile.setOnPreClickListener( (Preference p) -> Utils.startQuietModeDialogIfNecessary(mContext, UserManager.get(mContext), mProfileChallengeUserId) ); 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 Loading @@ -284,15 +280,18 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { CharSequence entryValue, int keyguardNotificationFeatures) { EnforcedAdmin admin = RestrictedLockUtils.checkIfKeyguardFeaturesDisabled( mContext, keyguardNotificationFeatures, UserHandle.myUserId()); if (admin != null) { RestrictedItem item = new RestrictedItem(entry, entryValue, admin); if (admin != null && mLockscreen != null) { RestrictedDropDownPreference.RestrictedItem item = new RestrictedDropDownPreference.RestrictedItem(entry, entryValue, admin); mLockscreen.addRestrictedItem(item); } if (mProfileChallengeUserId != UserHandle.USER_NULL) { EnforcedAdmin profileAdmin = RestrictedLockUtils.checkIfKeyguardFeaturesDisabled( mContext, keyguardNotificationFeatures, mProfileChallengeUserId); if (profileAdmin != null) { RestrictedItem item = new RestrictedItem(entry, entryValue, profileAdmin); if (profileAdmin != null && mLockscreenProfile != null) { RestrictedDropDownPreference.RestrictedItem item = new RestrictedDropDownPreference.RestrictedItem( entry, entryValue, profileAdmin); mLockscreenProfile.addRestrictedItem(item); } } Loading Loading
res/layout/redaction_interstitial.xml +0 −9 Original line number Diff line number Diff line Loading @@ -65,13 +65,4 @@ </RadioGroup> <com.android.settings.RestrictedCheckBox android:id="@+id/lockscreen_remote_input" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/RedactionItemAndLabel" android:layout_marginStart="?android:attr/listPreferredItemPaddingStart" android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd" android:text="@string/lockscreen_remote_input" /> </LinearLayout> No newline at end of file
res/layout/setup_redaction_interstitial.xml +0 −10 Original line number Diff line number Diff line Loading @@ -71,16 +71,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/lock_screen_notifications_summary_disable" /> <!-- Place the checkbox inside RadioGroup and use SuwRadioButton style instead of SuwCheckBox style so that the checkbox and text is aligned with radio buttons. --> <com.android.settings.RestrictedCheckBox android:id="@+id/lockscreen_remote_input" style="@style/SuwRadioButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/redaction_vertical_margins" android:text="@string/lockscreen_remote_input" /> </RadioGroup> </LinearLayout> Loading
res/xml/configure_notification_settings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ android:title="@string/notification_pulse_title" /> <!-- When device is locked --> <com.android.settings.notification.NotificationLockscreenPreference <com.android.settings.notification.RestrictedDropDownPreference android:key="lock_screen_notifications" android:title="@string/lock_screen_notifications_title" android:summary="%s" /> Loading
res/xml/configure_notification_settings_profile.xml +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ <PreferenceCategory android:title="@string/profile_section_header" > <com.android.settings.notification.NotificationLockscreenPreference <com.android.settings.notification.RestrictedDropDownPreference android:key="lock_screen_notifications_profile" android:title="@string/lock_screen_notifications_title" android:summary="%s" /> Loading
src/com/android/settings/notification/ConfigureNotificationSettings.java +16 −17 Original line number Diff line number Diff line Loading @@ -57,8 +57,8 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { private Context mContext; private TwoStatePreference mNotificationPulse; private NotificationLockscreenPreference mLockscreen; private NotificationLockscreenPreference mLockscreenProfile; private RestrictedDropDownPreference mLockscreen; private RestrictedDropDownPreference mLockscreenProfile; private boolean mSecure; private boolean mSecureProfile; private int mLockscreenSelectedValue; Loading Loading @@ -148,7 +148,7 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { } private void initLockscreenNotifications() { mLockscreen = (NotificationLockscreenPreference) getPreferenceScreen().findPreference( mLockscreen = (RestrictedDropDownPreference) getPreferenceScreen().findPreference( KEY_LOCK_SCREEN_NOTIFICATIONS); if (mLockscreen == null) { Log.i(TAG, "Preference not found: " + KEY_LOCK_SCREEN_NOTIFICATIONS); Loading Loading @@ -178,9 +178,6 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { KEYGUARD_DISABLE_SECURE_NOTIFICATIONS); } mLockscreen.setRemoteInputRestricted(RestrictedLockUtils.checkIfKeyguardFeaturesDisabled( mContext, DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT, UserHandle.myUserId())); mLockscreen.setEntries(entries.toArray(new CharSequence[entries.size()])); mLockscreen.setEntryValues(values.toArray(new CharSequence[values.size()])); updateLockscreenNotifications(); Loading Loading @@ -211,13 +208,12 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { // === Lockscreen (public / private) notifications === private void initLockscreenNotificationsForProfile() { mLockscreenProfile = (NotificationLockscreenPreference) getPreferenceScreen() mLockscreenProfile = (RestrictedDropDownPreference) getPreferenceScreen() .findPreference(KEY_LOCK_SCREEN_PROFILE_NOTIFICATIONS); if (mLockscreenProfile == null) { Log.i(TAG, "Preference not found: " + KEY_LOCK_SCREEN_PROFILE_NOTIFICATIONS); return; } mLockscreenProfile.setUserId(mProfileChallengeUserId); ArrayList<CharSequence> entries = new ArrayList<>(); ArrayList<CharSequence> values = new ArrayList<>(); entries.add(getString(R.string.lock_screen_notifications_summary_disable_profile)); Loading @@ -243,14 +239,14 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { KEYGUARD_DISABLE_SECURE_NOTIFICATIONS); } mLockscreen.setRemoteInputRestricted(RestrictedLockUtils.checkIfKeyguardFeaturesDisabled( mContext, DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT, mProfileChallengeUserId)); mLockscreenProfile.setOnPreClickListener( (Preference p) -> Utils.startQuietModeDialogIfNecessary(mContext, UserManager.get(mContext), mProfileChallengeUserId) ); 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 Loading @@ -284,15 +280,18 @@ public class ConfigureNotificationSettings extends SettingsPreferenceFragment { CharSequence entryValue, int keyguardNotificationFeatures) { EnforcedAdmin admin = RestrictedLockUtils.checkIfKeyguardFeaturesDisabled( mContext, keyguardNotificationFeatures, UserHandle.myUserId()); if (admin != null) { RestrictedItem item = new RestrictedItem(entry, entryValue, admin); if (admin != null && mLockscreen != null) { RestrictedDropDownPreference.RestrictedItem item = new RestrictedDropDownPreference.RestrictedItem(entry, entryValue, admin); mLockscreen.addRestrictedItem(item); } if (mProfileChallengeUserId != UserHandle.USER_NULL) { EnforcedAdmin profileAdmin = RestrictedLockUtils.checkIfKeyguardFeaturesDisabled( mContext, keyguardNotificationFeatures, mProfileChallengeUserId); if (profileAdmin != null) { RestrictedItem item = new RestrictedItem(entry, entryValue, profileAdmin); if (profileAdmin != null && mLockscreenProfile != null) { RestrictedDropDownPreference.RestrictedItem item = new RestrictedDropDownPreference.RestrictedItem( entry, entryValue, profileAdmin); mLockscreenProfile.addRestrictedItem(item); } } Loading