Add auto restriction preference
1. Add method in feature provider to check whether smart battery is supported 2. Hook up above method to controllers 3. Add auto restriction preference 4. Add tests Bug: 73002171 Test: RunSettingsRoboTests Change-Id: Ic314f61ad52e9bedb629b308731cb968bb4b1773
This commit is contained in:
@@ -4898,6 +4898,11 @@
|
||||
<item quantity="other">%1$d apps</item>
|
||||
</plurals>
|
||||
|
||||
<!-- Title for auto restriction toggle -->
|
||||
<string name="battery_auto_restriction_title">Restrict apps automatically</string>
|
||||
<!-- Summary for auto restriction toggle -->
|
||||
<string name="battery_auto_restriction_summary">Prevent apps from using extra battery in the background</string>
|
||||
|
||||
<!-- Title for force stop dialog [CHAR LIMIT=30] -->
|
||||
<string name="dialog_stop_title">Stop app?</string>
|
||||
<!-- Message body for force stop dialog [CHAR LIMIT=NONE] -->
|
||||
|
||||
@@ -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"
|
||||
android:key="smart_battery_detail"
|
||||
android:title="@string/smart_battery_manager_title">
|
||||
|
||||
@@ -32,6 +34,12 @@
|
||||
android:title="@string/smart_battery_title"
|
||||
android:summary="@string/smart_battery_summary"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="auto_restriction"
|
||||
android:title="@string/battery_auto_restriction_title"
|
||||
android:summary="@string/battery_auto_restriction_summary"
|
||||
settings:controller="com.android.settings.fuelgauge.AutoRestrictionPreferenceController"/>
|
||||
|
||||
<Preference
|
||||
android:key="restricted_app"
|
||||
android:title="@string/restricted_app_title"/>
|
||||
|
||||
Reference in New Issue
Block a user