mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
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:
@@ -135,6 +135,7 @@ class AndroidBluetoothPlugin
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
String getBluetoothAddress() {
|
String getBluetoothAddress() {
|
||||||
|
if (adapter == null) return null;
|
||||||
String address = AndroidUtils.getBluetoothAddress(app, adapter);
|
String address = AndroidUtils.getBluetoothAddress(app, adapter);
|
||||||
return address.isEmpty() ? null : address;
|
return address.isEmpty() ? null : address;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user