Repository navigation
Android: Stop and Start no longer leave the socket name taken; a camex link is used once (1.16.1) - #103
Conversation
…x link is used once (1.16.1)
PR Summary by QodoAndroid: Release socket on Stop and consume camex links once
AI Description
Merge Risk
|
Code Review by Qodo
1.
|
…ink check (Qodo on #103)
|
Fixed in a6eb1d6:
Build, lint and 24 unit tests pass in the container. On the box: Stop, then Start 5 s later, twice: vectis, the adapter and the tunnel came back each time, no "still taken" or "cannot open the socket" line, the page answers through the camex server's nginx. The Linux mipsel failure was the runner's apt step timing out again. |
|
/review |
|
Code review by qodo was updated up to the latest commit a6eb1d6 |
Closes #101. Also the "Reopening from recents reapplies an old camex link" finding of the review of #102.
stopVectis()now connects to the abstract socket before closing it, which wakesserve()out of its blockingaccept();serve()sees it is no longer the current server, closes that connection without handing over an fd, and returns, so the name is released. If a start still finds the name taken, it says so and tries again every second, up to 10 times (on the main thread's handler, and only while the user has not pressed Stop), instead of giving up for good.openLink()clears the activity's intent after reading the link and ignores an intent withFLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, so reopening the app from recents no longer opens the settings filled from the link that started it.Testing:
gradle assembleDebug testDebugUnitTest lintDebugincompot/android:2026.10: 23 unit tests pass.am start -a VIEW -d camex://connect?... -f 0x00100000(launched from history): no settings dialog; the same link without the flag: the dialog opens filled in.