fix issues with VoiceInteractionService start

VoiceInteractionService can get started by ActivityManager. Due to
background restrictions this call to startService requires the target
application to be in the foreground. If that is not the case this
currently causes a crash of the current foreground application.

Instead we catch the exception. To allow the VoiceInteractionService to
start it is added to the whitelist for 20s.

Bug: 119424643
Test: manually verified VoiceInteractionService can start even if application is not in the foreground
Change-Id: I3999183dca0e894f2e42d85a364cfa93ce2ddd17
1 file changed