Merge "Use ERROR_CAMERA_DISCONNECTED on id remap" into main
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 0d24838..61b667b 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -924,10 +924,8 @@
}
for (auto& clientSp : clientsToDisconnect) {
- // We send up ERROR_CAMERA_DEVICE so that the app attempts to reconnect
- // automatically. Note that this itself can cause clientSp->disconnect() based on the
- // app's response.
- clientSp->notifyError(hardware::camera2::ICameraDeviceCallbacks::ERROR_CAMERA_DEVICE,
+ // Notify the clients about the disconnection.
+ clientSp->notifyError(hardware::camera2::ICameraDeviceCallbacks::ERROR_CAMERA_DISCONNECTED,
CaptureResultExtras{});
}