Merge "Show volume bar when BLE device's volume is changed" am: b5996b0b46
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1962926 Change-Id: I39efd6e2be320171c0bbb0fb2a42f4629a47f2c4
This commit is contained in:
@@ -2817,8 +2817,9 @@ public class AudioService extends IAudioService.Stub
|
|||||||
int step;
|
int step;
|
||||||
|
|
||||||
// skip a2dp absolute volume control request when the device
|
// skip a2dp absolute volume control request when the device
|
||||||
// is not an a2dp device
|
// is neither an a2dp device nor BLE device
|
||||||
if (!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
|
if ((!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
|
||||||
|
&& !AudioSystem.DEVICE_OUT_ALL_BLE_SET.contains(device))
|
||||||
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) {
|
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2958,7 +2959,8 @@ public class AudioService extends IAudioService.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (device == AudioSystem.DEVICE_OUT_BLE_HEADSET
|
if (device == AudioSystem.DEVICE_OUT_BLE_HEADSET
|
||||||
&& streamType == getBluetoothContextualVolumeStream()) {
|
&& streamType == getBluetoothContextualVolumeStream()
|
||||||
|
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
|
||||||
if (DEBUG_VOL) {
|
if (DEBUG_VOL) {
|
||||||
Log.d(TAG, "adjustSreamVolume postSetLeAudioVolumeIndex index="
|
Log.d(TAG, "adjustSreamVolume postSetLeAudioVolumeIndex index="
|
||||||
+ newIndex + " stream=" + streamType);
|
+ newIndex + " stream=" + streamType);
|
||||||
@@ -3559,8 +3561,9 @@ public class AudioService extends IAudioService.Stub
|
|||||||
int oldIndex;
|
int oldIndex;
|
||||||
|
|
||||||
// skip a2dp absolute volume control request when the device
|
// skip a2dp absolute volume control request when the device
|
||||||
// is not an a2dp device
|
// is neither an a2dp device nor BLE device
|
||||||
if (!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
|
if ((!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
|
||||||
|
&& !AudioSystem.DEVICE_OUT_ALL_BLE_SET.contains(device))
|
||||||
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) {
|
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3602,7 +3605,8 @@ public class AudioService extends IAudioService.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (device == AudioSystem.DEVICE_OUT_BLE_HEADSET
|
if (device == AudioSystem.DEVICE_OUT_BLE_HEADSET
|
||||||
&& streamType == getBluetoothContextualVolumeStream()) {
|
&& streamType == getBluetoothContextualVolumeStream()
|
||||||
|
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
|
||||||
if (DEBUG_VOL) {
|
if (DEBUG_VOL) {
|
||||||
Log.d(TAG, "adjustSreamVolume postSetLeAudioVolumeIndex index="
|
Log.d(TAG, "adjustSreamVolume postSetLeAudioVolumeIndex index="
|
||||||
+ index + " stream=" + streamType);
|
+ index + " stream=" + streamType);
|
||||||
|
|||||||
Reference in New Issue
Block a user