Revert "Use aidl interface for Widevine service."
This reverts commit 96a8ccd4a1.
Reason for revert:
Could break DeviceManifest/SingleManifestTest#ManifestAidlHalsServed
Bug: 200055138
Bug: 170964303
Bug: 217241995
Change-Id: I9c42df15defec428c9ef8c62439c63d4a603fee6
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
//
|
||||
// Copyright 2021 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
//
|
||||
|
||||
#ifndef WV_UTILS_H_
|
||||
#define WV_UTILS_H_
|
||||
|
||||
#include <aidl/android/hardware/drm/Status.h>
|
||||
#include <android/binder_auto_utils.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "log.h"
|
||||
|
||||
namespace wvdrm {
|
||||
|
||||
inline ::aidl::android::hardware::drm::LogPriority toAidlLogPriority(
|
||||
wvutil::LogPriority p) {
|
||||
switch (p) {
|
||||
case wvutil::LogPriority::CDM_LOG_ERROR:
|
||||
return ::aidl::android::hardware::drm::LogPriority::ERROR;
|
||||
case wvutil::LogPriority::CDM_LOG_WARN:
|
||||
return ::aidl::android::hardware::drm::LogPriority::WARN;
|
||||
case wvutil::LogPriority::CDM_LOG_INFO:
|
||||
return ::aidl::android::hardware::drm::LogPriority::INFO;
|
||||
case wvutil::LogPriority::CDM_LOG_DEBUG:
|
||||
return ::aidl::android::hardware::drm::LogPriority::DEBUG;
|
||||
case wvutil::LogPriority::CDM_LOG_VERBOSE:
|
||||
return ::aidl::android::hardware::drm::LogPriority::VERBOSE;
|
||||
default:
|
||||
return ::aidl::android::hardware::drm::LogPriority::UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
inline ::ndk::ScopedAStatus toNdkScopedAStatus(
|
||||
::aidl::android::hardware::drm::Status status) {
|
||||
if (::aidl::android::hardware::drm::Status::OK == status)
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
else {
|
||||
return ::ndk::ScopedAStatus::fromServiceSpecificError(
|
||||
static_cast<int32_t>(status));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace wvdrm
|
||||
|
||||
#endif // WV_UTILS_H_
|
||||
Reference in New Issue
Block a user