Skip to content

Commit 960ba91

Browse files
Wink SavilleAndroid (Google) Code Review
authored andcommitted
Merge "CDMALTE: Start reading SIM record on SIM_READY"
2 parents b530500 + ef5acbc commit 960ba91

File tree

3 files changed

+4
-28
lines changed

3 files changed

+4
-28
lines changed

telephony/java/com/android/internal/telephony/IccCard.java

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -470,19 +470,6 @@ private void handleIccCardStatus(IccCardStatus newCardStatus) {
470470
} else if (isIccCardAdded) {
471471
mHandler.sendMessage(mHandler.obtainMessage(EVENT_CARD_ADDED, null));
472472
}
473-
474-
475-
476-
/*
477-
* TODO: We need to try to remove this, maybe if the RIL sends up a RIL_UNSOL_SIM_REFRESH?
478-
*/
479-
if (oldState != State.READY && newState == State.READY &&
480-
mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
481-
if (mPhone.mIccRecords instanceof SIMRecords) {
482-
((SIMRecords)mPhone.mIccRecords).onSimReady();
483-
}
484-
}
485-
486473
}
487474

488475
private void onIccSwap(boolean isAdded) {
@@ -720,17 +707,14 @@ public State getIccCardState() {
720707
currentRadioState == RadioState.SIM_NOT_READY ||
721708
currentRadioState == RadioState.RUIM_NOT_READY ||
722709
currentRadioState == RadioState.NV_NOT_READY ||
723-
(currentRadioState == RadioState.NV_READY &&
724-
(mPhone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE))) {
710+
currentRadioState == RadioState.NV_READY) {
725711
return IccCard.State.NOT_READY;
726712
}
727713

728714
if( currentRadioState == RadioState.SIM_LOCKED_OR_ABSENT ||
729715
currentRadioState == RadioState.SIM_READY ||
730716
currentRadioState == RadioState.RUIM_LOCKED_OR_ABSENT ||
731-
currentRadioState == RadioState.RUIM_READY ||
732-
(currentRadioState == RadioState.NV_READY &&
733-
(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE))) {
717+
currentRadioState == RadioState.RUIM_READY) {
734718

735719
State csimState =
736720
getAppState(mIccCardStatus.getCdmaSubscriptionAppIndex());

telephony/java/com/android/internal/telephony/gsm/SIMRecords.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,7 @@ public SIMRecords(PhoneBase p) {
181181
// recordsToLoad is set to 0 because no requests are made yet
182182
recordsToLoad = 0;
183183

184-
// SIMRecord is used by CDMA+LTE mode, and SIM_READY event
185-
// will be subscribed by CdmaLteServiceStateTracker.
186-
if (phone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE) {
187-
p.mCM.registerForSIMReady(this, EVENT_SIM_READY, null);
188-
}
184+
p.mCM.registerForSIMReady(this, EVENT_SIM_READY, null);
189185
p.mCM.registerForOffOrNotAvailable(
190186
this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null);
191187
p.mCM.setOnSmsOnSim(this, EVENT_SMS_ON_SIM, null);
@@ -199,9 +195,7 @@ public SIMRecords(PhoneBase p) {
199195
@Override
200196
public void dispose() {
201197
//Unregister for all events
202-
if (phone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE) {
203-
phone.mCM.unregisterForSIMReady(this);
204-
}
198+
phone.mCM.unregisterForSIMReady(this);
205199
phone.mCM.unregisterForOffOrNotAvailable( this);
206200
phone.mCM.unregisterForIccRefresh(this);
207201
}

telephony/java/com/android/internal/telephony/gsm/SimCard.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public SimCard(PhoneBase phone, String logTag, Boolean dbg) {
4949
updateStateProperty();
5050

5151
if(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
52-
mPhone.mCM.registerForNVReady(mHandler, EVENT_ICC_READY, null);
5352
mPhone.mCM.registerForIccStatusChanged(mHandler, EVENT_ICC_LOCKED_OR_ABSENT, null);
5453
}
5554
}
@@ -63,7 +62,6 @@ public void dispose() {
6362
mPhone.mCM.unregisterForSIMReady(mHandler);
6463

6564
if(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
66-
mPhone.mCM.unregisterForNVReady(mHandler);
6765
mPhone.mCM.unregisterForIccStatusChanged(mHandler);
6866
}
6967
}

0 commit comments

Comments
 (0)