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

Commit ff8ef28e authored by Samuel Tan's avatar Samuel Tan Committed by android-build-merger
Browse files

Merge "Add support for reading and writing double array values"

am: 61c0b7cd

* commit '61c0b7cd':
  Add support for reading and writing double array values
parents 5e2d9581 61c0b7cd
Loading
Loading
Loading
Loading
+29 −22
Original line number Diff line number Diff line
@@ -233,6 +233,7 @@ public final class Parcel {
    private static final int VAL_PERSISTABLEBUNDLE = 25;
    private static final int VAL_SIZE = 26;
    private static final int VAL_SIZEF = 27;
    private static final int VAL_DOUBLEARRAY = 28;

    // The initial int32 in a Binder call's reply Parcel header:
    private static final int EX_SECURITY = -1;
@@ -1429,6 +1430,9 @@ public final class Parcel {
        } else if (v instanceof SizeF) {
            writeInt(VAL_SIZEF);
            writeSizeF((SizeF) v);
        } else if (v instanceof double[]) {
            writeInt(VAL_DOUBLEARRAY);
            writeDoubleArray((double[]) v);
        } else {
            Class<?> clazz = v.getClass();
            if (clazz.isArray() && clazz.getComponentType() == Object.class) {
@@ -2396,6 +2400,9 @@ public final class Parcel {
        case VAL_SIZEF:
            return readSizeF();

        case VAL_DOUBLEARRAY:
            return createDoubleArray();

        default:
            int off = dataPosition() - 4;
            throw new RuntimeException(