Simplify parameter validation

[ Merge of http://go/wvgerrit/89888 ]

A macro validates parameters in CryptoSession and return a
specified error code. Some error codes have been retired and replaced with
the error code PARAMETER_NULL.

Bug: 136123217
Test: Android unit/integration tests
Change-Id: I6ecbad53e87cce04dfd9ea27861400e83044cf5e
This commit is contained in:
Rahul Frias
2019-11-20 14:36:59 -08:00
parent 0e6398469d
commit 10eb4da035
6 changed files with 57 additions and 175 deletions

View File

@@ -350,21 +350,6 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
case INVALID_PARAMETERS_ENG_16:
*os << "INVALID_PARAMETERS_ENG_16";
break;
case INVALID_PARAMETERS_ENG_17:
*os << "INVALID_PARAMETERS_ENG_17";
break;
case INVALID_PARAMETERS_ENG_18:
*os << "INVALID_PARAMETERS_ENG_18";
break;
case INVALID_PARAMETERS_ENG_19:
*os << "INVALID_PARAMETERS_ENG_19";
break;
case INVALID_PARAMETERS_ENG_20:
*os << "INVALID_PARAMETERS_ENG_20";
break;
case INVALID_PARAMETERS_ENG_21:
*os << "INVALID_PARAMETERS_ENG_21";
break;
case INVALID_PARAMETERS_ENG_22:
*os << "INVALID_PARAMETERS_ENG_22";
break;