mirror of
https://gitee.com/openharmony/account_os_account
synced 2024-11-23 02:00:01 +00:00
commit
3f5eef0b5c
@ -1865,6 +1865,7 @@ ErrCode IInnerOsAccountManager::DeactivateOsAccount(const int id, bool isStopSto
|
||||
OsAccountInterface::PublishCommonEvent(osAccountInfo, OHOS::EventFwk::CommonEventSupport::COMMON_EVENT_USER_STOPPED,
|
||||
Constants::OPERATION_STOP);
|
||||
subscribeManager_.Publish(id, OS_ACCOUNT_SUBSCRIBE_TYPE::STOPPED);
|
||||
ReportOsAccountLifeCycle(id, Constants::OPERATION_STOP);
|
||||
|
||||
RemoveLocalIdToOperating(id);
|
||||
ACCOUNT_LOGI("IInnerOsAccountManager DeactivateOsAccount end");
|
||||
@ -1878,6 +1879,7 @@ ErrCode IInnerOsAccountManager::SendMsgForAccountActivate(OsAccountInfo &osAccou
|
||||
int32_t oldId = -1;
|
||||
bool oldIdExist = foregroundAccountMap_.Find(displayId, oldId);
|
||||
int32_t localId = static_cast<int32_t>(osAccountInfo.GetLocalId());
|
||||
bool preActivated = osAccountInfo.GetIsActived();
|
||||
if (oldId != localId) {
|
||||
subscribeManager_.Publish(localId, oldId, OS_ACCOUNT_SUBSCRIBE_TYPE::SWITCHING);
|
||||
}
|
||||
@ -1912,6 +1914,9 @@ ErrCode IInnerOsAccountManager::SendMsgForAccountActivate(OsAccountInfo &osAccou
|
||||
subscribeManager_.Publish(localId, oldId, OS_ACCOUNT_SUBSCRIBE_TYPE::SWITCHED);
|
||||
ReportOsAccountSwitch(localId, oldId);
|
||||
}
|
||||
if (!preActivated) {
|
||||
ReportOsAccountLifeCycle(defaultActivatedId_, Constants::OPERATION_ACTIVATE);
|
||||
}
|
||||
ACCOUNT_LOGI("SendMsgForAccountActivate ok");
|
||||
return errCode;
|
||||
}
|
||||
@ -1936,6 +1941,7 @@ ErrCode IInnerOsAccountManager::SendToStorageAccountStart(OsAccountInfo &osAcco
|
||||
OsAccountInterface::PublishCommonEvent(osAccountInfo,
|
||||
OHOS::EventFwk::CommonEventSupport::COMMON_EVENT_USER_UNLOCKED, Constants::OPERATION_UNLOCK);
|
||||
subscribeManager_.Publish(localId, OS_ACCOUNT_SUBSCRIBE_TYPE::UNLOCKED);
|
||||
ReportOsAccountLifeCycle(localId, Constants::OPERATION_UNLOCK);
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
@ -2088,6 +2094,7 @@ ErrCode IInnerOsAccountManager::SetOsAccountIsVerified(const int id, const bool
|
||||
OsAccountInterface::PublishCommonEvent(osAccountInfo,
|
||||
OHOS::EventFwk::CommonEventSupport::COMMON_EVENT_USER_UNLOCKED, Constants::OPERATION_UNLOCK);
|
||||
subscribeManager_.Publish(id, OS_ACCOUNT_SUBSCRIBE_TYPE::UNLOCKED);
|
||||
ReportOsAccountLifeCycle(id, Constants::OPERATION_UNLOCK);
|
||||
|
||||
CleanGarbageOsAccountsAsync();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user