Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67627350 authored by Andy Hung's avatar Andy Hung
Browse files

AudioDeviceBroker: Log bluetooth service entry

Test: adb shell dumpsys media.metrics
Bug: 149850236
Change-Id: I72143a0b72a67bfa51446afde7c55950cc1f2091
parent 2cdb725b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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) {