Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be535fc8 authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am d860ab4a: am 31fed737: Merge "AudioService: filter flags in volume methods" into jb-mr1-dev

* commit 'd860ab4a':
  AudioService: filter flags in volume methods
parents 9fcc8aed d860ab4a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -733,7 +733,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {

        if (streamType == STREAM_REMOTE_MUSIC) {
            // don't play sounds for remote
            flags &= ~AudioManager.FLAG_PLAY_SOUND;
            flags &= ~(AudioManager.FLAG_PLAY_SOUND|AudioManager.FLAG_FIXED_VOLUME);
            //if (DEBUG_VOL) Log.i(TAG, "Need to adjust remote volume: calling adjustRemoteVolume()");
            adjustRemoteVolume(AudioSystem.STREAM_MUSIC, direction, flags);
        } else {
@@ -771,6 +771,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
        int index;
        int oldIndex;

        flags &= ~AudioManager.FLAG_FIXED_VOLUME;
        if ((streamTypeAlias == AudioSystem.STREAM_MUSIC) &&
               ((device & mFixedVolumeDevices) != 0)) {
            flags |= AudioManager.FLAG_FIXED_VOLUME;
@@ -855,6 +856,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
        final int device = getDeviceForStream(streamType);
        int oldIndex;

        flags &= ~AudioManager.FLAG_FIXED_VOLUME;
        if ((mStreamVolumeAlias[streamType] == AudioSystem.STREAM_MUSIC) &&
                ((device & mFixedVolumeDevices) != 0)) {
            flags |= AudioManager.FLAG_FIXED_VOLUME;