CtsVerifier / Camera video test: Scale the video preview when rotation is 90 or 270.

Foldable devices break assumptions made by the camera video test, namely that mPreviewRotation is
always either 0 or 180. It is possible on a foldable device to change from portrait to landscape
while the camera sensor orientation remains the same, for example by unfolding the device. This has
the effect of stretching the camera preview view, since the reported video dimensions will not
reflect the fact that the video is being saved with a rotation matrix. This patch will scale the
preview such that the correct aspect ratio is displayed.

Bug: 205504581
Test: Ran the Camera Format tests on all cameras on all orientations.
Change-Id: I5d56531576d89e78f5adc239331d7eff95ffe3c1
1 file changed