Add adjust-only absolute volume behavior.
Adjust-only behavior (DEVICE_VOLUME_BEHAVIOR_ABSOLUTE_ADJUST_ONLY) is a variant of absolute behavior (DEVICE_VOLUME_BEHAVIOR_ABSOLUTE). Like ABSOLUTE, ADJUST_ONLY may be adopted by calling a hidden API in AudioDeviceVolumeManager and providing a listener for volume changes. The difference with ADJUST_ONLY behavior is that setting volume via AudioManager#setStreamVolume does not necessarily have an effect. However, the listener is still notified of setStreamVolume calls in case there's a slow or less reliable method of setting volume. ADJUST_ONLY behavior may be returned by getDeviceVolumeBehavior for SDK level U or higher. For lower SDK levels, FULL volume behavior is returned in its place, as it is a similar but less powerful behavior. Bug: 240663182 Test: atest AbsoluteVolumeBehaviorTest Change-Id: I389bdd650dee717c4b249c989f4a9ee21c4eded7
Loading
Please register or sign in to comment