Merge "Fixed titles that differ from their link titles"
diff --git a/res/layout-land/choose_lock_pattern_tutorial.xml b/res/layout-land/choose_lock_pattern_tutorial.xml
index 606d2e1..ac693cc 100644
--- a/res/layout-land/choose_lock_pattern_tutorial.xml
+++ b/res/layout-land/choose_lock_pattern_tutorial.xml
@@ -17,29 +17,29 @@
 <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/topLayout"
-    android:orientation="horizontal"
+    android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-    <RelativeLayout
-        android:layout_width="0dip"
-        android:layout_height="match_parent"
-        android:layout_weight="1">
+    <!-- Top: pattern and information -->
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1"
+        android:orientation="horizontal">
 
-        <!-- left side: lock pattern -->
+        <!-- left side: lock pattern. Given the square aspect, this will be the smaller of the
+             two dimensions (height) -->
         <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
-             android:layout_width="300dip"
-             android:layout_height="300dip"
-             android:layout_gravity="center_horizontal"
-             aspect="square"/>
+             android:layout_width="match_parent"
+             android:layout_height="match_parent"/>
 
         <!-- right side: instructions and buttons -->
         <!-- header message -->
         <ScrollView
-            android:layout_width="300dip"
-            android:layout_height="180dip"
-            android:layout_alignParentTop="true"
-            android:layout_toRightOf="@id/lockPattern"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
             android:layout_marginLeft="25dip">
 
             <LinearLayout
@@ -69,25 +69,24 @@
 
         </ScrollView>
 
-        <LinearLayout
-            style="@style/SecurityPreferenceButtonContainer"
-            android:layout_alignParentRight="true"
-            android:layout_alignParentBottom="true"
-            android:orientation="horizontal">
+    </LinearLayout>
 
-            <!-- left / top button: skip, or re-try -->
-            <Button android:id="@+id/skip_button"
-                style="@style/SecurityPreferenceButton"
-                android:text="@string/lockpattern_tutorial_cancel_label"/>
+    <!-- Bottom: cancel/next buttons -->
+    <LinearLayout
+        style="@style/SecurityPreferenceButtonContainer"
+        android:orientation="horizontal">
 
-            <!-- right / bottom button: confirm or ok -->
-            <Button android:id="@+id/next_button"
-                style="@style/SecurityPreferenceButton"
-                android:text="@string/lockpattern_tutorial_continue_label"/>
+        <!-- left / top button: skip, or re-try -->
+        <Button android:id="@+id/skip_button"
+            style="@style/SecurityPreferenceButton"
+            android:text="@string/lockpattern_tutorial_cancel_label"/>
 
-        </LinearLayout>
+        <!-- right / bottom button: confirm or ok -->
+        <Button android:id="@+id/next_button"
+            style="@style/SecurityPreferenceButton"
+            android:text="@string/lockpattern_tutorial_continue_label"/>
 
-    </RelativeLayout>
+    </LinearLayout>
 
 </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
 
diff --git a/res/layout/choose_lock_pattern_tutorial.xml b/res/layout/choose_lock_pattern_tutorial.xml
index 5f6ea56..742cef8 100644
--- a/res/layout/choose_lock_pattern_tutorial.xml
+++ b/res/layout/choose_lock_pattern_tutorial.xml
@@ -33,6 +33,7 @@
             android:orientation="vertical"
             android:padding="5dip">
 
+            <!-- Top: instructions -->
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
@@ -40,26 +41,27 @@
                 android:text="@string/lock_title"
                 android:paddingBottom="10dip"
                 style="?android:attr/textAppearanceLarge"
+                android:visibility="visible"
             />
 
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textSize="18sp"
                 android:text="@string/lock_intro_message"
             />
 
+            <!-- bottom: lock pattern -->
+            <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
+                 android:layout_width="200dip"
+                 android:layout_height="200dip"
+                 android:layout_marginTop="10dip"
+                 android:layout_gravity="left"/>
+
         </LinearLayout>
 
     </ScrollView>
 
-    <!-- bottom: lock pattern. Note the size is match_parent in both axis since requested aspect
-         is square and the pattern view will choose the smaller of the two. -->
-    <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
-         android:layout_width="match_parent"
-         android:layout_height="match_parent"/>
-
     <LinearLayout
         style="@style/SecurityPreferenceButtonContainer"
         android:orientation="horizontal">
