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

Commit 540af4be authored by Chris Manton's avatar Chris Manton
Browse files

RemoteDevices: Add logging to fetchUuidsWithSdp

Bug: 339292552
Test: m .
Flag: EXEMPT, Logging Change

Change-Id: I7c9a9fb8708281c45f7e46c6b7b6f85c50d15f5a
parent 5f8a16e3
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -1279,7 +1279,11 @@ public class RemoteDevices {

    void fetchUuids(BluetoothDevice device, int transport) {
        if (mSdpTracker.contains(device)) {
            // SDP Skip fetch UUIDs if cached
            debugLog(
                    "Skip fetch UUIDs are they are already cached peer:"
                            + device
                            + " transport:"
                            + transport);
            MetricsLogger.getInstance().cacheCount(
                    BluetoothProtoEnums.SDP_FETCH_UUID_SKIP_ALREADY_CACHED, 1);
            return;
@@ -1289,7 +1293,7 @@ public class RemoteDevices {
        DeviceProperties deviceProperties = getDeviceProperties(device);
        if (deviceProperties != null && deviceProperties.isBonding()
                && getDeviceProperties(device).getUuids() == null) {
            // SDP Skip fetch UUIDs due to bonding
            debugLog("Skip fetch UUIDs due to bonding peer:" + device + " transport:" + transport);
            MetricsLogger.getInstance().cacheCount(
                    BluetoothProtoEnums.SDP_FETCH_UUID_SKIP_ALREADY_BONDED, 1);
            return;
@@ -1303,7 +1307,11 @@ public class RemoteDevices {

        // Uses cached UUIDs if we are bonding. If not, we fetch the UUIDs with SDP.
        if (deviceProperties == null || !deviceProperties.isBonding()) {
            // SDP Invoked native code to spin up SDP cycle
            debugLog(
                    "Invoking core stack to spin up SDP cycle peer:"
                            + device
                            + " transport:"
                            + transport);
            mAdapterService
                    .getNative()
                    .getRemoteServices(Utils.getBytesFromAddress(device.getAddress()), transport);