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

Commit d767220f 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: 1cdc8379

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

Change-Id: I555350016223c5c07dc5fd6bb01cac8dd739007c
parents 0e2a5da9 1cdc8379
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());
    }

    /**