Merge "[Bluetooth] Add more logs around active devices." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b985f8b635
@@ -668,6 +668,12 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
|||||||
* @param bluetoothProfile the Bluetooth profile
|
* @param bluetoothProfile the Bluetooth profile
|
||||||
*/
|
*/
|
||||||
public void onActiveDeviceChanged(boolean isActive, int bluetoothProfile) {
|
public void onActiveDeviceChanged(boolean isActive, int bluetoothProfile) {
|
||||||
|
if (BluetoothUtils.D) {
|
||||||
|
Log.d(TAG, "onActiveDeviceChanged: "
|
||||||
|
+ "profile " + BluetoothProfile.getProfileName(bluetoothProfile)
|
||||||
|
+ ", device " + mDevice.getAnonymizedAddress()
|
||||||
|
+ ", isActive " + isActive);
|
||||||
|
}
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
switch (bluetoothProfile) {
|
switch (bluetoothProfile) {
|
||||||
case BluetoothProfile.A2DP:
|
case BluetoothProfile.A2DP:
|
||||||
|
|||||||
@@ -146,7 +146,13 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getDeviceString(CachedBluetoothDevice device) {
|
private String getDeviceString(CachedBluetoothDevice device) {
|
||||||
return device.getName() + " " + device.getBondState() + " " + device.isConnected();
|
return device.getName()
|
||||||
|
+ " bondState=" + device.getBondState()
|
||||||
|
+ " connected=" + device.isConnected()
|
||||||
|
+ " active[A2DP]=" + device.isActiveDevice(BluetoothProfile.A2DP)
|
||||||
|
+ " active[HEADSET]=" + device.isActiveDevice(BluetoothProfile.HEADSET)
|
||||||
|
+ " active[HEARING_AID]=" + device.isActiveDevice(BluetoothProfile.HEARING_AID)
|
||||||
|
+ " active[LE_AUDIO]=" + device.isActiveDevice(BluetoothProfile.LE_AUDIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user