mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
解决代码一致性问题
Signed-off-by: m30043719 <maxiaodong25@huawei.com>
This commit is contained in:
parent
db65e9e206
commit
2d20c742a3
@ -149,6 +149,7 @@ private:
|
||||
void DealScreenOff();
|
||||
void DealTimerUnfocusedBussiness(const int32_t missionId);
|
||||
int32_t GetBundleNameByMissionId(const int32_t missionId, std::string& bundleName);
|
||||
int32_t GetBundleNameByScreenOffInfo(const int32_t missionId, std::string& bundleName);
|
||||
bool IsContinue(const int32_t& missionId, const std::string& bundleName);
|
||||
int32_t DealSetMissionContinueStateBusiness(const int32_t missionId, const AAFwk::ContinueState& state);
|
||||
int32_t CheckContinueState(const int32_t missionId);
|
||||
|
@ -131,9 +131,10 @@ void DnetworkAdapter::DmsDevTrustChangeCallback::OnDeviceTrustChange(const std::
|
||||
HILOGE("peer is not same account");
|
||||
return;
|
||||
}
|
||||
if (DmsBmStorage::GetInstance()->DelDataOfLogoutDev(udid, uuid)) {
|
||||
if (!DmsBmStorage::GetInstance()->DelDataOfLogoutDev(udid, uuid)) {
|
||||
HILOGE("DelDataOfLogoutDev failed");
|
||||
}
|
||||
HILOGI("end");
|
||||
}
|
||||
|
||||
bool DnetworkAdapter::AddDeviceChangeListener(const std::shared_ptr<DeviceListener>& listener)
|
||||
@ -171,6 +172,8 @@ bool DnetworkAdapter::AddDeviceChangeListener(const std::shared_ptr<DeviceListen
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(RETRY_REGISTER_CALLBACK_DELAY_TIME));
|
||||
continue;
|
||||
}
|
||||
errCode = DeviceManager::GetInstance().RegDevTrustChangeCallback(PKG_NAME, devTrustChangeCallback_);
|
||||
HILOGI("RegDevTrustChangeCallback errCode = %{public}d", errCode);
|
||||
if (UpdateDeviceInfoStorage()) {
|
||||
break;
|
||||
}
|
||||
|
@ -479,6 +479,21 @@ int32_t DMSContinueSendMgr::GetBundleNameByMissionId(const int32_t missionId, st
|
||||
return INVALID_PARAMETERS_ERR;
|
||||
}
|
||||
|
||||
int32_t DMSContinueSendMgr::GetBundleNameByScreenOffInfo(const int32_t missionId, std::string& bundleName)
|
||||
{
|
||||
if (screenOffHandler_ != nullptr && missionId == screenOffHandler_->GetMissionId()) {
|
||||
bundleName = screenOffHandler_->GetBundleName();
|
||||
if (bundleName.empty()) {
|
||||
HILOGE("get bundleName failed from screenOffHandler");
|
||||
return INVALID_PARAMETERS_ERR;
|
||||
}
|
||||
HILOGI("get missionId end, bundleName: %{public}s", bundleName.c_str());
|
||||
return ERR_OK;
|
||||
}
|
||||
HILOGE("get bundleName failed from screenOffHandler");
|
||||
return INVALID_PARAMETERS_ERR;
|
||||
}
|
||||
|
||||
int32_t DMSContinueSendMgr::GetAbilityNameByMissionId(const int32_t missionId, std::string& abilityName)
|
||||
{
|
||||
HILOGI("start, missionId: %{public}d", missionId);
|
||||
@ -579,8 +594,11 @@ int32_t DMSContinueSendMgr::GetBundleNameIdAndContinueTypeId(const int32_t missi
|
||||
std::string bundleName;
|
||||
int32_t ret = GetBundleNameByMissionId(missionId, bundleName);
|
||||
if (ret != ERR_OK) {
|
||||
HILOGE("get bundleName failed, missionId: %{public}d, ret: %{public}d", missionId, ret);
|
||||
return ret;
|
||||
HILOGW("get iterItem failed from focusedMission, try screenOffHandler");
|
||||
if (GetBundleNameByScreenOffInfo(missionId, bundleName) != ERR_OK) {
|
||||
HILOGE("get bundleName failed, missionId: %{public}d, ret: %{public}d", missionId, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
HILOGI("get bundleName success, missionId: %{public}d, bundleName: %{public}s", missionId, bundleName.c_str());
|
||||
if (!DmsKvSyncE2E::GetInstance()->CheckBundleContinueConfig(bundleName)) {
|
||||
|
Loading…
Reference in New Issue
Block a user