History log of /frameworks/native/libs/binder/Parcel.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a4cff88d80bf1acbdbd063af88ecad83a8b9b7b4 14-Nov-2014 Dianne Hackborn <hackbod@google.com> Fix issue #18356768: some app process may hang at Runtime#exit...

...in Parcel destructor

Don't use a Mutux object, just use simple posix mutex primitives,
to avoid static init/destroy order problems.

Change-Id: Ic012d94297564c0a55d58869f8276d7d10545fbc
/frameworks/native/libs/binder/Parcel.cpp
7e790af756d7891cb1cf1374bb283a8fbcbe6b49 11-Nov-2014 Dianne Hackborn <hackbod@google.com> Add tracking of parcel memory allocations.

Change-Id: I76ffed0e69ccfe70e87d98646f11d4de7c3fd980
/frameworks/native/libs/binder/Parcel.cpp
fee99040de000a64f6036a7db172fb7c68d9764a 04-Nov-2014 Jesse Hall <jessehall@google.com> Revert "Add more logging for dup(fd) failure"

Underlying bug has been fixed, extra debug code no longer needed

This reverts commit 36273c991b189c5516819f4d5e3f83061c320593.

Change-Id: Ia47f1ae9ee7338329bfb8d710aff57e15e944f20
/frameworks/native/libs/binder/Parcel.cpp
8e5cf83afbe2b671f96d04786cf0d0f967e342f9 04-Nov-2014 Jesse Hall <jessehall@google.com> Revert "Parcel: extra validation/debug code for writeDupFileDescriptor"

Underlying bug has been fixed, extra debug code no longer needed.

This reverts commit ccf851f108c008d086b7f3c3923d60d385985e71.

Change-Id: I19ad9239efdf1d8f70cd74af9b7c2ae97713208f
/frameworks/native/libs/binder/Parcel.cpp
9ea09757fa63ad2a9bea9c846b51c1210d69c79f 08-Oct-2014 Narayan Kamath <narayan@google.com> Fix broken error check in Parcel::readBlob

mmap returns MAP_FAILED (which is -1) and not NULL on
failure.

Diagnosed by cferris.

bug: 17909809

Change-Id: I609788ebf94742ef88af002d2d3f3bc9b9e520ac
/frameworks/native/libs/binder/Parcel.cpp
ccf851f108c008d086b7f3c3923d60d385985e71 06-Oct-2014 Jesse Hall <jessehall@google.com> Parcel: extra validation/debug code for writeDupFileDescriptor

Temporary extra debug validation for b/17477219: a Parcel recipient is
getting a positive but invalid fd unexpectedly. Trying to track down
where it's coming from.

Debug code for bug: 17477219
Change-Id: Idb1e71621025a3928c7adc88fd44790e1abd2a01
/frameworks/native/libs/binder/Parcel.cpp
36273c991b189c5516819f4d5e3f83061c320593 02-Oct-2014 Michael Lentine <mlentine@google.com> Add more logging for dup(fd) failure

Bug: 17477219
Change-Id: Ide0ae16d777c9af783023c705c18a93c00999147
/frameworks/native/libs/binder/Parcel.cpp
7da40c0a84dd89e92201448dd5ed3387dc94df2b 12-Jun-2014 Narayan Kamath <narayan@google.com> Remove Parcel::writeIntPtr.

All uses of this API have been removed. It should
never have been made public in the first place.

bug: 15424960
Change-Id: Id07d24ec95b2b393e6da138a7e8a9a4ecebeca94
/frameworks/native/libs/binder/Parcel.cpp
87947be61828a43fc738ffd204f72ab18b31946e 04-Jun-2014 Narayan Kamath <narayan@google.com> Merge "Fix mips build for libbinder."
2c68d380c9ef765a7d46e5a4735f39e6c27849f2 04-Jun-2014 Narayan Kamath <narayan@google.com> Fix mips build for libbinder.

Mips specific code was using an uninitialized variable.

Change-Id: I445043c76ebfa420b26376ade60f8068b4ea0b11
/frameworks/native/libs/binder/Parcel.cpp
b09b936d8ec7f1afe77f4f53ff4d4920c8b59092 03-Jun-2014 Mark Salyzyn <salyzyn@google.com> am f0a24759: am a28750ee: Merge "binder: Turn on -Werror"

