Skip to content

Commit e448f55

Browse files
Wei HuangAndroid Git Automerger
authored andcommitted
am 3d9a9e5: Merge "Update camera javadoc about AE and AWB lock." into ics-factoryrom
* commit '3d9a9e55df85c720573e69ec3062efc331ea69bb': Update camera javadoc about AE and AWB lock.
2 parents ec26232 + 3d9a9e5 commit e448f55

File tree

2 files changed

+29
-84
lines changed

2 files changed

+29
-84
lines changed

core/java/android/hardware/Camera.java

Lines changed: 23 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -772,15 +772,8 @@ public interface AutoFocusCallback
772772
* onAutoFocus will be called immediately with a fake value of
773773
* <code>success</code> set to <code>true</code>.
774774
*
775-
* The auto-focus routine may lock auto-exposure and auto-white balance
776-
* after it completes. To check for the state of these locks, use the
777-
* {@link android.hardware.Camera.Parameters#getAutoExposureLock()} and
778-
* {@link android.hardware.Camera.Parameters#getAutoWhiteBalanceLock()}
779-
* methods. If such locking is undesirable, use
780-
* {@link android.hardware.Camera.Parameters#setAutoExposureLock(boolean)}
781-
* and
782-
* {@link android.hardware.Camera.Parameters#setAutoWhiteBalanceLock(boolean)}
783-
* to release the locks.
775+
* The auto-focus routine does not lock auto-exposure and auto-white
776+
* balance after it completes.
784777
*
785778
* @param success true if focus was successful, false if otherwise
786779
* @param camera the Camera service object
@@ -811,16 +804,10 @@ public interface AutoFocusCallback
811804
* {@link android.hardware.Camera.Parameters#FLASH_MODE_OFF}, flash may be
812805
* fired during auto-focus, depending on the driver and camera hardware.<p>
813806
*
814-
* The auto-focus routine may lock auto-exposure and auto-white balance
815-
* after it completes. To check for the state of these locks, use the
816-
* {@link android.hardware.Camera.Parameters#getAutoExposureLock()} and
817-
* {@link android.hardware.Camera.Parameters#getAutoWhiteBalanceLock()}
818-
* methods after the {@link AutoFocusCallback#onAutoFocus(boolean, Camera)}
819-
* callback is invoked. If such locking is undesirable, use
820-
* {@link android.hardware.Camera.Parameters#setAutoExposureLock(boolean)}
821-
* and
822-
* {@link android.hardware.Camera.Parameters#setAutoWhiteBalanceLock(boolean)}
823-
* to release the locks.
807+
* Auto-exposure lock {@link android.hardware.Camera.Parameters#getAutoExposureLock()}
808+
* and auto-white balance locks {@link android.hardware.Camera.Parameters#getAutoWhiteBalanceLock()}
809+
* do not change during and after autofocus. But auto-focus routine may stop
810+
* auto-exposure and auto-white balance transiently during focusing.
824811
*
825812
* @param cb the callback to run
826813
* @see #cancelAutoFocus()
@@ -840,13 +827,7 @@ public final void autoFocus(AutoFocusCallback cb)
840827
* this function will return the focus position to the default.
841828
* If the camera does not support auto-focus, this is a no-op.
842829
*
843-
* Canceling auto-focus will return the auto-exposure lock and auto-white
844-
* balance lock to their state before {@link #autoFocus(AutoFocusCallback)}
845-
* was called.
846-
*
847830
* @see #autoFocus(Camera.AutoFocusCallback)
848-
* @see android.hardware.Camera.Parameters#setAutoExposureLock(boolean)
849-
* @see android.hardware.Camera.Parameters#setAutoWhiteBalanceLock(boolean)
850831
*/
851832
public final void cancelAutoFocus()
852833
{
@@ -2784,13 +2765,12 @@ public float getExposureCompensationStep() {
27842765
*
27852766
* <p>Stopping preview with {@link #stopPreview()}, or triggering still
27862767
* image capture with {@link #takePicture(Camera.ShutterCallback,
2787-
* Camera.PictureCallback, Camera.PictureCallback)}, will automatically
2788-
* set the lock to false. However, the lock can be re-enabled before
2789-
* preview is re-started to keep the same AE parameters.</p>
2768+
* Camera.PictureCallback, Camera.PictureCallback)}, will not change the
2769+
* lock.</p>
27902770
*
2791-
* <p>Exposure compensation, in conjunction with re-enabling the AE and
2792-
* AWB locks after each still capture, can be used to capture an
2793-
* exposure-bracketed burst of images, for example.</p>
2771+
* <p>Exposure compensation, auto-exposure lock, and auto-white balance
2772+
* lock can be used to capture an exposure-bracketed burst of images,
2773+
* for example.</p>
27942774
*
27952775
* <p>Auto-exposure state, including the lock state, will not be
27962776
* maintained after camera {@link #release()} is called. Locking
@@ -2799,14 +2779,6 @@ public float getExposureCompensationStep() {
27992779
* run at all, and may result in severely over- or under-exposed
28002780
* images.</p>
28012781
*
2802-
* <p>The driver may also independently lock auto-exposure after
2803-
* auto-focus completes. If this is undesirable, be sure to always set
2804-
* the auto-exposure lock to false after the
2805-
* {@link AutoFocusCallback#onAutoFocus(boolean, Camera)} callback is
2806-
* received. The {@link #getAutoExposureLock()} method can be used after
2807-
* the callback to determine if the camera has locked auto-exposure
2808-
* independently.</p>
2809-
*
28102782
* @param toggle new state of the auto-exposure lock. True means that
28112783
* auto-exposure is locked, false means that the auto-exposure
28122784
* routine is free to run normally.
@@ -2823,11 +2795,7 @@ public void setAutoExposureLock(boolean toggle) {
28232795
* {@link #setAutoExposureLock} for details about the lock.
28242796
*
28252797
* @return State of the auto-exposure lock. Returns true if
2826-
* auto-exposure is currently locked, and false otherwise. The
2827-
* auto-exposure lock may be independently enabled by the camera
2828-
* subsystem when auto-focus has completed. This method can be
2829-
* used after the {@link AutoFocusCallback#onAutoFocus(boolean,
2830-
* Camera)} callback to determine if the camera has locked AE.
2798+
* auto-exposure is currently locked, and false otherwise.
28312799
*
28322800
* @see #setAutoExposureLock(boolean)
28332801
*
@@ -2865,29 +2833,20 @@ public boolean isAutoExposureLockSupported() {
28652833
*
28662834
* <p>Stopping preview with {@link #stopPreview()}, or triggering still
28672835
* image capture with {@link #takePicture(Camera.ShutterCallback,
2868-
* Camera.PictureCallback, Camera.PictureCallback)}, will automatically
2869-
* set the lock to false. However, the lock can be re-enabled before
2870-
* preview is re-started to keep the same white balance parameters.</p>
2836+
* Camera.PictureCallback, Camera.PictureCallback)}, will not change the
2837+
* the lock.</p>
28712838
*
28722839
* <p> Changing the white balance mode with {@link #setWhiteBalance}
28732840
* will release the auto-white balance lock if it is set.</p>
28742841
*
2875-
* <p>Exposure compensation, in conjunction with re-enabling the AE and
2876-
* AWB locks after each still capture, can be used to capture an
2877-
* exposure-bracketed burst of images, for example. Auto-white balance
2878-
* state, including the lock state, will not be maintained after camera
2879-
* {@link #release()} is called. Locking auto-white balance after
2880-
* {@link #open()} but before the first call to {@link #startPreview()}
2881-
* will not allow the auto-white balance routine to run at all, and may
2882-
* result in severely incorrect color in captured images.</p>
2883-
*
2884-
* <p>The driver may also independently lock auto-white balance after
2885-
* auto-focus completes. If this is undesirable, be sure to always set
2886-
* the auto-white balance lock to false after the
2887-
* {@link AutoFocusCallback#onAutoFocus(boolean, Camera)} callback is
2888-
* received. The {@link #getAutoWhiteBalanceLock()} method can be used
2889-
* after the callback to determine if the camera has locked auto-white
2890-
* balance independently.</p>
2842+
* <p>Exposure compensation, AE lock, and AWB lock can be used to
2843+
* capture an exposure-bracketed burst of images, for example.
2844+
* Auto-white balance state, including the lock state, will not be
2845+
* maintained after camera {@link #release()} is called. Locking
2846+
* auto-white balance after {@link #open()} but before the first call to
2847+
* {@link #startPreview()} will not allow the auto-white balance routine
2848+
* to run at all, and may result in severely incorrect color in captured
2849+
* images.</p>
28912850
*
28922851
* @param toggle new state of the auto-white balance lock. True means
28932852
* that auto-white balance is locked, false means that the
@@ -2908,11 +2867,7 @@ public void setAutoWhiteBalanceLock(boolean toggle) {
29082867
*
29092868
* @return State of the auto-white balance lock. Returns true if
29102869
* auto-white balance is currently locked, and false
2911-
* otherwise. The auto-white balance lock may be independently
2912-
* enabled by the camera subsystem when auto-focus has
2913-
* completed. This method can be used after the
2914-
* {@link AutoFocusCallback#onAutoFocus(boolean, Camera)}
2915-
* callback to determine if the camera has locked AWB.
2870+
* otherwise.
29162871
*
29172872
* @see #setAutoWhiteBalanceLock(boolean)
29182873
*

include/camera/CameraParameters.h

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -317,18 +317,13 @@ class CameraParameters
317317
// recalculate exposure values). Changing exposure compensation
318318
// settings will still affect the exposure settings while
319319
// auto-exposure is locked. Stopping preview or taking a still
320-
// image will release the lock. However, the lock can be
321-
// re-enabled prior to preview being re-started, to keep the
322-
// exposure values from the previous lock. In conjunction with
320+
// image will not change the lock. In conjunction with
323321
// exposure compensation, this allows for capturing multi-exposure
324322
// brackets with known relative exposure values. Locking
325323
// auto-exposure after open but before the first call to
326324
// startPreview may result in severely over- or under-exposed
327-
// images. The driver may independently enable the AE lock after
328-
// auto-focus completes. If it does so, this key must have its
329-
// value updated to reflect the lock's existence. Applications are
330-
// free to release such a lock, to re-enable AE without restarting
331-
// preview.
325+
// images. The driver will not change the AE lock after
326+
// auto-focus completes.
332327
static const char KEY_AUTO_EXPOSURE_LOCK[];
333328
// Whether locking the auto-exposure is supported. "true" means it is, and
334329
// "false" or this key not existing means it is not supported.
@@ -339,18 +334,13 @@ class CameraParameters
339334
// change white balance values. If auto-white balance is already
340335
// locked, setting this to true again has no effect (the driver
341336
// will not recalculate white balance values). Stopping preview or
342-
// taking a still image will release the lock. However, the lock
343-
// can be re-enabled prior to preview being re-started, to keep
344-
// the white balance values from the previous lock. In conjunction
337+
// taking a still image will not change the lock. In conjunction
345338
// with exposure compensation, this allows for capturing
346339
// multi-exposure brackets with fixed white balance. Locking
347340
// auto-white balance after open but before the first call to
348341
// startPreview may result in severely incorrect color. The
349-
// driver may independently enable the AWB lock after auto-focus
350-
// completes. If it does so, this key must have its value updated
351-
// to reflect the lock's existence. Applications are free to
352-
// release such a lock, to re-enable AWB without restarting
353-
// preview.
342+
// driver will not change the AWB lock after auto-focus
343+
// completes.
354344
static const char KEY_AUTO_WHITEBALANCE_LOCK[];
355345
// Whether locking the auto-white balance is supported. "true"
356346
// means it is, and "false" or this key not existing means it is

0 commit comments

Comments
 (0)