CtsVerifier / Camera format test: Apply a rotation to the format view when necessary.

Foldable devices break assumptions made by the camera format 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
patch introduces a new matrix transformation to both the preview and format views when this
assumption has been broken.

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