* commit 'f0a2475905786d5457e7af838ac714acbfdafa4f':
binder: Turn on -Werror
f0a2475905786d5457e7af838ac714acbfdafa4f 03-Jun-2014 Mark Salyzyn <salyzyn@google.com> am a28750ee: Merge "binder: Turn on -Werror"

* commit 'a28750eec38c848230adfeef28725b29cc36a9da':
binder: Turn on -Werror
d4ecccfd206604a9b2d8a1220844fc2df85a5998 31-May-2014 Mark Salyzyn <salyzyn@google.com> binder: Turn on -Werror

Change-Id: I0ee785927a7ae5f731b02176b0b781b87c22a24e
/frameworks/native/libs/binder/Parcel.cpp
13de7f1defd259f41da9d1044c8aec779c60c1c4 05-May-2014 Jesse Hall <jessehall@google.com> am 57fdbbda: am 4314ccd1: am 70278fbf: Merge "Add error message for hints when exceptions occur during binder transactions."

* commit '57fdbbda2c475d2abdd828177f942ddb6d164bef':
Add error message for hints when exceptions occur during binder transactions.
57fdbbda2c475d2abdd828177f942ddb6d164bef 05-May-2014 Jesse Hall <jessehall@google.com> am 4314ccd1: am 70278fbf: Merge "Add error message for hints when exceptions occur during binder transactions."

* commit '4314ccd1ba9fe773b0fc91f0a08dc536ebce8dfe':
Add error message for hints when exceptions occur during binder transactions.
4314ccd1ba9fe773b0fc91f0a08dc536ebce8dfe 05-May-2014 Jesse Hall <jessehall@google.com> am 70278fbf: Merge "Add error message for hints when exceptions occur during binder transactions."

* commit '70278fbfe012c1fce3e63a41ffb9feaf1e53a64a':
Add error message for hints when exceptions occur during binder transactions.
abf8a2c608cb5f0d1523ab7d0c56e0da8a09cc87 29-Apr-2014 Jun Jiang <jun.a.jiang@intel.com> Add error message for hints when exceptions occur during binder transactions.

It can help to detect some kind of error, such as why GraphicBuffer::flatten
will crash when handle is null.

Change-Id: I703cd035b96edb7afb324cf24d8230d4e55f4f52
Signed-off-by: Jun Jiang <jun.a.jiang@intel.com>
/frameworks/native/libs/binder/Parcel.cpp
75d840693466125f14613e736fdd6a557f1f8dff 18-Mar-2014 Kenny Root <kroot@google.com> am ca609e43: am 38e2aaaa: am 5b61ad2c: Check the padded size of the read byte array

* commit 'ca609e4300d88ad1e815581ebc6a478b446d3882':
Check the padded size of the read byte array
ca609e4300d88ad1e815581ebc6a478b446d3882 17-Mar-2014 Kenny Root <kroot@google.com> am 38e2aaaa: am 5b61ad2c: Check the padded size of the read byte array

* commit '38e2aaaa3dd62a20eb211808ae6fe45ec37ee6d5':
Check the padded size of the read byte array
9ff2aad010f77a7f095d2802587775a59ed2384a 17-Mar-2014 Kenny Root <kroot@google.com> am 5b61ad2c: Check the padded size of the read byte array

* commit '5b61ad2cda8ec8ab634ce02f388bb2d3c5ab048d':
Check the padded size of the read byte array
5b61ad2cda8ec8ab634ce02f388bb2d3c5ab048d 17-Mar-2014 Kenny Root <kroot@google.com> Check the padded size of the read byte array

Bug: 13509200
Change-Id: Id93894fcc617ec1cd4ce66921c6e1f1c3cf40b09
/frameworks/native/libs/binder/Parcel.cpp
ce9f107c9d9ad4fdc0ad43ccd545823caa3cf933 15-Mar-2014 Marco Nelissen <marcone@google.com> am 793be12c: am b730a452: am f0190bff: Add support for writing byte arrays to parcels

* commit '793be12c0f5a7878d1085e94e58a9c36c84f0911':
Add support for writing byte arrays to parcels
793be12c0f5a7878d1085e94e58a9c36c84f0911 15-Mar-2014 Marco Nelissen <marcone@google.com> am b730a452: am f0190bff: Add support for writing byte arrays to parcels

