Skip to content

Fix: Resolved CalledFromWrongThreadException in Camera Fragment#2060

Merged
pedroSG94 merged 1 commit intopedroSG94:masterfrom
TroyTheGod:fix-call-method-from-wrong-thread
Apr 1, 2026
Merged

Fix: Resolved CalledFromWrongThreadException in Camera Fragment#2060
pedroSG94 merged 1 commit intopedroSG94:masterfrom
TroyTheGod:fix-call-method-from-wrong-thread

Conversation

@TroyTheGod
Copy link
Copy Markdown
Contributor

Description

While testing the Camera Fragment, I encountered a CalledFromWrongThreadException indicating that a UI element was being accessed or updated from a background thread (DefaultDispatcher-worker-1).

This PR fixes the issue by ensuring that the specific UI update (or View access) is safely dispatched to the main thread.

Error Log

Attempt to call method from wrong thread. This will throw an exception in a future version. 
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Expected: main Calling: DefaultDispatcher-worker-1

@pedroSG94 pedroSG94 merged commit cfb8b1a into pedroSG94:master Apr 1, 2026
1 check passed
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