Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 559b7f12 authored by Chienyuan's avatar Chienyuan
Browse files

Add bluetooth related log to improve debug

1. add address log when CachedBluetoothDevice update profiles
2. add address log when CachedBluetoothDevice.onProfileStateChanged
3. add log for deviceFoundHandle when cachedDevice != null

Bug: 114317168
Test: build pass
Change-Id: I37ea5ce210542f4e9afc13f669cec6db88839a85
parent c4dae619
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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());