CameraService: Use intended iterator when getting remapped keys
- Use the correct iterator to access elements when checking for
removal of keys remapped by RotationAndCrop mappers. Currently, the
iterator for distortionMappers is inaccurately being used for this
check.
Bug: 270474475
Test: CTS test
Change-Id: I095b03d284c49a94c70dd269f634d195ee3fb308
diff --git a/services/camera/libcameraservice/device3/Camera3OutputUtils.cpp b/services/camera/libcameraservice/device3/Camera3OutputUtils.cpp
index 738c314..c3af4ab 100644
--- a/services/camera/libcameraservice/device3/Camera3OutputUtils.cpp
+++ b/services/camera/libcameraservice/device3/Camera3OutputUtils.cpp
@@ -260,7 +260,7 @@
auto mapper = states.rotateAndCropMappers.find(states.cameraId.c_str());
if (mapper != states.rotateAndCropMappers.end()) {
- const auto& remappedKeys = iter->second.getRemappedKeys();
+ const auto& remappedKeys = mapper->second.getRemappedKeys();
keysToRemove.insert(remappedKeys.begin(), remappedKeys.end());
}