klte: Delay SIM status message until after radio is on

Change-Id: I84729c5a7aa23e7261834859582427b5778f2f63
This commit is contained in:
Tony Layher 2014-11-16 18:28:32 -08:00 committed by Ethan Chen
parent 90b6c65e97
commit 2864552a93

View file

@ -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) {