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

    mWorkerQueue.add(
        new Runnable() {
          public void run() {
            _disconnect();
          }
        });
  }
示例#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();
          }
        });
  }