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
diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java
index ffbbc8a..217dbc3 100644
--- a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java
+++ b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java
@@ -96,8 +96,7 @@
case MSG_SET_DISCONNECTED: {
SomeArgs args = (SomeArgs) msg.obj;
try {
- mDelegate.setDisconnected(
- (String) args.arg1, args.argi1, (String) args.arg2);
+ mDelegate.setDisconnected((String) args.arg1, (DisconnectCause) args.arg2);
} finally {
args.recycle();
}
@@ -234,11 +233,10 @@
@Override
public void setDisconnected(
- String connectionId, int disconnectCause, String disconnectMessage) {
+ String connectionId, DisconnectCause disconnectCause) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId;
- args.arg2 = disconnectMessage;
- args.argi1 = disconnectCause;
+ args.arg2 = disconnectCause;
mHandler.obtainMessage(MSG_SET_DISCONNECTED, args).sendToTarget();
}