Fix DISALLOW_AMBIENT_DISPLAY blocks access to all lock screen display settings

"Ambient display" was merged into "Lock screen display", and the entry
was also moved from security page to display page and leveraged the
original user restriction of "Ambient display".

The user restriction should just work on the switch of Ambient display
instead of the "Lock screen display" entry.

Bug: 138177691
Test: robotest, visual
Change-Id: I5db0eb68c3aa6f4f7d8ecd42db2cdc72255b12f7
This commit is contained in:
Jason Chiu
2019-07-25 16:23:12 +08:00
parent 7c5bb0ecda
commit 32930dbe4e
2 changed files with 5 additions and 5 deletions

View File

@@ -119,12 +119,11 @@
android:fragment="com.android.settings.dream.DreamSettings"
settings:searchable="false" />
<com.android.settingslib.RestrictedPreference
<Preference
android:key="lockscreen_from_display_settings"
android:title="@string/lockscreen_settings_title"
android:fragment="com.android.settings.security.LockscreenDashboardFragment"
settings:controller="com.android.settings.security.screenlock.LockScreenPreferenceController"
settings:userRestriction="no_ambient_display" />
settings:controller="com.android.settings.security.screenlock.LockScreenPreferenceController" />
<SwitchPreference
android:key="camera_gesture"

View File

@@ -53,11 +53,12 @@
android:title="@string/ambient_display_category_triggers"
android:order="1000">
<SwitchPreference
<com.android.settingslib.RestrictedSwitchPreference
android:key="ambient_display_always_on"
android:title="@string/doze_always_on_title"
android:summary="@string/doze_always_on_summary"
settings:controller="com.android.settings.display.AmbientDisplayAlwaysOnPreferenceController" />
settings:controller="com.android.settings.display.AmbientDisplayAlwaysOnPreferenceController"
settings:userRestriction="no_ambient_display" />
<Preference
android:key="ambient_display_tap"