mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-11-29 08:27:15 +00:00
Android 17 (API 37) makes local network protection mandatory for apps targeting it. WifiAwareMeshService reaches peers over link-local IPv6 TCP sockets (connectAwareClientSocket), which may be gated by the new ACCESS_LOCAL_NETWORK runtime permission once targetSdk is raised to 37. The official local network permission documentation frames the feature as LAN access and does not explicitly state whether Wi-Fi Aware peer-to-peer networks are in scope, so this is defensive rather than confirmed-necessary. The sockets are bound to a dedicated Aware Network obtained via requestNetwork, not the user's subnet. Declaring it costs nothing: ACCESS_LOCAL_NETWORK shares the NEARBY_DEVICES group with NEARBY_WIFI_DEVICES, so users who have already granted the latter are not prompted again. The runtime request is gated on SDK_INT >= 37 so older devices are unaffected. Raised by automated review on #750. Verified: compileDebugKotlin, testDebugUnitTest (124 tests, 0 failures), bundleRelease, and ACCESS_LOCAL_NETWORK present in the merged manifest. Not verified on an Android 17 device. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>