google / jetpack-camera-app

Apache License 2.0
152 stars 29 forks source link

openOutputStream called twice and not closed correctly #159

Open JolandaVerhoef opened 8 months ago

JolandaVerhoef commented 8 months ago

In CameraXCameraUseCase, when taking a picture through an external intent, the takePicture method opens an output stream twice. It shows a lint warning saying:

This OutputStream should be freed up after use with #close()

We can probably just replace the second contentResolver.openOutputStream(imageCaptureUri) with outputStream?