code: private void executeClose() {
          if (initState_ != SESSION_STATE.UNINITIALISED) {
              if (!hasNetwork_) {
                  // if there's no network connectivity, purge the old install/open
                  ServerRequest req = requestQueue_.peek();
                  if (req != null && (req instanceof ServerRequestRegisterInstall) || (req instanceof ServerRequestRegisterOpen)) {
                      requestQueue_.dequeue();
                  }
              } else {
                  if (!requestQueue_.containsClose()) {
                      ServerRequest req = new ServerRequestRegisterClose(context_);
                      handleNewRequest(req);
                  }
              }
              initState_ = SESSION_STATE.UNINITIALISED;
          }
      }
docs: <p>Perform the state-safe actions required to terminate any open session, and report the
  closed application event to the Branch API.</p>