Correct CryptoException error returned before keys have been loaded

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

Earlier versions of android returned CryptoException with
error code ERROR_NO_KEY, when a decrypt call was received before keys were
loaded. Changes to O resulted in ERROR_SESSION_NOT_OPENED being returned
instead. This CL reverts the behaviour.

Also a change to correct CDM error code numbering in comments.

Test: Verified by unit and integration tests

b/37219830

Change-Id: I43758cd29cf9d1945f878ac352a5f26538b48cdb
This commit is contained in:
Rahul Frias
2017-04-15 02:06:02 -07:00
parent 80798ae11c
commit 3d599197be
6 changed files with 40 additions and 31 deletions

View File

@@ -568,6 +568,12 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
case INCORRECT_USAGE_SUPPORT_TYPE_2:
*os << "INCORRECT_USAGE_SUPPORT_TYPE_2";
break;
case KEY_PROHIBITED_FOR_SECURITY_LEVEL:
*os << "KEY_PROHIBITED_FOR_SECURITY_LEVEL";
break;
case KEY_NOT_FOUND_IN_SESSION:
*os << "KEY_NOT_FOUND_IN_SESSION";
break;
default:
*os << "Unknown CdmResponseType";