Package-level declarations
Functions
Utility function that wraps a DisposableEffect and callbacks that should either cause the unbinding of the camera or trigger the re-binding of the camera in order to save resources. This contains the logic of the lifecycle stages where the camera should be un-binded (which is when the app is "minimized", in Android terms, in Lifecycle.Event.ON_PAUSE) and returned on Lifecycle.Event.ON_RESUME
This function has a lot of nested calls, but in the way it's now, it's more readable because it's more direct. Breaking it down into more util functions would make it cluttered even more, give the amount of common variables each component uses
Add bars in the sides so the background doesn't show, per example, when camera ratio == 4:3 and Gemin is enabled
Specifies the right modifier and alignment for 4_3 and 16_9 camera preview ratios when Gemini is enabled
Note: this is used for both the box with the camera & detection overlays and GeminiChatContainer
Creates a camera PreviewView which is passed to the cameraProvider along with other UseCases (max 3), that are used with the camera