diff --git a/res/layout/vpn_dialog.xml b/res/layout/vpn_dialog.xml
index 3e4b441..a4bb216 100644
--- a/res/layout/vpn_dialog.xml
+++ b/res/layout/vpn_dialog.xml
@@ -93,8 +93,8 @@
                         android:prompt="@string/vpn_ipsec_ca_cert" />
             </LinearLayout>
 
-            <TextView style="@style/vpn_label" android:text="@string/vpn_domains"/>
-            <EditText style="@style/vpn_value" android:id="@+id/domains"
+            <TextView style="@style/vpn_label" android:text="@string/vpn_search_domains"/>
+            <EditText style="@style/vpn_value" android:id="@+id/search_domains"
                     android:hint="@string/vpn_not_used"/>
 
             <!-- Not sure if we have time to make it. -->
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 54bd8fe..e6a5136 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1658,7 +1658,7 @@
     <!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of media on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] -->
     <string name="memory_media_usage">Media</string>
     <!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of /sdcard/Download on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] -->
-    <string name="memory_downloads_usage">Downloads</string>    
+    <string name="memory_downloads_usage">Downloads</string>
     <!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of all pictures, videos in /sdcard/DCIM, /sdcard/Pictures folders on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] -->
     <string name="memory_dcim_usage">Pictures, Videos</string>
     <!-- SD card & phone storage settings title. Displayed as a title when showing the total usage of audio files in /sdcard on the device. Below it will be a number like "123.4 MB" indicating used storage. [CHAR LIMIT=50] -->
@@ -2138,12 +2138,8 @@
         \n\nReady to start? Touch \u201CNext\u201D.
     </string>
     <!-- ChooseLockPatternTutorial, tutorial screen text -->
-    <string name="lock_intro_message" product="default"><font size="17">Protect your phone from unauthorized use by creating a personal screen unlock pattern.
-        \n<font height="17">\n</font><b>1</b>\u00A0 On the next screen, watch while an example pattern is drawn.
-        \n<font height="17">\n</font><b>2</b>\u00A0 When ready, draw your own personal unlock pattern. Experiment with different patterns but connect at least four dots.
-        \n<font height="17">\n</font><b>3</b>\u00A0 Redraw your pattern to confirm.
-        \n<font height="17">\n</font><b>Ready to start? Touch \u201CNext\u201D</b>.
-        \n<font height="3">\n</font>To leave your phone unprotected, touch \u201CCancel\u201D.</font>
+    <string name="lock_intro_message" product="default">Protect your phone from unauthorized use by creating a personal screen unlock pattern. Use your finger to connect at least four dots in any order on the next screen.
+        \n\nReady to start? Touch \u201CNext\u201D.
     </string>
 
     <!-- Applications Settings --> <skip />
@@ -3515,7 +3511,7 @@
     <!-- Selection label for the IPSec CA certificate of a VPN network. [CHAR LIMIT=40] -->
     <string name="vpn_ipsec_ca_cert">IPSec CA certificate</string>
     <!-- Input label for the DNS search domains of a VPN network. [CHAR LIMIT=40] -->
-    <string name="vpn_domains">DNS search domains</string>
+    <string name="vpn_search_domains">DNS search domains</string>
     <!-- Input label for the forwarding routes of a VPN network. [CHAR LIMIT=40] -->
     <string name="vpn_routes">Forwarding routes</string>
     <!-- Input label for the username of a VPN network. [CHAR LIMIT=40] -->
@@ -3523,7 +3519,7 @@
     <!-- Input label for the password of a VPN network. [CHAR LIMIT=40] -->
     <string name="vpn_password">Password</string>
     <!-- Checkbox label to save the username and the password for a VPN network. [CHAR LIMIT=40] -->
-    <string name="vpn_save_login">Save this information</string>
+    <string name="vpn_save_login">Save account information</string>
 
     <!-- Hint for an optional input of a VPN network. [CHAR LIMIT=40] -->
     <string name="vpn_not_used">(not used)</string>
diff --git a/src/com/android/settings/vpn2/VpnDialog.java b/src/com/android/settings/vpn2/VpnDialog.java
index 92ad362..2914b1b 100644
--- a/src/com/android/settings/vpn2/VpnDialog.java
+++ b/src/com/android/settings/vpn2/VpnDialog.java
@@ -60,7 +60,7 @@
     private TextView mServer;
     private TextView mUsername;
     private TextView mPassword;
-    private TextView mDomains;
+    private TextView mSearchDomains;
     private TextView mRoutes;
     private CheckBox mMppe;
     private TextView mL2tpSecret;
