diff options
Diffstat (limited to 'core/java/android/content/AbstractThreadedSyncAdapter.java')
-rw-r--r-- | core/java/android/content/AbstractThreadedSyncAdapter.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/content/AbstractThreadedSyncAdapter.java b/core/java/android/content/AbstractThreadedSyncAdapter.java index 0db6155..091d44e 100644 --- a/core/java/android/content/AbstractThreadedSyncAdapter.java +++ b/core/java/android/content/AbstractThreadedSyncAdapter.java @@ -17,10 +17,10 @@ package android.content; import android.accounts.Account; +import android.net.TrafficStats; import android.os.Bundle; -import android.os.Process; -import android.os.NetStat; import android.os.IBinder; +import android.os.Process; import android.os.RemoteException; import android.util.EventLog; @@ -157,8 +157,8 @@ public abstract class AbstractThreadedSyncAdapter { SyncResult syncResult = new SyncResult(); int uid = Process.myUid(); - mInitialTxBytes = NetStat.getUidTxBytes(uid); - mInitialRxBytes = NetStat.getUidRxBytes(uid); + mInitialTxBytes = TrafficStats.getUidTxBytes(uid); + mInitialRxBytes = TrafficStats.getUidRxBytes(uid); ContentProviderClient provider = null; try { provider = mContext.getContentResolver().acquireContentProviderClient(mAuthority); @@ -175,8 +175,8 @@ public abstract class AbstractThreadedSyncAdapter { if (!isCanceled()) { mSyncContext.onFinished(syncResult); } - onLogSyncDetails(NetStat.getUidTxBytes(uid) - mInitialTxBytes, - NetStat.getUidRxBytes(uid) - mInitialRxBytes, syncResult); + onLogSyncDetails(TrafficStats.getUidTxBytes(uid) - mInitialTxBytes, + TrafficStats.getUidRxBytes(uid) - mInitialRxBytes, syncResult); // synchronize so that the assignment will be seen by other threads // that also synchronize accesses to mSyncThread synchronized (mSyncThreadLock) { |