libaudiohal: only call getAudioPort if it is supported.

The getAudioPort API is supported since HAL version 3.0. Do not call
getAudioPort API if it is not supported.

Bug: 329548103
Test: dumpsys audio policy with USB device connected
Change-Id: I6e107c9a394bffc30728041c21b31e148d1d9f20
1 file changed