From 52809d8f2da945909ff1b3d0f3e3b653e65efb29 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 29 Sep 2022 10:16:38 -0300 Subject: [PATCH] Add permission rationale for camera and Bluetooth combined --- .../add/nearby/AddNearbyContactPermissionManager.java | 5 +++++ briar-android/src/main/res/values/strings.xml | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/briar-android/src/main/java/org/briarproject/briar/android/contact/add/nearby/AddNearbyContactPermissionManager.java b/briar-android/src/main/java/org/briarproject/briar/android/contact/add/nearby/AddNearbyContactPermissionManager.java index 728308608..316c78711 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/contact/add/nearby/AddNearbyContactPermissionManager.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/contact/add/nearby/AddNearbyContactPermissionManager.java @@ -103,6 +103,11 @@ class AddNearbyContactPermissionManager { showRationale(ctx, R.string.permission_camera_location_title, R.string.permission_camera_location_request_body, this::requestPermissions); + } else if (cameraPermission == SHOW_RATIONALE && + bluetoothPermissions == SHOW_RATIONALE) { + showRationale(ctx, R.string.permission_camera_bluetooth_title, + R.string.permission_camera_bluetooth_request_body, + this::requestPermissions); } else if (cameraPermission == SHOW_RATIONALE) { showRationale(ctx, R.string.permission_camera_title, R.string.permission_camera_request_body, diff --git a/briar-android/src/main/res/values/strings.xml b/briar-android/src/main/res/values/strings.xml index a5125ce0c..8887fcd7b 100644 --- a/briar-android/src/main/res/values/strings.xml +++ b/briar-android/src/main/res/values/strings.xml @@ -314,7 +314,7 @@ Different Person %1$s and %2$s sent you the same link.\n\nOne of them may be trying to discover who your contacts are.\n\nDon\'t tell them you received the same link from someone else. Pending contact updated - + Unverified contact @@ -778,6 +778,8 @@ To discover Bluetooth devices, Briar needs permission to access your location.\n\nBriar does not store your location or share it with anyone. Camera and location To scan the QR code, Briar needs access to the camera.\n\nTo discover Bluetooth devices, Briar needs permission to access your location.\n\nBriar does not store your location or share it with anyone. + Camera and nearby devices + To scan the QR code, Briar needs access to the camera.\n\nTo discover Bluetooth devices, Briar needs permission to find and connect to nearby devices. You have denied access to the camera, but adding contacts requires using the camera.\n\nPlease consider granting access. You have denied access to your location, but Briar needs this permission to discover Bluetooth devices.\n\nPlease consider granting access. Location setting