mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2025-01-17 15:12:46 +00:00
Signed-off-by: m00512953 <mingxihua@huawei.com>
This commit is contained in:
parent
916b7c9181
commit
c334ed49b4
@ -430,29 +430,6 @@ bool ConnectionStateItem::HandleDataAbilityDied(const sptr<IRemoteObject> &token
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ConnectionStateItem::CheckTokenAndConnectionData(const sptr<IRemoteObject> &token,
|
||||
AbilityRuntime::ConnectionData &data, std::shared_ptr<ConnectedDataAbility> &connectedDataAbility)
|
||||
{
|
||||
if (!token) {
|
||||
HILOG_WARN("invalid data ability token.");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto it = dataAbilityMap_.find(token);
|
||||
if (it == dataAbilityMap_.end()) {
|
||||
HILOG_ERROR("no such connected data ability.");
|
||||
return false;
|
||||
}
|
||||
|
||||
connectedDataAbility = it->second;
|
||||
if (!connectedDataAbility) {
|
||||
HILOG_ERROR("can not find such connectedDataAbility");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ConnectionStateItem::IsEmpty() const
|
||||
{
|
||||
return connectionMap_.empty() && dataAbilityMap_.empty();
|
||||
|
Loading…
x
Reference in New Issue
Block a user