Replace INetStatService with TrafficStats.

Change-Id: I679b67f9a51e7951b7c06c67dab4efa9f09297b9
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index ba07fb5..d45616e 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -24,11 +24,11 @@
 import android.content.res.Resources;
 import android.net.ConnectivityManager;
 import android.net.LinkProperties;
+import android.net.TrafficStats;
 import android.net.Uri;
 import android.os.AsyncResult;
 import android.os.Bundle;
 import android.os.Handler;
-import android.os.INetStatService;
 import android.os.Message;
 import android.os.RemoteException;
 import android.os.ServiceManager;
@@ -133,7 +133,6 @@
     private TelephonyManager mTelephonyManager;
     private Phone phone = null;
     private PhoneStateIntentReceiver mPhoneStateReceiver;
-    private INetStatService netstat;
 
     private String mPingIpAddrResult;
     private String mPingHostnameResult;
@@ -311,8 +310,6 @@
         phone.getNeighboringCids(
                 mHandler.obtainMessage(EVENT_QUERY_NEIGHBORING_CIDS_DONE));
 
-        netstat = INetStatService.Stub.asInterface(ServiceManager.getService("netstat"));
-
         CellLocation.requestLocationUpdate();
     }
 
@@ -625,19 +622,16 @@
     private final void updateDataStats2() {
         Resources r = getResources();
 
-        try {
-            long txPackets = netstat.getMobileTxPackets();
-            long rxPackets = netstat.getMobileRxPackets();
-            long txBytes   = netstat.getMobileTxBytes();
-            long rxBytes   = netstat.getMobileRxBytes();
+        long txPackets = TrafficStats.getMobileTxPackets();
+        long rxPackets = TrafficStats.getMobileRxPackets();
+        long txBytes   = TrafficStats.getMobileTxBytes();
+        long rxBytes   = TrafficStats.getMobileRxBytes();
 
-            String packets = r.getString(R.string.radioInfo_display_packets);
-            String bytes   = r.getString(R.string.radioInfo_display_bytes);
+        String packets = r.getString(R.string.radioInfo_display_packets);
+        String bytes   = r.getString(R.string.radioInfo_display_bytes);
 
-            sent.setText(txPackets + " " + packets + ", " + txBytes + " " + bytes);
-            received.setText(rxPackets + " " + packets + ", " + rxBytes + " " + bytes);
-        } catch (RemoteException e) {
-        }
+        sent.setText(txPackets + " " + packets + ", " + txBytes + " " + bytes);
+        received.setText(rxPackets + " " + packets + ", " + rxBytes + " " + bytes);
     }
 
     /**