Example #1
0
  public void disconnect() {
    System.out.println("disconnect() called");
    if (!mConnectEnabled) {
      return;
    }
    mConnectEnabled = false;

    mWorkerQueue.add(
        new Runnable() {
          public void run() {
            _disconnect();
          }
        });
  }
Example #2
0
  public void connect() {
    System.out.println("connect() called");
    if (mConnectEnabled) {
      return;
    }
    mConnectEnabled = true;
    mReconnectDelay = RECONNECT_DELAY_MIN;

    mWorkerQueue.add(
        new Runnable() {
          public void run() {
            _connect();
          }
        });
  }