diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-01-31 00:58:26 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-01-31 00:58:26 +0000 |
commit | 1e6feded57078df78cae0be96e11be2964d0405c (patch) | |
tree | fb1807e19392c7e04397b0e9db912299030ac7f5 | |
parent | 8dacd6195c405a461b1b06dd00cd7aceacca9c19 (diff) | |
parent | 89f142b59b1fd1ca1c68ba44daeb96a7d7e8a0d8 (diff) |
Merge "Fix A2DP volume at 0 on connection"
-rw-r--r-- | services/core/java/com/android/server/audio/AudioDeviceBroker.java | 2 | ||||
-rw-r--r-- | services/core/java/com/android/server/audio/AudioDeviceInventory.java | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java index d652f93ccf04..deaa9313fadd 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java +++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java @@ -600,7 +600,7 @@ import java.util.ArrayList; break; case MSG_IL_SET_A2DP_SINK_CONNECTION_STATE: mDeviceInventory.onSetA2dpSinkConnectionState( - (BtHelper.BluetoothA2dpDeviceInfo) msg.obj, msg.arg1, msg.arg2); + (BtHelper.BluetoothA2dpDeviceInfo) msg.obj, msg.arg1); break; case MSG_IL_SET_A2DP_SOURCE_CONNECTION_STATE: mDeviceInventory.onSetA2dpSourceConnectionState( diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java index eb76e6e02edc..97649a741f62 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java +++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java @@ -147,18 +147,20 @@ public final class AudioDeviceInventory { } /*package*/ void onSetA2dpSinkConnectionState(@NonNull BtHelper.BluetoothA2dpDeviceInfo btInfo, - @AudioService.BtProfileConnectionState int state, int a2dpVolume) { + @AudioService.BtProfileConnectionState int state) { final BluetoothDevice btDevice = btInfo.getBtDevice(); + int a2dpVolume = btInfo.getVolume(); if (AudioService.DEBUG_DEVICES) { Log.d(TAG, "onSetA2dpSinkConnectionState btDevice=" + btDevice + " state=" - + state + " is dock=" + btDevice.isBluetoothDock()); + + state + " is dock=" + btDevice.isBluetoothDock() + " vol=" + a2dpVolume); } String address = btDevice.getAddress(); if (!BluetoothAdapter.checkBluetoothAddress(address)) { address = ""; } AudioService.sDeviceLogger.log(new AudioEventLogger.StringEvent( - "A2DP sink connected: device addr=" + address + " state=" + state)); + "A2DP sink connected: device addr=" + address + " state=" + state + + " vol=" + a2dpVolume)); final int a2dpCodec; synchronized (mDeviceBroker.mA2dpAvrcpLock) { |