Add null check for device name to avoid NPE
@@ -65,7 +65,7 @@ public class BluetoothIOIOConnectionBootstrap implements
try {
Set<BluetoothDevice> bondedDevices = adapter_.getBondedDevices();
for (final BluetoothDevice device : bondedDevices) {
- if (device.getName().startsWith("IOIO")) {
+ if (device.getName() != null && device.getName().startsWith("IOIO")) {
result.add(new IOIOConnectionFactory() {
@Override
public String getType() {
