diff options
| author | John Wang <johnwang@google.com> | 2012-05-01 16:12:05 -0700 |
|---|---|---|
| committer | John Wang <johnwang@google.com> | 2012-05-02 17:10:51 -0700 |
| commit | 6ac0471da79c99a043cb6fbccb12bd86f1f3c024 (patch) | |
| tree | ea5b998592b398ea0a8a26528d7ee33a7b15cf8d /telephony | |
| parent | 459e459ef99f494238128aa4142fe2e97adae35b (diff) | |
| download | frameworks_base-6ac0471da79c99a043cb6fbccb12bd86f1f3c024.zip frameworks_base-6ac0471da79c99a043cb6fbccb12bd86f1f3c024.tar.gz frameworks_base-6ac0471da79c99a043cb6fbccb12bd86f1f3c024.tar.bz2 | |
Enable restart in getSpnFsm().
If the FSM gets restart while waiting for one of
SPN EFs results (i.e. a SIM refresh occurs after issuing
read EF_CPHS_SPN), it will re-initialize only after
receiving and discarding the unfinished SPN EF result.
bug:5499225
Change-Id: I715fc2feabdd03435903f7dcb785c8f0154619bc
Diffstat (limited to 'telephony')
| -rwxr-xr-x | telephony/java/com/android/internal/telephony/gsm/SIMRecords.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java index 80988fd..52e2caf 100755 --- a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java +++ b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java @@ -1459,6 +1459,11 @@ public class SIMRecords extends IccRecords { * After starting, FSM will search SPN EFs in order and stop after finding * the first valid SPN * + * If the FSM gets restart while waiting for one of + * SPN EFs results (i.e. a SIM refresh occurs after issuing + * read EF_CPHS_SPN), it will re-initialize only after + * receiving and discarding the unfinished SPN EF result. + * * @param start set true only for initialize loading * @param ar the AsyncResult from loadEFTransparent * ar.exception holds exception in error @@ -1468,7 +1473,19 @@ public class SIMRecords extends IccRecords { byte[] data; if (start) { - spnState = Get_Spn_Fsm_State.INIT; + // Check previous state to see if there is outstanding + // SPN read + if(spnState == Get_Spn_Fsm_State.READ_SPN_3GPP || + spnState == Get_Spn_Fsm_State.READ_SPN_CPHS || + spnState == Get_Spn_Fsm_State.READ_SPN_SHORT_CPHS || + spnState == Get_Spn_Fsm_State.INIT) { + // Set INIT then return so the INIT code + // will run when the outstanding read done. + spnState = Get_Spn_Fsm_State.INIT; + return; + } else { + spnState = Get_Spn_Fsm_State.INIT; + } } switch(spnState){ |
