Skip to content

K2GO-577 feat(hotspot): one Hotspot / Wi-Fi rule for Connect, Clone and Share - #792

Open
luisguzman-adfa wants to merge 4 commits into
mainfrom
feat/K2GO-577-share-transport-mode
Open

luisguzman-adfa wants to merge 4 commits into
mainfrom
feat/K2GO-577-share-transport-mode

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • One Hotspot / Wi-Fi rule (HotspotMode) for Connect, Clone and Content Exchange Share. Hotspot holds the shared hotspot. Wi-Fi gives it back.
  • Share: the service no longer starts the hotspot. The screen starts it only on Hotspot (the default). The Hotspot / Wi-Fi tabs always show. Wi-Fi uses the station IP and hides the join step.
  • Content manager opens Share without the hotspot permission. The Share screen asks for it, so a phone without a hotspot can share over Wi-Fi.
  • Connect: Wi-Fi now turns the hotspot off.
  • Connect and Share: a switch to Wi-Fi asks first when it drops joined devices. It asks only when this screen is the last holder of the hotspot.
  • Receive: stops this phone's hotspot only when its address clashes with the sender. A sender on the shared Wi-Fi does not cut Connect.
  • One escaped Wi-Fi join QR (WifiQr) and one join section (QrSection.setWifiJoin) for Connect, Clone, Share and the QR screen.
  • UI changes:
    • New: k2go_connect_switch_msg "Devices joined to this hotspot lose their connection." (33 locales).
    • Changed: share notification "The hotspot and the share stay open." -> "The share stays open until you stop it." (k2go_cx_share_notif_open, 33 locales).
    • Removed: k2go_cx_share_need_permission (no longer used).

Why

  • The Hotspot / Wi-Fi logic was copied into three screens and drifted. Share kept the Wi-Fi Direct group up on Wi-Fi, which slows the radio (K2GO-561).
  • The Wi-Fi join QR did not escape ;, :, ,, " and \.

Steps to QA

  • Baseline (main): Share, then tap Wi-Fi. The Wi-Fi Direct group stays up (adb shell dumpsys wifip2p | grep groupFormed -> true).
  • Change:
    • Share starts on Hotspot. Tap Wi-Fi: the group goes down, the join step hides, and the invite carries the Wi-Fi IP. Tap Hotspot: the group comes back with name and password. Done: the group goes down.
    • Connect: Wi-Fi turns the group off. With a phone joined, Wi-Fi asks first.
    • Clone Send: same behavior as before.
    • Receive from a sender on the same Wi-Fi while Connect runs: Connect keeps its hotspot.

Verifications

  • JVM unit tests (HotspotModeTest, WifiQrTest, HotspotHoldersTest), lint clean.
  • OPPO: Connect, Share and Clone switch, start and teardown verified. The two-phone tests (warning with a joined device, Receive over Wi-Fi, transfer in both modes) are pending.
  • Light and dark: pending.
  • Evidence goes in K2GO-577.

Notes

  • Deferred: Connect re-acquires its hotspot on resume even while a receive runs from a Wi-Fi Direct sender. This is pre-existing.

…nd Share

HotspotMode holds a screen's choice: Hotspot takes its hold on the shared hotspot, Wi-Fi gives it back.
Share no longer starts the hotspot on its own. Connect warns before Wi-Fi drops joined devices.
WifiQr and QrSection.setWifiJoin build the escaped join QR in one place.
…ddress clash

A sender on the shared Wi-Fi no longer cuts Connect. The Connect switch warning ships in all locales.
…arn only on a real drop

The switch warning asks the hotspot owner whether this screen is its last holder.
The share notification no longer claims a hotspot on Wi-Fi.
@luisguzman-adfa luisguzman-adfa added ui change or edit to UI strings changes or updates on xml strings files labels Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

strings changes or updates on xml strings files ui change or edit to UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant