Removed summary text and categories in Wireless settings

Bug 5002377 and 5002476.

Change-Id: Ia35dd9701f59a18a812b5079396835cc19e6d901
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f8d38a2..8f09012 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -339,8 +339,6 @@
 
     <!-- HTTP proxy settings title -->
     <string name="proxy_settings_title">Proxy settings</string>
-    <!-- HTTP proxy settings summary -->
-    <string name="proxy_settings_summary">Set the global HTTP proxy and exclusion lists</string>
     <!-- HTTP proxy settings. Button to clear the proxy box. -->
     <string name="proxy_clear_text">Clear</string>
     <!-- HTTP proxy settings. The port number label. -->
@@ -531,12 +529,6 @@
     <string name="settings_shortcut">Select settings shortcut</string>
     <!-- Wireless controls settings screen, setting check box label -->
     <string name="airplane_mode">Airplane mode</string>
-    <!-- Wireless controls settings screen, setting option summary text -->
-    <string name="airplane_mode_summary">Disable all wireless connections</string>
-    <!-- Wireless controls settings screen, setting option summary text as airplane mode is being enabled (so it is disabling all wireless connections)  -->
-    <string name="airplane_mode_turning_on">Disabling wireless connections\u2026</string>
-    <!-- Wireless controls settings screen, setting option summary text as airplane mode is being disabled (so it is re-enabling all the wireless conenctions) -->
-    <string name="airplane_mode_turning_off">Enabling wireless connections\u2026</string>
     <!-- Main Settings screen settings title for things like airplane mode, tethering, NFC, VPN.  This will take you to another screen with those settings. -->
     <string name="radio_controls_title">More\u2026</string>
     <!-- Wireless Settings screen title for things like Wi-Fi, bluetooth, airplane mode. -->
@@ -1066,9 +1058,6 @@
     <!-- NFC settings -->
     <!-- Used in the 1st-level settings screen to turn on NFC -->
     <string name="nfc_quick_toggle_title">NFC</string>
-    <!-- Used in the 1st-level settings screen as the turn-on summary -->
-    <string name="nfc_quick_toggle_summary">Use Near Field Communication to read and exchange tags</string>
-    <string name="nfc_toggle_error" msgid="8998642457947607263">An error occurred.</string>
 
     <!-- Wi-Fi Settings --> <skip />
     <!-- Used in the 1st-level settings screen to turn on Wi-Fi -->
@@ -1910,32 +1899,6 @@
     <!-- Tethering controls, item title to go into the tethering settings when USB, Bluetooth and Wifi tethering are available [CHAR LIMIT=25]-->
     <string name="tether_settings_title_all">Tethering &amp; portable hotspot</string>
 
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings -->
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when only USB tethering is available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_usb" product="tablet">Share your tablet\'s mobile data connection via USB</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when only USB tethering is available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_usb" product="default">Share your phone\'s mobile data connection via USB</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when only Wifi tethering is available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_wifi">Share your mobile data connection as a portable Wi-Fi hotspot</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when only Bluetooth tethering is available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_bluetooth">Share your mobile data connection via Bluetooth</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB and Wifi tethering are available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_usb_wifi" product="tablet">Share your tablet\'s mobile data connection via USB or as a portable Wi-Fi hotspot</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB and Wifi tethering are available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_usb_wifi" product="default">Share your phone\'s mobile data connection via USB or as a portable Wi-Fi hotspot</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB and Bluetooth tethering are available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_usb_bluetooth" product="tablet">Share your tablet\'s mobile data connection via USB or Bluetooth</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB and Bluetooth tethering are available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_usb_bluetooth" product="default">Share your phone\'s mobile data connection via USB or Bluetooth</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when Bluetooth and Wifi tethering are available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_wifi_bluetooth" product="tablet">Share your tablet\'s mobile data connection via Bluetooth or as a portable Wi-Fi hotspot</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when Bluetooth and Wifi tethering are available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_wifi_bluetooth" product="default">Share your phone\'s mobile data connection via Bluetooth or as a portable Wi-Fi hotspot</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB, Wifi, and Bluetooth tethering are available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_all" product="tablet">Share your tablet\'s mobile data connection via USB, Wi-Fi, or Bluetooth</string>
-    <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB, Wifi, and Bluetooth tethering are available [CHAR LIMIT=100]-->
-    <string name="tether_settings_summary_all" product="default">Share your phone\'s mobile data connection via USB, Wi-Fi, or Bluetooth</string>
-
     <!-- USB Tethering options -->
     <string name="usb_title">USB</string>
     <string name="usb_tethering_button_text">USB tethering</string>
