VCS: Refactor Device Volume API for generic usage
Refactors the Device Volume API to be fully independent of the Group Volume API, allowing both APIs to coexist without breaking existing logic. Enhance setDeviceVolume to include mute state control. Update device volume and mute state in group operations to reflect any changes in group volume or mute state. Modify getDeviceVolume to fall back to group volume if device-specific volume data does not exist (e.g., when a device is newly added to a group). Modify getGroupVolume to fall back to device volume if group-specific volume data does not exist (e.g., when group volume has not been set before). Modify getMute to fall back to group mute state if device-specific mute state does not exist. Modify getGroupMute to fall back to device mute state if device-specific mute state does not exist. Remove the case for non-autonomous device volume changes from handleVolumeControlChanged, as no action is required in such scenarios. Remove group volume restoration in connectionStateChanged#Connected, as it is already handled in handleVolumeControlChanged. Bug: 339760224 Bug: 381507732 Test: atest VolumeControlServiceTest Change-Id: I4ebb08d671025f2ffcce13fc782b56a06a605efe
Loading
Please register or sign in to comment