Repository navigation
fix: bars hidden again over the video, LAN-only debug addresses, no leaked menu (#202, #203, #205) - #206
Conversation
…eaked menu (#202, #203, #205) - Viewing modes go back to full-screen immersive (status and navigation bars hidden, transient on swipe) on resume and on every window focus regain, so after the menu, dialogs and the WebUI too; bars that stay shown are hidden again after 3 s. Pre-R: IMMERSIVE_STICKY | HIDE_NAVIGATION | FULLSCREEN. WebUI keeps its insets padding. - Debug addresses (overlay, /stats.json, UDP hint) list only private IPv4 addresses of non-cellular interfaces, Wi-Fi first, then Ethernet; pure NetInfo.lanAddresses() tested. - Menu popup and the URL/Reset dialogs are dismissed before the activity finishes. - 2.11 (36) Fixes #202, fixes #203, fixes #205
PR Summary by QodoRestore immersive video, filter LAN addresses, and dismiss menu windows
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1. Local IPv6 addresses disappear
|
| static boolean isShown(InetAddress a) { | ||
| return a instanceof Inet4Address && !a.isLoopbackAddress() && !a.isLinkLocalAddress() | ||
| && !a.isAnyLocalAddress(); | ||
| return a instanceof Inet4Address && a.isSiteLocalAddress(); | ||
| } |
There was a problem hiding this comment.
1. Local ipv6 addresses disappear 📎 Requirement gap ≡ Correctness
NetInfo.isShown() accepts only IPv4 site-local addresses, so link-local and unique-local IPv6 addresses are discarded. lanAddresses() applies this filter to every interface used by the overlay, /stats.json, and UDP hint, preventing eligible local addresses from being advertised.
Agent Prompt
## Issue description
The address filter rejects link-local and unique-local addresses even though the debug address lists must support eligible local Wi-Fi and Ethernet addresses in those ranges.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/NetInfo.java[83-90]
- android/app/src/test/java/com/openipc/decoder/DebugServerTest.java[52-65]
## Recommended Fix
Update `isShown()` to accept the required private IPv4, link-local, and unique-local address ranges while continuing to reject public, loopback, and carrier-grade NAT addresses. Add tests covering eligible IPv4 and IPv6 link-local and unique-local addresses.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Not changed: the shown addresses were IPv4 only before this PR as well (#87, #96). An IPv6 link-local URL needs a zone id (fe80::1%wlan0) that a browser cannot use, and ULA addresses are rare on the LANs this app runs in; a user types the IPv4 address. Only public/CGNAT IPv4 and mobile-data interfaces are dropped (#203).
| for (int rank = 0; rank <= 2; rank++) { | ||
| for (Map.Entry<String, List<InetAddress>> e : byInterface.entrySet()) { | ||
| String name = e.getKey() == null ? "" : e.getKey().toLowerCase(Locale.ROOT); | ||
| if (isCellular(name) || rank(name) != rank) continue; | ||
| for (InetAddress a : e.getValue()) { |
There was a problem hiding this comment.
2. Usb-tethered addresses are advertised 📎 Requirement gap ≡ Correctness
NetInfo.lanAddresses() processes rank-2 interfaces after Wi-Fi and Ethernet instead of limiting results to those two interface classes. A private address on an interface such as rndis0, a bridge, or another non-cellular rank-2 interface therefore reaches the debug overlay and advertised endpoints.
Agent Prompt
## Issue description
The address collector includes rank-2 interfaces even though advertised addresses must come only from eligible Wi-Fi and Ethernet interfaces.
## Fix Focus Areas
- android/app/src/main/java/com/openipc/decoder/NetInfo.java[54-80]
- android/app/src/test/java/com/openipc/decoder/DebugServerTest.java[101-112]
## Recommended Fix
Stop iterating rank 2, or explicitly exclude every interface that is not classified as Wi-Fi or Ethernet. Preserve Wi-Fi-before-Ethernet ordering and add a test proving that private addresses on `rndis`, bridge, and other non-Wi-Fi/non-Ethernet interfaces are omitted.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Kept on purpose: the debug server answers every private client, and a phone sharing its connection over USB (rndis) or a bridge is such a LAN, so its private address is reachable. They come last, after Wi-Fi and Ethernet, as #203 asks for the order; only mobile-data interfaces are left out.
A pushed RTP stream can arrive on any address, mobile data included; only the debug page's addresses are LAN-only (#203).
A pushed RTP stream can arrive on any address, mobile data included; only the debug page's addresses are LAN-only (#203).
A pushed RTP stream can arrive on any address, mobile data included; only the debug page's addresses are LAN-only (#203).
Fixes #202, fixes #203, fixes #205
#202 — bars over the video (Android 15)
Investigation. The app hid only
navigationBars()withWindowInsetsController, once, inonCreate(); the status bar relied on the theme'swindowFullscreen. Nothing re-applied it on resume or after another window (menu popup, dialogs, WebUI) had the focus. With target SDK 36 Android 15 draws edge to edge, so any bar the system leaves shown lies over the picture.On the TECNO KM4 (Android 15) with v2.11 it did not reproduce: bars stayed hidden (
dumpsys window:statusBars visible=false,navigationBars visible=false) from start, after top/right edge swipes (transient bars, gone after ~3 s), after the menu, Reset → Cancel, Settings URL editor with the keyboard → Cancel, WebUI → Close, Home and back, the notification shade, screen off/on, cold start and in the grid. So the OPPO (ColorOS) case is a system that brings the bars back and the app never asking again.Fix.
hideSystemBars()hides all system bars (systemBars()) withBEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPEon API 30+, andIMMERSIVE_STICKY | HIDE_NAVIGATION | FULLSCREENbefore; it runs inonCreate(),onResume()and on everyonWindowFocusChanged(true)(after the menu, dialogs and the WebUI). A decor insets listener hides bars again 3 s after they turn up persistently while the video has the focus (transient bars are not reported to the app). The WebUI dialog and its insets padding (#169, #180) are unchanged.#203 — mobile-network addresses in the debug overlay
NetInfo.addresses()(overlay,/stats.jsonaddresses) now goes through the pureNetInfo.lanAddresses(): cellular interfaces (rmnet*,rev_rmnet*,ccmni*,v4-*,clat*,seth*,pdp*,wwan*) are skipped, only private IPv4 (RFC 1918) is shown — loopback and link-local stay hidden as before, public/CGNAT are dropped — Wi-Fi (also a hotspot) first, then Ethernet, then the rest. The U view's hint and/stats.jsonudp.addresseskeep every IPv4 address (NetInfo.udpAddresses(), unchanged behaviour): a pushed stream may come in over any of them. Unit tests with interface/address lists inDebugServerTest.#205 — WindowLeaked menu popup
MenuManager.dismissAll()closes the menu popup, the URL editor / Reset dialog and the WebUI; called beforefinishAndRemoveTask()on Exit and inonDestroy().Version 2.11 (36).