code: private boolean finishLinkRequest() {
          boolean isSuccessful = false;
  
          if (mIsLinkRequested) {
              synchronized (mDropboxApiLock) {
                  if (mDropboxApi != null) {
                      AndroidAuthSession session = mDropboxApi.getSession();
                      if (session.authenticationSuccessful()) {
                          try {
                              // Set access token on the session.
                              session.finishAuthentication();
                              isSuccessful = true;
                          } catch (IllegalStateException e) {
                              // Do nothing.
                          }
                      }
                  }
              }
  
              // Reset flag.
              mIsLinkRequested = false;
          }
          return isSuccessful;
      }
docs: Finishes a link request. Does nothing if {@link #mIsLinkRequested} is false prior to this call.
  
  @return true if linking is successful; false otherwise.