Replace the existing notifications on lock screen preferences with new page
Replace the existing notifications on lock screen preferences with the new notifications on lock screen page entries. Bug: 367455695 Flag: com.android.server.notification.notification_lock_screen_settings Test: Manual, Settings - Display & touch - Lockscreen; Settings - Security & privacy - More security & privacy Change-Id: I858f84db8b5c09895d6b196426b32b3bfbd80d15
This commit is contained in:
@@ -83,6 +83,12 @@
|
||||
android:summary="@string/summary_placeholder"
|
||||
settings:searchable="false"/>
|
||||
|
||||
<Preference
|
||||
android:key="more_security_lock_screen_notifications_page"
|
||||
android:title="@string/lock_screen_notifs_title"
|
||||
android:fragment="com.android.settings.notification.LockScreenNotificationsPreferencePageFragment"
|
||||
settings:controller="com.android.settings.notification.LockScreenNotificationsPreferencePageController" />
|
||||
|
||||
<!-- Show media on lock screen -->
|
||||
<SwitchPreferenceCompat
|
||||
android:key="privacy_media_controls_lockscreen"
|
||||
|
@@ -91,6 +91,12 @@
|
||||
android:title="@string/lock_screen_notifs_title"
|
||||
android:summary="@string/summary_placeholder"/>
|
||||
|
||||
<Preference
|
||||
android:key="privacy_lock_screen_notifications_page"
|
||||
android:title="@string/lock_screen_notifs_title"
|
||||
android:fragment="com.android.settings.notification.LockScreenNotificationsPreferencePageFragment"
|
||||
settings:controller="com.android.settings.notification.LockScreenNotificationsPreferencePageController" />
|
||||
|
||||
<!-- Show media on lock screen -->
|
||||
<SwitchPreferenceCompat
|
||||
android:key="privacy_media_controls_lockscreen"
|
||||
|
@@ -29,6 +29,13 @@
|
||||
android:summary="@string/summary_placeholder"
|
||||
settings:keywords="@string/keywords_lock_screen_notif"/>
|
||||
|
||||
<Preference
|
||||
android:key="security_lock_screen_notifications_page"
|
||||
android:title="@string/lock_screen_notifs_title"
|
||||
android:summary="@string/summary_placeholder"
|
||||
android:fragment="com.android.settings.notification.LockScreenNotificationsPreferencePageFragment"
|
||||
settings:controller="com.android.settings.notification.LockScreenNotificationsPreferencePageController" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="security_display_lockscreen_bypass"
|
||||
android:title="@string/lockscreen_bypass_title"
|
||||
|
@@ -37,6 +37,7 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.android.server.notification.Flags;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.RestrictedListPreference;
|
||||
import com.android.settings.Utils;
|
||||
@@ -94,6 +95,13 @@ public class LockScreenNotificationPreferenceController extends AbstractPreferen
|
||||
@Override
|
||||
public void displayPreference(PreferenceScreen screen) {
|
||||
super.displayPreference(screen);
|
||||
// Hide the preference when the lock screen notification page shows
|
||||
if (Flags.notificationLockScreenSettings()) {
|
||||
setVisible(screen, mSettingKey, false);
|
||||
setVisible(screen, mWorkSettingKey, false);
|
||||
setVisible(screen, mWorkSettingCategoryKey, false);
|
||||
return;
|
||||
}
|
||||
mLockscreen = screen.findPreference(mSettingKey);
|
||||
if (mLockscreen == null) {
|
||||
Log.i(TAG, "Preference not found: " + mSettingKey);
|
||||
|
Reference in New Issue
Block a user