ADFA-5158 fix(clone): resolve the Send AP IP by polling, not a one-shot - #418
Merged
Conversation
The get-app QR (Send page 1, section 2) sat on "Starting the service…" for up to a minute on a hotspot: renderPrepare read the host IP with a single NetworkInterfaces.discover(), and on a LocalOnlyHotspot the AP interface's IPv4 lands with latency, so the first read was null and the QR only redrew on the next incidental render. - Poll for the AP IP (~1s) while a Send page needs it and redraw the moment it resolves; the "Starting the service…" placeholder stays honest meanwhile. - Broaden NetworkInterfaces.discover(): if the name whitelist misses the AP iface (OEM-specific names), fall back to the up, non-loopback, site-local IPv4 that isn't wlan0. - Resolve the IP through one helper (peerReachableIp) for both get-app and the Copy daemon; drop Copy's hardcoded 192.168.49.1 (not universal). ApkServer already binds all interfaces, so this is only about which IP to advertise. - Guard ensureHotspot against re-requesting a start while one is in flight. No new strings.
The get-app QR (Send page 1) sat on "Starting the service…" for up to a minute on a hotspot: renderPrepare read the host IP with a single NetworkInterfaces.discover(), and on a LocalOnlyHotspot the AP interface's IPv4 lands with latency, so the first read was null and the QR only redrew on the next incidental render. - Poll for the AP IP and redraw only the get-app section the moment it resolves. The poll is bounded: it runs only while the IP can still arrive (hotspot, not FAILED/unsupported; Wi-Fi is covered by the network observer) and caps at ~2 min, so it never spins — and no longer re-requests the hotspot every second on failure. - Broaden NetworkInterfaces.discover(): if the name whitelist misses the AP iface (OEM names), fall back to the up, non-loopback, site-local IPv4 that isn't wlan0; skip tun*/ppp* (VPN) interfaces. - Resolve the IP through one helper (peerReachableIp) for both get-app and the Copy daemon; drop Copy's hardcoded 192.168.49.1 (not universal). ApkServer already binds all interfaces, so this is only about which IP to advertise. - Guard ensureHotspot against re-requesting a start while one is in flight. No new strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADFA-5158 fix(clone): resolve the Send AP IP by polling, not a one-shot
The get-app QR (Send page 1) sat on "Starting the service…" for up to a minute
on a hotspot: renderPrepare read the host IP with a single
NetworkInterfaces.discover(), and on a LocalOnlyHotspot the AP interface's IPv4
lands with latency, so the first read was null and the QR only redrew on the
next incidental render.
The poll is bounded: it runs only while the IP can still arrive (hotspot, not
FAILED/unsupported; Wi-Fi is covered by the network observer) and caps at
~2 min, so it never spins — and no longer re-requests the hotspot every second
on failure.
iface (OEM names), fall back to the up, non-loopback, site-local IPv4 that
isn't wlan0; skip tun*/ppp* (VPN) interfaces.
Copy daemon; drop Copy's hardcoded 192.168.49.1 (not universal). ApkServer
already binds all interfaces, so this is only about which IP to advertise.
No new strings.