summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2021-06-02 19:10:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-06-02 19:10:53 +0000
commit1cdc8379a8f13098de337c918fac322d60cfa3a5 (patch)
treeeda9faf748e321213a2e01ffba1666069b17e14e /core/java/android
parent2ab80e45622b33849565c409b9d8d40676757bda (diff)
parente1a464e141ebf3f17d14412ea7ae25e819a720b7 (diff)
Merge "camera2: Fix parcelling of sensor pixel modes." into sc-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/hardware/camera2/params/OutputConfiguration.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/java/android/hardware/camera2/params/OutputConfiguration.java b/core/java/android/hardware/camera2/params/OutputConfiguration.java
index 0662f160a009..8dfb787bb3ab 100644
--- a/core/java/android/hardware/camera2/params/OutputConfiguration.java
+++ b/core/java/android/hardware/camera2/params/OutputConfiguration.java
@@ -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());
}
/**