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

Commit 31d370f2 authored by Shishir Agrawal's avatar Shishir Agrawal Committed by Android (Google) Code Review
Browse files

Merge "Control radio poweroff on SIM reset using a config variable." into lmp-dev

parents 11eb5d9c c3e37a01
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -605,6 +605,11 @@ public abstract class IccRecords extends Handler implements IccConstants {
        return android.util.Base64.encodeToString(auth_rsp.payload, android.util.Base64.NO_WRAP);
    }

    protected boolean requirePowerOffOnSimRefreshReset() {
        return mContext.getResources().getBoolean(
            com.android.internal.R.bool.config_requireRadioPowerOffOnSimRefreshReset);
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("IccRecords: " + this);
        pw.println(" mDestroyed=" + mDestroyed);
+10 −8
Original line number Diff line number Diff line
@@ -838,6 +838,7 @@ public final class RuimRecords extends IccRecords {
                break;
            case IccRefreshResponse.REFRESH_RESULT_RESET:
                if (DBG) log("handleRuimRefresh with SIM_REFRESH_RESET");
                if (requirePowerOffOnSimRefreshReset()) {
                    mCi.setRadioPower(false, null);
                    /* Note: no need to call setRadioPower(true).  Assuming the desired
                    * radio power state is still ON (as tracked by ServiceStateTracker),
@@ -846,6 +847,7 @@ public final class RuimRecords extends IccRecords {
                    * desired power state has changed in the interim, we don't want to
                    * override it with an unconditional power on.
                    */
                }
                break;
            default:
                // unknown refresh operation
+10 −8
Original line number Diff line number Diff line
@@ -1243,6 +1243,7 @@ public class SIMRecords extends IccRecords {
                break;
            case IccRefreshResponse.REFRESH_RESULT_RESET:
                if (DBG) log("handleSimRefresh with SIM_REFRESH_RESET");
                if (requirePowerOffOnSimRefreshReset()) {
                    mCi.setRadioPower(false, null);
                    /* Note: no need to call setRadioPower(true).  Assuming the desired
                    * radio power state is still ON (as tracked by ServiceStateTracker),
@@ -1251,6 +1252,7 @@ public class SIMRecords extends IccRecords {
                    * desired power state has changed in the interim, we don't want to
                    * override it with an unconditional power on.
                    */
                }
                mAdnCache.reset();
                break;
            default: