Files
app_Settings/res/xml/battery_saver_settings.xml
Salvador Martinez d12d722099 Flip the preference for sticky battery saver
Instead of toggled on being to keep battery saver on, the UX
writers would like to make toggled on be turn battery saver off
automatically. Also turns the controller into a
TogglePreferenceController, because those exist apparently.

Test: visual inspection, tests pass
Fixes: 126938839
Change-Id: Iffac536d0b1956d4534ca1b5fa5c6440c4d3a3ff
2019-03-26 11:29:18 -07:00

54 lines
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/battery_saver"
android:key="battery_saver_page">
<Preference
android:key="battery_saver_schedule"
android:fragment="com.android.settings.fuelgauge.batterysaver.BatterySaverScheduleSettings"
android:title="@string/battery_saver_schedule_settings_title"
settings:controller="com.android.settings.fuelgauge.batterysaver.BatterySaverSchedulePreferenceController"/>
<SwitchPreference
android:key="battery_saver_sticky"
android:title="@string/battery_saver_sticky_title_new"
android:summary="@string/summary_placeholder"
settings:keywords="@string/keywords_battery_saver_sticky"
settings:controller="com.android.settings.fuelgauge.batterysaver.BatterySaverStickyPreferenceController"/>
<com.android.settings.widget.TwoStateButtonPreference
android:key="battery_saver"
android:title="@string/battery_saver"
android:selectable="false"
settings:textOn="@string/battery_saver_button_turn_on"
settings:textOff="@string/battery_saver_button_turn_off"
settings:platform_slice="true"
settings:controller="com.android.settings.fuelgauge.batterysaver.BatterySaverButtonPreferenceController" />
<PreferenceCategory
android:key="battery_saver_footer">
<com.android.settingslib.widget.FooterPreference
android:key="battery_saver_footer_preference"
android:title="@*android:string/battery_saver_description"
android:selectable="false" />
</PreferenceCategory>
</PreferenceScreen>