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

Commit fd19f960 authored by Raphael Kim's avatar Raphael Kim Committed by Android (Google) Code Review
Browse files

Merge "Pre-emptively mark BLE device as lost if the bluetooth disconnect was...

Merge "Pre-emptively mark BLE device as lost if the bluetooth disconnect was detected on the same device."
parents 27704b7b 5d091ca8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -164,6 +164,12 @@ public class CompanionDevicePresenceMonitor implements AssociationStore.OnChange

    @Override
    public void onBluetoothCompanionDeviceDisconnected(int associationId) {
        // If disconnected device is also a BLE device, skip the 2-minute timer and mark it as gone.
        boolean isConnectableBleDevice = mNearbyBleDevices.remove(associationId);
        if (DEBUG && isConnectableBleDevice) {
            Log.d(TAG, "Bluetooth device disconnect was detected."
                    + " Pre-emptively marking the BLE device as lost.");
        }
        onDeviceGone(mConnectedBtDevices, associationId, /* sourceLoggingTag */ "bt");
    }