Merge "CDMALTE: Start reading SIM record on SIM_READY"

This commit is contained in:
Wink Saville
2011-08-30 16:05:04 -07:00
committed by Android (Google) Code Review
3 changed files with 4 additions and 28 deletions

View File

@@ -470,19 +470,6 @@ public abstract class IccCard {
} else if (isIccCardAdded) {
mHandler.sendMessage(mHandler.obtainMessage(EVENT_CARD_ADDED, null));
}
/*
* TODO: We need to try to remove this, maybe if the RIL sends up a RIL_UNSOL_SIM_REFRESH?
*/
if (oldState != State.READY && newState == State.READY &&
mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
if (mPhone.mIccRecords instanceof SIMRecords) {
((SIMRecords)mPhone.mIccRecords).onSimReady();
}
}
}
private void onIccSwap(boolean isAdded) {
@@ -720,17 +707,14 @@ public abstract class IccCard {
currentRadioState == RadioState.SIM_NOT_READY ||
currentRadioState == RadioState.RUIM_NOT_READY ||
currentRadioState == RadioState.NV_NOT_READY ||
(currentRadioState == RadioState.NV_READY &&
(mPhone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE))) {
currentRadioState == RadioState.NV_READY) {
return IccCard.State.NOT_READY;
}
if( currentRadioState == RadioState.SIM_LOCKED_OR_ABSENT ||
currentRadioState == RadioState.SIM_READY ||
currentRadioState == RadioState.RUIM_LOCKED_OR_ABSENT ||
currentRadioState == RadioState.RUIM_READY ||
(currentRadioState == RadioState.NV_READY &&
(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE))) {
currentRadioState == RadioState.RUIM_READY) {
State csimState =
getAppState(mIccCardStatus.getCdmaSubscriptionAppIndex());

View File

@@ -181,11 +181,7 @@ public class SIMRecords extends IccRecords {
// recordsToLoad is set to 0 because no requests are made yet
recordsToLoad = 0;
// SIMRecord is used by CDMA+LTE mode, and SIM_READY event
// will be subscribed by CdmaLteServiceStateTracker.
if (phone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE) {
p.mCM.registerForSIMReady(this, EVENT_SIM_READY, null);
}
p.mCM.registerForSIMReady(this, EVENT_SIM_READY, null);
p.mCM.registerForOffOrNotAvailable(
this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null);
p.mCM.setOnSmsOnSim(this, EVENT_SMS_ON_SIM, null);
@@ -199,9 +195,7 @@ public class SIMRecords extends IccRecords {
@Override
public void dispose() {
//Unregister for all events
if (phone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE) {
phone.mCM.unregisterForSIMReady(this);
}
phone.mCM.unregisterForSIMReady(this);
phone.mCM.unregisterForOffOrNotAvailable( this);
phone.mCM.unregisterForIccRefresh(this);
}

View File

@@ -49,7 +49,6 @@ public final class SimCard extends IccCard {
updateStateProperty();
if(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
mPhone.mCM.registerForNVReady(mHandler, EVENT_ICC_READY, null);
mPhone.mCM.registerForIccStatusChanged(mHandler, EVENT_ICC_LOCKED_OR_ABSENT, null);
}
}
@@ -63,7 +62,6 @@ public final class SimCard extends IccCard {
mPhone.mCM.unregisterForSIMReady(mHandler);
if(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
mPhone.mCM.unregisterForNVReady(mHandler);
mPhone.mCM.unregisterForIccStatusChanged(mHandler);
}
}