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

Commit 6abf2255 authored by Yuanru Qian's avatar Yuanru Qian Committed by Android (Google) Code Review
Browse files

Merge "Switch some debug level logging to regular logging in the bluetooth...

Merge "Switch some debug level logging to regular logging in the bluetooth settings for the ease of issue triage." into main
parents a60dc6ca 0b91cdfb
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -70,9 +70,8 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater

        boolean isFilterMatched = false;
        if (isDeviceConnected(cachedDevice) && isDeviceInCachedDevicesList(cachedDevice)) {
            if (DBG) {
            Log.d(TAG, "isFilterMatched() current audio profile : " + currentAudioProfile);
            }

            // If device is Hearing Aid, it is compatible with HFP and A2DP.
            // It would show in Available Devices group.
            if (cachedDevice.isConnectedAshaHearingAidDevice()) {
@@ -111,7 +110,6 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater
                    isFilterMatched = cachedDevice.isConnectedHfpDevice();
                    break;
            }
            if (DBG) {
            Log.d(
                    TAG,
                    "isFilterMatched() device : "
@@ -119,7 +117,6 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater
                            + ", isFilterMatched : "
                            + isFilterMatched);
        }
        }
        return isFilterMatched;
    }

+2 −4
Original line number Diff line number Diff line
@@ -183,10 +183,8 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback,

    @Override
    public void onAclConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) {
        if (DBG) {
        Log.d(getLogTag(), "onAclConnectionStateChanged() device: " + cachedDevice.getName()
                + ", state: " + state);
        }
        update(cachedDevice);
    }

+3 −6
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ public class SavedBluetoothDeviceUpdater extends BluetoothDeviceUpdater
        implements Preference.OnPreferenceClickListener {

    private static final String TAG = "SavedBluetoothDeviceUpdater";
    private static final boolean DBG = Log.isLoggable(BluetoothDeviceUpdater.TAG, Log.DEBUG);

    private static final String PREF_KEY = "saved_bt";

@@ -100,11 +99,9 @@ public class SavedBluetoothDeviceUpdater extends BluetoothDeviceUpdater
    @Override
    public boolean isFilterMatched(CachedBluetoothDevice cachedDevice) {
        final BluetoothDevice device = cachedDevice.getDevice();
        if (DBG) {
        Log.d(TAG, "isFilterMatched() device name : " + cachedDevice.getName() +
                ", is connected : " + device.isConnected() + ", is profile connected : "
                + cachedDevice.isConnected());
        }
        return device.getBondState() == BluetoothDevice.BOND_BONDED
                && (mShowConnectedDevice || (!device.isConnected() && isDeviceInCachedDevicesList(
                cachedDevice)));