replicant-frameworks_native/include
Brad Fitzpatrick 837a0d0fb2 Add Parcel::readExceptionCode() and Parcel::writeNoException()
Add native Parcel methods analogous to the Java versions.

Currently, these don't do much, but upcoming StrictMode work changes
the RPC calling conventions in some cases, so it's important that
everybody uses these consistently, rather than having a lot of code
trying to parse RPC responses out of Parcels themselves.

As a summary, the current convention that Java Binder services use is
to prepend the reply Parcel with an int32 signaling the exception
status:

     0: no exception
     -1: Security exception
     -2: Bad Parcelable
     -3: ...
     -4: ...
     -5: ...

... followed by Parceled String if the exception code is non-zero.

With an upcoming change, it'll be the case that a response Parcel can,
non-exceptionally return rich data in the header, and also return data
to the caller.  The important thing to note in this new case is that
the first int32 in the reply parcel *will not be zero*, so anybody
manually checking for it with reply.readInt32() will get false
negative failures.

Short summary: If you're calling into a Java service and manually
checking the exception status with reply.readInt32(), change it to
reply.readExceptionCode().

Change-Id: I23f9a0e53a8cfbbd9759242cfde16723641afe04
2010-07-13 15:45:18 -07:00
..
binder Add Parcel::readExceptionCode() and Parcel::writeNoException() 2010-07-13 15:45:18 -07:00
pim auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
private allow re-targetting of surfaces 2010-06-08 20:10:02 -07:00
surfaceflinger Introduce official public NativeWindow type. 2010-06-30 15:32:04 -07:00
tts Update TTS plugin interface to receive engine configuration data 2010-03-18 11:52:41 -07:00
ui Add ANativeWindow API for directly drawing to the surface bits. 2010-07-09 16:58:19 -07:00
utils Add new glue code for writing native apps. 2010-07-08 11:06:59 -07:00