code: public synchronized void start(boolean android, boolean secure) {
          isAndroid = android;
          mIsSecure = secure;
          // Cancel any thread attempting to make a connection
          if (mConnectThread != null) {mConnectThread.cancel(); mConnectThread = null;}
          // Cancel any thread currently running a connection
          if (mConnectedThread != null) {mConnectedThread.cancel(); mConnectedThread = null;}
  
          setState(BluetoothService.STATE_LISTEN);
  
          // Start the thread to listen on a BluetoothServerSocket
          if (mSecureAcceptThread == null) {
              mSecureAcceptThread = new AcceptThread(isAndroid, mIsSecure);
              mSecureAcceptThread.start();
          }
      }
docs: session in listening (server) mode. Called by the Activity onResume()