!2130 处理超大函数

Merge pull request !2130 from swg/fix
This commit is contained in:
openharmony_ci 2024-10-12 02:54:16 +00:00 committed by Gitee
commit 2d14e41424
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1721,18 +1721,16 @@ ErrCode IInnerOsAccountManager::SendMsgForAccountActivate(OsAccountInfo &osAccou
if (oldId != localId) { if (oldId != localId) {
subscribeManager_.Publish(localId, oldId, OS_ACCOUNT_SUBSCRIBE_TYPE::SWITCHING); subscribeManager_.Publish(localId, oldId, OS_ACCOUNT_SUBSCRIBE_TYPE::SWITCHING);
} }
ErrCode errCode = ERR_OK;
if (startStorage) { if (startStorage) {
errCode = OsAccountInterface::SendToStorageAccountStart(osAccountInfo); ErrCode err = OsAccountInterface::SendToStorageAccountStart(osAccountInfo);
if (errCode != ERR_OK) { if (err != ERR_OK) {
ACCOUNT_LOGE("account %{public}d call storage active failed, errCode %{public}d.", localId, errCode); ACCOUNT_LOGE("Failed to SendToStorageAccountStart, localId %{public}d, error: %{public}d.", localId, err);
return ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY_MANAGER; return ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY_MANAGER;
} }
} }
errCode = OsAccountInterface::SendToAMSAccountStart(osAccountInfo); ErrCode errCode = OsAccountInterface::SendToAMSAccountStart(osAccountInfo);
if (errCode != ERR_OK) { if (errCode != ERR_OK) {
ACCOUNT_LOGE("account %{public}d call ams active failed, errCode %{public}d.", ACCOUNT_LOGE("Failed to call SendToAMSAccountStart, localId: %{public}d, error: %{public}d.", localId, errCode);
localId, errCode);
return errCode; return errCode;
} }
errCode = UpdateAccountToForeground(displayId, osAccountInfo); errCode = UpdateAccountToForeground(displayId, osAccountInfo);