diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index bbc3606..d6c40b2 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -35,6 +35,8 @@
 import static android.net.NetworkTemplate.buildTemplateMobile4g;
 import static android.net.NetworkTemplate.buildTemplateMobileAll;
 import static android.net.NetworkTemplate.buildTemplateWifi;
+import static android.net.TrafficStats.UID_REMOVED;
+import static android.net.TrafficStats.UID_TETHERING;
 import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
 import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
 import static android.text.format.Time.TIMEZONE_UTC;
@@ -68,7 +70,6 @@
 import android.net.NetworkStats;
 import android.net.NetworkStatsHistory;
 import android.net.NetworkTemplate;
-import android.net.TrafficStats;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.os.INetworkManagementService;
@@ -1411,7 +1412,7 @@
                 final int uid = entry.uid;
                 final boolean isApp = uid >= android.os.Process.FIRST_APPLICATION_UID
                         && uid <= android.os.Process.LAST_APPLICATION_UID;
-                if (isApp || uid == TrafficStats.UID_REMOVED) {
+                if (isApp || uid == UID_REMOVED || uid == UID_TETHERING) {
                     AppUsageItem item = knownUids.get(uid);
                     if (item == null) {
                         item = new AppUsageItem(uid);
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 20a34a3..90336e2 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -393,4 +393,34 @@
             list.setPadding(effectivePaddingSide, 0, effectivePaddingSide, paddingBottom);
         }
     }
+
+    /**
+     * Return string resource that best describes combination of tethering
+     * options available on this device.
+     */
+    public static int getTetheringLabel(ConnectivityManager cm) {
+        String[] usbRegexs = cm.getTetherableUsbRegexs();
+        String[] wifiRegexs = cm.getTetherableWifiRegexs();
+        String[] bluetoothRegexs = cm.getTetherableBluetoothRegexs();
+
+        boolean usbAvailable = usbRegexs.length != 0;
+        boolean wifiAvailable = wifiRegexs.length != 0;
+        boolean bluetoothAvailable = bluetoothRegexs.length != 0;
+
+        if (wifiAvailable && usbAvailable && bluetoothAvailable) {
+            return R.string.tether_settings_title_all;
+        } else if (wifiAvailable && usbAvailable) {
+            return R.string.tether_settings_title_all;
+        } else if (wifiAvailable && bluetoothAvailable) {
+            return R.string.tether_settings_title_all;
+        } else if (wifiAvailable) {
+            return R.string.tether_settings_title_wifi;
+        } else if (usbAvailable && bluetoothAvailable) {
+            return R.string.tether_settings_title_usb_bluetooth;
+        } else if (usbAvailable) {
+            return R.string.tether_settings_title_usb;
+        } else {
+            return R.string.tether_settings_title_bluetooth;
+        }
+    }
 }
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
index ccbc87a..7c52413 100644
--- a/src/com/android/settings/WirelessSettings.java
+++ b/src/com/android/settings/WirelessSettings.java
@@ -163,30 +163,8 @@
         if (!cm.isTetheringSupported()) {
             getPreferenceScreen().removePreference(findPreference(KEY_TETHER_SETTINGS));
         } else {
-            String[] usbRegexs = cm.getTetherableUsbRegexs();
-            String[] wifiRegexs = cm.getTetherableWifiRegexs();
-            String[] bluetoothRegexs = cm.getTetherableBluetoothRegexs();
-
-            boolean usbAvailable = usbRegexs.length != 0;
-            boolean wifiAvailable = wifiRegexs.length != 0;
-            boolean bluetoothAvailable = bluetoothRegexs.length != 0;
-
             Preference p = findPreference(KEY_TETHER_SETTINGS);
-            if (wifiAvailable && usbAvailable && bluetoothAvailable) {
-                p.setTitle(R.string.tether_settings_title_all);
-            } else if (wifiAvailable && usbAvailable) {
-                p.setTitle(R.string.tether_settings_title_all);
-            } else if (wifiAvailable && bluetoothAvailable) {
-                p.setTitle(R.string.tether_settings_title_all);
-            } else if (wifiAvailable) {
-                p.setTitle(R.string.tether_settings_title_wifi);
-            } else if (usbAvailable && bluetoothAvailable) {
-                p.setTitle(R.string.tether_settings_title_usb_bluetooth);
-            } else if (usbAvailable) {
-                p.setTitle(R.string.tether_settings_title_usb);
-            } else {
-                p.setTitle(R.string.tether_settings_title_bluetooth);
-            }
+            p.setTitle(Utils.getTetheringLabel(cm));
         }
     }
 
diff --git a/src/com/android/settings/net/UidDetailProvider.java b/src/com/android/settings/net/UidDetailProvider.java
index 9eac801..0518b0b 100644
--- a/src/com/android/settings/net/UidDetailProvider.java
+++ b/src/com/android/settings/net/UidDetailProvider.java
@@ -22,11 +22,13 @@
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources;
+import android.net.ConnectivityManager;
 import android.net.TrafficStats;
 import android.text.TextUtils;
 import android.util.SparseArray;
 
 import com.android.settings.R;
+import com.android.settings.Utils;
 
 public class UidDetailProvider {
     private final Context mContext;
@@ -71,6 +73,13 @@
                 detail.icon = pm.getDefaultActivityIcon();
                 mUidDetailCache.put(uid, detail);
                 return detail;
+            case TrafficStats.UID_TETHERING:
+                final ConnectivityManager cm = (ConnectivityManager) mContext.getSystemService(
+                        Context.CONNECTIVITY_SERVICE);
+                detail.label = res.getString(Utils.getTetheringLabel(cm));
+                detail.icon = pm.getDefaultActivityIcon();
+                mUidDetailCache.put(uid, detail);
+                return detail;
         }
 
         // otherwise fall back to using packagemanager labels
