synchronized void onStop(JobInvocation jobInvocation, boolean needToSendResult) {
    if (!wasUnbound()) {
      boolean isRunning = Boolean.TRUE.equals(jobStatuses.remove(jobInvocation));
      if (isRunning && isConnected()) {
        stopJob(needToSendResult, jobInvocation);
      }
      // Need to keep the connection open to receive the result.
      if (!needToSendResult && jobStatuses.isEmpty()) {
        unbind();
      }
    } else {
      Log.w(TAG, "Can't send stop request because service was unbound.");
    }
  }
Stops provided {@link JobInvocation job}.

<p>Unbinds the service if {@code needToSendResult} is {@code false} and no other jobs are
running.
jobdispatcher/src/main/java/com/firebase/jobdispatcher/JobServiceConnection.java