Merge "API Changes needed for Blueooth apex to build"

This commit is contained in:
Treehugger Robot 2022-02-12 12:09:15 +00:00 committed by Gerrit Code Review
commit a83857b9e2
2 changed files with 2 additions and 4 deletions

View File

@ -1569,7 +1569,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
}
@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 + ") "
+ BluetoothAdapter.BluetoothConnectionCallback.disconnectReasonText(reason));
CompanionDeviceManagerService.this.onDeviceDisconnected(device.getAddress());

View File

@ -490,9 +490,7 @@ public class BtHelper {
return;
}
final BluetoothDevice btDevice = deviceList.get(0);
final @BluetoothProfile.BtProfileState int state =
proxy.getConnectionState(btDevice);
if (state == BluetoothProfile.STATE_CONNECTED) {
if (proxy.getConnectionState(btDevice) == BluetoothProfile.STATE_CONNECTED) {
mDeviceBroker.queueOnBluetoothActiveDeviceChanged(
new AudioDeviceBroker.BtDeviceChangedData(btDevice, null,
new BluetoothProfileConnectionInfo(profile),