diff --git a/ril/telephony/java/com/android/internal/telephony/KlteRIL.java b/ril/telephony/java/com/android/internal/telephony/KlteRIL.java index f7091f2..3655e50 100755 --- a/ril/telephony/java/com/android/internal/telephony/KlteRIL.java +++ b/ril/telephony/java/com/android/internal/telephony/KlteRIL.java @@ -38,6 +38,8 @@ public class KlteRIL extends RIL { private static final int RIL_REQUEST_DIAL_EMERGENCY = 10016; + private Message mPendingGetSimStatus; + public KlteRIL(Context context, int networkMode, int cdmaSubscription) { super(context, networkMode, cdmaSubscription, null); mQANElements = 6; @@ -202,6 +204,26 @@ public class KlteRIL extends RIL { return response; } + @Override + public void + getIccCardStatus(Message result) { + if (mState != RadioState.RADIO_ON) { + mPendingGetSimStatus = result; + } else { + super.getIccCardStatus(result); + } + } + + @Override + protected void + switchToRadioState(RadioState newState) { + super.switchToRadioState(newState); + if (newState == RadioState.RADIO_ON && mPendingGetSimStatus != null) { + super.getIccCardStatus(mPendingGetSimStatus); + mPendingGetSimStatus = null; + } + } + @Override protected Object responseSignalStrength(Parcel p) {