* commit 'b730a45216991cf22c39451c47393b4bccae111b':
Add support for writing byte arrays to parcels
446ef4bae2605f4d4ef83c57803a9f8c2e901f8e 15-Mar-2014 Marco Nelissen <marcone@google.com> am f0190bff: Add support for writing byte arrays to parcels

* commit 'f0190bff38b6c29abbfc4a877442f71fc3d7dad8':
Add support for writing byte arrays to parcels
f0190bff38b6c29abbfc4a877442f71fc3d7dad8 13-Mar-2014 Marco Nelissen <marcone@google.com> Add support for writing byte arrays to parcels

b/13418320

Change-Id: I2285df9e9d3dc8a6a54055b13b352b81660bf45d
/frameworks/native/libs/binder/Parcel.cpp
614019cd1f73686f9f5883cf0a7505887f44af26 10-Mar-2014 Arve Hjønnevåg <arve@android.com> am d1c87d37: Merge changes I3432d9d3,I90fcf538,I64398603

* commit 'd1c87d37025c49f6a47fe43328572da495ff04c1':
Binder: Fix some valgrind errors.
Binder: Don't cast directly from a pointer to binder_uintptr_t
Binder: Disable attemptIncStrongHandle
8ff043d3fb0eb913aee9afe2a741bf0c30abb7d7 07-Mar-2014 Colin Cross <ccross@android.com> am 74be0f7b: Merge "binder: fix all warnings"

* commit '74be0f7be35e7b40a322fa9a407cb49265333a0b':
binder: fix all warnings
eea5b2984204a9da2a59a8092a4191a33c8e7640 07-Mar-2014 Arve Hjønnevåg <arve@android.com> am 58242fc2: Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...

* commit '58242fc29881cf29d56ee6e5fde6d73b16d0b67c':
ServiceManager: Implement PING_TRANSACTION
ServiceManager: Use 32/64 bit types from new binder header
Binder: Use 64 bit pointers in 32 processes if selected by the target
Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
Binder: Make binder portable
ServiceManager: Fix the binder interface
ServiceManager: Store handles in uint32_t instead of void *
ServiceManager: Generic Fixes
ServiceManager: Add extra error handling
ServiceManager: Fix Android.mk
ServiceManager: Make use of kernel exported structures
4cab0fd7f788995e3858f992ae760df1cfb7f63d 14-Feb-2014 Arve Hjønnevåg <arve@android.com> Binder: Make sure binder objects do not overlap

Fixes crashing part of bug 11355082.
The driver still leaks references.

Change-Id: Ibc6a63b151c1fc1f7666237f25255ba781e02071
/frameworks/native/libs/binder/Parcel.cpp
3c98ba77b9c44037a63d84d185d4128216d8b38a 22-Feb-2014 Arve Hjønnevåg <arve@android.com> am c5294424: am d1c87d37: Merge changes I3432d9d3,I90fcf538,I64398603

* commit 'c5294424386bedad2a240074d0845999f28e662d':
Binder: Fix some valgrind errors.
Binder: Don't cast directly from a pointer to binder_uintptr_t
Binder: Disable attemptIncStrongHandle
c5294424386bedad2a240074d0845999f28e662d 22-Feb-2014 Arve Hjønnevåg <arve@android.com> am d1c87d37: Merge changes I3432d9d3,I90fcf538,I64398603

* commit 'd1c87d37025c49f6a47fe43328572da495ff04c1':
Binder: Fix some valgrind errors.
Binder: Don't cast directly from a pointer to binder_uintptr_t
Binder: Disable attemptIncStrongHandle
ee319ab1d29f9cfd98752e8e3e876c9e7fccb264 20-Feb-2014 Arve Hjønnevåg <arve@android.com> am 6f286114: Revert "Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface"

* commit '6f286114ec1d597f3dae987bba6e72dbbc404e32':
Revert "Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface"
5febeff15f71f3826b91a51990c901746f97e950 20-Feb-2014 Arve Hjønnevåg <arve@android.com> am 9b5c3b91: am d5a354c6: am d06f6b00: am 67903293: Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface

* commit '9b5c3b9132831ba9078fc7c4001821bcfe8dd39d':
Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface
6f286114ec1d597f3dae987bba6e72dbbc404e32 20-Feb-2014 Arve Hjønnevåg <arve@android.com> Revert "Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface"

