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

Commit 629f40c2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Support App and System tabs for battery usage breakdown."

parents 902cf1a8 00fb008e
Loading
Loading
Loading
Loading
+0 −46
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2021 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.
  -->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeightSmall"
    android:gravity="center_vertical"
    android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingRight="?android:attr/listPreferredItemPaddingRight"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:background="?android:attr/selectableItemBackground"
    android:orientation="horizontal">

    <TextView
        android:id="@+id/expand_title"
        android:layout_width="0px"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:paddingEnd="4dp"
        android:textAlignment="viewStart"
        style="@style/PreferenceCategoryTitleTextStyle"/>

    <ImageView
        android:id="@+id/expand_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_settings_expand_more"/>

</LinearLayout>
+37 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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.
  -->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:theme="@style/Theme.TabTheme"
    android:id="@+id/tab_container"
    android:clipToPadding="true"
    android:clipChildren="true"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <com.google.android.material.tabs.TabLayout
        android:id="@+id/tabs"
        style="@style/SettingsLibTabsStyle" />

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>
+8 −0
Original line number Diff line number Diff line
@@ -4993,6 +4993,14 @@
    <string name="daily_battery_usage_chart">Daily battery usage chart</string>
    <!-- [CHAR_LIMIT=NONE] Accessibility content description for hourly battery chart view. -->
    <string name="hourly_battery_usage_chart">Hourly battery usage chart</string>
    <!-- [CHAR_LIMIT=NONE] Battery usage breakdown title since last full charge -->
    <string name="battery_usage_breakdown_title_since_last_full_charge">Usage proportional breakdown since last full charge</string>
    <!-- [CHAR_LIMIT=NONE] Battery usage breakdown title for a selected slot -->
    <string name="battery_usage_breakdown_title_for_slot">Usage proportional breakdown for <xliff:g id="slot">%s</xliff:g></string>
    <!-- [CHAR_LIMIT=NONE] The tab title in the battery usage breakdown. -->
    <string name="battery_usage_app_tab">App</string>
    <!-- [CHAR_LIMIT=NONE] The tab title in the battery usage breakdown. -->
    <string name="battery_usage_system_tab">System</string>
    <!-- Process Stats strings -->
    <skip />
+23 −7
Original line number Diff line number Diff line
@@ -22,14 +22,30 @@
    settings:keywords="@string/keywords_battery_usage">

    <com.android.settings.fuelgauge.batteryusage.BatteryHistoryPreference
        android:key="battery_graph"/>
        android:key="battery_chart"
        settings:controller=
            "com.android.settings.fuelgauge.batteryusage.BatteryChartPreferenceController" />

    <PreferenceCategory
        android:key="app_list"/>
        android:key="battery_usage_breakdown"
        settings:controller=
            "com.android.settings.fuelgauge.batteryusage.BatteryUsageBreakdownController"
        settings:isPreferenceVisible="false">

        <com.android.settings.fuelgauge.batteryusage.TabPreference
            android:key="battery_usage_tab"
            settings:isPreferenceVisible="false" />

        <PreferenceCategory
            android:key="app_list"
            settings:isPreferenceVisible="false" />

        <com.android.settingslib.widget.FooterPreference
        android:key="battery_graph_footer"
        android:title="@string/battery_usage_screen_footer"
            android:key="battery_usage_footer"
            android:selectable="false"
            android:title="@string/battery_usage_screen_footer"
            settings:isPreferenceVisible="false"
            settings:searchable="false" />

    </PreferenceCategory>
</PreferenceScreen>
+50 −315

File changed.

Preview size limit exceeded, changes collapsed.

Loading