public boolean thisDeviceSpeaksTo(BluetoothDevice other) throws NoSuchAlgorithmException, UnsupportedEncodingException {
  if (MurmurService.USE_BACKOFF)   return true;
  if (other == null) {
    log.info("This device not speaking to peer, peer is null");
    return false;
  }
  String otherAddr=other.getAddress();
  if (otherAddr == null) {
    log.info("This device not speaking to peer :" + other + ", peer address is null");
    return false;
  }
  String myAddr=mBluetoothSpeaker.getAddress();
  if (myAddr.equals(whichInitiates(myAddr,otherAddr))) {
    return true;
  }
 else {
    return false;
  }
}

public boolean thisDeviceSpeaksTo ( BluetoothDevice other ) throws NoSuchAlgorithmException , UnsupportedEncodingException { if ( MurmurService . USE_BACKOFF ) return true ; if ( other == null ) { log . info ( "This device not speaking to peer, peer is null" ) ; return false ; } String otherAddr = other . getAddress ( ) ; if ( otherAddr == null ) { log . info ( "This device not speaking to peer :" + other + ", peer address is null" ) ; return false ; } String myAddr = mBluetoothSpeaker . getAddress ( ) ; if ( myAddr . equals ( whichInitiates ( myAddr , otherAddr ) ) ) { return true ; } else { return false ; } }
check whether this device should start an exchange with the other device or allow that device to start an exchange , based on their addresses .
