bluetooth tethering

Change-Id: I8dfb1c85bb8b963d2937b8bc4a4c9f0cf641785d
This commit is contained in:
Danica Chang
2010-08-10 18:41:29 -07:00
parent 4216902ba3
commit 32711b6752
11 changed files with 522 additions and 65 deletions

View File

@@ -34,6 +34,7 @@ public class BluetoothDevicePreference extends Preference implements CachedBluet
private static int sDimAlpha = Integer.MIN_VALUE;
private CachedBluetoothDevice mCachedDevice;
private int mAccessibleProfile;
/**
* Cached local copy of whether the device is busy. This is only updated
@@ -41,7 +42,8 @@ public class BluetoothDevicePreference extends Preference implements CachedBluet
*/
private boolean mIsBusy;
public BluetoothDevicePreference(Context context, CachedBluetoothDevice cachedDevice) {
public BluetoothDevicePreference(Context context, CachedBluetoothDevice cachedDevice,
int accessibleProfile) {
super(context);
if (sDimAlpha == Integer.MIN_VALUE) {
@@ -51,6 +53,7 @@ public class BluetoothDevicePreference extends Preference implements CachedBluet
}
mCachedDevice = cachedDevice;
mAccessibleProfile = accessibleProfile;
setLayoutResource(R.layout.preference_bluetooth);
@@ -83,7 +86,7 @@ public class BluetoothDevicePreference extends Preference implements CachedBluet
* related to BluetoothHeadset not bound to the actual
* BluetoothHeadsetService when we got here.
*/
setSummary(mCachedDevice.getSummary());
setSummary(mCachedDevice.getSummary(mAccessibleProfile));
// Used to gray out the item
mIsBusy = mCachedDevice.isBusy();