This branch has the new driver interface so it should not have this change.

This reverts commit 6790329358d1c84af2fe9ba093bcfc1c6176e758.

Change-Id: I9b6d0d653d98dbdb521ef964c5e7c2f14859d340
/frameworks/native/libs/binder/Parcel.cpp
9b5c3b9132831ba9078fc7c4001821bcfe8dd39d 20-Feb-2014 Arve Hjønnevåg <arve@android.com> am d5a354c6: am d06f6b00: am 67903293: Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface

* commit 'd5a354c6b7f2ae0b93e018f3024a2fca5f6543a1':
Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface
6790329358d1c84af2fe9ba093bcfc1c6176e758 20-Feb-2014 Arve Hjønnevåg <arve@android.com> Fix "Binder: Make sure binder objects do not overlap" to work old binder kernel interface

DO NOT MERGE into any branch that uses the new interface

Change-Id: Id54308a89327e69a389ac5916c052ad97f57cb28
/frameworks/native/libs/binder/Parcel.cpp
79aa621330e1fefcfc7ccf7c14ef51a8d0ea8c9c 19-Feb-2014 Arve Hjønnevåg <arve@android.com> am 7cc5b880: am e45636a8: am d437364e: am f50b9eaa: Binder: Make sure binder objects do not overlap

* commit '7cc5b8800c22790b0db9ea0af62fcad2cc998303':
Binder: Make sure binder objects do not overlap
7cc5b8800c22790b0db9ea0af62fcad2cc998303 19-Feb-2014 Arve Hjønnevåg <arve@android.com> am e45636a8: am d437364e: am f50b9eaa: Binder: Make sure binder objects do not overlap

* commit 'e45636a8674b9cbb9305648e21316210e1daf920':
Binder: Make sure binder objects do not overlap
07fd0f195db6d341cab4e54257f508d802c98832 19-Feb-2014 Arve Hjønnevåg <arve@android.com> Binder: Fix some valgrind errors.

When using 64 bit binder pointers, only initializing the 32 bit
handle, in a stack allocated struct, will pass uninitialized stack
data to the kernel and other processes.

Change-Id: I3432d9d36bb251d8ddb0a863661aeb80aabb3d92
/frameworks/native/libs/binder/Parcel.cpp
f50b9eaaeeaeae16981f11b05d3f3a6fb0dea30d 14-Feb-2014 Arve Hjønnevåg <arve@android.com> Binder: Make sure binder objects do not overlap

Fixes crashing part of bug 11355082.
The driver still leaks references.

Change-Id: Ibc6a63b151c1fc1f7666237f25255ba781e02071
/frameworks/native/libs/binder/Parcel.cpp
4ba492f23b6fb0d5a95174cc194ce04e1497c0d7 06-Feb-2014 Colin Cross <ccross@android.com> am 2b957503: am 74be0f7b: Merge "binder: fix all warnings"

* commit '2b957503b77c938e0698ffa8904e20c38c408d81':
binder: fix all warnings
6f4f3ab36c5ed1df84eb3a9f7475f0ac42952f58 06-Feb-2014 Colin Cross <ccross@android.com> binder: fix all warnings

Fix warnings related to casting pointers to ints, using %d or %ld to
print size_t/ssize_t, and unused parameters.

Change-Id: I7a13ba83d402952989c1f795cd9e880a95b98d9e
/frameworks/native/libs/binder/Parcel.cpp
88f6ad18de946307b9b1db68faad84b991528e88 03-Feb-2014 Arve Hjønnevåg <arve@android.com> am c93865de: am 58242fc2: Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...

* commit 'c93865de80a16d3638936890fb42eb175284044b':
ServiceManager: Implement PING_TRANSACTION
ServiceManager: Use 32/64 bit types from new binder header
Binder: Use 64 bit pointers in 32 processes if selected by the target
Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
Binder: Make binder portable
ServiceManager: Fix the binder interface
ServiceManager: Store handles in uint32_t instead of void *
ServiceManager: Generic Fixes
ServiceManager: Add extra error handling
ServiceManager: Fix Android.mk
ServiceManager: Make use of kernel exported structures
84e625ac1e01f5a9c3ed16664da6498212ed662b 29-Jan-2014 Arve Hjønnevåg <arve@android.com> Binder: Use 64 bit pointers in 32 processes if selected by the target

