Use the view finder's dimensions instead of the whole screen's to determine the photo aspect ratio #710
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently the aspect ratio of the photo is determined by the size of the device's screen. This assumes that the preview / view finder covers the whole screen, but that is not necessarily the case - for example in our use case, in portrait mode we have an app header above and UI elements below the view finder, intentionally resulting in a view finder with a 4:3 aspect ratio. In this case, a photo captured at 16:9 would not match what was displayed in the view finder. It seems to me that the aspect ratio of the captured photo should be driven by the view finder dimensions rather than the device's screen size.
This seems similar to the issue logged in #576 but not quite the same.
How did you test this change?
Tested on a few different Android devices.
4:3 view finder:

16:9 view finder:
