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

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

Merge "Add wifi metered controls in wifi settings."

parents d32c43d0 261c29c4
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0"
        android:tint="?android:attr/colorControlNormal">
    <path
        android:fillColor="#FF000000"
        android:pathData="M11.8,10.9c-2.27,-0.59 -3,-1.2 -3,-2.15 0,-1.09 1.01,-1.85 2.7,-1.85 1.78,0 2.44,0.85 2.5,2.1h2.21c-0.07,-1.72 -1.12,-3.3 -3.21,-3.81V3h-3v2.16c-1.94,0.42 -3.5,1.68 -3.5,3.61 0,2.31 1.91,3.46 4.7,4.13 2.5,0.6 3,1.48 3,2.41 0,0.69 -0.49,1.79 -2.7,1.79 -2.06,0 -2.87,-0.92 -2.98,-2.1h-2.2c0.12,2.19 1.76,3.42 3.68,3.83V21h3v-2.15c1.95,-0.37 3.5,-1.5 3.5,-3.55 0,-2.84 -2.43,-3.81 -4.7,-4.4z"/>
</vector>
 No newline at end of file
+20 −0
Original line number Diff line number Diff line
@@ -316,6 +316,26 @@
                    android:orientation="vertical"
                    android:visibility="gone">

            <LinearLayout android:id="@+id/metered_settings_fields"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          style="@style/wifi_item">

                <TextView android:id="@+id/metered_settings_title"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          style="@style/wifi_item_label"
                          android:text="@string/data_usage_metered_yes" />

                <Spinner android:id="@+id/metered_settings"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         style="@style/wifi_item_spinner"
                         android:prompt="@string/data_usage_metered_yes"
                         android:entries="@array/wifi_metered_entries"/>

            </LinearLayout>

            <LinearLayout android:id="@+id/proxy_settings_fields"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
+12 −0
Original line number Diff line number Diff line
@@ -1063,4 +1063,16 @@
        <item>zen_mode_from_none</item>
    </string-array>

    <string-array name="wifi_metered_entries">
        <item>Use network preference</item>
        <item>Treat as metered</item>
        <item>Treat as unmetered</item>
    </string-array>

    <string-array name="wifi_metered_values" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
    </string-array>

</resources>
+0 −5
Original line number Diff line number Diff line
@@ -27,11 +27,6 @@
            android:key="wifi_data_usage"
            android:title="@string/wifi_data_usage" />

        <com.android.settings.datausage.NetworkRestrictionsPreference
            android:key="network_restrictions"
            android:title="@string/network_restrictions"
            android:fragment="com.android.settings.datausage.DataUsageMeteredSettings" />

    </com.android.settings.datausage.TemplatePreferenceCategory>

</PreferenceScreen>
+7 −0
Original line number Diff line number Diff line
@@ -49,6 +49,13 @@
                android:icon="@drawable/ic_security_lock_24dp"
                android:title="@string/wifi_security"
                android:selectable="false"/>

        <DropDownPreference
                android:key="metered"
                android:icon="@drawable/ic_attach_money_black_24dp"
                android:title="@string/data_usage_metered_yes"
                android:entries="@array/wifi_metered_entries"
                android:entryValues="@array/wifi_metered_values"/>
    </PreferenceCategory>

    <!-- Network Details -->
Loading