Fix mapCdmResponseType template.
Merged from http://go/wvgerrit/163457 mapCdmResponseType is called either with an enum or a CdmResponseType struct. Test: build android.hardware.drm-service.widevine Test: Netflix and Play Movies & TV Test: build_and_run_all_unit_tests.sh Test: atest MediaDrmParameterizedTests Test: atest DrmSessionManagerTest Bug: 253271674 Bug: 262210157 Change-Id: Ieb9fccf33f54a98c67ddf7655d2a5ada7a946114
This commit is contained in:
@@ -16,11 +16,6 @@ namespace wvdrm {
|
|||||||
|
|
||||||
using ::aidl::android::hardware::drm::Status;
|
using ::aidl::android::hardware::drm::Status;
|
||||||
|
|
||||||
template <typename S = Status>
|
|
||||||
static S mapCdmResponseType(wvcdm::CdmResponseType res) {
|
|
||||||
return mapCdmResponseType(static_cast<wvcdm::CdmResponseType>(res));
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename S = Status>
|
template <typename S = Status>
|
||||||
static S mapCdmResponseType(wvcdm::CdmResponseEnum res) {
|
static S mapCdmResponseType(wvcdm::CdmResponseEnum res) {
|
||||||
Status err = Status::ERROR_DRM_UNKNOWN;
|
Status err = Status::ERROR_DRM_UNKNOWN;
|
||||||
@@ -439,6 +434,11 @@ static S mapCdmResponseType(wvcdm::CdmResponseEnum res) {
|
|||||||
return static_cast<S>(err);
|
return static_cast<S>(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename S = Status>
|
||||||
|
static S mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||||
|
return mapCdmResponseType(static_cast<wvcdm::CdmResponseEnum>(res));
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool isCdmResponseTypeSuccess(wvcdm::CdmResponseType res) {
|
static inline bool isCdmResponseTypeSuccess(wvcdm::CdmResponseType res) {
|
||||||
return mapCdmResponseType(res) == Status::OK;
|
return mapCdmResponseType(res) == Status::OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user