code: void restartService(@NonNull final Intent intent, final boolean scanForBootloader) {
  		String newAddress = null;
  		if (scanForBootloader) {
  			mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_VERBOSE, "Scanning for the DFU Bootloader...");
  			newAddress = BootloaderScannerFactory.getScanner().searchFor(mGatt.getDevice().getAddress());
  			logi("Scanning for new address finished with: " + newAddress);
  			if (newAddress != null)
  				mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_INFO, "DFU Bootloader found with address " + newAddress);
  			else {
  				mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_INFO, "DFU Bootloader not found. Trying the same address...");
  			}
  		}
  
  		if (newAddress != null)
  			intent.putExtra(DfuBaseService.EXTRA_DEVICE_ADDRESS, newAddress);
  
  		// Reset the DFU attempt counter
  		intent.putExtra(DfuBaseService.EXTRA_DFU_ATTEMPT, 0);
  
  		mService.startService(intent);
  	}
docs: Restarts the service based on the given intent. If parameter set this method will also scan for
  an advertising bootloader that has address equal or incremented by 1 to the current one.
  
  @param intent            the intent to be started as a service
  @param scanForBootloader true to scan for advertising bootloader, false to keep the same address