b/2296110 New Dialog which appears when phone is place on dock.

Change-Id: I58b216ee9b4ca9ce16210309358c0512271e128e
This commit is contained in:
Michael Chan
2009-12-03 00:31:59 -08:00
parent 3327f78873
commit 0bd445b974
8 changed files with 479 additions and 23 deletions

View File

@@ -185,7 +185,9 @@ public abstract class LocalBluetoothProfileManager {
@Override
public boolean disconnect(BluetoothDevice device) {
// Downgrade priority as user is disconnecting the sink.
mService.setSinkPriority(device, BluetoothA2dp.PRIORITY_ON);
if (mService.getSinkPriority(device) > BluetoothA2dp.PRIORITY_ON) {
mService.setSinkPriority(device, BluetoothA2dp.PRIORITY_ON);
}
return mService.disconnectSink(device);
}
@@ -291,7 +293,9 @@ public abstract class LocalBluetoothProfileManager {
public boolean disconnect(BluetoothDevice device) {
if (mService.getCurrentHeadset().equals(device)) {
// Downgrade prority as user is disconnecting the headset.
mService.setPriority(device, BluetoothHeadset.PRIORITY_ON);
if (mService.getPriority(device) > BluetoothHeadset.PRIORITY_ON) {
mService.setPriority(device, BluetoothHeadset.PRIORITY_ON);
}
return mService.disconnectHeadset();
} else {
return false;