c2 hal: handle C2_BAD_INDEX

In Codec 2.0 API query/config may return C2_BAD_INDEX but has valid
out params. In AIDL when the result is not OK the out params are
invalidated. To reconcile the differences, HAL adaptation returns OK
for C2_BAD_INDEX and the client side recovers the error code from the
out params.

Bug: 315555457
Test: atest android.media.decoder.cts.DecoderTest
Change-Id: If7c285929b0e7782ea305d5f1e268ff28900f2b5
2 files changed