Disable bg restriction for "Disallow apps control"

Use RestrictedPreference so it could handle it automatically

Change-Id: Ibf58934639677b88316366b2e00790f9556d0966
Fixes: 64474641
Test: Robotests
This commit is contained in:
jackqdyulei
2018-08-07 15:12:54 -07:00
parent b9b4a68862
commit fd0c472bdc
3 changed files with 35 additions and 15 deletions

View File

@@ -15,7 +15,9 @@
limitations under the License.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto">
<com.android.settings.applications.LayoutPreference
android:key="header_view"
@@ -30,10 +32,11 @@
<PreferenceCategory
android:title="@string/battery_detail_manage_title">
<Preference
<com.android.settingslib.RestrictedPreference
android:key="background_activity"
android:title="@string/background_activity_title"
android:selectable="true"/>
android:selectable="true"
settings:userRestriction="no_control_apps"/>
<Preference
android:key="battery_optimization"