String change - wifi tether = hotspot

bug:2664412
Change-Id: I6ca955e7fcc299ae1d69892c93c9250229610b19
diff --git a/assets/html/en_us/tethering_help.html b/assets/html/en_us/tethering_help.html
index fa827d5..dfff700 100644
--- a/assets/html/en_us/tethering_help.html
+++ b/assets/html/en_us/tethering_help.html
@@ -24,11 +24,11 @@
 <li>You can't mount your phone's SD card on your computer when USB tethered</li><br>
 <li>For more information, including using USB tethering with other OSs, see <a href="http://www.android.com/tether#usb">http://www.android.com/tether#usb</a></li><br>
 </ul>
-<p><b>Wi-Fi tethering</b></p>
-<span class="style1">You can turn your phone into a Wi-Fi access point, to share your phone's internet connection with one or more computers or other devices</span>
+<p><b>Portable Wi-Fi hotspot</b></p>
+<span class="style1">You can turn your phone into a portable Wi-Fi hotspot, to share your phone's internet connection with one or more computers or other devices</span>
 <ul>
-<li>When your phone is acting as an access point, you can't use your phone's applications to access the internet via its Wi-Fi connection</li><br>
-<li>You configure a Wi-Fi access point in Wi-Fi tethering settings</li><br>
+<li>When your phone is serving as a Wi-Fi hotspot, you can't use your phone's applications to access the internet via its Wi-Fi connection</li><br>
+<li>You configure the hotspot with the Wi-Fi hotspot settings</li><br>
 <li>For more information, visit <a href="http://www.android.com/tether#wifi">http://www.android.com/tether#wifi</a></li><br>
 </ul>
 </body>
diff --git a/assets/html/en_us/tethering_wifi_help.html b/assets/html/en_us/tethering_wifi_help.html
index cd8398d14..fac231b 100644
--- a/assets/html/en_us/tethering_wifi_help.html
+++ b/assets/html/en_us/tethering_wifi_help.html
@@ -17,11 +17,11 @@
 </style>
 </head>
 <body>
-<p><b>Wi-Fi tethering</b></p>
-<span class="style1">You can turn your phone into a Wi-Fi access point, to share your phone's internet connection with one or more computers or other devices</span>
+<p><b>Portable Wi-Fi hotspot</b></p>
+<span class="style1">You can turn your phone into a portable Wi-Fi hotspot, to share your phone's internet connection with one or more computers or other devices</span>
 <ul>
-<li>When your phone is acting as an access point, you can't use your phone's applications to access the internet via its Wi-Fi connection</li><br>
-<li>You configure a Wi-Fi access point in Wi-Fi tethering settings</li><br>
+<li>When your phone is serving as a Wi-Fi hotspot, you can't use your phone's applications to access the internet via its Wi-Fi connection</li><br>
+<li>You configure the hotspot with the Wi-Fi hotspot settings</li><br>
 <li>For more information, visit <a href="http://www.android.com/tether#wifi">http://www.android.com/tether#wifi</a></li><br>
 </ul>
 </body>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a0d3b41..0560bfb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -889,23 +889,23 @@
 
     <!-- Wifi AP settings-->
     <!-- Label for wifi tether checkbox. Toggles Access Point on/off -->
-    <string name="wifi_tether_checkbox_text">Wi-Fi tethering</string>
+    <string name="wifi_tether_checkbox_text">Portable Wi-Fi hotspot</string>
     <!-- Subtext for wifi tether checkbox on success -->
-    <string name="wifi_tether_enabled_subtext">Access point <xliff:g id="network_ssid">%1$s</xliff:g> active</string>
+    <string name="wifi_tether_enabled_subtext">Portable hotspot <xliff:g id="network_ssid">%1$s</xliff:g> active</string>
     <!-- Subtext for wifi tether checkbox on failure -->
-    <string name="wifi_tether_failed_subtext">Wi-Fi tethering error</string>
+    <string name="wifi_tether_failed_subtext">Portable Wi-Fi hotspot error</string>
     <!-- Label for Wi-fi tether settings preference -->
-    <string name="wifi_tether_settings_text">Wi-Fi tethering settings</string>
+    <string name="wifi_tether_settings_text">Portable Wi-Fi hotspot settings</string>
     <!-- Subtext for Wi-fi tether settings preference -->
-    <string name="wifi_tether_settings_subtext">Set up &amp; manage access point</string>
+    <string name="wifi_tether_settings_subtext">Set up &amp; manage portable Wi-Fi hotspot</string>
     <!-- Title of the Wi-fi settings screen -->
-    <string name="wifi_tether_settings_title">Wi-Fi tethering settings</string>
+    <string name="wifi_tether_settings_title">Portable Wi-Fi hotspot settings</string>
     <!-- Used to open the ssid and security dialog for Wifi Access Point -->
-    <string name="wifi_tether_configure_ap_text">Configure AP</string>
+    <string name="wifi_tether_configure_ap_text">Configure Wi-Fi hotspot</string>
     <!-- Subtext on configuration preference to indicate SSID and security chosen -->
-    <string name="wifi_tether_configure_subtext"><xliff:g id="network_ssid">%1$s</xliff:g> <xliff:g id="network_security">%2$s</xliff:g> access point</string>
+    <string name="wifi_tether_configure_subtext"><xliff:g id="network_ssid">%1$s</xliff:g> <xliff:g id="network_security">%2$s</xliff:g> portable Wi-Fi hotspot</string>
     <!-- Default access point SSID used for tethering -->
