Don't play a sound when adjusting volume while telephony is active

bug:17106215
Change-Id: I54f156d91440ce777e5a4d473cdd47927479d084
This commit is contained in:
RoboErik
2014-09-02 15:04:27 -07:00
parent d379361ecb
commit 7a18cb5672

View File

@@ -231,7 +231,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
* @param direction The direction to adjust volume in.
*/
public void adjustVolume(int direction, int flags, String packageName, int uid) {
if (isPlaybackActive(false)) {
if (isPlaybackActive(false) || hasFlag(MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY)) {
flags &= ~AudioManager.FLAG_PLAY_SOUND;
}
if (direction > 1) {