Skip to content
Commit d06ad212 authored by Nicholas Ambur's avatar Nicholas Ambur
Browse files

send onFailure callback for asyncronous exceptions

A ChangeId is added and only applied for clients with target SDK UDC and
above.

If the ChangeId is enabled, we will still mark the internal availability
state as STATE_ERROR, but we will send onFailure callback instead. This
allows for the client to get the full exception message detail.

If the ChangeId is not enabled, then STATE_ERROR is still propagated to
the client via onAvailabilityChanged.

One other update here is that we are catching all exceptions in the
async task.  This resolves the case where uncaught exceptions would
crash the client's VoiceInteractionService process.

Test: Manually throw an exception from system service to verify
callback
Test: atest CtsVoiceInteractionTestCases
Fixes: 280471513
Bug: 272147641

Change-Id: I316e5f545eed88e490bab2e0a052c051cc0cc94e
parent 619bfd92
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment