display: Add a check when registering a client
This change checks if the registered client has a valid callback and hwc session. Change-Id: I9758d6d59c7087e67e89318746cb48054255ab72 CRs-Fixed: 2749805
This commit is contained in:
@@ -75,7 +75,13 @@ Return<void> DeviceImpl::registerClient(const hidl_string &client_name,
|
||||
callback->linkToDeath(this, client_handle);
|
||||
}
|
||||
ConfigInterface *intf = nullptr;
|
||||
intf_->RegisterClientContext(device_client, &intf);
|
||||
error = intf_->RegisterClientContext(device_client, &intf);
|
||||
|
||||
if (error) {
|
||||
callback->unlinkToDeath(this);
|
||||
return Void();
|
||||
}
|
||||
|
||||
device_client->SetDeviceConfigIntf(intf);
|
||||
|
||||
display_config_map_.emplace(std::make_pair(client_handle, device_client));
|
||||
|
||||
Reference in New Issue
Block a user