Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e933446b authored by John Wang's avatar John Wang Committed by Android Git Automerger
Browse files

am ca94d6d4: am 28d9911a: Merge "Enable restart in getSpnFsm()." into jb-dev

* commit 'ca94d6d4':
  Enable restart in getSpnFsm().
parents 107d956a ca94d6d4
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -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) {
            // 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){