Uses new kernel header where void * has been replaced by binder_uintptr_t

Change-Id: Icfc67c2a279269f700343bd9246fd7cb94efe2c1
/frameworks/native/libs/binder/Parcel.cpp
f683e0163a84d93448b9388126902242367cd961 05-Nov-2013 Serban Constantinescu <serban.constantinescu@arm.com> Binder: Make binder portable

Changes include
- Binder attempts to cast pointers to a int datatype
which is not sufficient on a 64-bit platform.

- This patch introduces new read/write functions into
Parcel that allow pointers to be written using the
uintptr_t datatype for compile-time data type size
selection.

- Change access specifier for the methods above.

- Binder uses the 64bit android_atomic_release_cas64
(aka cmpxchg)

Change-Id: I595280541e0ba1d19c94b2ca2127bf9d96efabf1
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
/frameworks/native/libs/binder/Parcel.cpp
708cc794f6ccd4d31e0a00a23b289272c665adc1 16-Oct-2013 Marco Nelissen <marcone@google.com> Native counterpart of new power manager method

Cherrypicked from master.

b/9464621

Change-Id: I54c0ed50a57ac870da91db8589a73a2c792dbd8d
/frameworks/native/libs/binder/Parcel.cpp
5c0106e134366312206702f1b072347e20c90374 16-Oct-2013 Marco Nelissen <marcone@google.com> Native counterpart of new power manager method

Change-Id: I54c0ed50a57ac870da91db8589a73a2c792dbd8d
/frameworks/native/libs/binder/Parcel.cpp
cbe36fe1ec21e22e6649d47144c91260ba51d753 05-Sep-2013 Mike Lockwood <lockwood@google.com> Add support for sending and receiving ParcelFileDescriptors from native Binder code

Change-Id: I7f308e28ebac0755628e19c9b4d0d7399341b435
/frameworks/native/libs/binder/Parcel.cpp
e142428a9c8b9d2380032cd4d7b55ee440fe8770 30-Jul-2013 Mathias Agopian <mathias@google.com> Make Flattenable not virtual

Fallout from the Flattenable change, update all its uses.

Additionnaly, fix/tighten size checks when (un)flatten()ing
things.

Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)

The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).

Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
/frameworks/native/libs/binder/Parcel.cpp
af0f8c0a56b1b6b7fe20f34f04e0e15b518fb494 30-May-2013 Jeff Brown <jeffbrown@android.com> am 255405eb: am 86b2ecdd: Merge "fix mem leak on error handling"

* commit '255405eb19e6a3fa7f7bb4de9b07beacdf65ece9':
fix mem leak on error handling
3f727c0ea3ad1de512c935c6e80423f2115b46c0 09-Mar-2013 Hyejin Kim <hyejin.kim@lge.com> fix mem leak on error handling

Change-Id: I40d8e371c46184aa701fa676246201a9d8f6e27d
/frameworks/native/libs/binder/Parcel.cpp
002e1e58dfe19dd3e49a59c6827cbf51573941a2 07-May-2013 Mathias Agopian <mathias@google.com> libutils clean-up

Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
/frameworks/native/libs/binder/Parcel.cpp
cc1a4bb1e1da3f2f38bdaf1f76348c7bc9fb6adb 12-Jan-2013 Douglas Leung <douglas@mips.com> [MIPS] Avoid unaligned load/store for 64-bit doubles.

Change-Id: Iefdcac8742f23fef31f63730b48698fc4205c3ad
Signed-off-by: Douglas Leung <douglas@mips.com>
/frameworks/native/libs/binder/Parcel.cpp
1ba24574b2debd3ca012adbbd77f12bed4f2d266 03-May-2011 Magnus Strandberg <magnus.strandberg@sonyericsson.com> Aligning native Parcel implementation to Java.

The Java implementation of writing the RPC response header
calculates the length of the header including the 4 bytes
specifying the header length but the native implementation
excludes the 4 bytes specifying the length from the header
length.
The native implementation has been aligned to the Java impl.

