Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d498747 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Parcel: hasFileDescriptors warning" into main

parents 1adb0dbc 7c18bbee
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -892,6 +892,12 @@ public final class Parcel {

    /**
     * Report whether the parcel contains any marshalled file descriptors.
     *
     * WARNING: Parcelable definitions change over time. Unless you define
     * a Parcelable yourself OR the Parcelable explicitly guarantees that
     * it would never include such objects, you should not expect the return
     * value to stay the same, and your code should continue to work even
     * if the return value changes.
     */
    public boolean hasFileDescriptors() {
        return nativeHasFileDescriptors(mNativePtr);
@@ -901,6 +907,12 @@ public final class Parcel {
     * Report whether the parcel contains any marshalled file descriptors in the range defined by
     * {@code offset} and {@code length}.
     *
     * WARNING: Parcelable definitions change over time. Unless you define
     * a Parcelable yourself OR the Parcelable explicitly guarantees that
     * it would never include such objects, you should not expect the return
     * value to stay the same, and your code should continue to work even
     * if the return value changes.
     *
     * @param offset The offset from which the range starts. Should be between 0 and
     *     {@link #dataSize()}.
     * @param length The length of the range. Should be between 0 and {@link #dataSize()} - {@code
@@ -921,6 +933,12 @@ public final class Parcel {
     * <p>For most cases, it will use the self-reported {@link Parcelable#describeContents()} method
     * for that.
     *
     * WARNING: Parcelable definitions change over time. Unless you define
     * a Parcelable yourself OR the Parcelable explicitly guarantees that
     * it would never include such objects, you should not expect the return
     * value to stay the same, and your code should continue to work even
     * if the return value changes.
     *
     * @throws IllegalArgumentException if you provide any object not supported by above methods
     *     (including if the unsupported object is inside a nested container).
     *
@@ -990,6 +1008,13 @@ public final class Parcel {
     *
     * @throws UnsupportedOperationException if binder kernel driver was disabled or if method was
     *                                       invoked in case of Binder RPC protocol.
     *
     * WARNING: Parcelable definitions change over time. Unless you define
     * a Parcelable yourself OR the Parcelable explicitly guarantees that
     * it would never include such objects, you should not expect the return
     * value to stay the same, and your code should continue to work even
     * if the return value changes.
     *
     * @hide
     */
    public boolean hasBinders() {
@@ -1000,6 +1025,12 @@ public final class Parcel {
     * Report whether the parcel contains any marshalled {@link IBinder} objects in the range
     * defined by {@code offset} and {@code length}.
     *
     * WARNING: Parcelable definitions change over time. Unless you define
     * a Parcelable yourself OR the Parcelable explicitly guarantees that
     * it would never include such objects, you should not expect the return
     * value to stay the same, and your code should continue to work even
     * if the return value changes.
     *
     * @param offset The offset from which the range starts. Should be between 0 and
     *               {@link #dataSize()}.
     * @param length The length of the range. Should be between 0 and {@link #dataSize()} - {@code