summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/Script.java
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2016-03-25 11:54:39 -0700
committerEino-Ville Talvala <etalvala@google.com>2016-03-25 12:29:44 -0700
commit6c91e2c31b514bcfd838c75b4c74412e7288415d (patch)
tree2f19498e8b2aa00cbc27ab1f682a46a1ddccebf4 /rs/java/android/renderscript/Script.java
parenta70cbf7f9cf7dbb12f7f6067c039c85bcac99361 (diff)
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
Diffstat (limited to 'rs/java/android/renderscript/Script.java')
0 files changed, 0 insertions, 0 deletions