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

Commit 34910458 authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "Add ImsReason codes and DisconnectCauses for data disconnects." into nyc-mr1-dev

parents 4804404e ed21e8fc
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -212,6 +212,20 @@ public class DisconnectCause {
     */
    public static final int MAXIMUM_NUMBER_OF_CALLS_REACHED = 53;

    /**
     * The call was terminated because cellular data has been disabled.
     * Used when in a video call and the user disables cellular data via the settings.
     * {@hide}
     */
    public static final int DATA_DISABLED = 54;

    /**
     * The call was terminated because the data policy has disabled cellular data.
     * Used when in a video call and the user has exceeded the device data limit.
     * {@hide}
     */
    public static final int DATA_LIMIT_REACHED = 55;

    //*********************************************************************************************
    // When adding a disconnect type:
    // 1) Please assign the new type the next id value below.
@@ -220,14 +234,14 @@ public class DisconnectCause {
    // 4) Update toString() with the newly added disconnect type.
    // 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause.
    //
    // NextId: 54
    // NextId: 56
    //*********************************************************************************************

    /** Smallest valid value for call disconnect codes. */
    public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED;

    /** Largest valid value for call disconnect codes. */
    public static final int MAXIMUM_VALID_VALUE = MAXIMUM_NUMBER_OF_CALLS_REACHED;
    public static final int MAXIMUM_VALID_VALUE = DATA_LIMIT_REACHED;

    /** Private constructor to avoid class instantiation. */
    private DisconnectCause() {
@@ -343,6 +357,10 @@ public class DisconnectCause {
            return "ANSWERED_ELSEWHERE";
        case MAXIMUM_NUMBER_OF_CALLS_REACHED:
            return "MAXIMUM_NUMER_OF_CALLS_REACHED";
        case DATA_DISABLED:
            return "DATA_DISABLED";
        case DATA_LIMIT_REACHED:
            return "DATA_LIMIT_REACHED";
        default:
            return "INVALID: " + cause;
        }
+10 −0
Original line number Diff line number Diff line
@@ -297,6 +297,16 @@ public class ImsReasonInfo implements Parcelable {
     */
    public static final int CODE_REMOTE_CALL_DECLINE = 1404;

    /**
     * Indicates the call was disconnected due to the user reaching their data limit.
     */
    public static final int CODE_DATA_LIMIT_REACHED = 1405;

    /**
     * Indicates the call was disconnected due to the user disabling cellular data.
     */
    public static final int CODE_DATA_DISABLED = 1406;

    /**
     * Network string error messages.
     * mExtraMessage may have these values.