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

Commit 1ab5f01c authored by Kwangkyu Park's avatar Kwangkyu Park
Browse files

Camera: Fix OutputConfiguration equality check

For the non deferred configuration, equals() and hashCode() show
different behavior when the number of surfaces changes.
Thus, the camera device could try to create a stream using an already
configured surface.

This patch fixed the issue by checking the size of surface list in
equals() for the non deferred configuration.

Bug: 306364653
Test: CameraCTS, Manual test with OEM scenario
Change-Id: Ifea113606dd3489a29bf94ec76f6f8a8a4547d16
parent b0e4f7e7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1403,6 +1403,7 @@ public final class OutputConfiguration implements Parcelable {
                if (mSurfaces.get(i) != other.mSurfaces.get(i))
                    return false;
            }
            if (!mIsDeferredConfig && mSurfaces.size() != other.mSurfaces.size()) return false;
            if (mDynamicRangeProfile != other.mDynamicRangeProfile) {
                return false;
            }