@@ -1464,6 +1464,8 @@ public class Parameters {
14641464 private static final String KEY_MAX_NUM_DETECTED_FACES_SW = "max-num-detected-faces-sw" ;
14651465 private static final String KEY_RECORDING_HINT = "recording-hint" ;
14661466 private static final String KEY_VIDEO_SNAPSHOT_SUPPORTED = "video-snapshot-supported" ;
1467+ private static final String KEY_VIDEO_STABILIZATION = "video-stabilization" ;
1468+ private static final String KEY_VIDEO_STABILIZATION_SUPPORTED = "video-stabilization-supported" ;
14671469
14681470 // Parameter key suffix for supported values.
14691471 private static final String SUPPORTED_VALUES_SUFFIX = "-values" ;
@@ -2443,7 +2445,7 @@ public String getWhiteBalance() {
24432445 *
24442446 * @param value new white balance.
24452447 * @see #getWhiteBalance()
2446- * @see #setAutoWhiteBalanceLock()
2448+ * @see #setAutoWhiteBalanceLock(boolean )
24472449 */
24482450 public void setWhiteBalance (String value ) {
24492451 set (KEY_WHITE_BALANCE , value );
@@ -3208,6 +3210,59 @@ public boolean isVideoSnapshotSupported() {
32083210 return TRUE .equals (str );
32093211 }
32103212
3213+ /**
3214+ * <p>Enables and disables video stabilization. Use
3215+ * {@link #isVideoStabilizationSupported} to determine if calling this
3216+ * method is valid.</p>
3217+ *
3218+ * <p>Video stabilization reduces the shaking due to the motion of the
3219+ * camera in both the preview stream and in recorded videos, including
3220+ * data received from the preview callback. It does not reduce motion
3221+ * blur in images captured with
3222+ * {@link Camera#takePicture takePicture}.</p>
3223+ *
3224+ * <p>Video stabilization can be enabled and disabled while preview or
3225+ * recording is active, but toggling it may cause a jump in the video
3226+ * stream that may be undesirable in a recorded video.</p>
3227+ *
3228+ * @param toggle Set to true to enable video stabilization, and false to
3229+ * disable video stabilization.
3230+ * @see #isVideoStabilizationSupported()
3231+ * @see #getVideoStabilization()
3232+ * @hide
3233+ */
3234+ public void setVideoStabilization (boolean toggle ) {
3235+ set (KEY_VIDEO_STABILIZATION , toggle ? TRUE : FALSE );
3236+ }
3237+
3238+ /**
3239+ * Get the current state of video stabilization. See
3240+ * {@link #setVideoStabilization} for details of video stabilization.
3241+ *
3242+ * @return true if video stabilization is enabled
3243+ * @see #isVideoStabilizationSupported()
3244+ * @see #setVideoStabilization(boolean)
3245+ * @hide
3246+ */
3247+ public boolean getVideoStabilization () {
3248+ String str = get (KEY_VIDEO_STABILIZATION );
3249+ return TRUE .equals (str );
3250+ }
3251+
3252+ /**
3253+ * Returns true if video stabilization is supported. See
3254+ * {@link #setVideoStabilization} for details of video stabilization.
3255+ *
3256+ * @return true if video stabilization is supported
3257+ * @see #setVideoStabilization(boolean)
3258+ * @see #getVideoStabilization()
3259+ * @hide
3260+ */
3261+ public boolean isVideoStabilizationSupported () {
3262+ String str = get (KEY_VIDEO_STABILIZATION_SUPPORTED );
3263+ return TRUE .equals (str );
3264+ }
3265+
32113266 // Splits a comma delimited string to an ArrayList of String.
32123267 // Return null if the passing string is null or the size is 0.
32133268 private ArrayList <String > split (String str ) {
0 commit comments