AudioPolicyService: add check when creating the spatializer

Add a null pointer check on mAudioPolicyManager before calling
canBeVirtualized() in onFirstRef() to avoid continuous audioserver
crashes when a failure to init the audio HAL occurs.

Bug: 201230333
Test: make and boot
Change-Id: Idcf21e3ac2e6e3fdbdcb4f68217abdc15f9166e5
1 file changed