diff options
| author | 2022-11-17 16:00:24 +0000 | |
|---|---|---|
| committer | 2022-11-17 16:00:24 +0000 | |
| commit | 0b31af9df5832da9de743394c106ca03beb94a90 (patch) | |
| tree | 17fb8cea7fcc5b21501883380284560bde332fd9 | |
| parent | 7ac69ceb8c07dcb57d3b87ad899b5e64bb139e88 (diff) | |
| parent | 07458dd8bc36e33ab6346201acf32e359e9f7b39 (diff) | |
Merge "[Bluetooth] Add more logs around active devices." into tm-qpr-dev am: b985f8b635 am: 07458dd8bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20496869
Change-Id: I694f6f85b30dd76103d51667b50d70cd01608c36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java | 6 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 950ee21ae7b5..9583a59148fc 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -668,6 +668,12 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> * @param bluetoothProfile the Bluetooth profile */ 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; switch (bluetoothProfile) { case BluetoothProfile.A2DP: diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java index 38b3769c1071..acdf0d2bc32b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java @@ -146,7 +146,13 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa } 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 |