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

Commit 68ffee1a authored by Lei Yu's avatar Lei Yu
Browse files

Remove the old battery page

This CL removes PowerUsageSummaryLegacy and PowerUsageAdvancedLegacy
and their related layouts and strigns.

Also remove the isBatteryV2Enabled method in feature provider.

Change-Id: I1ec30f713d733ed24335a3e698fb515751232948
Fixes: 76027338
Test: robo test still pass
parent 553c2778
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -2208,7 +2208,6 @@
            android:name="Settings$PowerUsageSummaryActivity"
            android:label="@string/power_usage_summary_title"
            android:icon="@drawable/ic_homepage_battery"
            android:enabled="false"
            android:taskAffinity="com.android.settings"
            android:parentActivityName="Settings">
            <intent-filter android:priority="1">
@@ -2229,24 +2228,6 @@
                android:value="com.android.settings.fuelgauge.PowerUsageSummary" />
        </activity>

        <activity android:name=".Settings$PowerUsageSummaryLegacyActivity"
                  android:label="@string/power_usage_summary_title"
                  android:icon="@drawable/ic_homepage_battery"
                  android:taskAffinity="com.android.settings"
                  android:parentActivityName="Settings">
            <intent-filter>
                <action android:name="android.intent.action.POWER_USAGE_SUMMARY" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="8">
                <action android:name="com.android.settings.action.SETTINGS" />
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
                       android:value="com.android.settings.category.ia.homepage" />
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                       android:value="com.android.settings.fuelgauge.PowerUsageSummaryLegacy" />
        </activity>

        <activity
            android:name="Settings$BatterySaverSettingsActivity"
            android:label="@string/battery_saver"
+0 −10
Original line number Diff line number Diff line
@@ -5061,14 +5061,6 @@
    <string name="power_unaccounted">Miscellaneous</string>
    <!-- Label for power that we computed too much for -->
    <string name="power_overcounted">Over-counted</string>
    <!-- Label for power consumed by apps [CHAR LIMIT=30] -->
    <string name="power_apps">Apps</string>
    <!-- Label for power consumed by services [CHAR LIMIT=30] -->
    <string name="power_service">Services</string>
    <!-- Label for power consumed by system [CHAR LIMIT=30] -->
    <string name="power_system">System</string>
    <!-- Label for power consumed by user [CHAR LIMIT=30] -->
    <string name="power_user">Other users</string>
    <!-- Label for CPU usage time -->
    <string name="usage_type_cpu">CPU total</string>
@@ -9658,8 +9650,6 @@
    <!-- Settings item summary for automatic Bluetooth on while driving preference [CHAR LIMIT=100] -->
    <string name="bluetooth_on_while_driving_summary">Turn on Bluetooth automatically when driving</string>
    <!-- Title for item to go to old battery settings page when clicking [CHAR LIMIT=100] -->
    <string name="dev_android_o_battery_settings_title">See Android 8.0 battery settings</string>
    <!-- Title for Wifi Access settings [CHAR LIMIT=35] -->
    <string name="change_wifi_state_title">Wi-Fi control</string>
+0 −5
Original line number Diff line number Diff line
@@ -76,11 +76,6 @@
            android:summary="@string/runningservices_settings_summary"
            android:fragment="com.android.settings.applications.RunningServices" />

        <Preference
            android:key="android_o_battery_settings"
            android:fragment="com.android.settings.fuelgauge.PowerUsageSummaryLegacy"
            android:title="@string/dev_android_o_battery_settings_title" />

        <Preference
            android:key="convert_to_file_encryption"
            android:title="@string/convert_to_file_encryption"
+0 −31
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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:key="power_usage_advanced_screen_legacy"
    android:title="@string/advanced_battery_title"
    settings:keywords="@string/keywords_battery">

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

    <PreferenceCategory
        android:key="battery_usage_list_legacy"
        android:title="@string/battery_detail_since_full_charge"/>

</PreferenceScreen>
+0 −93
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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:key="power_usage_summary_screen"
    android:title="@string/power_usage_summary_title"
    settings:keywords="@string/keywords_battery">

    <com.android.settings.applications.LayoutPreference
        android:key="battery_header"
        android:selectable="true"
        android:layout="@layout/battery_header"/>

    <Preference
        android:key="high_usage"
        android:icon="@drawable/ic_battery_alert_24dp"
        android:title="@string/power_high_usage_title"/>

    <PreferenceCategory
        android:key="device_usage_list">

        <com.android.settings.fuelgauge.PowerGaugePreference
            android:key="last_full_charge"
            android:title="@string/battery_last_full_charge"
            android:selectable="false"/>

        <com.android.settings.fuelgauge.PowerGaugePreference
            android:key="screen_usage"
            android:title="@string/device_screen_usage"
            android:selectable="false"/>

    </PreferenceCategory>

    <PreferenceCategory
        android:key="power_management"
        android:title="@string/battery_power_management">

        <com.android.settings.widget.MasterSwitchPreference
            android:fragment="com.android.settings.fuelgauge.batterysaver.BatterySaverSettings"
            android:key="battery_saver_summary"
            android:title="@string/battery_saver"/>

        <SwitchPreference
            android:key="battery_percentage"
            android:title="@string/battery_percentage"
            android:summary="@string/battery_percentage_description"/>

        <!-- Cross-listed item, if you change this, also change it in display_settings.xml -->
        <com.android.settingslib.RestrictedSwitchPreference
            android:key="auto_brightness_battery"
            android:title="@string/auto_brightness_title"
            android:summary="@string/auto_brightness_summary"
            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 -->
        <com.android.settings.TimeoutListPreference
            android:key="screen_timeout_battery"
            android:title="@string/screen_timeout"
            android:summary="@string/screen_timeout_summary"
            android:entries="@array/screen_timeout_entries"
            android:entryValues="@array/screen_timeout_values"/>

        <!-- Cross-listed item, if you change this, also change it in display_settings.xml -->
        <com.android.settingslib.RestrictedPreference
            android:key="ambient_display_battery"
            android:title="@string/ambient_display_screen_title"
            android:fragment="com.android.settings.display.AmbientDisplaySettings"
            settings:userRestriction="no_ambient_display" />

    </PreferenceCategory>

    <PreferenceCategory
        android:key="app_list"
        android:title="@string/power_usage_list_summary"/>

</PreferenceScreen>
Loading