diff options
| author | 2020-03-11 14:09:52 +0100 | |
|---|---|---|
| committer | 2020-03-18 14:41:09 +0100 | |
| commit | 664ded78ed9a6ba87a53586e690a5a78ba8ae7fe (patch) | |
| tree | c62f3bf5b77b1e1b4315b904a9362a6fe6543417 | |
| parent | 81ab487105de959171b14c81bd976026d43f4ba7 (diff) | |
Fix regression on voice call default volume
This CL fixes regression introduced by aosp/586122.
The fallback of default volume uses a temporary max volume which may
not be valid. (-1).
This CL uses the up to date AudioSystem.DEFAULT_STREAM_VOLUME instead.
This happens only if no "ro.config.vc_call_vol_default" property defined.
Test: Ensure "ro.config.vc_call_vol_default" is not defined &&
dumpsys audio && ensure VOICE CALL default volume (aka for device 40000000)
is not zero.
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Change-Id: I8937e54a61df196da8c2578f0a581b63dea34caa
| -rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 068d6fc9dbf0..e5cd783f2047 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -672,7 +672,7 @@ public class AudioService extends IAudioService.Stub AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = defaultCallVolume; } else { AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = - (maxCallVolume * 3) / 4; + (MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] * 3) / 4; } int maxMusicVolume = SystemProperties.getInt("ro.config.media_vol_steps", -1); |