summaryrefslogtreecommitdiff
path: root/src/com/android/devcamera/CameraInterface.java
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2016-04-25 15:58:48 -0700
committerEino-Ville Talvala <etalvala@google.com>2016-04-27 15:37:11 -0700
commit3855bb499fbfc073771fa951babfe1922d90ffc9 (patch)
treeba24fe1845559ba629832dc38787ed98f5b3a415 /src/com/android/devcamera/CameraInterface.java
parent9736d0f3038125c3c4b0cdeacbe18884a70805f2 (diff)
downloadDevCamera-3855bb499fbfc073771fa951babfe1922d90ffc9.tar.gz
Fix portrait-orientation assumptionsnougat-dev
Not all devices are native portrait, so account for other sensor orientations in drawing gyro output and saving JPEGs. With this, Pixel C gyro overlay looks reasonable Bug: 27543253 Change-Id: I03f48a84f2dd206c468d00cca9ba09a46c1432a6
Diffstat (limited to 'src/com/android/devcamera/CameraInterface.java')
-rw-r--r--src/com/android/devcamera/CameraInterface.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/devcamera/CameraInterface.java b/src/com/android/devcamera/CameraInterface.java
index e16c9e5..e6df5ce 100644
--- a/src/com/android/devcamera/CameraInterface.java
+++ b/src/com/android/devcamera/CameraInterface.java
@@ -33,6 +33,13 @@ public interface CameraInterface {
float[] getFieldOfView();
/**
+ * Get the camera sensor orientation relative to device native orientation
+ * Typically 90 or 270 for phones, 0 or 180 for tablets, though many tables are also
+ * portrait-native.
+ */
+ int getOrientation();
+
+ /**
* Open the camera. Call startPreview() to actually see something.
*/
void openCamera();