diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-04-03 21:13:25 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2012-04-05 14:31:43 -0700 |
commit | 313f7d8c5759fd29a98c710ceb9339d27b8e62fa (patch) | |
tree | 9275d0f9e2627535813e517a8e99319a7941c5d5 /res | |
parent | 9f55ae28789754dafeed5c68468d45135d46199e (diff) | |
download | packages_apps_Settings-313f7d8c5759fd29a98c710ceb9339d27b8e62fa.zip packages_apps_Settings-313f7d8c5759fd29a98c710ceb9339d27b8e62fa.tar.gz packages_apps_Settings-313f7d8c5759fd29a98c710ceb9339d27b8e62fa.tar.bz2 |
Controls to set expensive (metered) networks.
Add UI to change metered flag on NetworkPolicy, and support Wi-Fi
policies per-SSID. Create Wi-Fi policies as needed, but leave cycle
undefined.
Only show and mutate mobile policies when SIM state is ready.
Bug: 3001465, 3291052
Change-Id: I481a202fe0e68fc2f5adfd3b3a6f40347d2b168c
Diffstat (limited to 'res')
-rw-r--r-- | res/menu/data_usage.xml | 3 | ||||
-rw-r--r-- | res/values/strings.xml | 11 | ||||
-rw-r--r-- | res/xml/data_usage_metered_prefs.xml | 34 |
3 files changed, 48 insertions, 0 deletions
diff --git a/res/menu/data_usage.xml b/res/menu/data_usage.xml index 4e938aa..7847f3b 100644 --- a/res/menu/data_usage.xml +++ b/res/menu/data_usage.xml @@ -35,4 +35,7 @@ android:id="@+id/data_usage_menu_show_ethernet" android:title="@string/data_usage_menu_show_ethernet" android:checkable="true" /> + <item + android:id="@+id/data_usage_menu_metered" + android:title="@string/data_usage_menu_metered" /> </menu> diff --git a/res/values/strings.xml b/res/values/strings.xml index d080d59..1bf5763 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3603,6 +3603,8 @@ <string name="data_usage_menu_show_wifi">Show Wi-Fi usage</string> <!-- Title for checkbox menu option to show Ethernet data usage. [CHAR LIMIT=32] --> <string name="data_usage_menu_show_ethernet">Show Ethernet usage</string> + <!-- Title for menu option to configure expensive networks. [CHAR LIMIT=32] --> + <string name="data_usage_menu_metered">Expensive networks</string> <!-- Title for option to change data usage cycle day. [CHAR LIMIT=32] --> <string name="data_usage_change_cycle">Change cycle\u2026</string> <!-- Body of dialog prompting user to change numerical day of month that data usage cycle should reset. [CHAR LIMIT=64] --> @@ -3704,6 +3706,15 @@ <!-- Label displaying total network data transferred during a specific time period. [CHAR LIMIT=64] --> <string name="data_usage_total_during_range"><xliff:g id="range" example="Jul 1 - Jul 31">%2$s</xliff:g>: about <xliff:g id="total" example="128KB">%1$s</xliff:g> used</string> + <!-- Dialog title for selecting paid networks. [CHAR LIMIT=25] --> + <string name="data_usage_metered_title">Expensive networks</string> + <!-- Dialog body for selecting paid networks. [CHAR LIMIT=NONE] --> + <string name="data_usage_metered_body">Select the networks for which data usage is expensive. Apps can be restricted from using these networks when in the background. Apps may also warn before using these networks for large downloads.</string> + <!-- Header for list of mobile networks. [CHAR LIMIT=32] --> + <string name="data_usage_metered_mobile">Mobile networks</string> + <!-- Header for list of Wi-Fi networks. [CHAR LIMIT=32] --> + <string name="data_usage_metered_wifi">Wi-Fi networks</string> + <!-- Button at the bottom of the CryptKeeper screen to make an emergency call. --> <string name="cryptkeeper_emergency_call">Emergency call</string> <!-- Button at the bottom of the CryptKeeper screen that lets the user return to a call --> diff --git a/res/xml/data_usage_metered_prefs.xml b/res/xml/data_usage_metered_prefs.xml new file mode 100644 index 0000000..7ec3059 --- /dev/null +++ b/res/xml/data_usage_metered_prefs.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 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"> + + <Preference + android:summary="@string/data_usage_metered_body" + android:persistent="false" + android:selectable="false" /> + + <PreferenceCategory + android:key="mobile" + android:title="@string/data_usage_metered_mobile" + android:persistent="false" /> + + <PreferenceCategory + android:key="wifi" + android:title="@string/data_usage_metered_wifi" + android:persistent="false" /> + +</PreferenceScreen> |