History log of /frameworks/base/core/java/android/os/Parcel.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9adf1c54226940e9f9065d92b4edd2b232122302 05-Feb-2015 John Spurlock <jspurlock@google.com> am ac7b9dd3: am 42d3b66f: am e0852368: Fix a few typos in Parcel.java.

* commit 'ac7b9dd39f64118a2129c17cdc7b6c93e53e1c42':
Fix a few typos in Parcel.java.
e08523684d5414117f81debd4eb14bc8eb494c29 04-Feb-2015 John Spurlock <jspurlock@google.com> Fix a few typos in Parcel.java.

Change-Id: Ic1674fc72f08a0f3536b4870a5ce7d14ee6fcc16
/frameworks/base/core/java/android/os/Parcel.java
fabb70b2efbd125f74923d19ab12bc8e1371ed1f 11-Nov-2014 Dianne Hackborn <hackbod@google.com> Add reporting of Parcel memory/count.

Also fix issue #18340771: Dumpsys Procstats missing a newline

Change-Id: I0c612187a3fb4d7eeafbf97d373efdef732c477e
/frameworks/base/core/java/android/os/Parcel.java
33d738a10209d4dc882a65285d6e71cfaeabe769 12-Sep-2014 Dianne Hackborn <hackbod@google.com> Allow throwing UnsupportedOperationException across Binder.

Change-Id: I3a9b81958886033d546c3a20331716dbb9492365
/frameworks/base/core/java/android/os/Parcel.java
5ef33984d0cc50bf4654b0d8e9557ac34d44fddd 05-Sep-2014 Jeff Sharkey <jsharkey@android.com> Move Size parceling to Bundle.

Size itself shouldn't be Parcelable, since that would be a layering
violation.

Bug: 17390381
Change-Id: Ica62709bd889db51c916c550a0146714b002baa3
/frameworks/base/core/java/android/os/Parcel.java
9c3e74f1f77d3b29ad47d2c74b0a0061e67c76f1 14-Aug-2014 Dianne Hackborn <hackbod@google.com> Fix issue #16794553: Duplicate ArrayMap entries in Bundle...

...can lead to launching of un-exported activities

We now validate the array map after unparcelling to make sure there
are no duplicate keys.

And to make up for the performance overhead this introduces, I switched
the parcelling/unparcelling code to write keys as explicit string
objects rather than generic values. There was no reason to use generic
values since the write method itself only accepts an array map with
String keys.

Change-Id: I57bda9eb79ceaaa9c1b94ad49d9e462b52102149
/frameworks/base/core/java/android/os/Parcel.java
39c12fab49075b715c253c68c84b5c10c3150197 26-Jul-2014 Sandeep Siddhartha <sansid@google.com> Use blob (shared memory) for large data in sound model/recognition event/config

Also add a missing null check in writeBlob

Bug: 16516353
Change-Id: Ie702f8daae541cab7c2cee6e13d49e7fc84c84e1
/frameworks/base/core/java/android/os/Parcel.java
90d7a3e996ee3a6e33e655341c5d301fbe30cd58 26-Jul-2014 Sandeep Siddhartha <sansid@google.com> Add read/writeBlob to Parcel

These are {@hide}en for now.

Bug: 16516353
Change-Id: Ie1635617ee8611a78be9068a7ce674e34c30301d
/frameworks/base/core/java/android/os/Parcel.java
719e6b167041ffaffc2245f692714c8de191863f 05-Apr-2014 Craig Mautner <cmautner@google.com> Introduce PersistableBundle

The PersistableBundle class is similar to Bundle except that only
objects that have meaning across reboots can be stored and there
is a limited number of types that can be stored. More
specifically Binders, FileDescriptors, Parcelables, Booleans,
Bytes, Shorts, Chars, CharSequences, Floats, and ArrayLists
cannot be stored.

Fixes bug 13736007.

Change-Id: If6595b2e6fd92af6b7f60c4f7140ae867c258794
/frameworks/base/core/java/android/os/Parcel.java
5784f159ab9da9dd89c82926abdda26916503325 21-Feb-2014 Elliott Hughes <enh@google.com> am 48dcf9d5: am d7d37256: am b2f07b27: am 4a809272: Merge "Fix documentation for Parcel.readException()."

* commit '48dcf9d5f59acf53a3ac0eda141ec323534a3321':
Fix documentation for Parcel.readException().
4a80927241b3168d9d5138c46c22385d6467a736 21-Feb-2014 Elliott Hughes <enh@google.com> Merge "Fix documentation for Parcel.readException()."
5ea06c59be1f7a0495378f703562ee02eaad99d8 13-Feb-2014 Paul Duffin <paulduffin@google.com> am 4de91118: am 0741e11c: am 75d67c6a: am d562a9b5: Merge "Improve Parcel\'s handling of non-primitive arrays"

