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

Commit 6d86b6a8 authored by Rambo Wang's avatar Rambo Wang
Browse files

CPT: Fix a missing break statement

When handling ACTION_UICC_ACCESS_RULES_LOADED in the switch
block, the break statement is missing. This will not
impact the funtionality (fall through to default and break)
but introduces a confusing radio log which belongs to
default case.

The change also uses SubscriptionInfoUpdater.simStateString
to print more readable SIM state in logging.

Bug: 227809916
Test: atest CarrierPrivilegesTrackerTest
Test: Telephony sanity(Activation, call, sms, data, switching)
Change-Id: I7d24102a688da705504ab03b44196f49da3401b8
parent 360cb934
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ import static android.telephony.TelephonyManager.SIM_STATE_NOT_READY;
import static android.telephony.TelephonyManager.SIM_STATE_READY;
import static android.telephony.TelephonyManager.SIM_STATE_UNKNOWN;

import static com.android.internal.telephony.SubscriptionInfoUpdater.simStateString;

import android.annotation.ElapsedRealtimeLong;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -437,6 +439,7 @@ public class CarrierPrivilegesTracker extends Handler {
            }
            case ACTION_UICC_ACCESS_RULES_LOADED: {
                handleUiccAccessRulesLoaded();
                break;
            }
            default: {
                Rlog.e(TAG, "Received unknown msg type: " + msg.what);
@@ -519,9 +522,9 @@ public class CarrierPrivilegesTracker extends Handler {
                        SystemClock.uptimeMillis() + CLEAR_UICC_RULES_DELAY_MILLIS;
                sendMessageAtTime(obtainMessage(ACTION_CLEAR_UICC_RULES),
                        mClearUiccRulesUptimeMillis);
                mLocalLog.log("SIM is gone, simState=" + simState + ". Delay "
                        + TimeUnit.MILLISECONDS.toSeconds(CLEAR_UICC_RULES_DELAY_MILLIS)
                        + " seconds to clear UICC rules.");
                mLocalLog.log("SIM is gone, simState=" + simStateString(simState)
                        + ". Delay " + TimeUnit.MILLISECONDS.toSeconds(
                        CLEAR_UICC_RULES_DELAY_MILLIS) + " seconds to clear UICC rules.");
            } else {
                mLocalLog.log(
                        "Ignore SIM gone event while UiccRules is empty or waiting to be emptied.");