Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for TCL Android 12 Smart TVs. #5148

Closed
wants to merge 1 commit into from

Conversation

algrimes
Copy link
Contributor

Fixes #5140

A fix for a bug which caused scrcpy to crash generating a video stream on certain TCL Android TVs.

Manufacturer's custom code expects to have access information about the activity.
Fix follows similar pattern to workarounds for other manufacturers, providing them the fake context.

Scoped only to android 12.

@rom1v
Copy link
Collaborator

rom1v commented Jul 30, 2024

Thank you for your PR.

I'm considering enabling all workarounds by default (I'm not sure yet), that would also fix your issue: #5154.

rom1v pushed a commit that referenced this pull request Jul 31, 2024
@rom1v
Copy link
Collaborator

rom1v commented Jul 31, 2024

in any case, I will merge your commit first, in case the commit enabling all workarounds needs to be reverted in the future.

I edited your commit a bit to use the same if-branch as the other devices, and removing the Android version check (too specific I guess): https://github.com/Genymobile/scrcpy/commits/pr5148/

Is it ok for you?

@algrimes
Copy link
Contributor Author

algrimes commented Aug 1, 2024

Hi @rom1v ! Definitely cleaner to move it into the same branch but on removing the Android 12 scoping, its difficult to say as I don't have access to any other TCL devices (tvs, phones etc) for testing, but up to you - happy to merge like this if you are.

Defaulting to prefilling the fake context sounds sensible as it may be a smaller list of devices that in fact aren't compatible and perhaps a config flag could skip that step in a future design to avoid further code changes being needed.

@rom1v
Copy link
Collaborator

rom1v commented Aug 1, 2024

👍 merged f691ebb into dev.

@rom1v rom1v closed this Aug 1, 2024
FreedomBen pushed a commit to FreedomBen/scrcpy that referenced this pull request Aug 2, 2024
Gottox pushed a commit to Gottox/scrcpy that referenced this pull request Sep 29, 2024
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.

scrcpy crashes with NullPointerException displaying screen on TCL C805 Smart TV
2 participants