API Changes needed for Blueooth apex to build

Bug: 216476895
Test: Compile
Tag: #refactor
Ignore-AOSP-First: AOSP will be updated later
Change-Id: Ia7741309719e1f46c8c18c81b65c8862bca814e1
This commit is contained in:
William Escande
2022-01-27 13:33:02 +01:00
parent 19f083cda7
commit 0a7c5ec9a9
3 changed files with 3 additions and 5 deletions

View File

@@ -1255,7 +1255,7 @@ public class CompanionDeviceManagerService extends SystemService
} }
@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());

View File

@@ -91,7 +91,7 @@ class BluetoothCompanionDeviceConnectionListener
*/ */
@Override @Override
public void onDeviceDisconnected(@NonNull BluetoothDevice device, public void onDeviceDisconnected(@NonNull BluetoothDevice device,
@DisconnectReason int reason) { int reason) {
if (DEBUG) { if (DEBUG) {
Log.i(TAG, "onDevice_Disconnected() " + btDeviceToString(device)); Log.i(TAG, "onDevice_Disconnected() " + btDeviceToString(device));
Log.d(TAG, " reason=" + disconnectReasonText(reason)); Log.d(TAG, " reason=" + disconnectReasonText(reason));

View File

@@ -486,9 +486,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 BtProfileConnectionInfo(profile), "mBluetoothProfileServiceListener")); new BtProfileConnectionInfo(profile), "mBluetoothProfileServiceListener"));