Merge "camera2: Fix parcelling of sensor pixel modes." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1cdc8379a8
@@ -846,6 +846,14 @@ public final class OutputConfiguration implements Parcelable {
|
|||||||
return 0;
|
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
|
@Override
|
||||||
public void writeToParcel(Parcel dest, int flags) {
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
if (dest == null) {
|
if (dest == null) {
|
||||||
@@ -861,7 +869,9 @@ public final class OutputConfiguration implements Parcelable {
|
|||||||
dest.writeTypedList(mSurfaces);
|
dest.writeTypedList(mSurfaces);
|
||||||
dest.writeString(mPhysicalCameraId);
|
dest.writeString(mPhysicalCameraId);
|
||||||
dest.writeInt(mIsMultiResolution ? 1 : 0);
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user