Fix FormatAttributes

Merged from http://go/wvgerrit/161639

This CL addresses the review comment in http://go/ag/20205433
so that attributes.error_code should be using
CdmResponseTypeToString().

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 239462891
Change-Id: Iaa96423044d53a83406807b3db90e394fdda2803
This commit is contained in:
Edwin Wong
2022-11-17 01:51:33 +00:00
parent 0c64ed0e0b
commit c13a1981c4

View File

@@ -162,7 +162,8 @@ string FormatAttributes(const string& indent, const Attributes& attributes) {
result.append("error_code:\n");
string next_indent = indent + kIndentSpaces;
result.append(next_indent + "name: ");
result.append(DrmHalStatusToString(static_cast<Status>(attributes.error_code())));
result.append(CdmResponseTypeToString(static_cast<wvcdm::CdmResponseType>(
attributes.error_code())));
result.append("\n" + next_indent + "value: ");
result.append(to_string(attributes.error_code()));
}