diff options
author | Andrew Lee <anwlee@google.com> | 2014-09-11 17:33:16 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-09-16 12:07:41 -0700 |
commit | 7f3d41fd124dd7c4a8b72c1d48df08a8ee7209ec (patch) | |
tree | 5f90ef2d188ec564b16fd79936b5a19c7ea27395 /telecomm/java/android/telecom/RemoteConnectionService.java | |
parent | b37b7ae137d09e21ed9b57415960ae1b975bdc0f (diff) |
Add new DisconnectCause class to telecomm.
+ Add a hidden "UNKNOWN" default type to ToneGenerator.
- Hide the Telephony DisconnectCause from the public API.
+ Add a Telecomm DisconnectCause. This is parcelable, and contains
information (code, user facing message, non-user facing reason,
and tone) to help describe the disconnect state and what behaviors
an application can implement for the user experience. This reduces
the causes for a disconnect to a more generic set.
+ Lots of work to pipe this through. DisconnectCause replaces the
code and message which were formerly passed around.
Bug: 17241433
Bug: 17329632
Change-Id: I9d337e478a8784bcc0ade02267c2df52cac9bf17
Diffstat (limited to 'telecomm/java/android/telecom/RemoteConnectionService.java')
-rw-r--r-- | telecomm/java/android/telecom/RemoteConnectionService.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java index bfd7c51658a5..03b38c2aaaad 100644 --- a/telecomm/java/android/telecom/RemoteConnectionService.java +++ b/telecomm/java/android/telecom/RemoteConnectionService.java @@ -20,7 +20,6 @@ import android.net.Uri; import android.os.IBinder; import android.os.IBinder.DeathRecipient; import android.os.RemoteException; -import android.telephony.DisconnectCause; import com.android.internal.telecom.IConnectionService; import com.android.internal.telecom.IConnectionServiceAdapter; @@ -107,14 +106,13 @@ final class RemoteConnectionService { } @Override - public void setDisconnected(String callId, int disconnectCause, - String disconnectMessage) { + public void setDisconnected(String callId, DisconnectCause disconnectCause) { if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "setDisconnected") - .setDisconnected(disconnectCause, disconnectMessage); + .setDisconnected(disconnectCause); } else { findConferenceForAction(callId, "setDisconnected") - .setDisconnected(disconnectCause, disconnectMessage); + .setDisconnected(disconnectCause); } } @@ -351,8 +349,8 @@ final class RemoteConnectionService { }); return connection; } catch (RemoteException e) { - return RemoteConnection - .failure(DisconnectCause.ERROR_UNSPECIFIED, e.toString()); + return RemoteConnection.failure( + new DisconnectCause(DisconnectCause.ERROR, e.toString())); } } |