Merge branch '1785-bluetooth-adapter-npe' into 'master'

Check whether Bluetooth adapter exists before trying to get address

Closes #1785

See merge request briar/briar!1288
This commit is contained in:
Torsten Grote
2020-09-29 12:51:22 +00:00

View File

@@ -135,6 +135,7 @@ class AndroidBluetoothPlugin
@Override
@Nullable
String getBluetoothAddress() {
if (adapter == null) return null;
String address = AndroidUtils.getBluetoothAddress(app, adapter);
return address.isEmpty() ? null : address;
}