-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Single source of truth for camera settings (#122)
* Update CameraUseCase to reactive model CameraUseCase (and CameraXCameraUseCase implementation) will now hold on to CameraAppSettings and react to changes in those settings which are initiated through the CameraUseCase API. * PreviewViewModel should not edit CameraAppState CameraAppState is now owned by CameraUseCase. It will have the single source of truth, and PreviewViewModel will only communicate changes through PreviewUiState, it will not edit CameraAppState directly. * Setting aspect ratio and flipping camera no longer restarts camera job The camera job is started once by runCamera(), any changes that restart the camera will happen contained inside this coroutine. We no longer need to explicitly stop the camera before applying changes that would normally restart the camera. * Fix tests to work with API changes Also changes FakeCameraUseCase to use a similar reactive model to CameraXCameraUseCase * Fix more tests
- Loading branch information
Showing
10 changed files
with
424 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.