History log of /frameworks/native/libs/binder/Parcel.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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