Add constructor for DisconnectCause that does not require a tone.

In order to create a DisconnectCause with a label/description that does
not require specifying a tone.

Bug: 17486242
Change-Id: If82605ff20fc9f53ed41b49e12575424c6efc2b6
This commit is contained in:
Nancy Chen
2014-09-19 10:53:21 -07:00
parent ddc5e5f1c6
commit f4cf77c5dc
3 changed files with 13 additions and 1 deletions

View File

@@ -28170,6 +28170,7 @@ package android.telecom {
public final class DisconnectCause implements android.os.Parcelable {
ctor public DisconnectCause(int);
ctor public DisconnectCause(int, java.lang.String);
ctor public DisconnectCause(int, java.lang.CharSequence, java.lang.CharSequence, java.lang.String);
ctor public DisconnectCause(int, java.lang.CharSequence, java.lang.CharSequence, java.lang.String, int);
method public int describeContents();
method public int getCode();

View File

@@ -161,7 +161,7 @@ public final class Call {
/**
* @return For a {@link #STATE_DISCONNECTED} {@code Call}, the disconnect cause expressed
* by {@link android.telecomm.DisconnectCause}.
* by {@link android.telecom.DisconnectCause}.
*/
public DisconnectCause getDisconnectCause() {
return mDisconnectCause;

View File

@@ -83,6 +83,17 @@ public final class DisconnectCause implements Parcelable {
this(code, null, null, reason, ToneGenerator.TONE_UNKNOWN);
}
/**
* Creates a new DisconnectCause.
* @param label The localized label to show to the user to explain the disconnect.
* @param code The code for the disconnect cause.
* @param description The localized description to show to the user to explain the disconnect.
* @param reason The reason for the disconnect.
*/
public DisconnectCause(int code, CharSequence label, CharSequence description, String reason) {
this(code, label, description, reason, ToneGenerator.TONE_UNKNOWN);
}
/**
* Creates a new DisconnectCause.
*