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

Commit 1fe32a90 authored by Achim Thesmann's avatar Achim Thesmann Committed by Android (Google) Code Review
Browse files

Merge "Fix Unsafe Parcel Usage" into main

parents 31857cce a17d20fa
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -162,12 +162,7 @@ public final class ParcelableHolder implements Parcelable {

        mParcel.setDataPosition(0);

        T parcelable = mParcel.readParcelable(clazz.getClassLoader());
        if (parcelable != null && !clazz.isInstance(parcelable)) {
            throw new BadParcelableException(
                    "The ParcelableHolder has " + parcelable.getClass().getName()
                    + ", but the requested type is " + clazz.getName());
        }
        T parcelable = mParcel.readParcelable(clazz.getClassLoader(), clazz);
        mParcelable = parcelable;

        mParcel.recycle();
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ public class PerformanceCollector {
        iteration.putString(METRIC_KEY_LABEL, label);
        iteration.putLong(METRIC_KEY_EXECUTION_TIME, mExecTime);
        iteration.putLong(METRIC_KEY_CPU_TIME, mCpuTime);
        mPerfMeasurement.getParcelableArrayList(METRIC_KEY_ITERATIONS).add(iteration);
        mPerfMeasurement.getParcelableArrayList(METRIC_KEY_ITERATIONS, Bundle.class).add(iteration);

        mExecTime = SystemClock.uptimeMillis();
        mCpuTime = Process.getElapsedCpuTime();