audiohal: Do not log if EINVAL is received from get_presentation_position
This happens often, and it's normal. Avoid logging it down as this
causes logspam.
Bug: 33353073
Change-Id: Ia3b1b8af61bdf83e9bcde0e5bed0285af037df45
Test: cause the system to play some sounds (e.g. UI clicks), watch logcat
diff --git a/audio/2.0/default/Stream.cpp b/audio/2.0/default/Stream.cpp
index 1b6d593..40f67f0 100644
--- a/audio/2.0/default/Stream.cpp
+++ b/audio/2.0/default/Stream.cpp
@@ -43,8 +43,8 @@
mStream = nullptr;
}
-Result Stream::analyzeStatus(const char* funcName, int status) {
- if (status != 0) {
+Result Stream::analyzeStatus(const char* funcName, int status, int ignoreError) {
+ if (status != 0 && status != -ignoreError) {
ALOGW("Stream %p %s: %s", mStream, funcName, strerror(-status));
}
switch (status) {