OSDN Git Service

AudioService: fix mismatch in device volume index for alias streams
authorEric Laurent <elaurent@google.com>
Thu, 3 Nov 2016 23:27:40 +0000 (16:27 -0700)
committerEric Laurent <elaurent@google.com>
Wed, 7 Dec 2016 18:56:19 +0000 (18:56 +0000)
commit825a5ea380d277d201a017d743cf10725266b64c
treec1e68cf4d60a0e1111db134d71d0e70144e9acc4
parent987f4e53e412fbf540ae8f05ae7b5eca9bfc8c7e
AudioService: fix mismatch in device volume index for alias streams

Fix VolumeStreamState.setIndex() to force device volume
index update on an alias stream when no specific device volume exists
on the VolumeStreamState of this alias stream.

This prevents asymetric behaviors of setDeviceVolume() and setAllVolumes()
causing some stream types to be muted and
not unmuted if no specific device volume index exist.

Test: make
Test: wipe device, setup wizard, place call and check nofication volume

Bug: 32626244
Change-Id: Idd170aa9f295b0a9533a589e1891a04c05ab2f2f
(cherry picked from commit 3fb608e4f38df2781461ee601156258c90b6c472)
services/core/java/com/android/server/audio/AudioService.java