Dump error_detail in dumpsys
Merged from http://go/wvgerrit/162420 Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine Bug: 260241061 Change-Id: I28b06b201c3408d85f6ca944534ad9602bc60a85
This commit is contained in:
@@ -33,6 +33,7 @@ const char kAttributeKeyStatusType[] = "key_status_type";
|
||||
const char kAttributeEventType[] = "event_type";
|
||||
const char kAttributeKeyRequestType[] = "key_request_type";
|
||||
const char kAttributeLicenseType[] = "license_type";
|
||||
const char kAttributeErrorDetail[] = "error_detail";
|
||||
|
||||
template <typename T>
|
||||
void SetValue(const T& value, DrmMetricNamedValue* attribute);
|
||||
@@ -239,6 +240,10 @@ void WvMetricsGroupBuilder::AddAttributes(
|
||||
AddAttribute(kAttributeLicenseType, attributes_proto.license_type(),
|
||||
&attribute_vector);
|
||||
}
|
||||
if (attributes_proto.has_error_detail()) {
|
||||
AddAttribute(kAttributeErrorDetail, attributes_proto.error_detail(),
|
||||
&attribute_vector);
|
||||
}
|
||||
|
||||
*attributes = attribute_vector;
|
||||
}
|
||||
|
||||
@@ -226,6 +226,11 @@ string FormatAttributes(const string& indent, const Attributes& attributes) {
|
||||
result.append("license_type: ");
|
||||
result.append(to_string(attributes.license_type()));
|
||||
}
|
||||
if (attributes.has_error_detail()) {
|
||||
result.assign(indent);
|
||||
result.append("error_detail: ");
|
||||
result.append(to_string(attributes.error_detail()));
|
||||
}
|
||||
if (result.size()) {
|
||||
return result;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user