Skip to content

Better error messages if remote service connection dies (DeadObjectException) - #1822

Merged
d4rken merged 1 commit into
mainfrom
error-deadobject
Jun 5, 2025
Merged

d4rken merged 1 commit into
mainfrom
error-deadobject

Conversation

@d4rken

@d4rken d4rken commented Jun 5, 2025

Copy link
Copy Markdown
Member

Closes #1821

This commit introduces a new `ServiceConnectionLostException` which wraps `android.os.DeadObjectException`. This allows for more specific error handling and user-facing messages when an IPC connection to a service is lost.

The `refineException()` extension function is added to `Throwable` to automatically convert `DeadObjectException` instances into `ServiceConnectionLostException`. This function is now used in `ShellOpsClient`, `FileOpsClient`, and `PkgOpsClient` instead of the previous `unwrapPropagation()`.

Additionally, new string resources have been added to provide localized titles and descriptions for this specific error condition, guiding the user to reboot or report the issue.

The `getStackTracePeek()` function's visibility has been changed to `internal` as it's primarily used within the error handling mechanism.
@d4rken d4rken added c: IO SAF/Normal/Root access c: Debug Debugging related features/issues labels Jun 5, 2025
@d4rken
d4rken merged commit 6ecef7c into main Jun 5, 2025
@d4rken
d4rken deleted the error-deadobject branch June 5, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: Debug Debugging related features/issues c: IO SAF/Normal/Root access

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System Cleaner fails at DeadObjectException

1 participant