SpatializerHelper: fix canBeSpatializedOnDevice NPE

Check whether routing is known when calling
canBeSpatializedOnDevice. Unknown routing is defined
by an empty list of devices for the requested
AudioAttributes.

Add test method in SpatializerHelper to force state.
Implement a unit test covering failure modes when
querying routing.

Test: atest com.android.server.audio.SpatializerHelperTest#testNoRoutingCanBeSpatialized
Bug: 267963974
Change-Id: Ib6d73fec4d57cf372361762b5c1d85329794de92
Merged-In: Ib6d73fec4d57cf372361762b5c1d85329794de92
(cherry picked from commit af85e232b7dc5503220900e0c998e54333bd5f4c)
2 files changed