replicant-frameworks_native/include/binder
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.h Make static versions of libutils and libbinder. 2010-05-06 01:03:31 -07:00
BpBinder.h some work to try to reduce the code size of some native libraries 2009-05-26 16:12:20 -07:00
IBinder.h Propagate background scheduling class across processes. 2009-12-07 19:11:14 -08:00
IInterface.h Allow META* macros outside of the framework 2010-04-20 14:14:30 -07:00
IMemory.h fix [2599939] "cannot play video" after open/close a video player a dozen of times 2010-04-19 19:09:03 -07:00
IPCThreadState.h Start of work on passing around StrictMode policy over Binder calls. 2010-06-21 12:56:35 -07:00
IPermissionController.h move libbinder's header files under includes/binder 2009-05-20 12:55:03 -07:00
IServiceManager.h new Permission class used to improve permission checks speed (by caching results) 2009-06-15 21:56:51 -07:00
MemoryBase.h move libbinder's header files under includes/binder 2009-05-20 12:55:03 -07:00
MemoryDealer.h Simplify the MemoryDealer implementation 2010-01-29 14:51:06 -08:00
MemoryHeapBase.h fix [2599939] "cannot play video" after open/close a video player a dozen of times 2010-04-19 19:09:03 -07:00
MemoryHeapPmem.h fix [2599939] "cannot play video" after open/close a video player a dozen of times 2010-04-19 19:09:03 -07:00
Parcel.h Add Parcel::readExceptionCode() and Parcel::writeNoException() 2010-07-13 15:45:18 -07:00
Permission.h new Permission class used to improve permission checks speed (by caching results) 2009-06-15 21:56:51 -07:00
ProcessState.h move libbinder's header files under includes/binder 2009-05-20 12:55:03 -07:00