Merge branch '2448-bluetooth-permission-prompt' into 'master'

Only show Bluetooth permission prompt when Bluetooth is toggled

Closes #2448

See merge request briar/briar!1812
This commit is contained in:
Torsten Grote
2023-09-28 14:09:07 +00:00

View File

@@ -219,7 +219,8 @@ public class TransportsActivity extends BriarActivity {
}
private void onClicked(TransportId transportId, boolean enable) {
if (enable && SDK_INT >= 31 && !areBluetoothPermissionsGranted(this)) {
if (transportId.equals(BluetoothConstants.ID) && enable
&& SDK_INT >= 31 && !areBluetoothPermissionsGranted(this)) {
if (shouldShowRequestPermissionRationale(BLUETOOTH_CONNECT)) {
showRationale(this, R.string.permission_bluetooth_title,
R.string.permission_bluetooth_body,