Commit 8cade277 authored by aligungr's avatar aligungr

MM state management improvement

parent c8e18b5c
......@@ -60,7 +60,23 @@ void NasMm::performMmCycle()
if (m_cmState == ECmState::CM_IDLE)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_PLMN_SEARCH);
else
{
if (m_usim->m_servingCell.has_value())
{
auto cellCategory = m_usim->m_servingCell->cellCategory;
if (cellCategory == ECellCategory::SUITABLE_CELL)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE);
else if (cellCategory == ECellCategory::ACCEPTABLE_CELL)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_LIMITED_SERVICE);
else
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_PLMN_SEARCH);
}
else
{
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_PLMN_SEARCH);
}
}
}
else
{
......@@ -99,6 +115,25 @@ void NasMm::performMmCycle()
if (startECallInactivityIfNeeded())
return;
}
if (m_mmSubState == EMmSubState::MM_REGISTERED_NA)
{
if (m_usim->m_servingCell.has_value())
{
auto cellCategory = m_usim->m_servingCell->cellCategory;
if (cellCategory == ECellCategory::SUITABLE_CELL)
switchMmState(EMmState::MM_REGISTERED, EMmSubState::MM_REGISTERED_NORMAL_SERVICE);
else if (cellCategory == ECellCategory::ACCEPTABLE_CELL)
switchMmState(EMmState::MM_REGISTERED, EMmSubState::MM_REGISTERED_LIMITED_SERVICE);
else
switchMmState(EMmState::MM_REGISTERED, EMmSubState::MM_REGISTERED_PLMN_SEARCH);
}
else
{
switchMmState(EMmState::MM_REGISTERED, EMmSubState::MM_REGISTERED_PLMN_SEARCH);
}
}
}
void NasMm::switchMmState(EMmState state, EMmSubState subState)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment