mirror of
https://gitee.com/openharmony/account_os_account
synced 2024-11-26 19:50:37 +00:00
!2287 [Bug]: ACTIVED->ACTIVATED
Merge pull request !2287 from 王力量/day1118_ACTIVED
This commit is contained in:
commit
75db57a509
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -23,7 +23,7 @@ namespace OHOS {
|
||||
namespace AccountSA {
|
||||
typedef enum {
|
||||
INVALID_TYPE = -1,
|
||||
ACTIVED = 0,
|
||||
ACTIVATED = 0,
|
||||
ACTIVATING,
|
||||
UNLOCKED,
|
||||
CREATED,
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user