Skip to content

fix: retry hardware bitmap failures with software decoding - #3287

Draft
SonAndE14 wants to merge 1 commit into
recloudstream:masterfrom
SonAndE14:fix/hardware-bitmap-runtime-fallback
Draft

SonAndE14 wants to merge 1 commit into
recloudstream:masterfrom
SonAndE14:fix/hardware-bitmap-runtime-fallback

Conversation

@SonAndE14

Copy link
Copy Markdown

Some Android devices fail to decode images with hardware bitmaps even when their hardware/model strings are not covered by the existing detection. Add a runtime fallback for that specific failure path while preserving the model-based workaround from #2765.

On a hardware-enabled request that returns a recognizable hardware-bitmap allocation/compatibility error, retry once with hardware disabled and ARGB_8888. Remember the fallback for the lifetime of that image loader. Requests already using software, unrelated HTTP/decoding failures, cancellation and fatal errors do not trigger a retry. Error-cause traversal handles wrapping and cycles.

The existing network client, request headers, caches, device detection and decoder configuration remain in place. This does not attempt to repair unavailable provider artwork, missing ratings or video links. #2640 is historical context, not an issue this PR claims to close.

Validation:

  • :app:testPrereleaseDebugUnitTest: 18 passing JVM tests, including 10 error-classification regression tests.
  • :app:assemblePrereleaseDebug: passed.
  • :library:checkKotlinAbi: passed.
  • :app:lintPrereleaseDebug: passed.

This is a draft: the new interceptor's runtime retry still needs an end-to-end test on physical affected hardware. A software-bitmap plugin previously worked on the owner's projector, but that is not validation of this exact retry path. Unit tests cover failure classification, not device decoding.

AI disclosure: implementation, code review and automated test execution used OpenAI Codex assistance. This is disclosed in accordance with AI-POLICY.md. Human review and the physical-device validation above remain necessary.

Kept separate from the fork's other UI, multi-source, download and experimental LAN features, following the maintainers' guidance to submit small contributions with a single scope.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants