mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
commit
55a237da32
@ -116,6 +116,10 @@ DistributedUnsupportedData& DistributedUnsupportedData::operator=(DistributedUns
|
||||
|
||||
std::string DistributedWantParams::GetStringByType(const sptr<AAFwk::IInterface> iIt, int typeId)
|
||||
{
|
||||
if (iIt == nullptr) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (typeId == VALUE_TYPE_BOOLEAN) {
|
||||
return static_cast<AAFwk::Boolean*>(AAFwk::IBoolean::Query(iIt))->ToString();
|
||||
} else if (typeId == VALUE_TYPE_BYTE) {
|
||||
@ -314,6 +318,9 @@ sptr<IInterface> DistributedWantParams::GetInterfaceByType(int typeId, const std
|
||||
bool DistributedWantParams::CompareNumberInterface(const sptr<IInterface> iIt1,
|
||||
const sptr<IInterface> iIt2, int typeId)
|
||||
{
|
||||
if (iIt1 == nullptr) {
|
||||
return false;
|
||||
}
|
||||
bool flag = false;
|
||||
switch (typeId) {
|
||||
case VALUE_TYPE_SHORT:
|
||||
@ -344,6 +351,9 @@ bool DistributedWantParams::CompareNumberInterface(const sptr<IInterface> iIt1,
|
||||
|
||||
bool DistributedWantParams::CompareInterface(const sptr<IInterface> iIt1, const sptr<IInterface> iIt2, int typeId)
|
||||
{
|
||||
if (iIt1 == nullptr) {
|
||||
return false;
|
||||
}
|
||||
bool flag = false;
|
||||
switch (typeId) {
|
||||
case VALUE_TYPE_BOOLEAN:
|
||||
@ -465,6 +475,9 @@ bool DistributedWantParams::WriteToParcelWantParams(Parcel& parcel, sptr<IInterf
|
||||
if (!parcel.WriteInt32(VALUE_TYPE_WANTPARAMS)) {
|
||||
return false;
|
||||
}
|
||||
if (o == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return parcel.WriteString16(Str8ToStr16(
|
||||
static_cast<DistributedWantParamWrapper*>(IDistributedWantParams::Query(o))->ToString()));
|
||||
}
|
||||
|
@ -1846,7 +1846,7 @@ void DistributedSchedService::ProcessCalleeOffline(const std::string& deviceId)
|
||||
}
|
||||
ReportDistributedComponentChange(callerInfo, DISTRIBUTED_COMPONENT_REMOVE,
|
||||
IDistributedSched::CALL, IDistributedSched::CALLER);
|
||||
callerMap_.erase(iter++);
|
||||
iter = callerMap_.erase(iter);
|
||||
} else {
|
||||
iter++;
|
||||
}
|
||||
@ -2492,7 +2492,7 @@ int32_t DistributedSchedService::NotifyProcessDiedFromRemote(const CallerInfo& c
|
||||
}
|
||||
ReportDistributedComponentChange(connectInfo, DISTRIBUTED_COMPONENT_REMOVE,
|
||||
IDistributedSched::CONNECT, IDistributedSched::CALLEE);
|
||||
connectAbilityMap_.erase(iter++);
|
||||
iter = connectAbilityMap_.erase(iter);
|
||||
} else {
|
||||
iter++;
|
||||
}
|
||||
@ -2525,7 +2525,7 @@ void DistributedSchedService::RemoveConnectAbilityInfo(const std::string& device
|
||||
DecreaseConnectLocked(uid);
|
||||
ReportDistributedComponentChange(callerInfo, DISTRIBUTED_COMPONENT_REMOVE,
|
||||
IDistributedSched::CONNECT, IDistributedSched::CALLER);
|
||||
distributedConnectAbilityMap_.erase(iter++);
|
||||
iter = distributedConnectAbilityMap_.erase(iter);
|
||||
} else {
|
||||
iter++;
|
||||
}
|
||||
@ -2656,7 +2656,7 @@ void DistributedSchedService::ProcessConnectDied(const sptr<IRemoteObject>& conn
|
||||
}
|
||||
ReportDistributedComponentChange(callerInfo, DISTRIBUTED_COMPONENT_REMOVE,
|
||||
IDistributedSched::CONNECT, IDistributedSched::CALLER);
|
||||
distributedConnectAbilityMap_.erase(iter++);
|
||||
iter = distributedConnectAbilityMap_.erase(iter);
|
||||
} else {
|
||||
iter++;
|
||||
}
|
||||
|
@ -1546,6 +1546,9 @@ int32_t DistributedSchedStub::StartFreeInstallFromRemoteInner(MessageParcel& dat
|
||||
info.want.RemoveParam(PARAM_FREEINSTALL_APPID);
|
||||
info.want.SetParam(PARAM_FREEINSTALL_APPID, callerInfo.callerAppId);
|
||||
info.want.RemoveParam(PARAM_FREEINSTALL_BUNDLENAMES);
|
||||
if (cmpWant == nullptr) {
|
||||
return ERR_NULL_OBJECT;
|
||||
}
|
||||
info.want.SetParam(
|
||||
PARAM_FREEINSTALL_BUNDLENAMES, (*cmpWant).GetStringArrayParam(CMPT_PARAM_FREEINSTALL_BUNDLENAMES));
|
||||
result = StartFreeInstallFromRemote(info, taskId);
|
||||
|
@ -173,7 +173,7 @@ void DmsCallbackTask::NotifyDeviceOffline(const std::string& deviceId)
|
||||
dmsCallbackHandler_->RemoveEvent(it->second.taskId);
|
||||
}
|
||||
DistributedSchedService::GetInstance().NotifyFreeInstallResult(it->second, DEVICE_OFFLINE_ERR);
|
||||
(void)callbackMap_.erase(it++);
|
||||
it = callbackMap_.erase(it);
|
||||
} else {
|
||||
it++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user