AudioService: Add metrics for audio mode

A metrics for audio mode changes and failure to release IN_COMMUNICATION
mode when inactive.

Bug: 153934174
Bug: 161444687
Test: repro steps in Bug and verify logs and metrics
Change-Id: Ib3beab2e8b64e7354ff1a32f04561e7b95f61855
This commit is contained in:
Eric Laurent
2020-06-29 09:49:54 -07:00
parent 1b09322bc6
commit 6915e2ff50
5 changed files with 154 additions and 7 deletions

View File

@@ -53,6 +53,7 @@ public class MediaMetrics {
public static final String AUDIO_SERVICE = AUDIO + SEPARATOR + "service";
public static final String AUDIO_VOLUME = AUDIO + SEPARATOR + "volume";
public static final String AUDIO_VOLUME_EVENT = AUDIO_VOLUME + SEPARATOR + "event";
public static final String AUDIO_MODE = AUDIO + SEPARATOR + "mode";
}
/**
@@ -140,6 +141,10 @@ public class MediaMetrics {
public static final Key<String> REQUEST =
createKey("request", String.class);
// For audio mode
public static final Key<String> REQUESTED_MODE =
createKey("requestedMode", String.class); // audio_mode
// For Bluetooth
public static final Key<String> SCO_AUDIO_MODE =
createKey("scoAudioMode", String.class);