* commit '4de9111819638b70dd6fb58094d7a61477fc59da':
Improve Parcel's handling of non-primitive arrays
ac5a0828c14eea59f2ffda85432ad1977d3e1ce0 03-Feb-2014 Paul Duffin <paulduffin@google.com> Improve Parcel's handling of non-primitive arrays

Treat arrays other than actual Object arrays (i.e. those whose component type
is actually Object) and the primitive arrays already handled specially by
Parcel as Serializable's.

Issue: 64583
Change-Id: I3ff797f3262e77e4de27f35709bceee5410d1ed4
/frameworks/base/core/java/android/os/Parcel.java
ef099b71838e15758c8e859af21748a123bb4a99 29-Jan-2014 Narayan Kamath <narayan@google.com> am 4a587146: am 09d07d0d: am e3e4b405: am 9846fb69: am 50afaefd: Merge "AArch64: Make Binder and Parcel 64-bit compatible"

* commit '4a58714606fdeb2e740b0ce51ea5074783e2ecf4':
AArch64: Make Binder and Parcel 64-bit compatible
8ab665dda40ab10e60fc69392022171f454af530 22-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Make Binder and Parcel 64-bit compatible

Changes include
[x] Long is used to store native pointers

[x] Added new method obtain(long obj) to Parcel. Binder
uses this method instead of obtain(int obj).

[x] obtain(int) has been changed to throw unsupported
operation exception.

Change-Id: I408e0f2a24deb28c9277d86670653a51eb314266
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
/frameworks/base/core/java/android/os/Parcel.java
b34a4615f82a4ad8ce2c0687f47e2113e057e893 23-Jan-2014 Narayan Kamath <narayan@google.com> Hide android.os.Parcel.obtain(int).

This will break on 64 bit because 64 bit pointers are
wider than java int.

Also, this method technically isn't a public API because
it's a protected method on a final class. It shows up in
our api.txt files because of a quirk in the API generation
system.

Change-Id: I2b574943008ed34696b048195c0cac6af1aa0a3b
/frameworks/base/core/java/android/os/Parcel.java
5002b8c972967b9f0f58dcefe6e37ea79fa9a179 10-Jan-2014 John Spurlock <jspurlock@google.com> Use custom classloader if provided for Serializables.

If an explicit classloader is provided during unparcel, use it
when deserializing java serializables.

Change-Id: I2b354f0b55359201528234b8095aa0bc102928ec
/frameworks/base/core/java/android/os/Parcel.java
879ea451cefa535803d9742506cf51e2e0df75a7 02-Jan-2014 Mark Doliner <markdoliner@google.com> Fix documentation for Parcel.readException().

The old documentation was kind of useless and not clear, so this is an
improvement.

In addition to this change, I think this method should probably be private
instead of public, especially since the values for code are private. But it's
too late to change that now. Also the method name is pretty poor, since it's
not actually reading anything. Something like "throwException" would be more
appropriate.

I'm open to suggestions on how to improve this situation. Maybe mark the
method as deprecated with a comment that it will be made private in the
future?

Change-Id: I830f2bcf606714bd130d8c953aa33974b33c9a83
/frameworks/base/core/java/android/os/Parcel.java
8aee64d18b6b90e46e886a80d8de0467d682ddc4 25-Oct-2013 Dianne Hackborn <hackbod@google.com> Fix issue #11290095: Parcel change causing crashing in KLP...

...when reading from empty byte[]

Better handling of empty bundles and parcels.

Change-Id: Ie9182e43a52b8f163e8fb20bd1d110e0832683e6
/frameworks/base/core/java/android/os/Parcel.java
4a7d824c3b41eafc4ff91d3253ff8a9ebd60a454 03-Oct-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10921903: CTS: android.os.cts.ParcelTest#testReadBundle...

...fails from KRS84 across all platforms

My fix for issue #10807048 was wrong, wrong, wrong. The problem was
actually just a stupid mistake in ArrayMap.erase(). This makes it
all right.

Change-Id: I762f7a2d5100bceb86a091ab3d6368edc21b4266
/frameworks/base/core/java/android/os/Parcel.java
e784d1e4cfeaf3a9accd7caa33c087abd8f39040 21-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10807048: Groupon: The application crash when user rotates...

...device to another mode (portrait or landscape) on Main page.

