diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 341d39d76..870cd838e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,8 +31,8 @@ Android 17 (API 37) makes local network protection mandatory for apps targeting it. The Wi‑Fi Aware transport reaches peers over link-local IPv6 TCP sockets (WifiAwareMeshService.connectAwareClientSocket), so declare this defensively. - It belongs to the NEARBY_DEVICES group, so it does not add a prompt for users - who have already granted NEARBY_WIFI_DEVICES. + It belongs to the NEARBY_DEVICES group, but is granted independently of + NEARBY_WIFI_DEVICES, so it must be requested explicitly (see PermissionManager). --> diff --git a/app/src/main/java/com/bitchat/android/onboarding/PermissionManager.kt b/app/src/main/java/com/bitchat/android/onboarding/PermissionManager.kt index 787026b70..000a26754 100644 --- a/app/src/main/java/com/bitchat/android/onboarding/PermissionManager.kt +++ b/app/src/main/java/com/bitchat/android/onboarding/PermissionManager.kt @@ -45,8 +45,13 @@ class PermissionManager(private val context: Context) { * Android 17 (API 37) makes local network protection mandatory for apps that target it. * WifiAwareMeshService reaches peers over link-local IPv6 TCP sockets * (connectAwareClientSocket), so ACCESS_LOCAL_NETWORK is requested defensively there. - * It shares the NEARBY_DEVICES group with NEARBY_WIFI_DEVICES, so granting it does not - * cost the user an extra prompt. + * + * Note that although ACCESS_LOCAL_NETWORK shares the NEARBY_DEVICES group with + * NEARBY_WIFI_DEVICES, the two are tracked and granted independently: granting + * NEARBY_WIFI_DEVICES alone leaves ACCESS_LOCAL_NETWORK denied (verified on an + * Android 17 device). It must therefore be requested explicitly, which is what this + * list is for. Whether the runtime dialog bundles the two into a single prompt has + * not been verified. */ private fun wifiAwarePermissions(): List { val permissions = mutableListOf(Manifest.permission.NEARBY_WIFI_DEVICES)