Skip to content

Fix crash when the liblcp native library cannot be loaded - #813

Draft
mickael-menu wants to merge 1 commit into
developfrom
fix-issue-796
Draft

mickael-menu wants to merge 1 commit into
developfrom
fix-issue-796

Conversation

@mickael-menu

@mickael-menu mickael-menu commented Jul 17, 2026

Copy link
Copy Markdown
Member

LcpClient.isAvailable() relied on tryOr, which only catches Exception. When loading liblcp.so fails — e.g. on some rooted devices or with Xposed — an UnsatisfiedLinkError (an Error) escaped and crashed the app instead of making LcpService() return null as documented.

isAvailable() now catches Throwable and logs the cause with Timber, so integrators can diagnose why LCP is unavailable in the field.

Fixes #796

🤖 Generated with Claude Code

LcpClient.isAvailable() relied on tryOr, which only catches Exception.
When loading liblcp.so fails - e.g. on some rooted devices or with
Xposed - an UnsatisfiedLinkError (an Error) escaped and crashed the app
instead of reporting LCP as unavailable. isAvailable() now catches
Throwable and logs the cause, so LcpService() returns null as
documented.

Fixes #796

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

UnsatisfiedLinkError: liblcp.so fails to load on devices with Xposed/LSPosed framework

1 participant