After looking at this code I think an if statement might be better. 
```java
if (mode == BluetoothAdapter.SCAN_MODE_NONE || mode == BluetoothAdapter.SCAN_MODE_CONNECTABLE {
    isSearching = false;
    setJoinToDefaultState();
} else if (mode == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
    isSearching = true;
    setJoinToSearchingState();
} else {
    Log.wtf(TAG, "Recieved scan mode changed with unknown mode");
}