I think getCameraOrientation would be a better name for this function.

I'd give it a comment like this:

// If the user rotates the phone by 90 degrees clockwise, then the camera on the back of the phone
// has been rotated by 90 degrees clockwise. But the camera on the front of the phone (the selfie
// camera) has been rotated by 90 degrees counter clockwise. This function computes the camera
// orientation based on the phone orientation and which camera is being used. Using the correct
// orientation matters so that the camera firmware can encode the photo right-side up.
// 90 degrees clockwise. But the front camera (the selfie camera)