Always check Bluetooth permission when trying to get own address.

This commit is contained in:
akwizgran
2022-12-22 17:46:12 +00:00
parent c6e9554026
commit c3a9eff96b
2 changed files with 9 additions and 8 deletions

View File

@@ -310,14 +310,12 @@ class BriarReportCollector {
btLeAdvertise);
}
if (hasBtConnectPermission(ctx)) {
Pair<String, String> p = getBluetoothAddressAndMethod(ctx, bt);
String address = p.getFirst();
String method = p.getSecond();
connectivityInfo.add("BluetoothAddress",
scrubMacAddress(address));
connectivityInfo.add("BluetoothAddressMethod", method);
}
Pair<String, String> p = getBluetoothAddressAndMethod(ctx, bt);
String address = p.getFirst();
String method = p.getSecond();
connectivityInfo.add("BluetoothAddress",
scrubMacAddress(address));
connectivityInfo.add("BluetoothAddressMethod", method);
}
return new ReportItem("Connectivity", R.string.dev_report_connectivity,
connectivityInfo);