Change-Id: I325bf272a63152d8fded4cf4e51a906b5a9bfe19
/frameworks/native/libs/binder/Parcel.cpp
e6f43ddce78d6846af12550ff9193c5c6fe5844b 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/native/libs/binder/Parcel.cpp
32397c1cd3327905173b36baa6fd1c579bc328ff 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
/frameworks/native/libs/binder/Parcel.cpp
a19954ab377b46dbcb9cbe8a6ab6d458f2e32bca 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
/frameworks/native/libs/binder/Parcel.cpp
9d4536835248525f32f1504a3d28d5bbfa0a2910 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/native/libs/binder/Parcel.cpp
d341c7178fffc7ad5b57645c2bcf5a395ca95591 05-Nov-2011 Jeff Brown <jeffbrown@google.com> Fix possible leak in Parcel::writeDupFileDescriptor.

Also, check the result of dup() just in case we got EMFILE
or something.

Change-Id: I18e627bd84f4c7941813fe1c2bad2cdd9e5afa83
/frameworks/native/libs/binder/Parcel.cpp
c17f56fdf11d5c5207d02d457692a40252aa3f34 07-Nov-2011 Jeff Brown <jeffbrown@google.com> am 88061d6b: am 5462bc63: Fix a leak in Parcel::writeBlob.

* commit '88061d6b38cfb4bf374039846b753a3b21ac61e1':
Fix a leak in Parcel::writeBlob.
93ff1f985e233fe04412a65041e977c9f0c21f5b 05-Nov-2011 Jeff Brown <jeffbrown@google.com> Fix a leak in Parcel::writeBlob.

Was mistakenly assuming that Parcel::writeFileDescriptor took
ownership of the fd that was passed in. It does not!
Added some comments and a default parameter to allow the caller
to specify whether it wishes the Parcel to take ownership.

Bug: 5563374
Change-Id: I5a12f51d582bf246ce90133cce7690bb9bca93f6
/frameworks/native/libs/binder/Parcel.cpp
6807e59e0ff943cc6225d46e3c33a8a7eae9b3d7 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/native/libs/binder/Parcel.cpp
9f760150f6e0f39b9923cfdc875373606839ee00 12-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/141576

Bug: 5449033
Change-Id: I42575e7c29cf1c0f465c357a5c97ab118df6f473
/frameworks/native/libs/binder/Parcel.cpp
ec4e0063a1c5cc6e01472cc2a9d27609ce3827d7 10-Oct-2011 Jeff Brown <jeffbrown@google.com> Use ashmem for CursorWindows.
Bug: 5332296

The memory dealer introduces additional delays for reclaiming
the memory owned by CursorWindows because the Binder object must
be finalized. Using ashmem instead gives CursorWindow more
direct control over the lifetime of the shared memory region.

The provider now allocates the CursorWindows and returns them
to clients with a read-only protection bit set on the ashmem
region.

Improved the encapsulation of CursorWindow. Callers shouldn't
need to care about details like how string fields are allocated.

Removed the compile-time configuration of string and numeric
storage modes to remove some dead weight.

Change-Id: I07c2bc2a9c573d7e435dcaecd269d25ea9807acd
/frameworks/native/libs/binder/Parcel.cpp
7746cc318829358bb2c4dc0a03d40a7856a6d13e 04-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix handling of "allow fds" state.

Didn't take into account nesting of bundles. Boo.

Change-Id: Ic8cf21ad8d6f4938a3e105128624c9d162310d01
/frameworks/native/libs/binder/Parcel.cpp
5707dbf15d0b44c88fbaa6dd271097f2d42932e0 24-Sep-2011 Jeff Brown <jeffbrown@google.com> Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: If385a66adf4c6179a0bb49c0e6d09a9567e23808
/frameworks/native/libs/binder/Parcel.cpp
8938ed2c8e906fc332301b64787728d4d34da571 29-Sep-2011 Dianne Hackborn <hackbod@google.com> Add mechanism for Parcel to not allow FDs to be written to it.

This is to help implement issue #5224703.

Change-Id: I026a5890495537d15b57fe61227a640aac806d46
/frameworks/native/libs/binder/Parcel.cpp
8acda7803417cc38cb284298fcb86b479d11fdb5 25-Sep-2011 Bart Sears <bsears@google.com> Revert "Transfer large bitmaps using ashmem. Bug: 5224703"

This reverts commit 56c58f66b97d22fe7e7de1f7d9548bcbe1973029

