diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2012-09-07 12:26:40 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2012-09-10 09:09:13 -0700 |
commit | 69fe527bea12f262bfb1a5838f40e3433ad3cb78 (patch) | |
tree | 7b264dd1ac20004a111167aa902a487ab40d8ef9 /core/java | |
parent | 753e1280cbc3f0006b04f67385f02e1f92019f7d (diff) | |
download | frameworks_base-69fe527bea12f262bfb1a5838f40e3433ad3cb78.zip frameworks_base-69fe527bea12f262bfb1a5838f40e3433ad3cb78.tar.gz frameworks_base-69fe527bea12f262bfb1a5838f40e3433ad3cb78.tar.bz2 |
Camera: Add enableShutterSound method.
Some camera apps may wish to replace the system camera shutter sound
with their own, especially if they are taking rapid bursts of
images. Add method to allow this when possible.
Hidden for now.
Change-Id: I6520f5441d28675626fafab48c6609c589fc6f7e
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/hardware/Camera.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 829620b..652356c 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -1146,6 +1146,31 @@ public class Camera { public native final void setDisplayOrientation(int degrees); /** + * Enable or disable the default shutter sound when taking a picture. + * + * By default, the camera plays the system-defined camera shutter sound when + * {@link #takePicture} is called. Using this method, the shutter sound can + * be disabled. It is strongly recommended that an alternative shutter sound + * is played in the {@link ShutterCallback} when the system shutter sound is + * disabled. + * + * Note that devices may not always allow control of the camera shutter + * sound. If the shutter sound cannot be controlled, this method will return + * false. + * + * @param enabled whether the camera should play the system shutter sound + * when {@link #takePicture takePicture} is called. + * @return true if the shutter sound state was successfully changed. False + * if the shutter sound cannot be controlled; in this case, the + * application should not play its own shutter sound since the + * system shutter sound will play when a picture is taken. + * @see #takePicture + * @see ShutterCallback + * @hide + */ + public native final boolean enableShutterSound(boolean enabled); + + /** * Callback interface for zoom changes during a smooth zoom operation. * * @see #setZoomChangeListener(OnZoomChangeListener) |