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

Commit 3b536ff6 authored by Ling Ma's avatar Ling Ma Committed by Jack Yu
Browse files

Add toString for SRVCC state

Bug: 245666094
Test: atest
Merged-In: Ife7889cd39a9a0f86b8966849dba93212fb10f42
Change-Id: Ife7889cd39a9a0f86b8966849dba93212fb10f42
parent fdbe2583
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -310,6 +310,31 @@ public class TelephonyManager {
    @SystemApi
    public static final int SRVCC_STATE_HANDOVER_CANCELED  = 3;
    /**
     * Convert srvcc handover state to string.
     *
     * @param state The srvcc handover state.
     * @return The srvcc handover state in string format.
     *
     * @hide
     */
    public static @NonNull String srvccStateToString(int state) {
        switch (state) {
            case TelephonyManager.SRVCC_STATE_HANDOVER_NONE:
                return "NONE";
            case TelephonyManager.SRVCC_STATE_HANDOVER_STARTED:
                return "STARTED";
            case TelephonyManager.SRVCC_STATE_HANDOVER_COMPLETED:
                return "COMPLETED";
            case TelephonyManager.SRVCC_STATE_HANDOVER_FAILED:
                return "FAILED";
            case TelephonyManager.SRVCC_STATE_HANDOVER_CANCELED:
                return "CANCELED";
            default:
                return "UNKNOWN(" + state + ")";
        }
    }
    /**
     * A UICC card identifier used if the device does not support the operation.
     * For example, {@link #getCardIdForDefaultEuicc()} returns this value if the device has no