Skip to content

ADFA-5158 fix(clone): resolve the Send AP IP by polling, not a one-shot - #418

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/ADFA-5158-clone-getapp-ap-ip
Aug 15, 2026
Merged

ADFA-5158 fix(clone): resolve the Send AP IP by polling, not a one-shot#418
luisguzman-adfa merged 2 commits into
mainfrom
fix/ADFA-5158-clone-getapp-ap-ip

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

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.

  • 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.

@luisguzman-adfa
luisguzman-adfa merged commit 1e9827b into main Aug 15, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-5158-clone-getapp-ap-ip branch August 15, 2026 19:48
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant