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

Commit c4afa0b5 authored by Jake Wharton's avatar Jake Wharton Committed by Android (Google) Code Review
Browse files

Merge "Expose Parcel read/writeBoolean."

parents 4ff0d1ed 2ffa4314
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -32755,6 +32755,7 @@ package android.os {
    method public java.util.ArrayList readArrayList(java.lang.ClassLoader);
    method public void readBinderArray(android.os.IBinder[]);
    method public void readBinderList(java.util.List<android.os.IBinder>);
    method public boolean readBoolean();
    method public void readBooleanArray(boolean[]);
    method public android.os.Bundle readBundle();
    method public android.os.Bundle readBundle(java.lang.ClassLoader);
@@ -32800,6 +32801,7 @@ package android.os {
    method public void writeArray(java.lang.Object[]);
    method public void writeBinderArray(android.os.IBinder[]);
    method public void writeBinderList(java.util.List<android.os.IBinder>);
    method public void writeBoolean(boolean);
    method public void writeBooleanArray(boolean[]);
    method public void writeBundle(android.os.Bundle);
    method public void writeByte(byte);
+13 −2
Original line number Diff line number Diff line
@@ -715,7 +715,13 @@ public final class Parcel {
        nativeWriteString(mNativePtr, val);
    }

    /** @hide */
    /**
     * Write a boolean value into the parcel at the current dataPosition(),
     * growing dataCapacity() if needed.
     *
     * <p>Note: This method currently delegates to writeInt with a value of 1 or 0
     * for true or false, respectively, but may change in the future.
     */
    public final void writeBoolean(boolean val) {
        writeInt(val ? 1 : 0);
    }
@@ -805,6 +811,9 @@ public final class Parcel {
    /**
     * Write a byte value into the parcel at the current dataPosition(),
     * growing dataCapacity() if needed.
     *
     * <p>Note: This method currently delegates to writeInt but may change in
     * the future.
     */
    public final void writeByte(byte val) {
        writeInt(val);
@@ -2007,7 +2016,9 @@ public final class Parcel {
        return nativeReadString(mNativePtr);
    }

    /** @hide */
    /**
     * Read a boolean value from the parcel at the current dataPosition().
     */
    public final boolean readBoolean() {
        return readInt() != 0;
    }