@Override
		public void onServicesDiscovered(@NonNull final BluetoothGatt gatt, final int status) {
			if (!serviceDiscoveryRequested)
				return;
			serviceDiscoveryRequested = false;
			if (status == BluetoothGatt.GATT_SUCCESS) {
				log(Log.INFO, () -> "Services discovered");
				servicesDiscovered = true;
				if (manager.isRequiredServiceSupported(gatt)) {
					log(Log.VERBOSE, () -> "Primary service found");
					deviceNotSupported = false;
					final boolean optionalServicesFound = manager.isOptionalServiceSupported(gatt);
					if (optionalServicesFound)
						log(Log.VERBOSE, () -> "Secondary service found");

					// Notify the parent activity.
					postCallback(c -> c.onServicesDiscovered(gatt.getDevice(), optionalServicesFound));

					// Initialize server attributes.
					initializeServerAttributes();

					// Obtain the queue of initialization requests.
					// First, let's call the deprecated initGatt(...).
					operationInProgress = true;
					initialization = true;
					initQueue = initGatt(gatt);

					final boolean deprecatedApiUsed = initQueue != null;
					if (deprecatedApiUsed) {
						for (final Request request : initQueue) {
							request.setRequestHandler(BleManagerHandler.this);
							request.enqueued = true;
						}
					}

					if (initQueue == null)
						initQueue = new LinkedBlockingDeque<>();

					// Before we start executing the initialization queue some other tasks
					// need to be done.
					// Note, that operations are added in reverse order to the front of the queue.

					// 1. On devices running Android 4.3-5.x, 8.x and 9.0 the Service Changed
					//    characteristic needs to be enabled by the app (for bonded devices).
					//    The request will be ignored if there is no Service Changed characteristic.
					// This "fix" broke this in Android 8:
					// https://android-review.googlesource.com/c/platform/system/bt/+/239970
					if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M
							|| Build.VERSION.SDK_INT == Build.VERSION_CODES.O
							|| Build.VERSION.SDK_INT == Build.VERSION_CODES.O_MR1
							|| Build.VERSION.SDK_INT == Build.VERSION_CODES.P) {
						enqueueFirst(Request.newEnableServiceChangedIndicationsRequest()
								.setRequestHandler(BleManagerHandler.this));
						// The above enqueueFirst sets this flag to false.
						operationInProgress = true;
					}

					// Deprecated:
					if (deprecatedApiUsed) {
						// All Battery Service handling will be removed from BleManager in the future.
						// If you want to read/enable notifications on Battery Level characteristic
						// do this in initialize(...).

						// 2. Read Battery Level characteristic (if such does not exist, this will
						//    be skipped)
						manager.readBatteryLevel();
						// 3. Enable Battery Level notifications if required (if this char. does not
						//    exist, this operation will be skipped)
						if (manager.callbacks != null &&
							manager.callbacks.shouldEnableBatteryLevelNotifications(gatt.getDevice()))
							manager.enableBatteryLevelNotifications();
					}
					// End

					manager.initialize();
					initialization = false;
					nextRequest(true);
				} else {
					log(Log.WARN, () -> "Device is not supported");
					deviceNotSupported = true;
					postCallback(c -> c.onDeviceNotSupported(gatt.getDevice()));
					internalDisconnect(ConnectionObserver.REASON_NOT_SUPPORTED);
				}
			} else {
				Log.e(TAG, "onServicesDiscovered error " + status);
				onError(gatt.getDevice(), ERROR_DISCOVERY_SERVICE, status);
				if (connectRequest != null) {
					connectRequest.notifyFail(gatt.getDevice(), FailCallback.REASON_REQUEST_FAILED);
					connectRequest = null;
				}
				internalDisconnect(ConnectionObserver.REASON_UNKNOWN);
			}
		}
Callback indicating the connection parameters were updated. Works on Android 8+.

@param gatt     GATT client.
@param interval Connection interval used on this connection, 1.25ms unit.
                Valid range is from 6 (7.5ms) to 3200 (4000ms).
@param latency  Slave latency for the connection in number of connection events.
                Valid range is from 0 to 499.
@param timeout  Supervision timeout for this connection, in 10ms unit.
                Valid range is from 10 (0.1s) to 3200 (32s).
@deprecated Use {@link ConnectionPriorityRequest#with(ConnectionParametersUpdatedCallback)} instead.
ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java