Merge "AudioService: fix volume behavior for dock devices" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
67f8ff06b4
@@ -7055,9 +7055,10 @@ public class AudioService extends IAudioService.Stub
|
|||||||
|
|
||||||
private @AudioManager.DeviceVolumeBehavior
|
private @AudioManager.DeviceVolumeBehavior
|
||||||
int getDeviceVolumeBehaviorInt(@NonNull AudioDeviceAttributes device) {
|
int getDeviceVolumeBehaviorInt(@NonNull AudioDeviceAttributes device) {
|
||||||
// translate Java device type to native device type (for the devices masks for full / fixed)
|
// Get the internal type set by the AudioDeviceAttributes constructor which is always more
|
||||||
final int audioSystemDeviceOut = AudioDeviceInfo.convertDeviceTypeToInternalDevice(
|
// exact (avoids double conversions) than a conversion from SDK type via
|
||||||
device.getType());
|
// AudioDeviceInfo.convertDeviceTypeToInternalDevice()
|
||||||
|
final int audioSystemDeviceOut = device.getInternalType();
|
||||||
|
|
||||||
int setDeviceVolumeBehavior = retrieveStoredDeviceVolumeBehavior(audioSystemDeviceOut);
|
int setDeviceVolumeBehavior = retrieveStoredDeviceVolumeBehavior(audioSystemDeviceOut);
|
||||||
if (setDeviceVolumeBehavior != AudioManager.DEVICE_VOLUME_BEHAVIOR_UNSET) {
|
if (setDeviceVolumeBehavior != AudioManager.DEVICE_VOLUME_BEHAVIOR_UNSET) {
|
||||||
|
|||||||
Reference in New Issue
Block a user