Merge "Add bluetooth related log to improve debug"

This commit is contained in:
TreeHugger Robot
2018-12-20 02:20:08 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 3 deletions

View File

@@ -321,6 +321,11 @@ public class BluetoothEventManager {
// Dispatch device add callback to show bonded but
// not connected devices in discovery mode
dispatchDeviceAdded(cachedDevice);
Log.d(TAG, "DeviceFoundHandler found bonded and not connected device:"
+ cachedDevice);
} else {
Log.d(TAG, "DeviceFoundHandler found existing CachedBluetoothDevice:"
+ cachedDevice);
}
cachedDevice.setRssi(rssi);
cachedDevice.setJustDiscovered(true);

View File

@@ -116,8 +116,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
void onProfileStateChanged(LocalBluetoothProfile profile, int newProfileState) {
if (BluetoothUtils.D) {
Log.d(TAG, "onProfileStateChanged: profile " + profile +
" newProfileState " + newProfileState);
Log.d(TAG, "onProfileStateChanged: profile " + profile + ", device=" + mDevice
+ ", newProfileState " + newProfileState);
}
if (mLocalAdapter.getState() == BluetoothAdapter.STATE_TURNING_OFF)
{
@@ -570,7 +570,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
}
if (BluetoothUtils.D) {
Log.e(TAG, "updating profiles for " + mDevice.getAliasName());
Log.e(TAG, "updating profiles for " + mDevice.getAliasName() + ", " + mDevice);
BluetoothClass bluetoothClass = mDevice.getBluetoothClass();
if (bluetoothClass != null) Log.v(TAG, "Class: " + bluetoothClass.toString());