google / google/jetpack-camera-app

openOutputStream called twice and not closed correctly

Open
#159 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
341
Forks
71
Avg merge
4d 17h
Merged PRs (30d)
7

Description

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`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.