Call AIBinder_setRequestingSid from createBinder override function
AIBinder_setRequestingSid must be called first upon creation of a binder object before AIBinder_getCallingSid is called. Call AIBinder_setRequestingSid in the createBinder override function for WVDrmFactory, WVDrmPlugin and WVCryptoPlugin classes. Test: Play TV streaming Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -a Bug: 237613676 Change-Id: I9dde4715ba2003deb463bd75b23e1ebc2f22a764
This commit is contained in:
@@ -407,6 +407,8 @@ class WVDrmPlugin : public ::aidl::android::hardware::drm::BnDrmPlugin,
|
||||
|
||||
std::string mAppPackageName;
|
||||
|
||||
::ndk::SpAIBinder createBinder() override;
|
||||
|
||||
Status queryProperty(const std::string& property,
|
||||
std::string& stringValue) const;
|
||||
|
||||
|
||||
@@ -1851,6 +1851,12 @@ Status WVDrmPlugin::queryProperty(RequestedSecurityLevel securityLevel,
|
||||
return mapCdmResponseType(res);
|
||||
}
|
||||
|
||||
::ndk::SpAIBinder WVDrmPlugin::createBinder() {
|
||||
auto binder = BnDrmPlugin::createBinder();
|
||||
AIBinder_setRequestingSid(binder.get(), true);
|
||||
return binder;
|
||||
}
|
||||
|
||||
Status WVDrmPlugin::queryProperty(const std::string& property,
|
||||
vector<uint8_t>& vector_value) const {
|
||||
std::string string_value;
|
||||
|
||||
Reference in New Issue
Block a user