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

Commit 84319ceb authored by Steven Moreland's avatar Steven Moreland Committed by Android (Google) Code Review
Browse files

Merge "Parcel: readValue harder error" into main

parents 0f4b9eb7 e6e4f3d6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -4639,9 +4639,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);