AAudio Metrics: Move AAudioStreamReported enums

Bug: 270393418
Test: presubmit
Change-Id: Ibc0b67f7c51dacedebc05e65b195acb1c7d0bfeb
diff --git a/stats/atoms.proto b/stats/atoms.proto
index 02d9582..84222d6 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -18775,28 +18775,10 @@
  */
 message MediametricsAAudioStreamReported {
     // The implementation of aaudio.
-    enum CallerPath {
-        CALLER_PATH_UNKNOWN = 0;
-        CALLER_PATH_LEGACY = 1;
-        CALLER_PATH_MMAP = 2;
-    }
-    optional CallerPath path = 1;
+    optional android.media.audio.CallerPath path = 1;
 
     // The direction of the stream.
-    // See aaudio_direction_t in frameworks/av/media/libaaudio/include/aaudio/AAudio.h
-    // The Direction values are different from aaudio_direction_t to avoid having 0 at the first
-    // value since first value will be used as default value.
-    // See lookup<AAUDIO_DIRECTION> in frameworks/av/services/mediametrics/AudioTypes.cpp
-    // for conversion from aaudio_direction_t to Direction.
-    enum Direction {
-        // The direction is unknown.
-        DIRECTION_UNKNOWN = 0;
-        // Audio data will travel out of the device.
-        DIRECTION_OUTPUT = 1;
-        // Audio data will travel into the device.
-        DIRECTION_INPUT = 2;
-    }
-    optional Direction direction = 2;
+    optional android.media.audio.Direction direction = 2;
 
     // The amount read or written in one shot by the Mixer or DSP.
     optional int32 frames_per_burst = 3;
@@ -18809,38 +18791,13 @@
     // Total frames transferred (written or read)
     optional int64 total_frames_transferred = 7;
 
-    // The performance mode.
-    // See aaudio_performance_mode_t in frameworks/av/media/libaaudio/include/aaudio/AAudio.h
-    enum PerformanceMode {
-        // The performance mode is unknown.
-        PERFORMANCE_MODE_UNKNOWN = 0;
-        // No particular performance mode needs. Default.
-        PERFORMANCE_MODE_NONE = 10;
-        // Extending battery life is more important than low latency.
-        PERFORMANCE_MODE_POWER_SAVING = 11;
-        // Reducing latency is more important than battery life.
-        PERFORMANCE_MODE_LOW_LATENCY = 12;
-    }
     // The performance mode requested by the applications.
-    optional PerformanceMode perf_mode_requested = 8;
+    optional android.media.audio.PerformanceMode perf_mode_requested = 8;
     // The actual performance mode used by aaudio.
-    optional PerformanceMode perf_mode_actual = 9;
+    optional android.media.audio.PerformanceMode perf_mode_actual = 9;
 
     // The mode requested for sharing the device
-    // See aaudio_sharing_mode_t in frameworks/av/media/libaaudio/include/aaudio/AAudio.h
-    // The SharingMode values are different from aaudio_direction_t to avoid having 0 at the first
-    // value since first value will be used as default value.
-    // See lookup<AAUDIO_SHARING_MODE> in frameworks/av/services/mediametrics/AudioTypes.cpp
-    // for conversion from aaudio_sharing_mode_t to SharingMode.
-    enum SharingMode {
-        // The sharing mode is unknown
-        SHARING_MODE_UNKNOWN = 0;
-        // This will be the only stream using a particular source or sink.
-        SHARING_MODE_EXCLUSIVE = 1;
-        // Multiple application will be mixed by the AAudio server.
-        SHARING_MODE_SHARED = 2;
-    }
-    optional SharingMode sharing = 10;
+    optional android.media.audio.SharingMode sharing = 10;
 
     // Approximate number of glitches.
     // Underrun on output stream. Overrun on input stream.
@@ -18860,19 +18817,10 @@
     optional int32 sample_rate = 16;
 
     // The content type of the aaudio stream.
-    // An enumeration from system/media/audio/include/system/audio-hal-enums.h audio_content_type_t
-    enum ContentType {
-        CONTENT_TYPE_UNKNOWN = 0;
-        CONTENT_TYPE_SPEECH = 1;
-        CONTENT_TYPE_MUSIC = 2;
-        CONTENT_TYPE_MOVIE = 3;
-        CONTENT_TYPE_SONIFICATION = 4;
-        CONTENT_TYPE_INVALID = -1;
-    }
-    optional ContentType content_type = 17;
+    optional android.media.audio.ContentType content_type = 17;
 
     // The mode of sharing the device requested by the client.
-    optional SharingMode sharing_requested = 18;
+    optional android.media.audio.SharingMode sharing_requested = 18;
 
     // Android U
     // The format used by the audio hardware.
diff --git a/stats/enums/media/audio/enums.proto b/stats/enums/media/audio/enums.proto
index 83e42a4..3517a7d 100644
--- a/stats/enums/media/audio/enums.proto
+++ b/stats/enums/media/audio/enums.proto
@@ -388,3 +388,60 @@
   AUDIO_USAGE_VEHICLE_STATUS = 1002;
   AUDIO_USAGE_ANNOUNCEMENT = 1003;
 }
+
+// The implementation of aaudio.
+enum CallerPath {
+  CALLER_PATH_UNKNOWN = 0;
+  CALLER_PATH_LEGACY = 1;
+  CALLER_PATH_MMAP = 2;
+}
+
+// The direction of the stream.
+// See aaudio_direction_t in
+// frameworks/av/media/libaaudio/include/aaudio/AAudio.h
+// The Direction values are different from aaudio_direction_t
+// to avoid having 0 at the first value
+// since first value will be used as default value.
+// See lookup<AAUDIO_DIRECTION> in
+// frameworks/av/services/mediametrics/AudioTypes.cpp
+// for conversion from aaudio_direction_t to Direction.
+enum Direction {
+  // The direction is unknown.
+  DIRECTION_UNKNOWN = 0;
+  // Audio data will travel out of the device.
+  DIRECTION_OUTPUT = 1;
+  // Audio data will travel into the device.
+  DIRECTION_INPUT = 2;
+}
+
+// The performance mode.
+// See aaudio_performance_mode_t in
+// frameworks/av/media/libaaudio/include/aaudio/AAudio.h
+enum PerformanceMode {
+  // The performance mode is unknown.
+  PERFORMANCE_MODE_UNKNOWN = 0;
+  // No particular performance mode needs. Default.
+  PERFORMANCE_MODE_NONE = 10;
+  // Extending battery life is more important than low latency.
+  PERFORMANCE_MODE_POWER_SAVING = 11;
+  // Reducing latency is more important than battery life.
+  PERFORMANCE_MODE_LOW_LATENCY = 12;
+}
+
+// The mode requested for sharing the device
+// See aaudio_sharing_mode_t in
+// frameworks/av/media/libaaudio/include/aaudio/AAudio.h
+// The SharingMode values are different from aaudio_direction_t
+// to avoid having 0 at the first
+// value since first value will be used as default value.
+// See lookup<AAUDIO_SHARING_MODE> in
+// frameworks/av/services/mediametrics/AudioTypes.cpp
+// for conversion from aaudio_sharing_mode_t to SharingMode.
+enum SharingMode {
+  // The sharing mode is unknown
+  SHARING_MODE_UNKNOWN = 0;
+  // This will be the only stream using a particular source or sink.
+  SHARING_MODE_EXCLUSIVE = 1;
+  // Multiple application will be mixed by the AAudio server.
+  SHARING_MODE_SHARED = 2;
+}