From ef5acbc0d6176125c406d0d3448415d2cc699466 Mon Sep 17 00:00:00 2001 From: Kazuhiro Ondo Date: Fri, 26 Aug 2011 15:26:14 -0500 Subject: [PATCH] CDMALTE: Start reading SIM record on SIM_READY Clean up early workarounds placed for CDMA LTE mode. Now SIM_READY is used to start reading out SIM record which is the same as the baseline behavior. Bug: 4506200 Change-Id: Ib30b1710b60110957f8eb6483f39dbec6153d4a9 --- .../android/internal/telephony/IccCard.java | 20 ++----------------- .../internal/telephony/gsm/SIMRecords.java | 10 ++-------- .../internal/telephony/gsm/SimCard.java | 2 -- 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/telephony/java/com/android/internal/telephony/IccCard.java b/telephony/java/com/android/internal/telephony/IccCard.java index bce99916662cb..955849d4699c8 100644 --- a/telephony/java/com/android/internal/telephony/IccCard.java +++ b/telephony/java/com/android/internal/telephony/IccCard.java @@ -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()); diff --git a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java index b0bad56a4a79c..310f1fd0bb022 100755 --- a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java +++ b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java @@ -183,11 +183,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); @@ -201,9 +197,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); } diff --git a/telephony/java/com/android/internal/telephony/gsm/SimCard.java b/telephony/java/com/android/internal/telephony/gsm/SimCard.java index 643f709171375..1fa278ac4a7a6 100644 --- a/telephony/java/com/android/internal/telephony/gsm/SimCard.java +++ b/telephony/java/com/android/internal/telephony/gsm/SimCard.java @@ -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); } }