mirror of
https://gitee.com/openharmony/account_os_account
synced 2024-11-23 18:19:51 +00:00
clean after unlock
Signed-off-by: yeyuning <yeyuning2@huawei.com> Change-Id: Iaa0c80272dc436517d59d1d67f3996711970556e
This commit is contained in:
parent
12af702733
commit
2858645c51
@ -297,9 +297,6 @@ void AccountMgrService::OnAddSystemAbility(int32_t systemAbilityId, const std::s
|
||||
isDefaultOsAccountActivated_ = true;
|
||||
}
|
||||
}
|
||||
if (isBmsReady_ && isAmsReady_) {
|
||||
IInnerOsAccountManager::GetInstance().CleanGarbageOsAccounts();
|
||||
}
|
||||
}
|
||||
|
||||
bool AccountMgrService::Init()
|
||||
|
@ -1697,6 +1697,11 @@ ErrCode IInnerOsAccountManager::SendMsgForAccountActivate(OsAccountInfo &osAccou
|
||||
subscribeManager_.Publish(localId, OS_ACCOUNT_SUBSCRIBE_TYPE::UNLOCKED);
|
||||
}
|
||||
|
||||
auto task = [] { IInnerOsAccountManager::GetInstance().CleanGarbageOsAccounts(); };
|
||||
std::thread cleanThread(task);
|
||||
pthread_setname_np(cleanThread.native_handle(), "CleanGarbageOsAccounts");
|
||||
cleanThread.detach();
|
||||
|
||||
if (oldIdExist && (oldId != localId)) {
|
||||
errCode = UpdateAccountToBackground(oldId);
|
||||
if (errCode != ERR_OK) {
|
||||
@ -1837,6 +1842,12 @@ ErrCode IInnerOsAccountManager::SetOsAccountIsVerified(const int id, const bool
|
||||
OHOS::EventFwk::CommonEventSupport::COMMON_EVENT_USER_UNLOCKED, Constants::OPERATION_UNLOCK);
|
||||
subscribeManager_.Publish(id, OS_ACCOUNT_SUBSCRIBE_TYPE::UNLOCKED);
|
||||
}
|
||||
|
||||
auto task = [] { IInnerOsAccountManager::GetInstance().CleanGarbageOsAccounts(); };
|
||||
std::thread cleanThread(task);
|
||||
pthread_setname_np(cleanThread.native_handle(), "CleanGarbageOsAccounts");
|
||||
cleanThread.detach();
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user