choose Optimal Size
Helper method for choosing a Size of a given set of choices, which best fits the given constraints.
Parameters
choices
All available camera output sizes
texture View Width
The width of previewTextureView
texture View Height
The height of previewTextureView
max Width
The maximum width
max Height
The maximum height
aspect Ratio
The aspect ratio