Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ class PhoneConnectionService : ConnectionService() {
dispatcher.dispatch(baseContext, event, data?.toBundle())
}

override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
val action = ServiceAction.from(intent.action)
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
val action = intent?.action?.let { ServiceAction.from(it) } ?: run {
Log.w(TAG, "onStartCommand called with null intent or action, ignoring")
return START_NOT_STICKY
}
val metadata = intent.extras?.let { CallMetadata.fromBundle(it) }

try {
Expand All @@ -88,7 +91,6 @@ class PhoneConnectionService : ConnectionService() {
Log.e(TAG, "Exception $e with service action: ${intent.action},")
}


return START_NOT_STICKY
}

Expand Down
Loading