So, it turns out that Bundle claimed to have an invariant that either
mParcelledData or mMap would hold its data, never both. The new
implementation on top of ArrayMap assumed this was the case. However,
there is one situation where it is not true: an application can take
an existing Bundle that contains data, and call readFromParcel() on it.
The implementation of readFromParcel() would just pull out the
parceled data and stuff it in to mParcelledData for later unparceling,
even if that Bundle already had a non-empty mMap.

To fix this, we just look for this case in readFromParcel() and
immediately unparcel at that point into the existing map, using a
new unparcelling method that doesn't rely on the target map being
empty.

Change-Id: Ib816b6876a6cd2760b7a3372c7a79ca2f12dfeba
/frameworks/base/core/java/android/os/Parcel.java
7e7144218e8681fff2065a891de517bad6fe1b38 14-Sep-2013 Dianne Hackborn <hackbod@google.com> Implement #10666712: NetworkOnMainThreadException should be...

...relayed back to calling application

What's one more exception between friends?

Change-Id: Ib83c7bfbddd397457dcdbe506a8cd2bc0f4fb70b
/frameworks/base/core/java/android/os/Parcel.java
da5a3e12f4f8f965c57d6f93c74190f43ea233f3 11-Aug-2013 Jeff Sharkey <jsharkey@android.com> Richer ParcelFileDescriptor close events.

When reading from the end of a pipe or socket, there is no way to
tell if the other end has finished successfully, encountered an error,
or outright crashed. To solve this, we create a second socketpair()
as a communication channel between the two ends of a pipe or
socket pair, sending a status code with details about why the
ParcelFileDescriptor was closed.

The writer end of a pipe or socket can closeWithError() to send a
message to the reader end. When the reader encounters EOF, they
call checkError() to detect if any error occured. This also detects
the case where the remote process died without sending a success
message.

This design is also extended to support regular files on disk, using
the communication channel above to detect various remote close events
or crashes, and delivering that event to a supplied OnCloseListener.

Replaces JNI with best-practice Libcore.os calls, and deprecates
some flags to match Context.

Bug: 10330121
Change-Id: I8cfa1e4fb6f57397667c7f785106193e0faccad3
/frameworks/base/core/java/android/os/Parcel.java
b87655b3e551c6a32f34084c8533800bbd1aff7d 18-Jul-2013 Dianne Hackborn <hackbod@google.com> Switch Bundle's implementation over to ArrayMap.

That was... um... easier than I thought it was going to be.

Change-Id: Id8f2211c1d5f8145e0bb009dca0f62a590f2b860
/frameworks/base/core/java/android/os/Parcel.java
dcbaf661bfa931f481022c27987798a03ce7a932 26-Apr-2013 Daniel Sandler <dsandler@android.com> Filter out dangerous CharSequences in Notification.

If an app mistakenly puts some Parcelable implementation of
CharSequence in here, Bundle will try to marshal the derived
class, which is going to be bad news when we try to unparcel
it in another process.

Additionally add a proper stack trace to unparceling
failures (otherwise you have no idea where the bad parcel
was being used).

Bug: 8725271
Change-Id: Ide19b986d65c7f47929cf2dde4e62b762c469fee
/frameworks/base/core/java/android/os/Parcel.java
d8e1dbb6bc1fbaf4f2e38c3ba92ced94270deaac 18-Jan-2013 Dianne Hackborn <hackbod@google.com> Rework ParceledListSlice to be much easier to use.

Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation. Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
/frameworks/base/core/java/android/os/Parcel.java
97a72f6693a7bee3255b2307c6bb18f66669a36c 11-Jan-2013 Irfan Sheriff <isheriff@google.com> Handle missing static for CREATOR

I made a mistake of missing out on static for CREATOR on a Parcelable
and it threw a NPE which was not obvious. We do not get NoSuchFieldException
when CREATOR exists but is not static.

Change-Id: Ib06f60797c00722075255d45e8189f8cebef9ae2
/frameworks/base/core/java/android/os/Parcel.java
f76a50ce8fdc6aea22cabc77b2977a1a15a79630 09-Mar-2012 Ken Wakasa <kwakasa@google.com> Fix obvious typos under frameworks/base/core

Change-Id: Ia5fc3db1bb51824e7523885553be926bcc42d736
/frameworks/base/core/java/android/os/Parcel.java
047238ced42eea812de9d39a9f32e94d002bfa5c 08-Mar-2012 Jeff Sharkey <jsharkey@android.com> Switch Parcel to static JNI calls, pass pointer.

Instead of using parcelForJavaObject(), pass down the mNativeObj
pointer explicitly. Benchmarks show that writeInt() is roughly 3x
faster with this approach.

