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

Commit 105dd7e6 authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioDeviceInventory: fix Bluetooth profile disconnection metrics

Add missing event to media metrics entries for Bluetooth profile
disconnection: a metrics record without item is rejected.

Bug: 297721616
Test: make
Change-Id: Id9b60c668607d4ff46dea686b1ecd4954ede52dd
parent bae52482
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1437,6 +1437,7 @@ public class AudioDeviceInventory {
                }
            });
            new MediaMetrics.Item(mMetricsId + "disconnectA2dp")
                    .set(MediaMetrics.Property.EVENT, "disconnectA2dp")
                    .record();
            if (toRemove.size() > 0) {
                final int delay = checkSendBecomingNoisyIntentInt(
@@ -1459,6 +1460,7 @@ public class AudioDeviceInventory {
                }
            });
            new MediaMetrics.Item(mMetricsId + "disconnectA2dpSink")
                    .set(MediaMetrics.Property.EVENT, "disconnectA2dpSink")
                    .record();
            toRemove.stream().forEach(deviceAddress -> makeA2dpSrcUnavailable(deviceAddress));
        }
@@ -1474,6 +1476,7 @@ public class AudioDeviceInventory {
                }
            });
            new MediaMetrics.Item(mMetricsId + "disconnectHearingAid")
                    .set(MediaMetrics.Property.EVENT, "disconnectHearingAid")
                    .record();
            if (toRemove.size() > 0) {
                final int delay = checkSendBecomingNoisyIntentInt(
@@ -1531,6 +1534,7 @@ public class AudioDeviceInventory {
                }
            });
            new MediaMetrics.Item(mMetricsId + "disconnectLeAudio")
                    .set(MediaMetrics.Property.EVENT, "disconnectLeAudio")
                    .record();
            if (toRemove.size() > 0) {
                final int delay = checkSendBecomingNoisyIntentInt(device,