Merge "Only use libbinder_ndk for aidl service." into tm-dev am: f607802265 am: 421e7d99d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18092491 Change-Id: I3874c09e4652c0222a342855199ac343837a91ef Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -49,8 +49,7 @@ bool WVDrmFactory::isCryptoSchemeSupported(const Uuid& in_uuid) {
|
||||
const std::vector<uint8_t>& in_initData,
|
||||
std::shared_ptr<::aidl::android::hardware::drm::ICryptoPlugin>*
|
||||
_aidl_return) {
|
||||
const auto& self = android::IPCThreadState::self();
|
||||
const char* sid = self->getCallingSid();
|
||||
const char* sid = AIBinder_getCallingSid();
|
||||
sid = sid ? (std::strstr(sid, "mediadrmserver") ? sid : "app") : "nullptr";
|
||||
ALOGI("[%s] calling %s", sid, __PRETTY_FUNCTION__);
|
||||
|
||||
@@ -73,8 +72,7 @@ bool WVDrmFactory::isCryptoSchemeSupported(const Uuid& in_uuid) {
|
||||
::ndk::ScopedAStatus WVDrmFactory::createDrmPlugin(
|
||||
const Uuid& in_uuid, const string& in_appPackageName,
|
||||
std::shared_ptr<::aidl::android::hardware::drm::IDrmPlugin>* _aidl_return) {
|
||||
const auto& self = ::android::IPCThreadState::self();
|
||||
const char* sid = self->getCallingSid();
|
||||
const char* sid = AIBinder_getCallingSid();
|
||||
sid = sid ? (std::strstr(sid, "mediadrmserver") ? sid : "app") : "nullptr";
|
||||
ALOGI("[%s][%s] calling %s", sid, in_appPackageName.c_str(),
|
||||
__PRETTY_FUNCTION__);
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <android/binder_ibinder_platform.h>
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <binder/ProcessState.h>
|
||||
|
||||
#include "WVCreatePluginFactories.h"
|
||||
#include "WVDrmFactory.h"
|
||||
@@ -31,6 +30,8 @@ int main(int /* argc */, char** /* argv */) {
|
||||
ABinderProcess_setThreadPoolMaxThreadCount(8);
|
||||
|
||||
std::shared_ptr<WVDrmFactory> drmFactory = createDrmFactory();
|
||||
AIBinder_setRequestingSid(drmFactory->asBinder().get(), true);
|
||||
|
||||
const std::string drmInstance =
|
||||
std::string(WVDrmFactory::descriptor) + "/widevine";
|
||||
binder_status_t status = AServiceManager_addService(
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <android/binder_ibinder_platform.h>
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <binder/ProcessState.h>
|
||||
|
||||
#include "WVCreatePluginFactories.h"
|
||||
#include "WVDrmFactory.h"
|
||||
@@ -31,6 +30,8 @@ int main(int /* argc */, char** /* argv */) {
|
||||
ABinderProcess_setThreadPoolMaxThreadCount(8);
|
||||
|
||||
std::shared_ptr<WVDrmFactory> drmFactory = createDrmFactory();
|
||||
AIBinder_setRequestingSid(drmFactory->asBinder().get(), true);
|
||||
|
||||
const std::string drmInstance =
|
||||
std::string(WVDrmFactory::descriptor) + "/widevine";
|
||||
binder_status_t status = AServiceManager_registerLazyService(
|
||||
|
||||
Reference in New Issue
Block a user