VoiceInteraction: Handle session delivery failure.

When the system connects to the VoiceInteractionSessionService, it
requests the service to create a new session. The service then delivers
this session to the system. Currently, a failure to deliver it is just
ignored, and the service continues to initialize the session. This
silently leaves the session in an invalid state where operations with it
always fail (since the system doesn't recognize the session).

There's currently a concurrency bug in the system server that causes the
session delivery to fail occasionally. Even with that fixed though, it's
good to handle unexpected errors here.

Fix: 178776751
Test: atest CtsVoiceInteractionTestCases --iterations
Change-Id: I3489db108158fa7c71179bee3d098ecd4ab6b2bd
2 files changed