Skip to content

Commit f806871

Browse files
author
Chih-Chung Chang
committed
Fix 5487571: Make sure shutter sound is played when it's enforced
Change-Id: I0c7adf452217b8308243836b40b1fba8f2029240
1 parent d47d4f7 commit f806871

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

services/camera/libcameraservice/CameraService.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,14 +331,8 @@ void CameraService::playSound(sound_kind kind) {
331331
Mutex::Autolock lock(mSoundLock);
332332
sp<MediaPlayer> player = mSoundPlayer[kind];
333333
if (player != 0) {
334-
// do not play the sound if stream volume is 0
335-
// (typically because ringer mode is silent).
336-
int index;
337-
AudioSystem::getStreamVolumeIndex(mAudioStreamType, &index);
338-
if (index != 0) {
339-
player->seekTo(0);
340-
player->start();
341-
}
334+
player->seekTo(0);
335+
player->start();
342336
}
343337
}
344338

0 commit comments

Comments
 (0)