diff options
Diffstat (limited to 'src/com/android/camera/one/OneCamera.java')
-rw-r--r-- | src/com/android/camera/one/OneCamera.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/com/android/camera/one/OneCamera.java b/src/com/android/camera/one/OneCamera.java index a45f83433..d4700717a 100644 --- a/src/com/android/camera/one/OneCamera.java +++ b/src/com/android/camera/one/OneCamera.java @@ -208,6 +208,33 @@ public interface OneCamera { } /** + * Classes implementing this interface will be called when the focus + * distance of the physical lens changes. + */ + public static interface FocusDistanceListener { + /** + * Called when physical lens distance on the camera changes. + * + * @param diopter the lens diopter from the last known position. + * @param isActive whether the lens is moving. + */ + public void onFocusDistance(float diopter, boolean isActive); + } + + /** + * Single instance of the current camera AF state. + */ + public static class FocusState { + public final float diopter; + public final boolean isActive; + + public FocusState(float diopter, boolean isActive) { + this.diopter = diopter; + this.isActive = isActive; + } + } + + /** * Parameters to be given to capture requests. */ public static abstract class CaptureParameters { @@ -333,6 +360,12 @@ public interface OneCamera { public void setFocusStateListener(FocusStateListener listener); /** + * Sets or replaces a listener that is called whenever the focus state of + * the camera changes. + */ + public void setFocusDistanceListener(FocusDistanceListener listener); + + /** * Sets or replaces a listener that is called whenever the state of the * camera changes to be either ready or not ready to take another picture. */ |