From 0c7d58b00a1da730aeef0e2a7dae6b7134786006 Mon Sep 17 00:00:00 2001 From: Daniel Van Veen Date: Tue, 28 Nov 2017 15:53:09 +1100 Subject: [PATCH] Fix inequality typo in StreamIn::getCapturePosition This was preventing getCapturePosition() being called from the default HIDL implementation. Test: cts-tradefed run cts -m CtsMediaTestCases \ -t android.media.cts.AudioRecordTest Change-Id: I9c920108f68fb895a7f7a9d2ea27c291a91c1afb --- audio/2.0/default/StreamIn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp index 575a4f47f5..3ed55a3aaf 100644 --- a/audio/2.0/default/StreamIn.cpp +++ b/audio/2.0/default/StreamIn.cpp @@ -419,7 +419,7 @@ Result StreamIn::getCapturePositionImpl(audio_stream_in_t* stream, // spam the log in this case. static const std::vector ignoredErrors{ENOSYS}; Result retval(Result::NOT_SUPPORTED); - if (stream->get_capture_position != NULL) return retval; + if (stream->get_capture_position == NULL) return retval; int64_t halFrames, halTime; retval = Stream::analyzeStatus("get_capture_position", stream->get_capture_position(stream, &halFrames, &halTime),