mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-22 06:15:34 -04:00
update sourcehandler/src/distributed_input_source_handler.cpp.
Signed-off-by: ry521 <renyi50@huawei.com>
This commit is contained in:
@@ -64,15 +64,15 @@ int32_t DistributedInputSourceHandler::InitSource(const std::string ¶ms)
|
||||
void DistributedInputSourceHandler::FinishStartSA(const std::string ¶ms, const sptr<IRemoteObject> &remoteObject)
|
||||
{
|
||||
DHLOGI("DInputSourceHandle FinishStartSA");
|
||||
std::unique_lock<std::mutex> lock(proxyMutex_);
|
||||
std::lock_guard<std::mutex> lock(proxyMutex_);
|
||||
if (sourceSvrRecipient_ == nullptr) {
|
||||
DHLOGE("sourceSvrRecipient is nullptr.");
|
||||
return;
|
||||
}
|
||||
remoteObject -> AddDeathRecipient(sourceSvrRecipient_);
|
||||
remoteObject->AddDeathRecipient(sourceSvrRecipient_);
|
||||
dInputSourceProxy_ = iface_cast<IDistributedSourceInput>(remoteObject);
|
||||
DInputSAManager::GetInstance().SetDInputSourceProxy(remoteObject);
|
||||
if ((dInputSourceProxy_ == nullptr) || (dInputSourceProxy_ ->AsObject() == nullptr)) {
|
||||
if ((dInputSourceProxy_ == nullptr) || (dInputSourceProxy_->AsObject() == nullptr)) {
|
||||
DHLOGE("Faild to get input source proxy.");
|
||||
return;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void DistributedInputSourceHandler::SALoadSourceCb::OnLoadSystemAbilityFail(int3
|
||||
void DistributedInputSourceHandler::DInputSourceSvrRecipient::OnRemoteDied(const wptr<IRemoteObject> &remote)
|
||||
{
|
||||
if (remote == nullptr) {
|
||||
DHLOGI("OnRemoteDied remote is nullptr.");
|
||||
DHLOGE("OnRemoteDied remote is nullptr.");
|
||||
return;
|
||||
}
|
||||
DHLOGI("DInputSourceSvrRecipient OnRemoteDied.");
|
||||
@@ -141,7 +141,7 @@ void DistributedInputSourceHandler::OnRemoteSourceSvrDied(const wptr<IRemoteObje
|
||||
return;
|
||||
}
|
||||
|
||||
if (dInputSourceProxy_ ->AsObject() != remoteObject) {
|
||||
if (dInputSourceProxy_->AsObject() != remoteObject) {
|
||||
DHLOGE("OnRemoteSourceSvrDied not found remote object.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user