Log if a remote call to the service has failed. The log records
provide info about the calling function and the actual
status. This is useful for debugging from logs since not every
client logs an error, and that log will anyway lack the original
status code.
Test: make
Change-Id: I5a7ff1698f443d37c2d57e2dc3c2ec686debfdec
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;