@Override
	final void cancelCurrent() {
		final BluetoothDevice device = bluetoothDevice;
		if (device == null)
			return;

		log(Log.WARN, () -> "Request cancelled");
		if (request instanceof final TimeoutableRequest r) {
			r.notifyFail(device, FailCallback.REASON_CANCELLED);
		}
		if (awaitingRequest != null) {
			awaitingRequest.notifyFail(device, FailCallback.REASON_CANCELLED);
			awaitingRequest = null;
		}
		if (requestQueue instanceof final ReliableWriteRequest rwr) {
			// Cancelling a Reliable Write request requires sending Abort command.
			// Instead of notifying failure, we will remove all enqueued tasks and
			// let the nextRequest to sent Abort command.
			rwr.notifyAndCancelQueue(device);
		} else if (requestQueue != null) {
			requestQueue.notifyFail(device, FailCallback.REASON_CANCELLED);
			requestQueue = null;
		}
		nextRequest(request == null || request.finished);
	}
Enqueues the given request at the front of the the init or task queue, depending
on whether the initialization is in progress, or not.
<p>
This method sets the {@link #operationInProgress} to false, assuming the newly added
request will be executed immediately after this method ends.

@param request the request to be added.
ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java