mirror of
https://github.com/openharmony/multimedia_audio_standard.git
synced 2026-06-30 22:17:58 -04:00
Revert "[Change]GetVolume to return 0 when mute is true"
This reverts commit 348ed7082d.
Signed-off-by: Ashish <ashish.sawakar@huawei.com>
This commit is contained in:
@@ -234,9 +234,6 @@ int32_t AudioPolicyServer::SetStreamVolume(AudioStreamType streamType, float vol
|
||||
|
||||
float AudioPolicyServer::GetStreamVolume(AudioStreamType streamType)
|
||||
{
|
||||
if (GetStreamMute(streamType)) {
|
||||
return MIN_VOLUME_LEVEL;
|
||||
}
|
||||
return mPolicyService.GetStreamVolume(streamType);
|
||||
}
|
||||
|
||||
@@ -249,18 +246,7 @@ int32_t AudioPolicyServer::SetStreamMute(AudioStreamType streamType, bool mute)
|
||||
}
|
||||
}
|
||||
|
||||
int result = mPolicyService.SetStreamMute(streamType, mute);
|
||||
for (auto it = volumeChangeCbsMap_.begin(); it != volumeChangeCbsMap_.end(); ++it) {
|
||||
std::shared_ptr<VolumeKeyEventCallback> volumeChangeCb = it->second;
|
||||
if (volumeChangeCb == nullptr) {
|
||||
AUDIO_ERR_LOG("volumeChangeCb: nullptr for client : %{public}d", it->first);
|
||||
continue;
|
||||
}
|
||||
AUDIO_DEBUG_LOG("AudioPolicyServer::SetStreamMute trigger volumeChangeCb clientPid : %{public}d", it->first);
|
||||
volumeChangeCb->OnVolumeKeyEvent(streamType, ConvertVolumeToInt(GetStreamVolume(streamType)), false);
|
||||
}
|
||||
|
||||
return result;
|
||||
return mPolicyService.SetStreamMute(streamType, mute);
|
||||
}
|
||||
|
||||
int32_t AudioPolicyServer::SetStreamVolume(AudioStreamType streamType, float volume, bool isUpdateUi)
|
||||
|
||||
Reference in New Issue
Block a user