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

Commit 67ffe383 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

Merge "camera2: Fix parcelling of sensor pixel modes." into sc-dev am: 1cdc8379 am: d767220f am: 1808497c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14745457

Change-Id: I28b88b2357b7e7fdead03b87399bca061555508c
parents 6320a5f6 1808497c
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());
    }

    /**