mirror of
https://gitee.com/openharmony/accessibility
synced 2024-11-27 00:51:07 +00:00
!1112 修改无障碍aa、asac服务启动未添加死亡回调
Merge pull request !1112 from qianchuang/add_death
This commit is contained in:
commit
903dfc40b5
@ -167,6 +167,15 @@ void AccessibleAbilityClientImpl::LoadSystemAbilitySuccess(const sptr<IRemoteObj
|
||||
std::lock_guard<std::mutex> lock(conVarMutex_);
|
||||
if (remoteObject != nullptr) {
|
||||
serviceProxy_ = iface_cast<IAccessibleAbilityManagerService>(remoteObject);
|
||||
if (!deathRecipient_) {
|
||||
deathRecipient_ = new(std::nothrow) AccessibilityServiceDeathRecipient(*this);
|
||||
if (!deathRecipient_) {
|
||||
HILOG_ERROR("create deathRecipient_ fail.");
|
||||
}
|
||||
}
|
||||
if (deathRecipient_ && remoteObject->IsProxyObject() && remoteObject->AddDeathRecipient(deathRecipient_)) {
|
||||
HILOG_INFO("successed to add death recipient");
|
||||
}
|
||||
} else {
|
||||
HILOG_WARN("remoteObject is nullptr.");
|
||||
}
|
||||
|
@ -154,8 +154,8 @@ void AccessibilityConfig::Impl::LoadSystemAbilitySuccess(const sptr<IRemoteObjec
|
||||
HILOG_ERROR("create deathRecipient_ fail.");
|
||||
}
|
||||
}
|
||||
if (remoteObject->IsProxyObject() && remoteObject->AddDeathRecipient(deathRecipient_)) {
|
||||
HILOG_DEBUG("successed to add death recipient");
|
||||
if (deathRecipient_ && remoteObject->IsProxyObject() && remoteObject->AddDeathRecipient(deathRecipient_)) {
|
||||
HILOG_INFO("successed to add death recipient");
|
||||
}
|
||||
} else {
|
||||
HILOG_WARN("remoteObject is nullptr.");
|
||||
|
@ -136,6 +136,15 @@ void AccessibilitySystemAbilityClientImpl::LoadSystemAbilitySuccess(const sptr<I
|
||||
std::lock_guard<std::mutex> lock(conVarMutex_);
|
||||
if (remoteObject != nullptr) {
|
||||
serviceProxy_ = iface_cast<IAccessibleAbilityManagerService>(remoteObject);
|
||||
if (!deathRecipient_) {
|
||||
deathRecipient_ = new(std::nothrow) DeathRecipient(*this);
|
||||
if (!deathRecipient_) {
|
||||
HILOG_ERROR("create deathRecipient_ fail.");
|
||||
}
|
||||
}
|
||||
if (deathRecipient_ && remoteObject->IsProxyObject() && remoteObject->AddDeathRecipient(deathRecipient_)) {
|
||||
HILOG_INFO("successed to add death recipient");
|
||||
}
|
||||
} else {
|
||||
HILOG_WARN("remoteObject is nullptr.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user