Infeasible
Status Update
Comments
en...@google.com <en...@google.com>
da...@google.com <da...@google.com>
ma...@google.com <ma...@google.com> #2
We are aware, but as you said there is nothing we can really do now. I agree it's a weird inconsistency, we'll look at our review processes around this, but there is nothing actionable I can really do to address it.
ma...@gmail.com <ma...@gmail.com> #3
Perhaps the only thing you can do is modify (u)int
s instead of status_t
, and maybe even add some (doc)comments. That should prevent some future confusion and hopefully not lead to someone returning the "correct" negative status_t
constants in some new API or codepath in the future (either intentional or by forwarding an API that already returns negative error codes).
Thanks either way!
Description
The public header and documentation for
AThermal
bindings describe that most functions returnint
with positive error codes.However, internally in its implementation it uses described as being negative , which makes at least internal use of this type wrong. And it is confusing nonetheless, as more NDK APIs (
status_t
values. All validstatus_t
values areSurfaceTexture
,HardwareBuffer
,NativeWindow
,InputQueue
) are expected to return negative error codes.I guess we can't expect this to change, as the API is already public and the documentation doesn't state the expected return values are negative. Just letting you know that this is an unnecessary inconsistency once again.