Widevine drm aidl: address API review
Interface update in change 16810770 Bug: 214410088 Test: atest VtsAidlHalDrmTargetTest Change-Id: I19da51ef75952f5ff6c7c02e0393f574e69ee30b
This commit is contained in:
@@ -36,12 +36,17 @@ inline ::aidl::android::hardware::drm::LogPriority toAidlLogPriority(
|
||||
}
|
||||
|
||||
inline ::ndk::ScopedAStatus toNdkScopedAStatus(
|
||||
::aidl::android::hardware::drm::Status status) {
|
||||
::aidl::android::hardware::drm::Status status, const char* msg = nullptr) {
|
||||
if (::aidl::android::hardware::drm::Status::OK == status)
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
else {
|
||||
return ::ndk::ScopedAStatus::fromServiceSpecificError(
|
||||
static_cast<int32_t>(status));
|
||||
auto err = static_cast<int32_t>(status);
|
||||
if (msg) {
|
||||
return ::ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(err,
|
||||
msg);
|
||||
} else {
|
||||
return ::ndk::ScopedAStatus::fromServiceSpecificError(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user