Camera preview stretches after accepting granular resolution
I have created a camera app that uses both Camera and Camera2 API. The problem occurs when using Camera2 and Granular Permissions.
The app starts up fine and the preview looks great. But only on first launch, when the user accepts the camera and storage permissions, the camera preview you see is stretched.
NOTE. On lower API level devices (API 16 - API 22) that don't use granular permissions, the preview is always correct!
Here are some screenshots to see for yourself:
My app is OpenSource and available on GitHub. Here are some of the classes that might be causing the problem:
+3
source to share