public void disconnectAll(){
  cancelConnecting();
  ArrayList<OneSheeldDevice> tempConnectedDevices;
synchronized (connectedDevicesLock) {
    tempConnectedDevices=new ArrayList<>(connectedDevices.values());
  }
  if (tempConnectedDevices.size() > 0)   Log.i("Manager: Disconnect all connected devices.");
 else   Log.i("Manager: There are no connected devices to disconnect.");
  for (  OneSheeldDevice device : tempConnectedDevices) {
    disconnect(device);
  }
}

public void disconnectAll ( ) { cancelConnecting ( ) ; ArrayList < OneSheeldDevice > tempConnectedDevices ; synchronized ( connectedDevicesLock ) { tempConnectedDevices = new ArrayList < > ( connectedDevices . values ( ) ) ; } if ( tempConnectedDevices . size ( ) > 0 ) Log . i ( "Manager: Disconnect all connected devices." ) ; else Log . i ( "Manager: There are no connected devices to disconnect." ) ; for ( OneSheeldDevice device : tempConnectedDevices ) { disconnect ( device ) ; } }
disconnect all connected devices .
