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

Commit 1cdc8379 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "camera2: Fix parcelling of sensor pixel modes." into sc-dev

parents 2ab80e45 e1a464e1
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -846,6 +846,14 @@ public final class OutputConfiguration implements Parcelable {
        return 0;
    }

    private static int[] convertIntegerToIntList(List<Integer> integerList) {
        int[] integerArray = new int[integerList.size()];
        for (int i = 0; i < integerList.size(); i++) {
            integerArray[i] = integerList.get(i);
        }
        return integerArray;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (dest == null) {
@@ -861,7 +869,9 @@ public final class OutputConfiguration implements Parcelable {
        dest.writeTypedList(mSurfaces);
        dest.writeString(mPhysicalCameraId);
        dest.writeInt(mIsMultiResolution ? 1 : 0);
        dest.writeList(mSensorPixelModesUsed);
        // writeList doesn't seem to work well with Integer list.
        dest.writeIntArray(convertIntegerToIntList(mSensorPixelModesUsed));
        //dest.writeArray(mSensorPixelModesUsed.toArray());
    }

    /**