summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-10-07 20:55:45 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-07 20:55:45 +0000
commit663edb8bfb5025b58ed874432b41f60cfa587266 (patch)
tree92be41048273922d1dc473ff50f7cedc1333de10 /telecomm
parent18ab83e571e1ef7e4599d38cffc080dca704a06d (diff)
parent329bd662cc0dccaf41d441ea44db2895df48f0df (diff)
downloadframeworks_base-663edb8bfb5025b58ed874432b41f60cfa587266.zip
frameworks_base-663edb8bfb5025b58ed874432b41f60cfa587266.tar.gz
frameworks_base-663edb8bfb5025b58ed874432b41f60cfa587266.tar.bz2
am 329bd662: am 3bde32e6: Merge "Fixing where call goes from disconnecting to active to disconnecting state." into lmp-dev
* commit '329bd662cc0dccaf41d441ea44db2895df48f0df': Fixing where call goes from disconnecting to active to disconnecting state.
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecom/Call.java9
-rw-r--r--telecomm/java/android/telecom/CallState.java12
2 files changed, 21 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index a71161a..f934963 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -81,6 +81,13 @@ public final class Call {
public static final int STATE_CONNECTING = 9;
/**
+ * The state of a {@code Call} when the user has initiated a disconnection of the call, but the
+ * call has not yet been disconnected by the underlying {@code ConnectionService}. The next
+ * state of the call is (potentially) {@link #STATE_DISCONNECTED}.
+ */
+ public static final int STATE_DISCONNECTING = 10;
+
+ /**
* The key to retrieve the optional {@code PhoneAccount}s Telecom can bundle with its Call
* extras. Used to pass the phone accounts to display on the front end to the user in order to
* select phone accounts to (for example) place a call.
@@ -828,6 +835,8 @@ public final class Call {
return STATE_DISCONNECTED;
case CallState.ABORTED:
return STATE_DISCONNECTED;
+ case CallState.DISCONNECTING:
+ return STATE_DISCONNECTING;
default:
Log.wtf(this, "Unrecognized CallState %s", parcelableCallState);
return STATE_NEW;
diff --git a/telecomm/java/android/telecom/CallState.java b/telecomm/java/android/telecom/CallState.java
index 7690847..bd9223a 100644
--- a/telecomm/java/android/telecom/CallState.java
+++ b/telecomm/java/android/telecom/CallState.java
@@ -100,6 +100,16 @@ public final class CallState {
*/
public static final int ABORTED = 8;
+ /**
+ * Indicates that the call is in the process of being disconnected and will transition next
+ * to a {@link #DISCONNECTED} state.
+ * <p>
+ * This state is not expected to be communicated from the Telephony layer, but will be reported
+ * to the InCall UI for calls where disconnection has been initiated by the user but the
+ * ConnectionService has confirmed the call as disconnected.
+ */
+ public static final int DISCONNECTING = 9;
+
public static String toString(int callState) {
switch (callState) {
case NEW:
@@ -120,6 +130,8 @@ public final class CallState {
return "DISCONNECTED";
case ABORTED:
return "ABORTED";
+ case DISCONNECTING:
+ return "DISCONNECTING";
default:
return "UNKNOWN";
}