diff --git a/api/current.txt b/api/current.txt index ec930c4b04063..c7ce8aa7d9e2f 100644 --- a/api/current.txt +++ b/api/current.txt @@ -9746,6 +9746,7 @@ package android.hardware { ctor public Camera.CameraInfo(); field public static final int CAMERA_FACING_BACK = 0; // 0x0 field public static final int CAMERA_FACING_FRONT = 1; // 0x1 + field public boolean canDisableShutterSound; field public int facing; field public int orientation; } diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 7b3a8af3eb612..375d788403744 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -233,6 +233,21 @@ public class Camera { * @see Parameters#setJpegThumbnailSize(int, int) */ public int orientation; + + /** + *
Whether the shutter sound can be disabled.
+ * + *On some devices, the camera shutter sound cannot be turned off + * through {@link #enableShutterSound enableShutterSound}. This field + * can be used to determine whether a call to disable the shutter sound + * will succeed.
+ * + *If this field is set to true, then a call of + * {@code enableShutterSound(false)} will be successful. If set to + * false, then that call will fail, and the shutter sound will be played + * when {@link Camera#takePicture takePicture} is called.
+ */ + public boolean canDisableShutterSound; }; /** diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp index e1e97a19cf0fe..99d49ec6c4146 100644 --- a/core/jni/android_hardware_Camera.cpp +++ b/core/jni/android_hardware_Camera.cpp @@ -23,6 +23,7 @@ #include "JNIHelp.h" #include "android_runtime/AndroidRuntime.h" +#include