summaryrefslogtreecommitdiff
path: root/core/java/android/os/Parcelable.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix writeToParcel parameter nullability" am: 55fb62a515 am: ↵Sam Gilbert2021-09-301-1/+2
|\ | | | | | | | | | | | | | | 182a0a144e am: 12da16335e am: c17751421a am: f56195ac0f Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1840533 Change-Id: I7ff844cac42f7734b27f3f84a68999ea3a6e864c
| * Fix writeToParcel parameter nullabilitySam Gilbert2021-09-291-1/+2
| | | | | | | | | | | | Test: Existing tests Bug: 144855352 Change-Id: Id3e0de043eee77e1dadf3b4db5d6d4bddd9e8247
* | Align the Kotlin sample code for Parcelable with JavaJing Ji2021-09-171-9/+6
|/ | | | | | Bug: 200270449 Test: m -j offline-sdk-docs Change-Id: I9a3b4e6e095ff370393280f5f3f01a895b74d66b
* Update Kotlin sample code for CountDownTimer and ParcelableJing Ji2021-04-141-5/+34
| | | | | | | | | | Also fixed a typo in the javadoc of android.os.Debug Bug: 155869891 Bug: 152033307 Bug: 177360175 Test: m -j ds-docs Change-Id: I52da37d24ab224344f931fed558df86f250bf86f
* Expose 'ParcelableHolder' as SystemApiJeongik Cha2020-10-201-2/+2
| | | | | | | | | | | | ParcelableHolder is the way to extend already defined parcelables. So, it's supposed to be used by OEM's modules. For Parcelable to be used by the OEM's module, it should be exposed as SystemApi Bug: 146611855 Test: atest aidl_unittests aidl_integration_test CtsNdkBinderTest Change-Id: I3d3e3d6b22ffd128dcfc8281d998ee3f55a398c5
* Parcelable getStability SystemApi MODULE_LIBRARIESSteven Moreland2020-08-061-0/+1
| | | | | | | | | | | | This method is intentionally overridden by subclasses. The infrastructure doesn't detect that this is happening, but we should still annotate this as part of the API. As requested by API review council. Bug: 162811168 Test: build only Change-Id: I27714a93b71108cc0cc62fc858c260e2a6920ba9
* Allow module libs to use VINTF AIDL (part II)Steven Moreland2020-07-281-0/+3
| | | | | | | | | Allow parcelables to be compiled which report VINTF stability. Bug: 161501127 Test: atest aidl_integration_test Change-Id: Idc2acb28ac0475ee69385487c7ef619951f93516 Merged-In: Idc2acb28ac0475ee69385487c7ef619951f93516
* android.os.Parcelable: isStable->getStabilitySteven Moreland2020-07-231-2/+31
| | | | | | | | | In preparation for APEX stability, make this API support arbitrary stability levels. Bug: 139325195 Test: AIDL's run_integration_test.py Change-Id: I0c1b50f228683717db2978aa909befa46de5302c
* Add isStable in Parcelable interfaceJeongik Cha2020-05-181-1/+15
| | | | | | Bug: 156242606 Test: m Change-Id: I353958ebe24911ac9fb684878931aecad7e09b97
* Even more auto-doc work.Jeff Sharkey2017-04-241-4/+22
| | | | | | | | | | Update docs based on what new lint detector found. Add new @IntDef to parameters or methods returning constants or flags, and add @RequiresPermission to methods mentioning permissions. Test: make -j32 offline-sdk-docs Bug: 37526420 Change-Id: I7f640f7883fcb66b911a52ae93b83f77306571ec
* Improve docs for Parcelable.describeContents()Christopher Tate2015-12-021-5/+17
| | | | | | | | Make the meaning of CONTENTS_FILE_DESCRIPTOR more explicit, and emphasize that describeContents() applies to the current object instance, not to the class generically. Change-Id: Ie5010e24c2e57bdc6c982249adb9d4c871d46f5a
* Avoid parceling redundant ApplicationInfo objects within PackageInfoChristopher Tate2015-09-101-1/+11
| | | | | | | | | | | | | | | | | | | | | Two benefits: 1) marshaling one flattened ApplicationInfo as part of a PackageInfo parcel rather than one per included ComponentInfo; and 2) producing one ApplicationInfo at unmarshaling time and sharing the reference to it among all included ComponentInfo instances, rather than the previous implementation that generated a separate ApplicationInfo instance for each ComponentInfo. In some cases there can be many hundreds of ComponentInfo objects embedded in a single PackageInfo, so coalescing duplicates is a significant win for both payload size and object pressure. Bug 19519502 Bug 20453802 Change-Id: Ib888810dad4471084fab9ead1ebb5e0b932905f1
* Add checks for types in Parcel / avoid class initializationNeil Fuller2015-04-211-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make Parcel more stringent to avoid initializing classes that are not related to Parcelable. Two new checks: 1) That the class found on the stream implements Parcelable. 2) That the type of the CREATOR field declared on the class found on the stream actually implements Parcelable.Creator. For (1) the new check that a class in the stream is actually Parcelable. This will affect handling of invalid streams or code that didn't obey the requirements. For (2) this change could break some apps that had a CREATOR field in a Parcelable class that was not declared to be (at least) a Parcelable.Creator: it is no longer sufficient for the type to implement Parcelable.Creator, the field must be declared as such. This change includes doc updates for Parcelable to make the requirement around the declared type of the CREATOR field more concrete. This change also makes the generics slightly tidier/explicit, annotates code as unchecked where needed and removes some assumptions that can not be guaranteed with Java's type system and the current definitions. For example, there's no guarantee right now that Parcelable.Creator returns objects that are actually Parcelable, or that the CREATOR object associated with a Parcelable will return objects of the surrounding class. The first we can't do something about without breaking the public API (due to implementations like TextUtils.CHAR_SEQUENCE_CREATOR). The second is currently typically implicitly enforced with an implicit cast in the (app's) calling code (e.g. callers to readParcelable() that causes a language-introduced cast to the type expected). A larger refactoring of Parcel would be required to ensure that the class that is produced by Creator is of a type compatible with the class that declared CREATOR, and is not a goal for this change. A fix is included for a class that doesn't implement Parcelable like it should and would probably fail check (1). Bug: 1171613 Change-Id: I31d07516efee29a320e80f4bc4f96aaac628f81c
* Add new Fragment API for explicitly saving/restoring state.Dianne Hackborn2011-06-021-0/+18
| | | | | | | | | | | | | | 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
* Fix code example in Parcelable javadocBjorn Bringert2009-10-281-4/+8
| | | | | | | | | | | | | | | | | | | DOCS ONLY The code example for android.os.Parcelable contained several errors: - There was no type parameter for Parcelable.Creator (due to unescaped < > in the javadoc comment). - There was no implementation of describeContents(). - The semicolon after the CREATOR declaration was missing. This change fixes all of the above. Fixes issue http://b/issue?id=2221120 Change-Id: Icaf932d079573cc7699f1caa643aac49e85ccca0
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+112
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-112/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+112