Android: Ask for the local network permission for ad hoc, UPnP and servers

Part of #21585

Android 17 blocks LAN traffic in both directions (TCP and UDP, including
broadcast and multicast) without ACCESS_LOCAL_NETWORK. Ask for it when
networking, the built-in ad hoc server, UPnP, share-on-startup or the
remote debugger gets turned on, when a game initializes ad hoc with
networking enabled, and at startup if a server is set to start then.

A denied ad hoc send fails with EPERM, which the games never see, so show
a message for it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-16 20:44:05 +02:00
1 parent fd6e4dfccd
commit 19e4b77be4
9 files changed
+65 -9

No files matched your search

+2
View File
@@ -845,6 +845,8 @@ void NativeInit(int argc, const char *argv[], const CommandLineOptions &cmdLineO
flags |= WebServerFlags::DEBUGGER;
}
if (flags != WebServerFlags::NONE) {
// Both are for other devices to connect to.
System_RequestLocalNetworkPermission();
StartWebServer(flags);
}