Skip to content

Comments

fix(android): handle null intent/action in PhoneConnectionService#138

Open
SERDUN wants to merge 1 commit intodevelopfrom
fix/null-action-crash-phone-connection-service
Open

fix(android): handle null intent/action in PhoneConnectionService#138
SERDUN wants to merge 1 commit intodevelopfrom
fix/null-action-crash-phone-connection-service

Conversation

@SERDUN
Copy link
Member

@SERDUN SERDUN commented Feb 23, 2026

Summary

  • Fix IllegalArgumentException("Unknown action: null") crash in PhoneConnectionService.onStartCommand
  • Make intent parameter nullable and add null-safe check before calling ServiceAction.from()
  • Gracefully return START_NOT_STICKY when intent or action is null, matching behavior of other services (IncomingCallService, ActiveCallService)

Context

On some devices (notably LGE), Android may restart the service with a null intent or an intent missing its action extra when the app is in the background. This was causing a crash in ServiceAction.from() because it throws on null input.

…tartCommand

On some devices (notably LGE), the system may restart the service with
a null intent or an intent missing its action extra when the app is in
the background. This caused an IllegalArgumentException in
ServiceAction.from() with "Unknown action: null". Now gracefully
returns START_NOT_STICKY when intent or action is null.

Co-Authored-By: Claude Opus 4.6 <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.

2 participants