Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 821fd62d authored by Michael Bestas's avatar Michael Bestas Committed by Steve Kondik
Browse files

Settings: Cleanup battery saver settings

* Add back auto battery saver
* Add back support for battery saver on devices without perf profiles

Change-Id: I562420a81592fde54a96dca88a71ed9137bb59a9
parent b0b82ba4
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -2047,26 +2047,6 @@
                android:resource="@id/battery_settings" />
        </activity-alias>

        <activity android:name="Settings$BatterySaverSettingsActivity"
                android:label="@string/battery_saver"
                android:taskAffinity="">
            <intent-filter android:priority="1">
                <action android:name="android.settings.BATTERY_SAVER_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="com.android.settings.SHORTCUT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.fuelgauge.BatterySaverSettings" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/battery_settings" />
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                android:value="true" />
        </activity>

        <activity android:name=".fuelgauge.BatterySaverModeVoiceActivity"
                android:label="@string/power_usage_summary_title"
                android:theme="@android:style/Theme.Material.Light.Voice"
+5 −0
Original line number Diff line number Diff line
@@ -657,4 +657,9 @@
    <string name="privacy_guard_help_text">In this screen you can choose which apps Privacy Guard should be active for by simply tapping on them. Selected apps will not be able to access your personal data such as contacts, messages or call logs. Long pressing an app\'s entry opens its app details screen.\n\nBuilt-in apps are not shown by default but can be revealed by selecting the respective menu option.</string>
    <string name="privacy_guard_manager_show_system_apps">Show built-in apps</string>
    <string name="privacy_guard_advanced_settings_title">Advanced</string>

    <!-- Battery saver -->
    <string name="battery_saver_threshold">Battery saver threshold</string>
    <string name="battery_saver_summary">Reduce performance and limit background data</string>
    <string name="battery_saver_summary_unavailable">Not available while charging</string>
</resources>
+0 −34
Original line number Diff line number Diff line
<?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"
        android:title="@string/battery_saver"
        android:key="battery_saver">

    <!-- Turn on automatically -->
    <com.android.settings.DropDownPreference
            android:key="turn_on_automatically"
            android:title="@string/battery_saver_turn_on_automatically_title"
            android:persistent="false" />

    <!-- Feature description text -->
    <com.android.settings.fuelgauge.WallOfTextPreference
            android:key="description"
            android:summary="@*android:string/battery_saver_description"
            android:persistent="false"
            android:selectable="false" />

</PreferenceScreen>
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,10 @@
        android:title="@string/power_usage_summary_title"
        settings:keywords="@string/keywords_battery">

        <com.android.settings.cyanogenmod.GlobalSettingSwitchPreference
            android:key="low_power"
            android:title="@string/battery_saver"/>

        <com.android.settings.fuelgauge.BatteryHistoryPreference
            android:key="battery_history" />

+0 −1
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@ public class Settings extends SettingsActivity {
    public static class RunningServicesActivity extends SettingsActivity { /* empty */ }
    public static class ManageAccountsSettingsActivity extends SettingsActivity { /* empty */ }
    public static class PowerUsageSummaryActivity extends SettingsActivity { /* empty */ }
    public static class BatterySaverSettingsActivity extends SettingsActivity { /* empty */ }
    public static class AccountSyncSettingsActivity extends SettingsActivity { /* empty */ }
    public static class AccountSettingsActivity extends SettingsActivity { /* empty */ }
    public static class AccountSyncSettingsInAddAccountActivity extends SettingsActivity { /* empty */ }
Loading