Translate Some CDM Errors as Events

The CDM may use the eventing mechanism or the error return-value mechanism to
notify callers of errors that the Java APIs expect to be passed via the
eventing mechanism.  We need to detect when an error has been synchronously
returned via the error return value of a method and fire an appropriate event.

bug: 8620943

Merge of https://widevine-internal-review.googlesource.com/#/c/5261/
from the Widevine CDM repo.

Change-Id: I2055854dc960845dc775b1fceab9d0850b63fbb5
This commit is contained in:
Jeff Tinker
2013-04-25 06:12:01 -07:00
parent 15cf441d17
commit 187d3e94e8
2 changed files with 37 additions and 27 deletions

View File

@@ -161,7 +161,11 @@ class WVDrmPlugin : public android::DrmPlugin,
WVGenericCryptoInterface* mCrypto;
map<CdmSessionId, CryptoSession> mCryptoSessions;
static status_t mapOEMCryptoResult(OEMCryptoResult res);
status_t mapAndNotifyOfCdmResponseType(const Vector<uint8_t>& sessionId,
CdmResponseType res);
status_t mapAndNotifyOfOEMCryptoResult(const Vector<uint8_t>& sessionId,
OEMCryptoResult res);
};
} // namespace wvdrm