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

Commit 764f45db authored by Jason Monk's avatar Jason Monk
Browse files

Add data saver to settings

Bug: 22817899

Change-Id: Ic3055aa6a5baae1653db350313366f180c049cc7
parent 3d71918c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
-keep class com.android.settings.wifi.*Settings
-keep class com.android.settings.deviceinfo.*
-keep class com.android.settings.bluetooth.*
-keep class com.android.settings.datausage.*
-keep class com.android.settings.applications.*
-keep class com.android.settings.inputmethod.*
-keep class com.android.settings.ResetNetwork
+28 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2016 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24.0dp"
        android:height="24.0dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="
        M9.0,16.0l2.0,0.0L11.0,8.0L9.0,8.0l0.0,8.0z
        m3.0,-14.0C6.48,2.0 2.0,6.48 2.0,12.0s4.48,10.0 10.0,10.0 10.0,-4.48 10.0,-10.0S17.52,2.0 12.0,2.0z
        m0.0,18.0c-4.41,0.0 -8.0,-3.59 -8.0,-8.0s3.59,-8.0 8.0,-8.0 8.0,3.59 8.0,8.0 -3.59,8.0 -8.0,8.0z
        m1.0,-4.0l2.0,0.0l0.0,-8.0l-2.0,0.0l0.0,8.0z"/>
</vector>
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
<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:minHeight="?android:attr/listPreferredItemHeight"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:orientation="horizontal">
+28 −4
Original line number Diff line number Diff line
@@ -4914,9 +4914,9 @@
    <!-- Button title for launching application-specific data usage settings. [CHAR LIMIT=32] -->
    <string name="data_usage_app_settings">App settings</string>
    <!-- Checkbox label that restricts background data usage of a specific application. [CHAR LIMIT=40] -->
    <string name="data_usage_app_restrict_background">Restrict app background data</string>
    <!-- Summary message for checkbox that restricts background data usage of a specific application. [CHAR LIMIT=64] -->
    <string name="data_usage_app_restrict_background_summary">Disable background data on cellular networks.</string>
    <string name="data_usage_app_restrict_background">Background data</string>
    <!-- Summary message for checkbox that restricts background data usage of a specific application. [CHAR LIMIT=NONE] -->
    <string name="data_usage_app_restrict_background_summary">Enable usage of cellular data in the background</string>
    <!-- Summary message for checkbox that restricts background data usage of a specific application when no networks have been limited. [CHAR LIMIT=84] -->
    <string name="data_usage_app_restrict_background_summary_disabled">To restrict background data for this app, first set a cellular data limit.</string>
    <!-- Title of dialog shown when user restricts background data usage of a specific application. [CHAR LIMIT=48] -->
@@ -6870,7 +6870,7 @@
    <string name="condition_cellular_summary">Internet is available only via Wi-Fi</string>
    <!-- Title of condition that background data is off [CHAR LIMIT=30] -->
    <string name="condition_bg_data_title">Background data is off</string>
    <string name="condition_bg_data_title">Data Saver is on</string>
    <!-- Summary of condition that background data is off [CHAR LIMIT=NONE] -->
    <string name="condition_bg_data_summary">Background data is only available via Wi-Fi. This may affect some apps or services when Wi-Fi is not available.</string>
@@ -6966,4 +6966,28 @@
         the code to do that -->
    <string name="data_usage_other_apps" translatable="false">Other apps included in usage</string>
    <!-- Description of number of apps allowed to ignore data saver [CHAR LIMIT=NONE] -->
    <plurals name="data_saver_unrestricted_summary">
        <item quantity="one">1 app allowed to use unrestricted data when Data Saver is on</item>
        <item quantity="other"><xliff:g id="count" example="10">%1$d</xliff:g> apps allowed to use unrestricted data when Data Saver is on</item>
    </plurals>
    <!-- Name of Data Saver screens [CHAR LIMIT=30] -->
    <string name="data_saver_title">Data Saver</string>
    <!-- Button that leads to list of apps with unrestricted data access [CHAR LIMIT=60] -->
    <string name="unrestricted_data_saver">Unrestricted data access</string>
    <!-- Summary for the data saver feature being on [CHAR LIMIT=NONE] -->
    <string name="data_saver_on">On</string>
    <!-- Summary for the data saver feature being off [CHAR LIMIT=NONE] -->
    <string name="data_saver_off">Off</string>
    <!-- Title for switch to allow app unrestricted data usage [CHAR LIMIT=30] -->
    <string name="unrestricted_app_title">Unrestricted data usage</string>
    <!-- Title for switch to allow app unrestricted data usage [CHAR LIMIT=30] -->
    <string name="unrestricted_app_summary">Allow unrestricted data access when Data Saver is on</string>
</resources>
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="@string/data_usage_summary_title">

    <com.android.settings.datausage.SpinnerPreference
        android:key="cycle" />

    <com.android.settings.applications.SpacePreference
        android:layout_height="8dp" />

@@ -50,6 +53,11 @@
        android:title="@string/data_usage_app_restrict_background"
        android:summary="@string/data_usage_app_restrict_background_summary" />

    <SwitchPreference
        android:key="unrestricted_data_saver"
        android:title="@string/unrestricted_app_title"
        android:summary="@string/unrestricted_app_summary" />

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