Update logging logic in AudioStream.

In destructor, it may point to a wrong virtual function for subclasses.
In that case, move the logging logic from destructor of AudioStream to
close_l.

In AudioStream::logOpen, the performance mode is the actual performance
mode instead of the requested one. In that case, log the requested
performance mode when the metric id is set.

Renamed ENCODINGREQUESTED as ENCODINGAPP to make it consitent with atom
definition.

Test: atest MediaMetricsAtomTests
Bug: 185788699
Change-Id: I35b40d7ccd7d135f79bc2c84f7cbfe73946f9d2f
diff --git a/media/libmediametrics/include/MediaMetricsConstants.h b/media/libmediametrics/include/MediaMetricsConstants.h
index 383bae8..66108df 100644
--- a/media/libmediametrics/include/MediaMetricsConstants.h
+++ b/media/libmediametrics/include/MediaMetricsConstants.h
@@ -160,9 +160,9 @@
 #define AMEDIAMETRICS_PROP_VOLUME_LEFT    "volume.left"    // double (AudioTrack)
 #define AMEDIAMETRICS_PROP_VOLUME_RIGHT   "volume.right"   // double (AudioTrack)
 #define AMEDIAMETRICS_PROP_WHERE          "where"          // string value
-// EncodingRequested is the encoding format requested by the app
-#define AMEDIAMETRICS_PROP_ENCODINGREQUESTED "encodingRequested" // string
-// PerformanceModeActual is the actual selected performance mode, could be "none', "loeLatency" or
+// EncodingClient is the encoding format requested by the client
+#define AMEDIAMETRICS_PROP_ENCODINGCLIENT "encodingClient" // string
+// PerformanceModeActual is the actual selected performance mode, could be "none', "lowLatency" or
 // "powerSaving"
 #define AMEDIAMETRICS_PROP_PERFORMANCEMODEACTUAL "performanceModeActual" // string
 #define AMEDIAMETRICS_PROP_FRAMESTRANSFERRED "framesTransferred" // int64_t, transferred frames