Change-Id: I24ca235c334c44be716070aa8066ec8a429eadb7
/frameworks/base/core/java/android/os/Parcel.java
c04db7e06737c5b9bae276ac462858d44002672e 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/base/core/java/android/os/Parcel.java
9ecebbfbf768fd63e9a6c9a09c86d81c7737ee2d 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/base/core/java/android/os/Parcel.java
b46ed7636be9341b6ce0b158b3d86f34a437e6da 03-Jun-2011 Dianne Hackborn <hackbod@google.com> Add new Fragment API for explicitly saving/restoring state.

Also fix issue #4519821:
Blank screen displayed on tapping "Battery Use" option in the settings

We weren't correctly doing the full Activity resume code when coming
back from delivering a new Intent or result.

And fix a fragment problem where we still weren't correctly restoring
the state of list views. (I think this was from a bad manual-merge
from master.)

Change-Id: If79dc7e998155c39ab8c04781f6c73a82238a9ef
/frameworks/base/core/java/android/os/Parcel.java
9a84983a9fd9959671e102045eaf185b83291269 08-Apr-2011 Dianne Hackborn <hackbod@google.com> DO NOT MERGE. Integrate from master: Improve activity manager debug dumps.

Activity manager now does all dump requests into apps
asynchronously, so it can nicely timeout if there is an
app problem. Also lots of general cleanup of the am
dump output.

Change-Id: I99447b87f77a701af52aeca984d93dfe931f065d
/frameworks/base/core/java/android/os/Parcel.java
c9119f5034d36f548bbddd8f60291e24ab4e270b 01-Mar-2011 Dianne Hackborn <hackbod@google.com> Add ParcelFileDescriptor APIs to get raw fd.

Change-Id: I66ba72ffffd27237e60c9411453eef950ae62705
/frameworks/base/core/java/android/os/Parcel.java
a28b83ee04ca25100781f37a50665d6e1b05e3a2 28-Feb-2011 Elliott Hughes <enh@google.com> Fix Parcel.writeNative to not ignore 'offset'.

Also switch to using libcore's array bounds checking. (This variant had no
detail message and was missing the length check.)

Bug: http://code.google.com/p/android/issues/detail?id=15075
Change-Id: Icfc045bd59403b59f02d95c8514abf881d3996e5
/frameworks/base/core/java/android/os/Parcel.java
3c1363beec9c142c062d8704b8bef4230b42eae5 20-Jul-2010 Dan Egnor <egnor@google.com> am 2f0dc6d9: Merge "COMMENT ONLY change to add some warnings about ParcelFileDescriptor behavior with Parcel.writeValue()." into froyo

Merge commit '2f0dc6d9f50ceece294e9db393583e655d3bf781' into gingerbread

* commit '2f0dc6d9f50ceece294e9db393583e655d3bf781':
COMMENT ONLY change to add some warnings about ParcelFileDescriptor
b3e4ef37021a9e5518fdbc7d0cbb0a1709d5301b 20-Jul-2010 Dan Egnor <egnor@google.com> COMMENT ONLY change to add some warnings about ParcelFileDescriptor
behavior with Parcel.writeValue().

Change-Id: If55fcce29559379855735ff5297cf4f46d5d6be6
Bug: 2847738
/frameworks/base/core/java/android/os/Parcel.java
703e5d3c7fbeb8ca0978045db01d40318f838612 15-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> StrictMode: avoid an allocation in common case

Make the initialValue() of the ThreadLocal be null, so checking it doesn't
cause one to be created in the case of an RPC call not using StrictMode.

Change-Id: I3ea19ce444a1b3c39a6e53c5cb5d4faf4b07a6c8
/frameworks/base/core/java/android/os/Parcel.java
5b747191ff8ad43a54d41faf50436271d1d7fcc8 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/base/core/java/android/os/Parcel.java
08bbffb049c135c5dfd40d261118c90d1a6dc111 25-Feb-2010 Bjorn Bringert <bringert@android.com> Support CharSequence lists+arrays in Bundle+Intent

Fixes http://b/issue?id=2468093

Change-Id: Id82686f6ca8c9501f6db8a07018278a78ddacd05
/frameworks/base/core/java/android/os/Parcel.java
6aff905048ba3b03724f17e2aba9089872e14cd2 22-May-2009 Dianne Hackborn <hackbod@google.com> Fix a major bug in Bundle when unparcelling from AIDL.

There was a serious problem in the Bundle(Parcel) and readFromParcel() methods,
where it wasn't doing the copying of the Parcel that Parcel.readBundle() does
and is a basic requirement for it to work correctly.

This re-arranges the code to make all of these functions (hopefully) correct.

Also fix a problem in Parcel where we were not duping fds when copying data from
one Parcel to another.
/frameworks/base/core/java/android/os/Parcel.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Parcel.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Parcel.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/os/Parcel.java