Merge "Fix AVRCP volume control from UI volume slider"

This commit is contained in:
TreeHugger Robot
2019-02-05 03:26:26 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 3 deletions

View File

@@ -1710,7 +1710,7 @@ public class AudioService extends IAudioService.Stub
Log.d(TAG, "adjustSreamVolume: postSetAvrcpAbsoluteVolumeIndex index="
+ newIndex + "stream=" + streamType);
}
mDeviceBroker.postSetAvrcpAbsoluteVolumeIndex(newIndex);
mDeviceBroker.postSetAvrcpAbsoluteVolumeIndex(newIndex / 10);
}
// Check if volume update should be send to Hearing Aid

View File

@@ -191,8 +191,8 @@ public class BtHelper {
Log.i(TAG, "setAvrcpAbsoluteVolumeIndex index=" + index);
}
AudioService.sVolumeLogger.log(new AudioServiceEvents.VolumeEvent(
AudioServiceEvents.VolumeEvent.VOL_SET_AVRCP_VOL, index / 10));
mA2dp.setAvrcpAbsoluteVolume(index / 10);
AudioServiceEvents.VolumeEvent.VOL_SET_AVRCP_VOL, index));
mA2dp.setAvrcpAbsoluteVolume(index);
}
/*package*/ synchronized int getA2dpCodec(@NonNull BluetoothDevice device) {