mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
codecheck
Signed-off-by: MisterE <smart_e@126.com>
This commit is contained in:
commit
a646b4b0df
@ -166,6 +166,7 @@ private:
|
||||
int32_t OnContinueDataCmd(std::shared_ptr<DSchedContinueDataCmd> cmd);
|
||||
int32_t OnNotifyComplete(int32_t missionId, bool isSuccess);
|
||||
int32_t UpdateElementInfo(std::shared_ptr<DSchedContinueDataCmd> cmd);
|
||||
std::string ContinueTypeFormat(const std::string &continueType);
|
||||
int32_t OnContinueEndCmd(std::shared_ptr<DSchedContinueEndCmd> cmd);
|
||||
int32_t OnContinueEnd(int32_t result);
|
||||
|
||||
|
@ -424,6 +424,8 @@ int32_t DSchedContinue::OnNotifyComplete(int32_t missionId, bool isSuccess)
|
||||
int32_t DSchedContinue::UpdateElementInfo(std::shared_ptr<DSchedContinueDataCmd> cmd)
|
||||
{
|
||||
std::string moduleName = cmd->want_.GetStringParam(OHOS::AAFwk::Want::PARAM_MODULE_NAME);
|
||||
std::string continueType = cmd->continueType_;
|
||||
std::string formatContinueType = ContinueTypeFormat(continueType);
|
||||
DmsBundleInfo distributedBundleInfo;
|
||||
if (!DmsBmStorage::GetInstance()->GetDistributedBundleInfo(
|
||||
cmd->dstDeviceId_, cmd->dstBundleName_, distributedBundleInfo)) {
|
||||
@ -439,7 +441,7 @@ int32_t DSchedContinue::UpdateElementInfo(std::shared_ptr<DSchedContinueDataCmd>
|
||||
for (const auto &abilityInfoElement: dmsAbilityInfos) {
|
||||
std::vector<std::string> continueTypes = abilityInfoElement.continueType;
|
||||
for (const auto &continueTypeElement: continueTypes) {
|
||||
if (continueTypeElement != cmd->continueType_) {
|
||||
if (continueTypeElement != continueType && continueTypeElement != formatContinueType) {
|
||||
continue;
|
||||
}
|
||||
if (continueTypeElement == abilityInfoElement.abilityName &&
|
||||
@ -474,6 +476,17 @@ int32_t DSchedContinue::UpdateElementInfo(std::shared_ptr<DSchedContinueDataCmd>
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
std::string DSchedContinue::ContinueTypeFormat(const std::string &continueType)
|
||||
{
|
||||
std::string suffix = QUICK_START_CONFIGURATION;
|
||||
if (suffix.length() <= continueType.length() &&
|
||||
continueType.rfind(suffix) == (continueType.length() - suffix.length())) {
|
||||
return continueType.substr(0, continueType.rfind(QUICK_START_CONFIGURATION));
|
||||
} else {
|
||||
return continueType + QUICK_START_CONFIGURATION;
|
||||
}
|
||||
}
|
||||
|
||||
int32_t DSchedContinue::OnContinueEndCmd(std::shared_ptr<DSchedContinueEndCmd> cmd)
|
||||
{
|
||||
HILOGI("called");
|
||||
|
Loading…
Reference in New Issue
Block a user