diff options
author | Rakesh Pallerla <rakesh@codeaurora.org> | 2014-12-18 13:32:35 +0530 |
---|---|---|
committer | Adnan <adnan@cyngn.com> | 2015-03-23 12:59:57 -0700 |
commit | d683d69fa307189b9a280bb9a31a64eb24688482 (patch) | |
tree | c9409c5b2afc87fbf23dfc40eb2565ce021036bd | |
parent | 5f8247ab7d9627afb7e57e1d012882e6974bf56c (diff) | |
download | android_frameworks_opt_telephony-d683d69fa307189b9a280bb9a31a64eb24688482.tar.gz android_frameworks_opt_telephony-d683d69fa307189b9a280bb9a31a64eb24688482.tar.bz2 android_frameworks_opt_telephony-d683d69fa307189b9a280bb9a31a64eb24688482.zip |
Abort Cross mapping process if SubInfo List is null
Abort cross mapping process if the SubInfo List is null
and notify Stack is ready for other processes to continue.
Change-Id: I836484b06c29b63f86d1c264d3c7bd386b6c580e
CRs-Fixed: 767026
-rw-r--r-- | src/java/com/android/internal/telephony/ModemStackController.java | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/java/com/android/internal/telephony/ModemStackController.java b/src/java/com/android/internal/telephony/ModemStackController.java index abd3bf546..b801c58a2 100644 --- a/src/java/com/android/internal/telephony/ModemStackController.java +++ b/src/java/com/android/internal/telephony/ModemStackController.java @@ -368,8 +368,7 @@ public class ModemStackController extends Handler { loge("onGetModemCapabilityDone: EXIT!, result null or Exception =" + ar.exception); //On Modem Packages which do not support GetModemCaps RIl will return exception //On such Modem packages notify stack is ready so that SUB Activation can continue. - mIsStackReady = true; - mStackReadyRegistrants.notifyRegistrants(); + notifyStackReady(false); return; } @@ -429,9 +428,7 @@ public class ModemStackController extends Handler { //if any deact failed notify registrants to activate any deactivated subs //and stop binding process. No need to recover here. if (isAnyCmdFailed()) { - mIsRecoveryInProgress = false; - mIsStackReady = true; - mStackReadyRegistrants.notifyRegistrants(); + notifyStackReady(false); } else { mDeactivationInProgress = false; triggerUnBindingOnAllSubs(); @@ -507,7 +504,7 @@ public class ModemStackController extends Handler { mUpdateStackMsg = null; } updateNetworkSelectionMode(); - notifyStackReady(); + notifyStackReady(true); } } @@ -715,7 +712,7 @@ public class ModemStackController extends Handler { } } else { //incase of bootup if cross binding is not required send stack ready notification. - if (isBootUp) notifyStackReady(); + if (isBootUp) notifyStackReady(false); return FAILURE; } return SUCCESS; @@ -725,6 +722,10 @@ public class ModemStackController extends Handler { SubscriptionController subCtrlr = SubscriptionController.getInstance(); List<SubInfoRecord> subInfoList = subCtrlr.getActiveSubInfoList(); mActiveSubCount = 0; + if (subInfoList == null) { + //if getting sub info list is failed, abort cross mapping process. + notifyStackReady(false); + } for (SubInfoRecord subInfo : subInfoList) { int subStatus = subCtrlr.getSubState(subInfo.subId); if (subStatus == SubscriptionManager.ACTIVE) { @@ -742,17 +743,18 @@ public class ModemStackController extends Handler { } } - private void notifyStackReady() { + private void notifyStackReady(boolean isCrossMapDone) { logd("notifyStackReady: Stack is READY!!!"); mIsRecoveryInProgress = false; mIsStackReady = true; resetSubStates(); - for (int i = 0; i < mNumPhones; i++) { - //update the current stackIds - mCurrentStackId[i] = mPreferredStackId[i]; + if (isCrossMapDone) { + for (int i = 0; i < mNumPhones; i++) { + //update the current stackIds + mCurrentStackId[i] = mPreferredStackId[i]; + } } - //notify binding completed to all StackReady registrants. //including subscriptionManager which activates available subs on binding complete. mStackReadyRegistrants.notifyRegistrants(); @@ -809,7 +811,7 @@ public class ModemStackController extends Handler { if(STATE_SET_PREF_MODE == mSubState[0]) { //Already recovery in progress, got failure in SetPrefNwmode. We are bailing out. //As Set Pref is failed, Binding is completed. so update and notify same. - notifyStackReady(); + notifyStackReady(true); } return; } |