@@ -92,7 +92,7 @@
         mServer = (TextView) mView.findViewById(R.id.server);
         mUsername = (TextView) mView.findViewById(R.id.username);
         mPassword = (TextView) mView.findViewById(R.id.password);
-        mDomains = (TextView) mView.findViewById(R.id.domains);
+        mSearchDomains = (TextView) mView.findViewById(R.id.search_domains);
         mRoutes = (TextView) mView.findViewById(R.id.routes);
         mMppe = (CheckBox) mView.findViewById(R.id.mppe);
         mL2tpSecret = (TextView) mView.findViewById(R.id.l2tp_secret);
@@ -108,7 +108,7 @@
         mServer.setText(mProfile.server);
         mUsername.setText(mProfile.username);
         mPassword.setText(getDummy(mProfile.password));
-        mDomains.setText(mProfile.domains);
+        mSearchDomains.setText(mProfile.searchDomains);
         mRoutes.setText(mProfile.routes);
         mMppe.setChecked(mProfile.mppe);
         mL2tpSecret.setText(getDummy(mProfile.l2tpSecret));
@@ -288,7 +288,7 @@
         profile.server = mServer.getText().toString().trim();
         profile.username = mUsername.getText().toString();
         profile.password = getSecret(mProfile.password, mPassword);
-        profile.domains = mDomains.getText().toString().trim();
+        profile.searchDomains = mSearchDomains.getText().toString().trim();
         profile.routes = mRoutes.getText().toString().trim();
 
         // Then, save type-specific fields.
diff --git a/src/com/android/settings/vpn2/VpnProfile.java b/src/com/android/settings/vpn2/VpnProfile.java
index 9e4c528..24c2f5f 100644
--- a/src/com/android/settings/vpn2/VpnProfile.java
+++ b/src/com/android/settings/vpn2/VpnProfile.java
@@ -42,14 +42,15 @@
     String server = "";         // 2
     String username = "";       // 3
     String password = "";       // 4
-    String domains = "";        // 5
-    String routes = "";         // 6
-    boolean mppe = false;       // 7
-    String l2tpSecret = "";     // 8
-    String ipsecIdentifier = "";// 9
-    String ipsecSecret = "";    // 10
-    String ipsecUserCert = "";  // 11
-    String ipsecCaCert = "";    // 12
+    String dnsServers = "";     // 5
+    String searchDomains = "";  // 6
+    String routes = "";         // 7
+    boolean mppe = false;       // 8
+    String l2tpSecret = "";     // 9
+    String ipsecIdentifier = "";// 10
+    String ipsecSecret = "";    // 11
+    String ipsecUserCert = "";  // 12
+    String ipsecCaCert = "";    // 13
 
     // Helper fields.
     boolean saveLogin = false;
@@ -65,8 +66,8 @@
             }
 
             String[] values = new String(value, Charsets.UTF_8).split("\0", -1);
-            // Currently it always has 13 fields.
-            if (values.length < 13) {
+            // Currently it always has 14 fields.
+            if (values.length < 14) {
                 return null;
             }
 
@@ -79,14 +80,15 @@
             profile.server = values[2];
             profile.username = values[3];
             profile.password = values[4];
-            profile.domains = values[5];
-            profile.routes = values[6];
-            profile.mppe = Boolean.valueOf(values[7]);
-            profile.l2tpSecret = values[8];
-            profile.ipsecIdentifier = values[9];
-            profile.ipsecSecret = values[10];
-            profile.ipsecUserCert = values[11];
-            profile.ipsecCaCert = values[12];
+            profile.dnsServers = values[5];
+            profile.searchDomains = values[6];
+            profile.routes = values[7];
+            profile.mppe = Boolean.valueOf(values[8]);
+            profile.l2tpSecret = values[9];
+            profile.ipsecIdentifier = values[10];
+            profile.ipsecSecret = values[11];
+            profile.ipsecUserCert = values[12];
+            profile.ipsecCaCert = values[13];
 
             profile.saveLogin = !profile.username.isEmpty() || !profile.password.isEmpty();
             return profile;
@@ -102,7 +104,8 @@
         builder.append('\0').append(server);
         builder.append('\0').append(saveLogin ? username : "");
         builder.append('\0').append(saveLogin ? password : "");
-        builder.append('\0').append(domains);
+        builder.append('\0').append(dnsServers);
+        builder.append('\0').append(searchDomains);
         builder.append('\0').append(routes);
         builder.append('\0').append(mppe);
         builder.append('\0').append(l2tpSecret);