Described are an electronic device, a camera, and a method for determining
an orientation of a camera in an electronic device. The method includes
measuring a position of the lens at rest within the lens cavity (680),
determining a pointing direction of the camera based on the position of
the lens (684), and moving the lens to a new or adjusted starting
position for an auto-focus function based on the pointing direction
(688). The lens is biased to a predetermined position within the lens
cavity when the camera is oriented in a predetermined pointing direction.
A lens position sensor can measure a position of the lens to record a
measured position. By evaluating the measured lens position, the camera
orientation can be determined. The auto-focus of the camera can be
started at a starting position based on the camera orientation.