- since allowBackup is set to true in the manifest,
- it is possible for the app to be launch after a fresh install with mIsInPhotoMode=true in MainActivity
- this commit ensure the audio permission is requested at this point
- if the user denies, then it is initialised in photo mode instead
- add a new BitmapOutput, returned from the MediaOutputHelper when no output URI is specified in an IMAGE_CAPTURE intent
- in this format, take the picture without actually saving it and return the bitmap
- this behaviour is consistent with the implementation described in the official Android docs https://developer.android.com/training/camera/photobasics#TaskPhotoView
- in MediaOutputHelper,
- add support for specifying the output URI if present in the intent
- when the output URI is specified,
- for Image Capture, we return a `Bitmap` as a `data` extra and also the URI as the Intent data
- for Video Capture we return the `Uri` as the Intent data
- if no output URI is specified in the capture intent or if there is an error while trying to access the URI, use the default location with MediaStore, so we do not return inconsistent URIs (eg, SAF tree URIs)
- add CameraXInitializer to abstract CameraXPreview initialisation logic
- add MediaSoundHelper to separate logic for playing media action sounds
- add support for playing media action sounds (shutter, start and stop recording) in CameraXPreview
- add CameraXPreview
- basic support image capture
- basic support for video capture
- add CameraXPreviewListener to prevent coupling to MainActivity
- support switching camera, flash light modes
- modify MyPreview interface to add default implementation for methods not needed by the CameraXPreview