This CL was causing the browser to crash when adding bookmarks, visiting the bookmarks page, and sharing pages (see bug http://b/issue?id=5369231
/frameworks/native/libs/binder/Parcel.cpp
f4c1088d750a182bd85889c86b3c9ef4ba772405 24-Sep-2011 Jeff Brown <jeffbrown@google.com> Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: Ic7481dd9f173986f085a8bbdcc59bbe9830d7a44
/frameworks/native/libs/binder/Parcel.cpp
6e9eb7453fe81fd0bb06eaa263c1767765ef5a78 18-Apr-2011 Andreas Huber <andih@google.com> Merge "Parcel::appendFrom({const } Parcel *parcel, size_t, size_t)"
97e2bcd76021b31c5064fd3f669bc3f450b4c952 14-Apr-2011 Dianne Hackborn <hackbod@google.com> Rewrite battery history storage.

We now write battery history directly into a buffer, instead of
creating objects. This allows for more efficient storage; later
it can be even better because we can only write deltas.

The old code is still there temporarily for validation.

Change-Id: I9707d4d8ff30855be8ebdc93bc078911040d8e0b
/frameworks/native/libs/binder/Parcel.cpp
51faf46e2958c57dab46d9420e585319125c7c42 13-Apr-2011 Andreas Huber <andih@google.com> Parcel::appendFrom({const } Parcel *parcel, size_t, size_t)

As far as I can tell "parcel" isn't actually modified by the implementation.

Change-Id: Ib806eefdc13c97b932773e1dc9ca3a4aad4422b2
/frameworks/native/libs/binder/Parcel.cpp
d1dff8d4d47a5f9142a22b11950adc55ea2b36df 15-Dec-2010 Pravat Dalbehera <pravat.dalbehera@sonyericsson.com> Fix for writing empty strings to Parcel::writeString8()

If writeString8 is called with the following sequence:

writeString8(String8(""));
writeString8(String8("TempString"));

Then in the readString8, the 2nd String i.e. "TempString" is not read,
instead an empty string is read.

The bug comes because of the write call for String8("") where there are
no String bytes present. In the write Statement, an extra ‘\0’ is
written. During the Marshalling, Following bytes are written:

1 2 3 4 5 ...
0x0 0x0 0xB ‘T’ ‘e’ ...

The readString8 function has a check that, if String length is 0, don’t
read anything. So the first byte is read as the length for the first
string. The second byte i.e. ‘\0’ is read as the length for the second
string and hence the second string becomes empty too.

Change-Id: Id7acc0c80ae16e77be4331f1ddf69ea87e758420
/frameworks/native/libs/binder/Parcel.cpp
5273603e98d2db3bac656b7bcf5352c04c86d62f 31-Aug-2010 Brad Fitzpatrick <bradfitz@android.com> Don't propagate StrictMode over one-way Binder calls.

This was causing stack stitching problems where a one-way call with
violations followed by a two-way call without violations was getting
the previous one-way call's violation stack stitched on to the second
caller's stack.

The solution is a little more indirect than I would've liked
(preserving the binder's onTransact flags until enforceInterface) but
was seemingly necessary to work without changing the AIDL compiler.
It should also be sufficiently cheap, since no new calls to
thread-local IPCThreadState lookups were required. The additional
work is just same-thread getter/setters on the existing
IPCThreadState.

Change-Id: I4b6db1d445c56e868e6d0d7be3ba6849f4ef23ae
/frameworks/native/libs/binder/Parcel.cpp
70081a1511955f53bd0ed7f2aec9a1bf09f0f379 27-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> Replace several IPCThreadState::get() lookups with one.

Also, make StrictMode's ThreadLocal final.

Change-Id: I08d400ed254fa67bb7a3dae1227f205a54c00df0
/frameworks/native/libs/binder/Parcel.cpp
d36f4a5f130be7f7b29a8b63cedbc8edfa56db96 12-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> StrictMode: gather and return violating stacks in Binder replies

Now, when Thread A has a strict mode policy in effect and does a
Binder call to Thread B (most likely in another process), the strict
mode policy is passed along, but with the GATHER penalty bit set which
overrides other policies and instead gathers all offending stack
traces to a threadlocal which are then written back in the Parcel's
reply header.

Change-Id: I7d4497032a0609b37b1a2a15855f5c929ba0584d
/frameworks/native/libs/binder/Parcel.cpp
a877cd85b5a026384542e3271fc310d6a8fe24c6 08-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> More StrictMode work, keeping Binder & BlockGuard's thread-locals in-sync.

Change-Id: Ia67cabcc17a73a0f15907ffea683d06bc41b90e5
/frameworks/native/libs/binder/Parcel.cpp
837a0d0fb2c3fba8082d47d04cb6120af1eb9a54 14-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> 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
/frameworks/native/libs/binder/Parcel.cpp
702ea9d42f52fc145090c0f0bfbe64993e4b8b33 18-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> Start of work on passing around StrictMode policy over Binder calls.

This is (intendend to be) a no-op change.

At this stage, Binder RPCs just have an additional uint32 passed around
in the header, right before the interface name. But nothing is actually
done with them yet. That value should right now always be 0.

This now boots and seems to work.

Change-Id: I135b7c84f07575e6b9717fef2424d301a450df7b
/frameworks/native/libs/binder/Parcel.cpp
98e71ddaede9a0bfb681fd237bec1f66c6c53193 12-Feb-2010 Mathias Agopian <mathias@google.com> remove a dependency of GraphicBuffer (libui) on Parcel (libbinder).

Add a Flattenable interface to libutils which can be used to flatten
an object into bytestream + filedescriptor stream.
Parcel is modified to handle Flattenable. And GraphicBuffer implements
Flattenable.

Except for the overlay classes libui is now independent of libbinder.
/frameworks/native/libs/binder/Parcel.cpp
84a6d041e2c69d4d0b69269a0b59e725c9f119a3 17-Aug-2009 Andreas Huber <andih@google.com> Support for marshalling pointers / intptr_t in Parcel.

Some refactoring to eliminate code duplication in Parcel implementation.
/frameworks/native/libs/binder/Parcel.cpp
1d0a95b12a9194f64dd436224ec3bf8e0622d678 01-Aug-2009 Mathias Agopian <mathias@google.com> don't crash in Parcel when given a null (and therfore invalid) native_handle_t
/frameworks/native/libs/binder/Parcel.cpp
83c0446f27b9542d6c2e724817b2b2d8d1f55085 23-May-2009 Mathias Agopian <mathias@google.com> some work to try to reduce the code size of some native libraries

- make sure that all binder Bn classes define a ctor and dtor in their respective library.
This avoids duplication of the ctor/dtor in libraries where these objects are instantiated.
This is also cleaner, should we want these ctor/dtor to do something one day.

- same change as above for some Bp classes and various other non-binder classes

- moved the definition of CHECK_INTERFACE() in IInterface.h instead of having it everywhere.

- improved the CHECK_INTERFACE() macro so it calls a single method in Parcel, instead of inlining its code everywhere

- IBinder::getInterfaceDescriptor() now returns a "const String16&" instead of String16, which saves calls to String16 and ~String16

- implemented a cache for BpBinder::getInterfaceDescriptor(), since this does an IPC. HOWEVER, this method never seems to be called.
The cache makes BpBinder bigger, so we need to figure out if we need this method at all.
/frameworks/native/libs/binder/Parcel.cpp
4e97f8c62f3eb3c51343e9f4bbd898992a13903d 22-May-2009 Android (Google) Code Review <android-gerrit@google.com> am d50a458b: Merge change 2351 into donut

Merge commit 'd50a458bb291801ab9fdc119301bc7b84b42a6e3'

* commit 'd50a458bb291801ab9fdc119301bc7b84b42a6e3':
Fix a major bug in Bundle when unparcelling from AIDL.
a47f02afb1e1f2c4abd9379c13903a5dde89d354 22-May-2009 Mathias Agopian <mathias@google.com> change 2115 wasn't merged properly into master. this fixes that.

Merge change 2115 into donut

* changes:
bring the native_handle stuff back from master_gl

Conflicts:

libs/binder/Parcel.cpp
/frameworks/native/libs/binder/Parcel.cpp
c5b2c0bf8007562536b822eb060fc54a01f8e08b 20-May-2009 Mathias Agopian <mathias@google.com> move libbinder's header files under includes/binder
/frameworks/native/libs/binder/Parcel.cpp
208059f67ed2dd9fa025e07fcb6954d3cb61c79e 19-May-2009 Mathias Agopian <mathias@google.com> checkpoint: split libutils into libutils + libbinder
/frameworks/native/libs/binder/Parcel.cpp