Skip to content

Commit 0f4f97b

Browse files
author
Wu-cheng Li
committed
Update camera continuous autofocus javadoc.
Suppose applications call autoFocus in CAF picture mode. If CAF is in the middle of scanning, the picture is very likely to be blurry. Change focus callback to return when the scanning finishes. bug:5514415 Change-Id: Ibcb8f92a5263d7dbd7cce54df3617fb21c6255d4
1 parent 763480f commit 0f4f97b

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

core/java/android/hardware/Camera.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,15 +1687,18 @@ public class Parameters {
16871687
* aggressive than {@link #FOCUS_MODE_CONTINUOUS_VIDEO}. Auto focus
16881688
* starts when the parameter is set.
16891689
*
1690-
* <p>If applications call {@link #autoFocus(AutoFocusCallback)} in this
1691-
* mode, the focus callback will immediately return with a boolean that
1692-
* indicates whether the focus is sharp or not. The apps can then decide
1693-
* if they want to take a picture immediately or to change the focus
1694-
* mode to auto, and run a full autofocus cycle. The focus position is
1695-
* locked after autoFocus call. If applications want to resume the
1696-
* continuous focus, cancelAutoFocus must be called. Restarting the
1697-
* preview will not resume the continuous autofocus. To stop continuous
1698-
* focus, applications should change the focus mode to other modes.
1690+
* <p>Applications can call {@link #autoFocus(AutoFocusCallback)} in
1691+
* this mode. If the autofocus is in the middle of scanning, the focus
1692+
* callback will return when it completes. If the autofocus is not
1693+
* scanning, the focus callback will immediately return with a boolean
1694+
* that indicates whether the focus is sharp or not. The apps can then
1695+
* decide if they want to take a picture immediately or to change the
1696+
* focus mode to auto, and run a full autofocus cycle. The focus
1697+
* position is locked after autoFocus call. If applications want to
1698+
* resume the continuous focus, cancelAutoFocus must be called.
1699+
* Restarting the preview will not resume the continuous autofocus. To
1700+
* stop continuous focus, applications should change the focus mode to
1701+
* other modes.
16991702
*
17001703
* @see #FOCUS_MODE_CONTINUOUS_VIDEO
17011704
*/

include/camera/CameraParameters.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -644,15 +644,17 @@ class CameraParameters
644644
// than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is
645645
// set.
646646
//
647-
// If applications call CameraHardwareInterface.autoFocus in this mode, the
648-
// focus callback will immediately return with a boolean that indicates
649-
// whether the focus is sharp or not. The apps can then decide if they want
650-
// to take a picture immediately or to change the focus mode to auto, and
651-
// run a full autofocus cycle. The focus position is locked after autoFocus
652-
// call. If applications want to resume the continuous focus,
653-
// cancelAutoFocus must be called. Restarting the preview will not resume
654-
// the continuous autofocus. To stop continuous focus, applications should
655-
// change the focus mode to other modes.
647+
// Applications can call CameraHardwareInterface.autoFocus in this mode. If
648+
// the autofocus is in the middle of scanning, the focus callback will
649+
// return when it completes. If the autofocus is not scanning, focus
650+
// callback will immediately return with a boolean that indicates whether
651+
// the focus is sharp or not. The apps can then decide if they want to take
652+
// a picture immediately or to change the focus mode to auto, and run a full
653+
// autofocus cycle. The focus position is locked after autoFocus call. If
654+
// applications want to resume the continuous focus, cancelAutoFocus must be
655+
// called. Restarting the preview will not resume the continuous autofocus.
656+
// To stop continuous focus, applications should change the focus mode to
657+
// other modes.
656658
static const char FOCUS_MODE_CONTINUOUS_PICTURE[];
657659

658660
private:

0 commit comments

Comments
 (0)