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

Commit 61c0b7cd authored by Samuel Tan's avatar Samuel Tan Committed by Gerrit Code Review
Browse files

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

parents ae119af5 a8036660
Loading
Loading
Loading
Loading
+29 −22
Original line number Diff line number Diff line
@@ -229,6 +229,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;
@@ -1408,6 +1409,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) {
@@ -2375,6 +2379,9 @@ public final class Parcel {
        case VAL_SIZEF:
            return readSizeF();

        case VAL_DOUBLEARRAY:
            return createDoubleArray();

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