b/2367861 Auto connect if the user turns on BT while docked.

Change-Id: I855d0448af9c9c665fb8288c83cd13ae9c3d6050
This commit is contained in:
Michael Chan
2010-01-13 16:31:39 -08:00
parent c5aa68f3f2
commit 845e740fc6
4 changed files with 80 additions and 20 deletions

View File

@@ -136,6 +136,8 @@ public abstract class LocalBluetoothProfileManager {
public abstract boolean isPreferred(BluetoothDevice device);
public abstract int getPreferred(BluetoothDevice device);
public abstract void setPreferred(BluetoothDevice device, boolean preferred);
public boolean isConnected(BluetoothDevice device) {
@@ -212,6 +214,11 @@ public abstract class LocalBluetoothProfileManager {
return mService.getSinkPriority(device) > BluetoothA2dp.PRIORITY_OFF;
}
@Override
public int getPreferred(BluetoothDevice device) {
return mService.getSinkPriority(device);
}
@Override
public void setPreferred(BluetoothDevice device, boolean preferred) {
if (preferred) {
@@ -331,6 +338,11 @@ public abstract class LocalBluetoothProfileManager {
return mService.getPriority(device) > BluetoothHeadset.PRIORITY_OFF;
}
@Override
public int getPreferred(BluetoothDevice device) {
return mService.getPriority(device);
}
@Override
public void setPreferred(BluetoothDevice device, boolean preferred) {
if (preferred) {
@@ -402,6 +414,11 @@ public abstract class LocalBluetoothProfileManager {
return false;
}
@Override
public int getPreferred(BluetoothDevice device) {
return -1;
}
@Override
public void setPreferred(BluetoothDevice device, boolean preferred) {
}