mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 21:37:44 +00:00
Merge "Use String8/16 c_str [cas]" into main
This commit is contained in:
@@ -103,8 +103,7 @@ Return<void> CasImpl::openSession(openSession_cb _hidl_cb) {
|
||||
|
||||
Return<Status> CasImpl::setSessionPrivateData(
|
||||
const HidlCasSessionId &sessionId, const HidlCasData& pvtData) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__,
|
||||
sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
@@ -113,8 +112,7 @@ Return<Status> CasImpl::setSessionPrivateData(
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::closeSession(const HidlCasSessionId &sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__,
|
||||
sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
@@ -124,8 +122,7 @@ Return<Status> CasImpl::closeSession(const HidlCasSessionId &sessionId) {
|
||||
|
||||
Return<Status> CasImpl::processEcm(
|
||||
const HidlCasSessionId &sessionId, const HidlCasData& ecm) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__,
|
||||
sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
|
||||
@@ -62,8 +62,7 @@ DescramblerImpl::~DescramblerImpl() {
|
||||
}
|
||||
|
||||
Return<Status> DescramblerImpl::setMediaCasSession(const HidlCasSessionId& sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__,
|
||||
sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
|
||||
std::shared_ptr<DescramblerPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
|
||||
@@ -98,10 +98,10 @@ bool FactoryLoader<T>::findFactoryForScheme(
|
||||
String8 dirPath("/vendor/lib/mediacas");
|
||||
#endif
|
||||
|
||||
DIR* pDir = opendir(dirPath.string());
|
||||
DIR* pDir = opendir(dirPath.c_str());
|
||||
|
||||
if (pDir == NULL) {
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.string());
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -138,10 +138,10 @@ bool FactoryLoader<T>::enumeratePlugins(
|
||||
String8 dirPath("/vendor/lib/mediacas");
|
||||
#endif
|
||||
|
||||
DIR* pDir = opendir(dirPath.string());
|
||||
DIR* pDir = opendir(dirPath.c_str());
|
||||
|
||||
if (pDir == NULL) {
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.string());
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace V1_0 {
|
||||
namespace implementation {
|
||||
|
||||
SharedLibrary::SharedLibrary(const String8 &path) {
|
||||
mLibHandle = dlopen(path.string(), RTLD_NOW);
|
||||
mLibHandle = dlopen(path.c_str(), RTLD_NOW);
|
||||
}
|
||||
|
||||
SharedLibrary::~SharedLibrary() {
|
||||
|
||||
@@ -125,7 +125,7 @@ Return<void> CasImpl::openSession(openSession_cb _hidl_cb) {
|
||||
|
||||
Return<Status> CasImpl::setSessionPrivateData(const HidlCasSessionId& sessionId,
|
||||
const HidlCasData& pvtData) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
@@ -134,7 +134,7 @@ Return<Status> CasImpl::setSessionPrivateData(const HidlCasSessionId& sessionId,
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::closeSession(const HidlCasSessionId& sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
@@ -143,7 +143,7 @@ Return<Status> CasImpl::closeSession(const HidlCasSessionId& sessionId) {
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::processEcm(const HidlCasSessionId& sessionId, const HidlCasData& ecm) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
|
||||
@@ -59,7 +59,7 @@ DescramblerImpl::~DescramblerImpl() {
|
||||
}
|
||||
|
||||
Return<Status> DescramblerImpl::setMediaCasSession(const HidlCasSessionId& sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
|
||||
std::shared_ptr<DescramblerPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
|
||||
@@ -90,10 +90,10 @@ bool FactoryLoader<T>::findFactoryForScheme(int32_t CA_system_id, sp<SharedLibra
|
||||
#else
|
||||
String8 dirPath("/vendor/lib/mediacas");
|
||||
#endif
|
||||
DIR* pDir = opendir(dirPath.string());
|
||||
DIR* pDir = opendir(dirPath.c_str());
|
||||
|
||||
if (pDir == NULL) {
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.string());
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -127,10 +127,10 @@ bool FactoryLoader<T>::enumeratePlugins(vector<HidlCasPluginDescriptor>* results
|
||||
#else
|
||||
String8 dirPath("/vendor/lib/mediacas");
|
||||
#endif
|
||||
DIR* pDir = opendir(dirPath.string());
|
||||
DIR* pDir = opendir(dirPath.c_str());
|
||||
|
||||
if (pDir == NULL) {
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.string());
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace V1_1 {
|
||||
namespace implementation {
|
||||
|
||||
SharedLibrary::SharedLibrary(const String8& path) {
|
||||
mLibHandle = dlopen(path.string(), RTLD_NOW);
|
||||
mLibHandle = dlopen(path.c_str(), RTLD_NOW);
|
||||
}
|
||||
|
||||
SharedLibrary::~SharedLibrary() {
|
||||
|
||||
@@ -174,7 +174,7 @@ Return<void> CasImpl::openSession_1_2(const SessionIntent intent, const Scrambli
|
||||
|
||||
Return<Status> CasImpl::setSessionPrivateData(const HidlCasSessionId& sessionId,
|
||||
const HidlCasData& pvtData) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
@@ -183,7 +183,7 @@ Return<Status> CasImpl::setSessionPrivateData(const HidlCasSessionId& sessionId,
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::closeSession(const HidlCasSessionId& sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
@@ -192,7 +192,7 @@ Return<Status> CasImpl::closeSession(const HidlCasSessionId& sessionId) {
|
||||
}
|
||||
|
||||
Return<Status> CasImpl::processEcm(const HidlCasSessionId& sessionId, const HidlCasData& ecm) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
std::shared_ptr<CasPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
|
||||
@@ -59,7 +59,7 @@ DescramblerImpl::~DescramblerImpl() {
|
||||
}
|
||||
|
||||
Return<Status> DescramblerImpl::setMediaCasSession(const HidlCasSessionId& sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
|
||||
std::shared_ptr<DescramblerPlugin> holder = std::atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
|
||||
@@ -90,10 +90,10 @@ bool FactoryLoader<T>::findFactoryForScheme(int32_t CA_system_id, sp<SharedLibra
|
||||
#else
|
||||
String8 dirPath("/vendor/lib/mediacas");
|
||||
#endif
|
||||
DIR* pDir = opendir(dirPath.string());
|
||||
DIR* pDir = opendir(dirPath.c_str());
|
||||
|
||||
if (pDir == NULL) {
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.string());
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -127,10 +127,10 @@ bool FactoryLoader<T>::enumeratePlugins(vector<HidlCasPluginDescriptor>* results
|
||||
#else
|
||||
String8 dirPath("/vendor/lib/mediacas");
|
||||
#endif
|
||||
DIR* pDir = opendir(dirPath.string());
|
||||
DIR* pDir = opendir(dirPath.c_str());
|
||||
|
||||
if (pDir == NULL) {
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.string());
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace V1_1 {
|
||||
namespace implementation {
|
||||
|
||||
SharedLibrary::SharedLibrary(const String8& path) {
|
||||
mLibHandle = dlopen(path.string(), RTLD_NOW);
|
||||
mLibHandle = dlopen(path.c_str(), RTLD_NOW);
|
||||
}
|
||||
|
||||
SharedLibrary::~SharedLibrary() {
|
||||
|
||||
@@ -158,7 +158,7 @@ ScopedAStatus CasImpl::openSession(SessionIntent intent, ScramblingMode mode,
|
||||
|
||||
ScopedAStatus CasImpl::setSessionPrivateData(const vector<uint8_t>& sessionId,
|
||||
const vector<uint8_t>& pvtData) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
shared_ptr<CasPlugin> holder = atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
@@ -167,7 +167,7 @@ ScopedAStatus CasImpl::setSessionPrivateData(const vector<uint8_t>& sessionId,
|
||||
}
|
||||
|
||||
ScopedAStatus CasImpl::closeSession(const vector<uint8_t>& sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
shared_ptr<CasPlugin> holder = atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
@@ -176,7 +176,7 @@ ScopedAStatus CasImpl::closeSession(const vector<uint8_t>& sessionId) {
|
||||
}
|
||||
|
||||
ScopedAStatus CasImpl::processEcm(const vector<uint8_t>& sessionId, const vector<uint8_t>& ecm) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(sessionId).c_str());
|
||||
shared_ptr<CasPlugin> holder = atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
return toStatus(INVALID_OPERATION);
|
||||
|
||||
@@ -54,7 +54,7 @@ DescramblerImpl::~DescramblerImpl() {
|
||||
}
|
||||
|
||||
ScopedAStatus DescramblerImpl::setMediaCasSession(const vector<uint8_t>& in_sessionId) {
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(in_sessionId).string());
|
||||
ALOGV("%s: sessionId=%s", __FUNCTION__, sessionIdToString(in_sessionId).c_str());
|
||||
|
||||
shared_ptr<DescramblerPlugin> holder = atomic_load(&mPluginHolder);
|
||||
if (holder.get() == nullptr) {
|
||||
|
||||
@@ -87,10 +87,10 @@ bool FactoryLoader<T>::findFactoryForScheme(int32_t CA_system_id,
|
||||
#else
|
||||
String8 dirPath("/vendor/lib/mediacas");
|
||||
#endif
|
||||
DIR* pDir = opendir(dirPath.string());
|
||||
DIR* pDir = opendir(dirPath.c_str());
|
||||
|
||||
if (pDir == NULL) {
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.string());
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -124,10 +124,10 @@ bool FactoryLoader<T>::enumeratePlugins(vector<AidlCasPluginDescriptor>* results
|
||||
#else
|
||||
String8 dirPath("/vendor/lib/mediacas");
|
||||
#endif
|
||||
DIR* pDir = opendir(dirPath.string());
|
||||
DIR* pDir = opendir(dirPath.c_str());
|
||||
|
||||
if (pDir == NULL) {
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.string());
|
||||
ALOGE("Failed to open plugin directory %s", dirPath.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace hardware {
|
||||
namespace cas {
|
||||
|
||||
SharedLibrary::SharedLibrary(const String8& path) {
|
||||
mLibHandle = dlopen(path.string(), RTLD_NOW);
|
||||
mLibHandle = dlopen(path.c_str(), RTLD_NOW);
|
||||
}
|
||||
|
||||
SharedLibrary::~SharedLibrary() {
|
||||
|
||||
Reference in New Issue
Block a user