Camera2Basic: ExifUtils has a condition conflict for computing orientation
Camera2Basic/utils/src/main/java/com/example/android/camera/utils/ExifUtils.kt

Line 32 conflicts with line 35 and causes saved images to be mirrored incorrectly. Simply removing line 32 solved my issue.
The bug pointed out is definitely a bug, but I think the solution as suggsted is not complete - the 270 !mirrored case should be ORIENTATION_ROTATE_270 and the 270 mirrored case should be ORIENTATION_TRANSVERSE - this would be analgous to the other cases where the !mirrored case always is a simple rotate (without a flip). This gives me correct results, for example when photographing a keyboard, the result is not reversed, using a device that has 270 rotation and where the front camera gives a mirrored image and the rear camera a non-mirrored image. I see that msjobremonte and evidently others got good results with the opposite solution, so I'm a bit puzzled.