add the option to disable Shutter sound

This commit is contained in:
tibbi
2016-07-09 20:42:36 +02:00
parent 17b771a649
commit b33ecdcc20
6 changed files with 51 additions and 1 deletions

View File

@ -223,7 +223,9 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
mParameters.setPictureSize(maxSize.width, maxSize.height);
mParameters.setRotation(rotation % 360);
MediaPlayer.create(getContext(), R.raw.camera_shutter).start();
if (Config.newInstance(getContext()).getIsSoundEnabled())
MediaPlayer.create(getContext(), R.raw.camera_shutter).start();
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
mCamera.enableShutterSound(false);
}