Check for valid buffer size before proceeding with testCreateAudioRecord.

Check the return value for buffer size is valid before continue testing.
In case buffer size is invalid, check if there is a microphone.
AudioRecord.getMinBufferSize() does not have audio source argument.  It
could return an invalid value if there is no microphone.  Use an alternative
buffer size if the returned value is in valid and there is no microphone.

Change-Id: I91e257d50e22fc53d0b62bfe1ca95afa9b20a3cb
Signed-off-by: Tochau Hoang <tochau.hoang@panasonic.aero>
1 file changed