title: What is the Camera2 API Equivalent of setDisplayOrientation()?
body: <p>With <code>android.hardware.Camera</code>, in order to have the camera output appropriately track the device movement, we need to hook up an <code>OrientationEventListener</code> to the <code>setDisplayOrientation()</code> method on <code>Camera</code>. That way, as the user twists the device around, we can keep what is "up" on the camera preview in sync with what is "up" in the real world. This is particularly true for rotating the device around the Y axis (i.e., flipping from landscape to reverse-landscape or back).</p>
  
  <p>For most orientation changes, the <code>android.hardware.camera2</code> API seems to "just work". However, for that Y-axis rotation (landscape -> reverse-landscape or vice versa), the camera preview winds up being inverted.</p>
  
  <p>What is the equivalent of calling <code>setDisplayOrientation()</code> on <code>Camera</code> for the Camera2 API, so we can handle this scenario?</p>