AudioDeviceBroker: Log bluetooth service entry

Test: adb shell dumpsys media.metrics
Bug: 149850236
Change-Id: I72143a0b72a67bfa51446afde7c55950cc1f2091
This commit is contained in:
Andy Hung
2020-05-13 17:21:12 -07:00
parent 2cdb725ba6
commit 67627350e6

View File

@@ -286,6 +286,13 @@ import java.io.PrintWriter;
final BtDeviceConnectionInfo info = new BtDeviceConnectionInfo(device, state, profile,
suppressNoisyIntent, a2dpVolume);
new MediaMetrics.Item(MediaMetrics.Name.AUDIO_DEVICE + MediaMetrics.SEPARATOR
+ "postBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent")
.set(MediaMetrics.Property.STATE, state == BluetoothProfile.STATE_CONNECTED
? MediaMetrics.Value.CONNECTED : MediaMetrics.Value.DISCONNECTED)
.set(MediaMetrics.Property.INDEX, a2dpVolume)
.record();
// operations of removing and posting messages related to A2DP device state change must be
// mutually exclusive
synchronized (mDeviceStateLock) {