Add ImsReason codes and DisconnectCauses for data disconnects.
Adding reason code and disconnect causes for: 1. disconnects due to user disabling data. 2. disconnects due to data limit being reached. Bug: 30702393 Change-Id: Id6ea5ee4f5aac1a8602094315f893e2f7b3cc8d6
This commit is contained in:
@@ -212,6 +212,20 @@ public class DisconnectCause {
|
|||||||
*/
|
*/
|
||||||
public static final int MAXIMUM_NUMBER_OF_CALLS_REACHED = 53;
|
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:
|
// When adding a disconnect type:
|
||||||
// 1) Please assign the new type the next id value below.
|
// 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.
|
// 4) Update toString() with the newly added disconnect type.
|
||||||
// 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause.
|
// 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause.
|
||||||
//
|
//
|
||||||
// NextId: 54
|
// NextId: 56
|
||||||
//*********************************************************************************************
|
//*********************************************************************************************
|
||||||
|
|
||||||
/** Smallest valid value for call disconnect codes. */
|
/** Smallest valid value for call disconnect codes. */
|
||||||
public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED;
|
public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED;
|
||||||
|
|
||||||
/** Largest valid value for call disconnect codes. */
|
/** 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 constructor to avoid class instantiation. */
|
||||||
private DisconnectCause() {
|
private DisconnectCause() {
|
||||||
@@ -343,6 +357,10 @@ public class DisconnectCause {
|
|||||||
return "ANSWERED_ELSEWHERE";
|
return "ANSWERED_ELSEWHERE";
|
||||||
case MAXIMUM_NUMBER_OF_CALLS_REACHED:
|
case MAXIMUM_NUMBER_OF_CALLS_REACHED:
|
||||||
return "MAXIMUM_NUMER_OF_CALLS_REACHED";
|
return "MAXIMUM_NUMER_OF_CALLS_REACHED";
|
||||||
|
case DATA_DISABLED:
|
||||||
|
return "DATA_DISABLED";
|
||||||
|
case DATA_LIMIT_REACHED:
|
||||||
|
return "DATA_LIMIT_REACHED";
|
||||||
default:
|
default:
|
||||||
return "INVALID: " + cause;
|
return "INVALID: " + cause;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,6 +297,16 @@ public class ImsReasonInfo implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
public static final int CODE_REMOTE_CALL_DECLINE = 1404;
|
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.
|
* Network string error messages.
|
||||||
* mExtraMessage may have these values.
|
* mExtraMessage may have these values.
|
||||||
|
|||||||
Reference in New Issue
Block a user