From 89358ec1e8323d2ce11b4e10e84d0389e806b8dc Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Mon, 19 Oct 2026 21:47:34 +0200 Subject: fix(android): cast from the Wi-Fi the phone is on, not its hotspot Android 17 lists the phone's own hotspot as a Wi-Fi network; taken first, the television was handed an address it cannot reach. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/tests/test_android_cast.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages/meshbay-hub') diff --git a/packages/meshbay-hub/tests/test_android_cast.py b/packages/meshbay-hub/tests/test_android_cast.py index 82b36d61..da8b912b 100644 --- a/packages/meshbay-hub/tests/test_android_cast.py +++ b/packages/meshbay-hub/tests/test_android_cast.py @@ -93,6 +93,15 @@ def test_the_relay_is_on_wifi_never_the_mobile_network(): assert "TRANSPORT_CELLULAR" not in lan +def test_the_relay_prefers_the_wifi_the_phone_is_on(): + """Android 17 lists the phone's own hotspot as a Wi-Fi network; taken first, + the television was handed an address on a network it is not on.""" + channels = _read(CAST / "CastChannels.kt") + lan = channels.split("private fun lanAddress()", 1)[1] + assert "activeNetwork" in lan and "NET_CAPABILITY_INTERNET" in lan + assert "return pickLan(found)" in lan + + def test_the_receiver_is_pointed_at_the_relay_and_nothing_else(): channels = _read(CAST / "CastChannels.kt") check = channels.split("private fun relayUrl(", 1)[1].split("\n }", 1)[0] -- cgit v1.2.3