Merge "API Changes needed for Blueooth apex to build" am: a83857b9e2 am: 9c9e32865d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982327 Change-Id: I05fbb5258850a441b8c7b45ee66d09129bd2991e
This commit is contained in:
@@ -1576,7 +1576,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDeviceDisconnected(BluetoothDevice device, @DisconnectReason int reason) {
|
public void onDeviceDisconnected(BluetoothDevice device, int reason) {
|
||||||
Slog.d(LOG_TAG, device.getAddress() + " disconnected w/ reason: (" + reason + ") "
|
Slog.d(LOG_TAG, device.getAddress() + " disconnected w/ reason: (" + reason + ") "
|
||||||
+ BluetoothAdapter.BluetoothConnectionCallback.disconnectReasonText(reason));
|
+ BluetoothAdapter.BluetoothConnectionCallback.disconnectReasonText(reason));
|
||||||
CompanionDeviceManagerService.this.onDeviceDisconnected(device.getAddress());
|
CompanionDeviceManagerService.this.onDeviceDisconnected(device.getAddress());
|
||||||
|
|||||||
@@ -490,9 +490,7 @@ public class BtHelper {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final BluetoothDevice btDevice = deviceList.get(0);
|
final BluetoothDevice btDevice = deviceList.get(0);
|
||||||
final @BluetoothProfile.BtProfileState int state =
|
if (proxy.getConnectionState(btDevice) == BluetoothProfile.STATE_CONNECTED) {
|
||||||
proxy.getConnectionState(btDevice);
|
|
||||||
if (state == BluetoothProfile.STATE_CONNECTED) {
|
|
||||||
mDeviceBroker.queueOnBluetoothActiveDeviceChanged(
|
mDeviceBroker.queueOnBluetoothActiveDeviceChanged(
|
||||||
new AudioDeviceBroker.BtDeviceChangedData(btDevice, null,
|
new AudioDeviceBroker.BtDeviceChangedData(btDevice, null,
|
||||||
new BluetoothProfileConnectionInfo(profile),
|
new BluetoothProfileConnectionInfo(profile),
|
||||||
|
|||||||
Reference in New Issue
Block a user