From ac1d41c6ab24669f63bbbc4ae86971e52ef68e9b Mon Sep 17 00:00:00 2001 From: Vinit Deshapnde Date: Wed, 21 Aug 2013 13:09:01 -0700 Subject: Introduce network link quality statistics This change starts tracking traffic quality data for WiFi and mobile networks. The quality is tracked based on incidental traffic, and not on specific measurements. Theoretical bandwidths are hard-coded, as well as sampling interval; although sampling interval can be changed by setting a system policy. Bugs filed to remove shortcomings of this change - 10342372 Change LinkInfo name to something better 10342318 Move hardcoded values of MobileLinkInfo to resources so they can be updated without changing code Bug: 10006249 Change-Id: I83d8c7594da20fe53abbd5e1f909b1f606b035bb --- .../java/android/bluetooth/BluetoothTetheringDataTracker.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'framework/java/android/bluetooth/BluetoothTetheringDataTracker.java') diff --git a/framework/java/android/bluetooth/BluetoothTetheringDataTracker.java b/framework/java/android/bluetooth/BluetoothTetheringDataTracker.java index 0aedecb82d..a9b7176933 100644 --- a/framework/java/android/bluetooth/BluetoothTetheringDataTracker.java +++ b/framework/java/android/bluetooth/BluetoothTetheringDataTracker.java @@ -16,6 +16,7 @@ package android.bluetooth; +import android.net.BaseNetworkStateTracker; import android.os.IBinder; import android.os.ServiceManager; import android.os.INetworkManagementService; @@ -54,7 +55,7 @@ import java.util.concurrent.atomic.AtomicReference; * * @hide */ -public class BluetoothTetheringDataTracker implements NetworkStateTracker { +public class BluetoothTetheringDataTracker extends BaseNetworkStateTracker { private static final String NETWORKTYPE = "BLUETOOTH_TETHER"; private static final String TAG = "BluetoothTethering"; private static final boolean DBG = true; @@ -66,18 +67,12 @@ public class BluetoothTetheringDataTracker implements NetworkStateTracker { private AtomicBoolean mDefaultRouteSet = new AtomicBoolean(false); private final Object mLinkPropertiesLock = new Object(); - private LinkProperties mLinkProperties; - - private LinkCapabilities mLinkCapabilities; - private final Object mNetworkInfoLock = new Object(); - private NetworkInfo mNetworkInfo; private BluetoothPan mBluetoothPan; private static String mRevTetheredIface; /* For sending events to connectivity service handler */ private Handler mCsHandler; - protected Context mContext; private static BluetoothTetheringDataTracker sInstance; private BtdtHandler mBtdtHandler; private AtomicReference mAsyncChannel = new AtomicReference(null); -- cgit v1.2.3