Merge "AudioService: fix AVRCP absolute volume reset" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3009a4d87d
@@ -1034,6 +1034,11 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
}
|
||||
}
|
||||
|
||||
/*package*/ void clearAvrcpAbsoluteVolumeSupported() {
|
||||
setAvrcpAbsoluteVolumeSupported(false);
|
||||
mAudioService.setAvrcpAbsoluteVolumeSupported(false);
|
||||
}
|
||||
|
||||
/*package*/ boolean getBluetoothA2dpEnabled() {
|
||||
synchronized (mDeviceStateLock) {
|
||||
return mBluetoothA2dpEnabled;
|
||||
|
||||
@@ -1015,7 +1015,7 @@ public class AudioDeviceInventory {
|
||||
}
|
||||
|
||||
// device to remove was visible by APM, update APM
|
||||
mDeviceBroker.setAvrcpAbsoluteVolumeSupported(false);
|
||||
mDeviceBroker.clearAvrcpAbsoluteVolumeSupported();
|
||||
final int res = mAudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
|
||||
AudioSystem.DEVICE_STATE_UNAVAILABLE, address, "", a2dpCodec);
|
||||
|
||||
|
||||
@@ -7647,8 +7647,12 @@ public class AudioService extends IAudioService.Stub
|
||||
// address is not used for now, but may be used when multiple a2dp devices are supported
|
||||
sVolumeLogger.log(new AudioEventLogger.StringEvent("avrcpSupportsAbsoluteVolume addr="
|
||||
+ address + " support=" + support));
|
||||
mAvrcpAbsVolSupported = support;
|
||||
mDeviceBroker.setAvrcpAbsoluteVolumeSupported(support);
|
||||
setAvrcpAbsoluteVolumeSupported(support);
|
||||
}
|
||||
|
||||
/*package*/ void setAvrcpAbsoluteVolumeSupported(boolean support) {
|
||||
mAvrcpAbsVolSupported = support;
|
||||
sendMsg(mAudioHandler, MSG_SET_DEVICE_VOLUME, SENDMSG_QUEUE,
|
||||
AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, 0,
|
||||
mStreamStates[AudioSystem.STREAM_MUSIC], 0);
|
||||
|
||||
Reference in New Issue
Block a user