Exclude the default CDM from metrics history.
[ Merge of http://go/wvgerrit/173410 ] The DRM plugin opens and closes many CDMs using the default identifier. These metrics are not needed when checking the metric history and will no longer be stored. Default CDM metrics will continue to appear in the live metrics list. Bug: 239462891 Bug: 270166158 Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m Change-Id: I64662a44e9c084cc0f08c5a3f013dbf86374ac2d
This commit is contained in:
@@ -565,6 +565,10 @@ CdmResponseType WvContentDecryptionModule::GetCurrentMetricsInternal(
|
||||
void WvContentDecryptionModule::SaveMetrics(
|
||||
const CdmIdentifier& identifier, drm_metrics::WvCdmMetrics&& metrics) {
|
||||
if (saved_metrics_snapshots_ == nullptr) return;
|
||||
// The DRM plugin opens and closes many CDMs using the default
|
||||
// identifier. These metrics are not needed when checking the
|
||||
// metric history.
|
||||
if (identifier.IsEquivalentToDefault()) return;
|
||||
saved_metrics_snapshots_->PushMetrics(
|
||||
WvMetricsSnapshot::MakeSnapshot(identifier, std::move(metrics)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user