ACTIVED->ACTIVATED

Signed-off-by: li-li-wang <wangliliang5@huawei.com>
This commit is contained in:
li-li-wang 2024-11-18 14:34:24 +08:00
parent e790409f51
commit 9e20aa5f02
6 changed files with 9 additions and 9 deletions

View File

@ -2579,7 +2579,7 @@ HWTEST_F(OsAccountManagerModuleTest, OsAccountManagerModuleTest116, TestSize.Lev
EXPECT_EQ(ERR_OK, OsAccountManager::SubscribeOsAccount(activingSubscriber));
EXPECT_CALL(*activingSubscriber, OnAccountsChanged(account.GetLocalId())).Times(Exactly(1));
// activated os account
OsAccountSubscribeInfo subscribeActivatedInfo(OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVED, "subscribeActived");
OsAccountSubscribeInfo subscribeActivatedInfo(OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVATED, "subscribeActivated");
auto activedSubscriber = std::make_shared<ActiveOsAccountSubscriber>(subscribeActivatedInfo);
EXPECT_EQ(ERR_OK, OsAccountManager::SubscribeOsAccount(activedSubscriber));
EXPECT_CALL(*activedSubscriber, OnAccountsChanged(account.GetLocalId())).Times(Exactly(1));
@ -2702,7 +2702,7 @@ HWTEST_F(OsAccountManagerModuleTest, OsAccountManagerModuleTest118, TestSize.Lev
EXPECT_EQ(ERR_OK, OsAccountManager::SubscribeOsAccount(activingSubscriber));
EXPECT_CALL(*activingSubscriber, OnAccountsChanged(account.GetLocalId())).Times(Exactly(1));
// activated os account
OsAccountSubscribeInfo subscribeActivatedInfo(OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVED, "subscribeActived");
OsAccountSubscribeInfo subscribeActivatedInfo(OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVATED, "subscribeActived");
auto activedSubscriber = std::make_shared<ActiveOsAccountSubscriber>(subscribeActivatedInfo);
EXPECT_EQ(ERR_OK, OsAccountManager::SubscribeOsAccount(activedSubscriber));
EXPECT_CALL(*activedSubscriber, OnAccountsChanged(account.GetLocalId())).Times(Exactly(1));

View File

@ -62,7 +62,7 @@ void OsAccountSubscribeInfoTest::TearDown(void)
*/
HWTEST_F(OsAccountSubscribeInfoTest, OsAccountSubscribeInfoTestTest01, TestSize.Level0)
{
OsAccountSubscribeInfo osAccountSubscribeInfo(ACTIVED, STRING_NAME);
OsAccountSubscribeInfo osAccountSubscribeInfo(ACTIVATED, STRING_NAME);
Parcel parcel;
EXPECT_EQ(true, osAccountSubscribeInfo.Marshalling(parcel));

View File

@ -23,7 +23,7 @@ namespace OHOS {
namespace AccountSA {
typedef enum {
INVALID_TYPE = -1,
ACTIVED = 0,
ACTIVATED = 0,
ACTIVATING,
UNLOCKED,
CREATED,

View File

@ -1798,7 +1798,7 @@ static bool ParseParamForActiveSubscriber(const napi_env &env, const std::string
// argv[0] type: 'activate' | 'activating'
if (type == "activate") {
asyncContext->osSubscribeType = OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVED;
asyncContext->osSubscribeType = OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVATED;
} else {
asyncContext->osSubscribeType = OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVATING;
}
@ -1899,7 +1899,7 @@ static bool ParseParamForActiveUnsubscriber(const napi_env &env, const std::stri
// argv[0] type: 'activate' | 'activating'
if (type == "activate") {
asyncContext->osSubscribeType = OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVED;
asyncContext->osSubscribeType = OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVATED;
} else {
asyncContext->osSubscribeType = OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVATING;
}

View File

@ -1910,7 +1910,7 @@ ErrCode IInnerOsAccountManager::SendMsgForAccountActivate(OsAccountInfo &osAccou
}
if (oldId != localId) {
OsAccountInterface::SendToCESAccountSwitched(localId, oldId);
subscribeManager_.Publish(localId, OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVED);
subscribeManager_.Publish(localId, OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVATED);
subscribeManager_.Publish(localId, oldId, OS_ACCOUNT_SUBSCRIBE_TYPE::SWITCHED);
ReportOsAccountSwitch(localId, oldId);
}

View File

@ -187,8 +187,8 @@ HWTEST_F(OsAccountManagerServiceSubscribeModuleTest, OsAccountManagerServiceSubs
{
ACCOUNT_LOGI("OsAccountManagerServiceSubscribeModuleTest_0001");
OsAccountSubscribeInfo osAccountSubscribeInfo;
osAccountSubscribeInfo.SetOsAccountSubscribeType(OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVED);
osAccountSubscribeInfo.SetName("subscribeActive");
osAccountSubscribeInfo.SetOsAccountSubscribeType(OS_ACCOUNT_SUBSCRIBE_TYPE::ACTIVATED);
osAccountSubscribeInfo.SetName("subscribeActivated");
// make a subscriber
auto subscriberTestPtr = std::make_shared<OsAccountSubscriberTest>(osAccountSubscribeInfo);