summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2012-08-25 00:06:08 -0700
committerJeff Sharkey <jsharkey@android.com>2012-08-26 17:01:46 -0700
commit9fd7ac1ec7c0c3984f225a237bd6e3dbafc7f831 (patch)
treee61e0abed374c4676caecb819f4d531ad25091ff /res
parent5e61ba5576d912c42af004510484a77625a96d44 (diff)
downloadpackages_apps_Settings-9fd7ac1ec7c0c3984f225a237bd6e3dbafc7f831.zip
packages_apps_Settings-9fd7ac1ec7c0c3984f225a237bd6e3dbafc7f831.tar.gz
packages_apps_Settings-9fd7ac1ec7c0c3984f225a237bd6e3dbafc7f831.tar.bz2
Always-on VPN.
Adds support for always-on VPN profiles. Users pick an always-on VPN from list of existing VPN profiles, which must use an IP address for both VPN server and DNS. Moved "add" operation into action bar. Bug: 5756357 Change-Id: I4c7ed7f2a3b027be1baf65c08213336a61f3acfe
Diffstat (limited to 'res')
-rw-r--r--res/layout/vpn_lockdown_editor.xml38
-rw-r--r--res/menu/vpn.xml27
-rw-r--r--res/values/strings.xml9
-rw-r--r--res/xml/vpn_settings2.xml4
4 files changed, 74 insertions, 4 deletions
diff --git a/res/layout/vpn_lockdown_editor.xml b/res/layout/vpn_lockdown_editor.xml
new file mode 100644
index 0000000..933c5ec
--- /dev/null
+++ b/res/layout/vpn_lockdown_editor.xml
@@ -0,0 +1,38 @@
+<?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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
+ android:paddingTop="8dip"
+ android:paddingBottom="8dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/vpn_lockdown_summary" />
+
+ <ListView
+ android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1" />
+
+</LinearLayout>
diff --git a/res/menu/vpn.xml b/res/menu/vpn.xml
new file mode 100644
index 0000000..dd8f64c
--- /dev/null
+++ b/res/menu/vpn.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/vpn_create"
+ android:title="@string/vpn_create"
+ android:icon="@drawable/ic_menu_add"
+ android:showAsAction="always" />
+ <item
+ android:id="@+id/vpn_lockdown"
+ android:title="@string/vpn_menu_lockdown"
+ android:showAsAction="never" />
+</menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ea7273c..eab6718 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4034,6 +4034,15 @@
<string name="vpn_menu_edit">Edit profile</string>
<!-- Menu item to delete a VPN profile. [CHAR LIMIT=40] -->
<string name="vpn_menu_delete">Delete profile</string>
+ <!-- Menu item to select always-on VPN profile. [CHAR LIMIT=40] -->
+ <string name="vpn_menu_lockdown">Always-on VPN</string>
+
+ <!-- Summary describing the always-on VPN feature. [CHAR LIMIT=NONE] -->
+ <string name="vpn_lockdown_summary">Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN.</string>
+ <!-- List item indicating that no always-on VPN is selected. [CHAR LIMIT=64] -->
+ <string name="vpn_lockdown_none">None</string>
+ <!-- Error indicating that the selected VPN doesn't meet requirements. [CHAR LIMIT=NONE] -->
+ <string name="vpn_lockdown_config_error">Always-on VPN requires an IP address for both server and DNS.</string>
<!-- Toast message when there is no network connection to start VPN. [CHAR LIMIT=100] -->
<string name="vpn_no_network">There is no network connection. Please try again later.</string>
diff --git a/res/xml/vpn_settings2.xml b/res/xml/vpn_settings2.xml
index 38632cc..08075a6 100644
--- a/res/xml/vpn_settings2.xml
+++ b/res/xml/vpn_settings2.xml
@@ -16,8 +16,4 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/vpn_title">
- <Preference android:key="add_network"
- android:title="@string/vpn_create"
- android:order="1"
- android:persistent="false"/>
</PreferenceScreen>