getRotationFromNaturalOrientation

Calculates the Surface.X in 0, 90, 180, 270 degrees off the 'natural' device orientation.

Return

Either Surface.ROTATION_0, Surface.ROTATION_90, Surface.ROTATION_180, Surface.ROTATION_270.

Parameters

activityContext

The context used for calculation. NOTE: As of Android 11 it MUST be an Activity's context.