private BluetoothGatt connectGattCompat(BluetoothGattCallback bluetoothGattCallback, BluetoothDevice device, boolean autoConnect) {
        RxBleLog.v("Connecting without reflection");

        if (Build.VERSION.SDK_INT >= 23 /* Build.VERSION_CODES.M */) {
            return device.connectGatt(context, autoConnect, bluetoothGattCallback, TRANSPORT_LE);
        } else {
            return device.connectGatt(context, autoConnect, bluetoothGattCallback);
        }
    }
Some implementations of Bluetooth Stack have a race condition where autoConnect flag
is not properly set before calling connectGatt. That's the reason for using reflection
to set the flag manually.
rxandroidble/src/main/java/com/polidea/rxandroidble2/internal/util/BleConnectionCompat.java