Merge "Add toString for SRVCC state" am: aac5467d8a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2528706 Change-Id: I7f2516fa08b4b3c5b2d7d5ec787a7e92928a496f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -310,6 +310,31 @@ public class TelephonyManager {
|
|||||||
@SystemApi
|
@SystemApi
|
||||||
public static final int SRVCC_STATE_HANDOVER_CANCELED = 3;
|
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.
|
* 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
|
* For example, {@link #getCardIdForDefaultEuicc()} returns this value if the device has no
|
||||||
|
|||||||
Reference in New Issue
Block a user