Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8e09cdc authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Android (Google) Code Review
Browse files

Merge "AudioSystem: Add log for failed commands"

parents bc12cde5 5caa57dd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -269,8 +269,11 @@ static sp<JNIAudioPortCallback> setJniCallback(JNIEnv* env,
    return old;
}

static int check_AudioSystem_Command(status_t status)
#define check_AudioSystem_Command(status) _check_AudioSystem_Command(__func__, (status))

static int _check_AudioSystem_Command(const char* caller, status_t status)
{
    ALOGE_IF(status, "Command failed for %s: %d", caller, status);
    switch (status) {
    case DEAD_OBJECT:
        return kAudioStatusMediaServerDied;