Camera: Add bandaid for preview orientation on reverse-landscape cameras
Camera sensors on Android may be either landscape or reverse-landscape oriented, but the vast majority of shipping devices only use landscape. This means that many camera-using apps (which are generally forcing themselves to landscape orientation) never call setDisplayOrientation, since its default value of 0 is correct for the majority of devices. However, there are some reverse-landscape devices, and for those, such apps get upside-down preview. This bandaid changes the default value of displayOrientation to be 180 on such devices, so that apps that never call setDisplayOrientation get correct preview. This bandaid has no effect on apps that do call setDisplayOrientation, so hopefully such apps are doing the math correctly. Also update documentation to indicate that setDisplayOrientation should be called, and to note the change in default orientation behavior in Android N. Change-Id: I1b2c957642fda8edead61bd07eda9d18c38d1fe6 Fixes: 27840948
Loading
Please register or sign in to comment