summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-09-19 10:53:21 -0700
committerNancy Chen <nancychen@google.com>2014-09-19 11:01:45 -0700
commitf4cf77c5dc0348d3f7561f48a5a751cb823cd271 (patch)
tree4169007c3cd21225ce1113f89efb554d0d2b97c1
parentddc5e5f1c60f5fc491c9299a0afd280f8fdc252b (diff)
downloadframeworks_base-f4cf77c5dc0348d3f7561f48a5a751cb823cd271.zip
frameworks_base-f4cf77c5dc0348d3f7561f48a5a751cb823cd271.tar.gz
frameworks_base-f4cf77c5dc0348d3f7561f48a5a751cb823cd271.tar.bz2
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
-rw-r--r--api/current.txt1
-rw-r--r--telecomm/java/android/telecom/Call.java2
-rw-r--r--telecomm/java/android/telecom/DisconnectCause.java11
3 files changed, 13 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt
index 17588c7..9aba0f3 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -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();
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index b0b6fb9..a71161a 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -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;
diff --git a/telecomm/java/android/telecom/DisconnectCause.java b/telecomm/java/android/telecom/DisconnectCause.java
index cae115d..9be0138 100644
--- a/telecomm/java/android/telecom/DisconnectCause.java
+++ b/telecomm/java/android/telecom/DisconnectCause.java
@@ -85,6 +85,17 @@ public final class DisconnectCause implements Parcelable {
/**
* 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.
*
* @param code The code for the disconnect cause.
* @param label The localized label to show to the user to explain the disconnect.