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

Commit e6e4f3d6 authored by Steven Moreland's avatar Steven Moreland
Browse files

Parcel: readValue harder error

Bug: 384586487
Test: boot
Change-Id: Ifa8b7551246a485f3622bb223ce0aec45dd178ac
parent 73a93318
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -4623,9 +4623,11 @@ public final class Parcel {
            object = readValue(type, loader, clazz, itemTypes);
            int actual = dataPosition() - start;
            if (actual != length) {
                Slog.wtfStack(TAG,
                        "Unparcelling of " + object + " of type " + Parcel.valueTypeToString(type)
                                + "  consumed " + actual + " bytes, but " + length + " expected.");
                String error = "Unparcelling of " + object + " of type "
                                + Parcel.valueTypeToString(type) + "  consumed " + actual
                                + " bytes, but " + length + " expected.";
                Slog.wtfStack(TAG, error);
                throw new BadParcelableException(error);
            }
        } else {
            object = readValue(type, loader, clazz, itemTypes);