summaryrefslogtreecommitdiffstats
path: root/telecomm/java
diff options
context:
space:
mode:
authorSailesh Nepal <sail@google.com>2014-11-06 06:14:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-11-06 06:14:15 +0000
commitdb66e1d2b9b63eb1612820dc6572de1e42880646 (patch)
tree7e19d4def1deaefacc8a6783f2c86e8f0e402147 /telecomm/java
parentff636d383c8f0464e543866ae73ec4a367efd15a (diff)
parent7a69c9277ffde11d862f1bf4fcb92e21a3f98c28 (diff)
downloadframeworks_base-db66e1d2b9b63eb1612820dc6572de1e42880646.zip
frameworks_base-db66e1d2b9b63eb1612820dc6572de1e42880646.tar.gz
frameworks_base-db66e1d2b9b63eb1612820dc6572de1e42880646.tar.bz2
Merge "Add CONNECTION_MANAGER_NOT_SUPPORTED to DisconnectCause" into lmp-mr1-dev
Diffstat (limited to 'telecomm/java')
-rw-r--r--telecomm/java/android/telecom/DisconnectCause.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/telecomm/java/android/telecom/DisconnectCause.java b/telecomm/java/android/telecom/DisconnectCause.java
index 206046d..73bcd0c 100644
--- a/telecomm/java/android/telecom/DisconnectCause.java
+++ b/telecomm/java/android/telecom/DisconnectCause.java
@@ -58,6 +58,11 @@ public final class DisconnectCause implements Parcelable {
public static final int RESTRICTED = 8;
/** Disconnected for reason not described by other disconnect codes. */
public static final int OTHER = 9;
+ /**
+ * Disconnected because the connection manager did not support the call. The call will be tried
+ * again without a connection manager. See {@link PhoneAccount#CAPABILITY_CONNECTION_MANAGER}.
+ */
+ public static final int CONNECTION_MANAGER_NOT_SUPPORTED = 10;
private int mDisconnectCode;
private CharSequence mDisconnectLabel;
@@ -220,7 +225,10 @@ public final class DisconnectCause implements Parcelable {
@Override
public String toString() {
String code = "";
- switch (getCode()) {
+ switch (mDisconnectCode) {
+ case UNKNOWN:
+ code = "UNKNOWN";
+ break;
case ERROR:
code = "ERROR";
break;
@@ -230,6 +238,9 @@ public final class DisconnectCause implements Parcelable {
case REMOTE:
code = "REMOTE";
break;
+ case CANCELED:
+ code = "CANCELED";
+ break;
case MISSED:
code = "MISSED";
break;
@@ -245,9 +256,12 @@ public final class DisconnectCause implements Parcelable {
case OTHER:
code = "OTHER";
break;
- case UNKNOWN:
+ case CONNECTION_MANAGER_NOT_SUPPORTED:
+ code = "CONNECTION_MANAGER_NOT_SUPPORTED";
+ break;
default:
- code = "UNKNOWN";
+ code = "invalid code: " + mDisconnectCode;
+ break;
}
String label = mDisconnectLabel == null ? "" : mDisconnectLabel.toString();
String description = mDisconnectDescription == null