@@ -1979,14 +1942,8 @@
     <!-- Tethering help button - calls up a web view with general tethering info -->
     <string name="tethering_help_button_text">Help</string>
 
-    <!-- Wireless controls, header for the general category (airplane mode, VPN, NFC, tethering...) [CHAR LIMIT=40]-->
-    <string name="wireless_category_general">General</string>
-    <!-- Wireless controls, header for the mobile networks category (4G/ network operator...) [CHAR LIMIT=40]-->
-    <string name="wireless_category_mobile_networks">Mobile networks</string>
     <!-- Wireless controls, item title to go into the network settings -->
     <string name="network_settings_title">Mobile networks</string>
-    <!-- Wireless controls, the item summary for the user to go into the network settings -->
-    <string name="network_settings_summary">Set options for roaming, networks, APNs</string>
 
     <!-- Security & location settings screen, section header for settings relating to location -->
     <string name="location_title">My Location</string>
@@ -2975,8 +2932,6 @@
 
     <!-- Title of preference to enter the VPN settings activity -->
     <string name="vpn_settings_title">VPN settings</string>
-    <!-- Summary of preference to enter the VPN settings activity -->
-    <string name="vpn_settings_summary">Set up &amp; manage Virtual Private Networks (VPNs)</string>
 
     <!-- Title of preference group for credential storage settings [CHAR LIMIT=30] -->
     <string name="credentials_title">Credential storage</string>
diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml
index 0488e02..605ddb9 100644
--- a/res/xml/wireless_settings.xml
+++ b/res/xml/wireless_settings.xml
@@ -17,43 +17,30 @@
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
         android:title="@string/wireless_networks_settings_title">
 
-    <PreferenceCategory
-        android:title="@string/wireless_category_general" />
-
     <CheckBoxPreference
         android:key="toggle_airplane"
         android:title="@string/airplane_mode"
-        android:summary="@string/airplane_mode_summary"
         android:persistent="false"
         android:disableDependentsState="true" />
 
-    <CheckBoxPreference
-        android:key="toggle_nfc"
-        android:title="@string/nfc_quick_toggle_title"
-        android:summary="@string/nfc_quick_toggle_summary"
-        android:persistent="false" />
-
     <PreferenceScreen
         android:fragment="com.android.settings.vpn2.VpnSettings"
         android:key="vpn_settings"
-        android:title="@string/vpn_settings_title"
-        android:summary="@string/vpn_settings_summary" >
-    </PreferenceScreen>
+        android:title="@string/vpn_settings_title" />
 
     <PreferenceScreen
         android:fragment="com.android.settings.TetherSettings"
         android:key="tether_settings"
-        android:title="@string/tether_settings_title_all"
-        android:summary="@string/tether_settings_summary_all">
-    </PreferenceScreen>
+        android:title="@string/tether_settings_title_all" />
 
-    <PreferenceCategory
-        android:title="@string/wireless_category_mobile_networks" />
+    <CheckBoxPreference
+        android:key="toggle_nfc"
+        android:title="@string/nfc_quick_toggle_title"
+        android:persistent="false" />
 
     <PreferenceScreen
         android:key="mobile_network_settings"
         android:title="@string/network_settings_title"
-        android:summary="@string/network_settings_summary"
         android:dependency="toggle_airplane">
         <intent
             android:action="android.intent.action.MAIN"
@@ -64,8 +51,6 @@
     <PreferenceScreen
         android:fragment="com.android.settings.ProxySelector"
         android:key="proxy_settings"
-        android:title="@string/proxy_settings_title"
-        android:summary="@string/proxy_settings_summary" >
-    </PreferenceScreen>
+        android:title="@string/proxy_settings_title" />
 
 </PreferenceScreen>
diff --git a/src/com/android/settings/AirplaneModeEnabler.java b/src/com/android/settings/AirplaneModeEnabler.java
index 00c416f..94ba5a1 100644
--- a/src/com/android/settings/AirplaneModeEnabler.java
+++ b/src/com/android/settings/AirplaneModeEnabler.java
@@ -16,8 +16,6 @@
 
 package com.android.settings;
 
