mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2024-11-23 08:00:07 +00:00
优化卡锁定状态
Signed-off-by: jierbumo866 <fangping5@huawei.com>
This commit is contained in:
parent
efeddf0c69
commit
0510ea049c
@ -155,6 +155,10 @@ bool RuimFile::ProcessIccLocked(const AppExecFwk::InnerEvent::Pointer &event)
|
||||
IccFile::ProcessIccLocked();
|
||||
lockQueried_ = true;
|
||||
AppExecFwk::InnerEvent::Pointer eventICCID = BuildCallerInfo(MSG_SIM_OBTAIN_ICCID_DONE);
|
||||
if (fileController_ == nullptr) {
|
||||
TELEPHONY_LOGE("fileController_ is nullptr!");
|
||||
return false;
|
||||
}
|
||||
fileController_->ObtainBinaryFile(ELEMENTARY_FILE_ICCID, eventICCID);
|
||||
fileToGet_++;
|
||||
return false;
|
||||
|
@ -260,6 +260,10 @@ bool SimFile::ProcessIccLocked(const AppExecFwk::InnerEvent::Pointer &event)
|
||||
IccFile::ProcessIccLocked();
|
||||
lockQueried_ = true;
|
||||
AppExecFwk::InnerEvent::Pointer eventIccId = BuildCallerInfo(MSG_SIM_OBTAIN_ICCID_DONE);
|
||||
if (fileController_ == nullptr) {
|
||||
TELEPHONY_LOGE("fileController_ is nullptr!");
|
||||
return false;
|
||||
}
|
||||
fileController_->ObtainBinaryFile(ELEMENTARY_FILE_ICCID, eventIccId);
|
||||
fileToGet_++;
|
||||
return false;
|
||||
|
@ -751,6 +751,27 @@ HWTEST_F(BranchTest, Telephony_SimFile_005, Function | MediumTest | Level1)
|
||||
EXPECT_FALSE(simFile->opl5gFiles_.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number Telephony_SimFile_006
|
||||
* @tc.name test error branch
|
||||
* @tc.desc Function test
|
||||
*/
|
||||
HWTEST_F(BranchTest, Telephony_SimFile_006, Function | MediumTest | Level1)
|
||||
{
|
||||
std::shared_ptr<TelRilManager> telRilManager = std::make_shared<TelRilManager>();
|
||||
std::shared_ptr<Telephony::SimStateManager> simStateManager = std::make_shared<SimStateManager>(telRilManager);
|
||||
std::shared_ptr<SimFile> simFile = std::make_shared<SimFile>(simStateManager);
|
||||
EventFwk::MatchingSkills matchingSkills;
|
||||
matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_OPERATOR_CONFIG_CHANGED);
|
||||
EventFwk::CommonEventSubscribeInfo subcribeInfo(matchingSkills);
|
||||
auto simFileManager = std::make_shared<SimFileManager>(subcribeInfo, std::weak_ptr<ITelRilManager>(telRilManager),
|
||||
std::weak_ptr<SimStateManager>(simStateManager));
|
||||
simFileManager->Init(0);
|
||||
auto event = AppExecFwk::InnerEvent::Get(0);
|
||||
event = nullptr;
|
||||
EXPECT_FALSE(simFile->ProcessIccLocked(event));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number Telephony_ISimFile_001
|
||||
* @tc.name test error branch
|
||||
@ -839,6 +860,27 @@ HWTEST_F(BranchTest, Telephony_RuimFile_001, Function | MediumTest | Level1)
|
||||
EXPECT_TRUE(rUimFile->ProcessGetSpnDone(event));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number Telephony_RuimFile_002
|
||||
* @tc.name test error branch
|
||||
* @tc.desc Function test
|
||||
*/
|
||||
HWTEST_F(BranchTest, Telephony_RuimFile_002, Function | MediumTest | Level1)
|
||||
{
|
||||
std::shared_ptr<TelRilManager> telRilManager = std::make_shared<TelRilManager>();
|
||||
std::shared_ptr<Telephony::SimStateManager> simStateManager = std::make_shared<SimStateManager>(telRilManager);
|
||||
std::shared_ptr<RuimFile> rUimFile = std::make_shared<RuimFile>(simStateManager);
|
||||
EventFwk::MatchingSkills matchingSkills;
|
||||
matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_OPERATOR_CONFIG_CHANGED);
|
||||
EventFwk::CommonEventSubscribeInfo subcribeInfo(matchingSkills);
|
||||
auto simFileManager = std::make_shared<SimFileManager>(subcribeInfo, std::weak_ptr<ITelRilManager>(telRilManager),
|
||||
std::weak_ptr<SimStateManager>(simStateManager));
|
||||
simFileManager->Init(0);
|
||||
auto event = AppExecFwk::InnerEvent::Get(RadioEvent::RADIO_SIM_STATE_READY, 1);
|
||||
event = nullptr;
|
||||
EXPECT_FALSE(rUimFile->ProcessIccLocked(event));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number Telephony_IccFileController_001
|
||||
* @tc.name test error branch
|
||||
|
Loading…
Reference in New Issue
Block a user