Merge "Fix problem in AudioEffect::command() status." into gingerbread

This commit is contained in:
Eric Laurent
2010-09-02 12:46:24 -07:00
committed by Android (Google) Code Review

View File

@@ -5992,12 +5992,14 @@ status_t AudioFlinger::EffectHandle::command(uint32_t cmdCode,
p, p,
&rsize, &rsize,
&reply); &reply);
if (ret == NO_ERROR) { // stop at first error encountered
if (reply != NO_ERROR) { if (ret != NO_ERROR) {
status = reply;
}
} else {
status = ret; status = ret;
*(int *)pReplyData = reply;
break;
} else if (reply != NO_ERROR) {
*(int *)pReplyData = reply;
break;
} }
mCblk->serverIndex += size; mCblk->serverIndex += size;
} }
@@ -6005,8 +6007,10 @@ status_t AudioFlinger::EffectHandle::command(uint32_t cmdCode,
mCblk->clientIndex = 0; mCblk->clientIndex = 0;
return status; return status;
} else if (cmdCode == EFFECT_CMD_ENABLE) { } else if (cmdCode == EFFECT_CMD_ENABLE) {
*(int *)pReplyData = NO_ERROR;
return enable(); return enable();
} else if (cmdCode == EFFECT_CMD_DISABLE) { } else if (cmdCode == EFFECT_CMD_DISABLE) {
*(int *)pReplyData = NO_ERROR;
return disable(); return disable();
} }