VIMS: Simplify findAvailInteractor() by getting metadata in initial pm query.
Also reorders the conditional blocks for readability.
Currently, available interactors are queried and one of them is selected, then the
metadata for it is retrieved through the VoiceInteractionServiceInfo constructor.
With this change, both things are done in a single step. That might mean we retrieve some
unneeded data (the metadata for the packages that aren't selected), but optimizing it
isn't important since there's usually just one interactor.
Bug: 178410946
Test: atest CtsVoiceInteractionTestCases
Change-Id: I9a0d859f12d043f47f33a307609dbcf9de759e7e
1 file changed