-import com.android.internal.telephony.PhoneStateIntentReceiver;
-
 import android.content.Context;
 import android.content.Intent;
 import android.database.ContentObserver;
@@ -27,8 +25,8 @@
 import android.preference.CheckBoxPreference;
 import android.preference.Preference;
 import android.provider.Settings;
-import android.telephony.ServiceState;
 
+import com.android.internal.telephony.PhoneStateIntentReceiver;
 import com.android.internal.telephony.TelephonyProperties;
 
 public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListener {
@@ -93,10 +91,6 @@
     }
 
     private void setAirplaneModeOn(boolean enabling) {
-        
-        mCheckBoxPref.setSummary(enabling ? R.string.airplane_mode_turning_on
-                : R.string.airplane_mode_turning_off);
-
         // Change the system setting
         Settings.System.putInt(mContext.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 
                                 enabling ? 1 : 0);
@@ -118,10 +112,7 @@
      * - mobile does not send failure notification, fail on timeout.
      */
     private void onAirplaneModeChanged() {
-        boolean airplaneModeEnabled = isAirplaneModeOn(mContext);
         mCheckBoxPref.setChecked(isAirplaneModeOn(mContext));
-        mCheckBoxPref.setSummary(airplaneModeEnabled ? null : 
-                mContext.getString(R.string.airplane_mode_summary));            
     }
     
     /**
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
index d09fcc5..5560a03 100644
--- a/src/com/android/settings/WirelessSettings.java
+++ b/src/com/android/settings/WirelessSettings.java
@@ -139,25 +139,18 @@
             Preference p = findPreference(KEY_TETHER_SETTINGS);
             if (wifiAvailable && usbAvailable && bluetoothAvailable) {
                 p.setTitle(R.string.tether_settings_title_all);
-                p.setSummary(R.string.tether_settings_summary_all);
             } else if (wifiAvailable && usbAvailable) {
                 p.setTitle(R.string.tether_settings_title_all);
-                p.setSummary(R.string.tether_settings_summary_usb_wifi);
             } else if (wifiAvailable && bluetoothAvailable) {
                 p.setTitle(R.string.tether_settings_title_all);
-                p.setSummary(R.string.tether_settings_summary_wifi_bluetooth);
             } else if (wifiAvailable) {
                 p.setTitle(R.string.tether_settings_title_wifi);
-                p.setSummary(R.string.tether_settings_summary_wifi);
             } else if (usbAvailable && bluetoothAvailable) {
                 p.setTitle(R.string.tether_settings_title_usb_bluetooth);
-                p.setSummary(R.string.tether_settings_summary_usb_bluetooth);
             } else if (usbAvailable) {
                 p.setTitle(R.string.tether_settings_title_usb);
-                p.setSummary(R.string.tether_settings_summary_usb);
             } else {
                 p.setTitle(R.string.tether_settings_title_bluetooth);
-                p.setSummary(R.string.tether_settings_summary_bluetooth);
             }
         }
     }
diff --git a/src/com/android/settings/nfc/NfcEnabler.java b/src/com/android/settings/nfc/NfcEnabler.java
index d1cec13..dba1329 100644
--- a/src/com/android/settings/nfc/NfcEnabler.java
+++ b/src/com/android/settings/nfc/NfcEnabler.java
@@ -16,8 +16,6 @@
 
 package com.android.settings.nfc;
 
-import com.android.settings.R;
-
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
@@ -26,7 +24,6 @@
 import android.os.Handler;
 import android.preference.CheckBoxPreference;
 import android.preference.Preference;
-import android.provider.Settings;
 import android.util.Log;
 
 /**
@@ -98,6 +95,7 @@
         // Start async update of the NFC adapter state, as the API is
         // unfortunately blocking...
         new Thread("toggleNFC") {
+            @Override
             public void run() {
                 Log.d(TAG, "Setting NFC enabled state to: " + desiredState);
                 boolean success = false;
@@ -118,7 +116,6 @@
                     mHandler.post(new Runnable() {
                             public void run() {
                                 mCheckbox.setEnabled(true);
-                                mCheckbox.setSummary(R.string.nfc_toggle_error);
                             }
                         });
                 }
@@ -130,6 +127,5 @@
     private void handleNfcStateChanged(boolean newState) {
         mCheckbox.setChecked(newState);
         mCheckbox.setEnabled(true);
-        mCheckbox.setSummary(R.string.nfc_quick_toggle_summary);
     }
 }