Skip to content

fix: quick fixes for TV visibility, status overlay, crash handler, WebUI auth (#24 #25 #26 #29) - #42

Merged
compot-dev merged 4 commits into
v2from
fix/quick
Oct 12, 2026
Merged

compot-dev merged 4 commits into
v2from
fix/quick

Conversation

@compot-dev

Copy link
Copy Markdown
Collaborator

Fixes #29, fixes #26, fixes #24, fixes #25. One commit per issue.

Issue Problem Fix
#29 Google Play hides the app on devices without a touchscreen (TV) <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
#26 A stale 1 s / 5 s timer from "connected" overwrites or hides "Disconnected" The timers are fields; every updateStatus() cancels them with removeCallbacks()
#24 After an uncaught exception the process keeps running in a broken state The process is ended after Crash is started; Crash runs in its own :crash process
#25 WebUI sends the camera credentials to any host that asks for HTTP auth handler.proceed() only when the requesting host equals the camera host; otherwise cancel()

About #24

Lint still warns about DefaultUncaughtExceptionDelegation, and this is deliberate. Handing the exception to the system handler would show the system "app keeps stopping" dialog on top of our own crash screen. Instead the process is ended explicitly with killProcess + exit. The Crash activity lives in a separate process, so it survives this and shows the stack trace.

Verification

Without the uses-feature entry Google Play assumes a touchscreen is
required and hides the app on Android TV and set-top boxes (fixes #29).
The 1 s details refresh and the 5 s hide posted on "connected" were
never cancelled, so a later "Disconnected" could be overwritten or
hidden (fixes #26).
The handler started the Crash activity but left the crashed process
running in an undefined state (or frozen, after a main-thread crash).
The process is now killed; Crash runs in its own :crash process so it
still shows the report (fixes #24).
onReceivedHttpAuthRequest answered every host with the user and password
from the RTSP URL, so a redirect or link to another host received them
(fixes #25).
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Fix TV availability, status timers, crash recovery, and WebUI auth

🐞 Bug fix ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Make touchscreen optional for TV availability and isolate crash reporting from the terminated app
 process.
• Cancel stale connection-overlay timers so later status messages remain visible.
• Send WebUI HTTP-auth credentials only to the configured camera host.
Diagram

graph TD
  Manifest["Android manifest"] --> Play["Google Play"]
  App["Crash handler"] --> Crash["Crash screen"]
  Decoder["Stream status"] --> Overlay["Status overlay"]
  WebUI["WebUI auth"] --> Camera["Camera host"]
  Manifest --> Crash
Loading
High-Level Assessment

The localized fixes fit four independent issues. Explicit callback cancellation preserves the existing overlay behavior, and a separate crash process lets the report remain visible after the failed process ends. Broader status-state or authentication redesigns would add scope without a clear benefit here; device testing should confirm crash display and camera login.

Files changed (4) +52 / -35

Bug fix (3) +48 / -34
App.javaEnd the failed process after launching crash reporting +12/-5

End the failed process after launching crash reporting

• Starts the Crash activity with the exception stack trace, then kills and exits the failed process in a finally block, including if activity launch fails.

android/app/src/main/java/com/openipc/decoder/App.java

Decoder.javaCancel stale connected-status overlay callbacks +34/-28

Cancel stale connected-status overlay callbacks

• Moves the delayed details and hide callbacks into reusable fields and cancels both before each status change. This prevents earlier connected-state timers from overwriting or hiding a later status.

android/app/src/main/java/com/openipc/decoder/Decoder.java

MenuManager.javaRestrict WebUI credentials to the camera host +2/-1

Restrict WebUI credentials to the camera host

• Compares the HTTP-auth requesting host with the configured camera host before supplying credentials. Requests from other hosts are cancelled, including those reached through redirects or links.

android/app/src/main/java/com/openipc/decoder/MenuManager.java

Other (1) +4 / -1
AndroidManifest.xmlAllow non-touchscreen devices and isolate the crash activity +4/-1

Allow non-touchscreen devices and isolate the crash activity

• Marks touchscreen hardware as optional so Google Play does not exclude TVs and set-top boxes. Assigns the Crash activity to a separate process so it can remain visible when the main process is killed.

android/app/src/main/AndroidManifest.xml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@compot-dev
compot-dev merged commit 963a3a0 into v2 Oct 12, 2026
1 check passed
@compot-dev
compot-dev deleted the fix/quick branch October 13, 2026 17:16
compot-dev added a commit that referenced this pull request Oct 15, 2026
fix: quick fixes for TV visibility, status overlay, crash handler, WebUI auth (#24 #25 #26 #29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant