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

Commit 652fe674 authored by Wink Saville's avatar Wink Saville
Browse files

Merge commit '310b322d' into fix-merge-conflict

* commit '310b322d':
  Telephony: Delay SIM IO until SIM_READY

Change-Id: I50618a1fb06a7eb465f7a0d9b4b8d6fb53ad1339
parents 4e9ed041 310b322d
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.os.Registrant;
import android.os.RegistrantList;

import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -91,6 +92,7 @@ public abstract class IccRecords extends Handler implements IccConstants {
    public static final int EVENT_SPN = 2; // Service Provider Name

    public static final int EVENT_GET_ICC_RECORD_DONE = 100;
    protected static final int EVENT_APP_READY = 1;

    @Override
    public String toString() {
@@ -366,6 +368,17 @@ public abstract class IccRecords extends Handler implements IccConstants {
     */
    public abstract void onRefresh(boolean fileChanged, int[] fileList);

    /**
     * Called by subclasses (SimRecords and RuimRecords) whenever
     * IccRefreshResponse.REFRESH_RESULT_INIT event received
     */
    protected void onIccRefreshInit() {
        mAdnCache.reset();
        if (mParentApp.getState() == AppState.APPSTATE_READY) {
            // This will cause files to be reread
            sendMessage(obtainMessage(EVENT_APP_READY));
        }
    }

    public boolean getRecordsLoaded() {
        if (mRecordsToLoad == 0 && mRecordsRequested == true) {
+1 −2
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ public final class RuimRecords extends IccRecords {
    }

    // ***** Event Constants
    private static final int EVENT_APP_READY = 1;
    private static final int EVENT_GET_IMSI_DONE = 3;
    private static final int EVENT_GET_DEVICE_IDENTITY_DONE = 4;
    private static final int EVENT_GET_ICCID_DONE = 5;
@@ -774,7 +773,7 @@ public final class RuimRecords extends IccRecords {
            case IccRefreshResponse.REFRESH_RESULT_INIT:
                if (DBG) log("handleRuimRefresh with SIM_REFRESH_INIT");
                // need to reload all files (that we care about)
                fetchRuimRecords();
                onIccRefreshInit();
                break;
            case IccRefreshResponse.REFRESH_RESULT_RESET:
                if (DBG) log("handleRuimRefresh with SIM_REFRESH_RESET");
+1 −4
Original line number Diff line number Diff line
@@ -124,8 +124,6 @@ public class SIMRecords extends IccRecords {
    private static final int CPHS_SST_MBN_ENABLED = 0x30;

    // ***** Event Constants

    private static final int EVENT_APP_READY = 1;
    private static final int EVENT_GET_IMSI_DONE = 3;
    private static final int EVENT_GET_ICCID_DONE = 4;
    private static final int EVENT_GET_MBI_DONE = 5;
@@ -1206,8 +1204,7 @@ public class SIMRecords extends IccRecords {
            case IccRefreshResponse.REFRESH_RESULT_INIT:
                if (DBG) log("handleSimRefresh with SIM_REFRESH_INIT");
                // need to reload all files (that we care about)
                mAdnCache.reset();
                fetchSimRecords();
                onIccRefreshInit();
                break;
            case IccRefreshResponse.REFRESH_RESULT_RESET:
                if (DBG) log("handleSimRefresh with SIM_REFRESH_RESET");