public void disconnect() { System.out.println("disconnect() called"); if (!mConnectEnabled) { return; } mConnectEnabled = false; mWorkerQueue.add( new Runnable() { public void run() { _disconnect(); } }); }
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(); } }); }