Merge "AudioService: fix volume behavior for dock devices" into tm-qpr-dev am: 67f8ff06b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20516847 Change-Id: I2d464f38d6793cf4796f47908b8a4b96c3f7ced5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -7055,9 +7055,10 @@ public class AudioService extends IAudioService.Stub
|
||||
|
||||
private @AudioManager.DeviceVolumeBehavior
|
||||
int getDeviceVolumeBehaviorInt(@NonNull AudioDeviceAttributes device) {
|
||||
// translate Java device type to native device type (for the devices masks for full / fixed)
|
||||
final int audioSystemDeviceOut = AudioDeviceInfo.convertDeviceTypeToInternalDevice(
|
||||
device.getType());
|
||||
// Get the internal type set by the AudioDeviceAttributes constructor which is always more
|
||||
// exact (avoids double conversions) than a conversion from SDK type via
|
||||
// AudioDeviceInfo.convertDeviceTypeToInternalDevice()
|
||||
final int audioSystemDeviceOut = device.getInternalType();
|
||||
|
||||
int setDeviceVolumeBehavior = retrieveStoredDeviceVolumeBehavior(audioSystemDeviceOut);
|
||||
if (setDeviceVolumeBehavior != AudioManager.DEVICE_VOLUME_BEHAVIOR_UNSET) {
|
||||
|
||||
Reference in New Issue
Block a user