Block settings when DISALLOW_CONFIG_BRIGHTNESS.
Test: m -j RunSettingsRoboTests Change-Id: I667c76dfef20158ab2a72178fb82b8183b448976 Fix: 67675654 Change-Id: I83f2e0086e16cd2a0dbc4cbcc31d4e2d454934cd
This commit is contained in:
@@ -22,12 +22,14 @@
|
|||||||
settings:keywords="@string/keywords_display"
|
settings:keywords="@string/keywords_display"
|
||||||
settings:initialExpandedChildrenCount="4">
|
settings:initialExpandedChildrenCount="4">
|
||||||
|
|
||||||
<Preference
|
<com.android.settingslib.RestrictedPreference
|
||||||
android:key="brightness"
|
android:key="brightness"
|
||||||
android:title="@string/brightness"
|
android:title="@string/brightness"
|
||||||
settings:keywords="@string/keywords_display_brightness_level">
|
settings:keywords="@string/keywords_display_brightness_level"
|
||||||
<intent android:action="com.android.intent.action.SHOW_BRIGHTNESS_DIALOG" />
|
settings:useAdminDisabledSummary="true"
|
||||||
</Preference>
|
settings:userRestriction="no_config_brightness">
|
||||||
|
<intent android:action="com.android.intent.action.SHOW_BRIGHTNESS_DIALOG" />
|
||||||
|
</com.android.settingslib.RestrictedPreference>
|
||||||
|
|
||||||
<com.android.settings.display.NightDisplayPreference
|
<com.android.settings.display.NightDisplayPreference
|
||||||
android:key="night_display"
|
android:key="night_display"
|
||||||
@@ -38,12 +40,13 @@
|
|||||||
settings:keywords="@string/keywords_display_night_display" />
|
settings:keywords="@string/keywords_display_night_display" />
|
||||||
|
|
||||||
<!-- Cross-listed item, if you change this, also change it in power_usage_summary.xml -->
|
<!-- Cross-listed item, if you change this, also change it in power_usage_summary.xml -->
|
||||||
<SwitchPreference
|
<com.android.settingslib.RestrictedSwitchPreference
|
||||||
android:key="auto_brightness"
|
android:key="auto_brightness"
|
||||||
android:title="@string/auto_brightness_title"
|
android:title="@string/auto_brightness_title"
|
||||||
settings:keywords="@string/keywords_display_auto_brightness"
|
settings:keywords="@string/keywords_display_auto_brightness"
|
||||||
android:summary="@string/auto_brightness_summary"
|
android:summary="@string/auto_brightness_summary"
|
||||||
settings:controller="com.android.settings.display.AutoBrightnessPreferenceController" />
|
settings:useAdminDisabledSummary="true"
|
||||||
|
settings:userRestriction="no_config_brightness" />
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
android:key="wallpaper"
|
android:key="wallpaper"
|
||||||
|
@@ -61,11 +61,13 @@
|
|||||||
android:summary="@string/battery_percentage_description"/>
|
android:summary="@string/battery_percentage_description"/>
|
||||||
|
|
||||||
<!-- Cross-listed item, if you change this, also change it in display_settings.xml -->
|
<!-- Cross-listed item, if you change this, also change it in display_settings.xml -->
|
||||||
<SwitchPreference
|
<com.android.settingslib.RestrictedSwitchPreference
|
||||||
android:key="auto_brightness_battery"
|
android:key="auto_brightness_battery"
|
||||||
android:title="@string/auto_brightness_title"
|
android:title="@string/auto_brightness_title"
|
||||||
android:summary="@string/auto_brightness_summary"
|
android:summary="@string/auto_brightness_summary"
|
||||||
settings:keywords="@string/keywords_display_auto_brightness"/>
|
settings:keywords="@string/keywords_display_auto_brightness"
|
||||||
|
settings:useAdminDisabledSummary="true"
|
||||||
|
settings:userRestriction="no_config_brightness" />
|
||||||
|
|
||||||
<!-- Cross-listed item, if you change this, also change it in display_settings.xml -->
|
<!-- Cross-listed item, if you change this, also change it in display_settings.xml -->
|
||||||
<com.android.settings.TimeoutListPreference
|
<com.android.settings.TimeoutListPreference
|
||||||
|
@@ -64,7 +64,8 @@ public class UserRestrictionTest {
|
|||||||
UserManager.DISALLOW_CONFIG_TETHERING,
|
UserManager.DISALLOW_CONFIG_TETHERING,
|
||||||
UserManager.DISALLOW_CONFIG_VPN,
|
UserManager.DISALLOW_CONFIG_VPN,
|
||||||
UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS,
|
UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS,
|
||||||
UserManager.DISALLOW_AIRPLANE_MODE
|
UserManager.DISALLOW_AIRPLANE_MODE,
|
||||||
|
UserManager.DISALLOW_CONFIG_BRIGHTNESS
|
||||||
);
|
);
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
Reference in New Issue
Block a user