From 9e20aa5f0241135f0c37430d3fa1950a9d6676fd Mon Sep 17 00:00:00 2001 From: li-li-wang Date: Mon, 18 Nov 2024 14:34:24 +0800 Subject: [PATCH] ACTIVED->ACTIVATED Signed-off-by: li-li-wang --- .../native/test/moduletest/os_account_manager_module_test.cpp | 4 ++-- .../native/test/unittest/os_account_subscribe_info_test.cpp | 2 +- .../osaccount/native/include/os_account_subscribe_info.h | 2 +- interfaces/kits/napi/osaccount/src/napi_os_account_common.cpp | 4 ++-- .../accountmgr/src/osaccount/inner_os_account_manager.cpp | 2 +- .../os_account_manager_service_subscribe_module_test.cpp | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frameworks/osaccount/native/test/moduletest/os_account_manager_module_test.cpp b/frameworks/osaccount/native/test/moduletest/os_account_manager_module_test.cpp index f041d28d4..c8cfce2a5 100644 --- a/frameworks/osaccount/native/test/moduletest/os_account_manager_module_test.cpp +++ b/frameworks/osaccount/native/test/moduletest/os_account_manager_module_test.cpp @@ -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(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(subscribeActivatedInfo); EXPECT_EQ(ERR_OK, OsAccountManager::SubscribeOsAccount(activedSubscriber)); EXPECT_CALL(*activedSubscriber, OnAccountsChanged(account.GetLocalId())).Times(Exactly(1)); diff --git a/frameworks/osaccount/native/test/unittest/os_account_subscribe_info_test.cpp b/frameworks/osaccount/native/test/unittest/os_account_subscribe_info_test.cpp index 5a1fdeade..616eca339 100644 --- a/frameworks/osaccount/native/test/unittest/os_account_subscribe_info_test.cpp +++ b/frameworks/osaccount/native/test/unittest/os_account_subscribe_info_test.cpp @@ -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)); diff --git a/interfaces/innerkits/osaccount/native/include/os_account_subscribe_info.h b/interfaces/innerkits/osaccount/native/include/os_account_subscribe_info.h index c464b0e10..098822be7 100644 --- a/interfaces/innerkits/osaccount/native/include/os_account_subscribe_info.h +++ b/interfaces/innerkits/osaccount/native/include/os_account_subscribe_info.h @@ -23,7 +23,7 @@ namespace OHOS { namespace AccountSA { typedef enum { INVALID_TYPE = -1, - ACTIVED = 0, + ACTIVATED = 0, ACTIVATING, UNLOCKED, CREATED, diff --git a/interfaces/kits/napi/osaccount/src/napi_os_account_common.cpp b/interfaces/kits/napi/osaccount/src/napi_os_account_common.cpp index e4eabb084..bd8143685 100644 --- a/interfaces/kits/napi/osaccount/src/napi_os_account_common.cpp +++ b/interfaces/kits/napi/osaccount/src/napi_os_account_common.cpp @@ -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; } diff --git a/services/accountmgr/src/osaccount/inner_os_account_manager.cpp b/services/accountmgr/src/osaccount/inner_os_account_manager.cpp index 2033f1f70..98b43769e 100644 --- a/services/accountmgr/src/osaccount/inner_os_account_manager.cpp +++ b/services/accountmgr/src/osaccount/inner_os_account_manager.cpp @@ -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); } diff --git a/services/accountmgr/test/moduletest/os_account/os_account_manager_service_subscribe_module_test.cpp b/services/accountmgr/test/moduletest/os_account/os_account_manager_service_subscribe_module_test.cpp index a089342d8..188287f63 100644 --- a/services/accountmgr/test/moduletest/os_account/os_account_manager_service_subscribe_module_test.cpp +++ b/services/accountmgr/test/moduletest/os_account/os_account_manager_service_subscribe_module_test.cpp @@ -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(osAccountSubscribeInfo);