-    <string name="wifi_tether_configure_ssid_default">AndroidAP</string>
+    <string name="wifi_tether_configure_ssid_default">AndroidHotspot</string>
 
 
     <!-- Do not translate. Used for diagnostic screens, precise translation is not necessary
@@ -1406,12 +1406,13 @@
     <string name="call_settings_summary">Set up voicemail, call forwarding, call waiting, caller ID</string>
 
     <!-- Tethering controls, item title to go into the tethering settings -->
-    <string name="tether_settings_title">Tethering</string>
+    <string name="tether_settings_title_usb">Tethering</string>
+    <string name="tether_settings_title_wifi">Portable hotspot</string>
+    <string name="tether_settings_title_both">Tethering &amp; portable hotspot</string>
     <!-- Tethering controls, the item summary for the user to go into the tethering settings -->
-    <string name="tether_settings_summary">Set up &amp; manage tethering</string>
-
-    <!-- Title of the screen for adjusting tethering settings -->
-    <string name="tether_screen_title">Tethering settings</string>
+    <string name="tether_settings_summary_usb">Share your phone\'s mobile data connection via USB</string>
+    <string name="tether_settings_summary_wifi">Share your phone\'s mobile connection as a portable Wi-Fi hotspot</string>
+    <string name="tether_settings_summary_both">Share your phone\'s mobile data connection via USB or as a portable Wi-Fi hotspot</string>
 
     <!-- USB Tethering options -->
     <string name="usb_title">USB</string>
@@ -1428,7 +1429,7 @@
     <string name="usb_tethering_errored_subtext">USB tethering error</string>
 
     <!-- Thethering help button - calls up a web view with general tethering info -->
-    <string name="tethering_help_button_text">Tethering help</string>
+    <string name="tethering_help_button_text">Help</string>
 
     <!-- Wireless controls, item title to go into the network settings -->
     <string name="network_settings_title">Mobile networks</string>
diff --git a/res/xml/tether_prefs.xml b/res/xml/tether_prefs.xml
index b4ce7c3..6e3d062 100644
--- a/res/xml/tether_prefs.xml
+++ b/res/xml/tether_prefs.xml
@@ -14,8 +14,7 @@
      limitations under the License.
 -->
 
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-        android:title="@string/tether_screen_title">
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
 
     <CheckBoxPreference
         android:key="usb_tether_settings"
diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml
index 5ee758a..7c91d50 100644
--- a/res/xml/wireless_settings.xml
+++ b/res/xml/wireless_settings.xml
@@ -58,8 +58,8 @@
 
     <PreferenceScreen
         android:key="tether_settings"
-        android:title="@string/tether_settings_title"
-        android:summary="@string/tether_settings_summary">
+        android:title="@string/tether_settings_title_both"
+        android:summary="@string/tether_settings_summary_both">
         <intent
             android:action="android.intent.action.MAIN"
             android:targetPackage="com.android.settings"
diff --git a/src/com/android/settings/TetherSettings.java b/src/com/android/settings/TetherSettings.java
index 56305d5..9eee4e0 100644
--- a/src/com/android/settings/TetherSettings.java
+++ b/src/com/android/settings/TetherSettings.java
@@ -88,12 +88,19 @@
         mUsbRegexs = cm.getTetherableUsbRegexs();
         if (mUsbRegexs.length == 0) {
             getPreferenceScreen().removePreference(mUsbTether);
+
+            setTitle(R.string.tether_settings_title_wifi);
         }
 
         mWifiRegexs = cm.getTetherableWifiRegexs();
         if (mWifiRegexs.length == 0) {
             getPreferenceScreen().removePreference(mEnableWifiAp);
             getPreferenceScreen().removePreference(mWifiApSettings);
+
+            setTitle(R.string.tether_settings_title_usb);
+        } else if (mUsbRegexs.length != 0) {
+            // have both
+            setTitle(R.string.tether_settings_title_both);
         }
         mWifiApEnabler = new WifiApEnabler(this, mEnableWifiAp);
         mView = new WebView(this);
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
index 6db2001..78cf8cf 100644
--- a/src/com/android/settings/WirelessSettings.java
+++ b/src/com/android/settings/WirelessSettings.java
@@ -123,6 +123,22 @@
                 (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
         if (!cm.isTetheringSupported()) {
             getPreferenceScreen().removePreference(findPreference(KEY_TETHER_SETTINGS));
+        } else {
+            String[] usbRegexs = cm.getTetherableUsbRegexs();
+            String[] wifiRegexs = cm.getTetherableWifiRegexs();
+            Preference p = findPreference(KEY_TETHER_SETTINGS);
+            if (wifiRegexs.length == 0) {
+                p.setTitle(R.string.tether_settings_title_usb);
+                p.setSummary(R.string.tether_settings_summary_usb);
+            } else {
+                if (usbRegexs.length == 0) {
+                    p.setTitle(R.string.tether_settings_title_wifi);
+                    p.setSummary(R.string.tether_settings_summary_wifi);
+                } else {
+                    p.setTitle(R.string.tether_settings_title_both);
+                    p.setSummary(R.string.tether_settings_summary_both);
+                }
+            }
         }
     }