!1024 修改看板告警

Merge pull request !1024 from 师皓杰/master
This commit is contained in:
openharmony_ci 2024-08-08 12:37:24 +00:00 committed by Gitee
commit 55a237da32
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 21 additions and 5 deletions

View File

@ -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()));
}

View File

@ -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++;
}

View File

@ -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);

View File

@ -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++;
}