private int indexOf(final ScanResult result) {
        int i = 0;
        for (final ExtendedBluetoothDevice device : mDevices) {
            if (device.matches(result))
                return i;
            i++;
        }
        return -1;
    }
Finds the index of existing devices on the scan results list.

@param result scan result
@return index of -1 if not found
app/src/main/java/no/nordicsemi/android/nrfmesh/viewmodels/ScannerLiveData.java