summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2014-04-01 02:10:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-01 02:10:12 +0000
commit61d2bec6ce1cea4ce4a33b3d4320ad449c28b053 (patch)
tree5a722349ee63bb14159d2ee7d155d9603fd07758 /telecomm
parente4fa4450383fe7adbbc58860a5a0b055351d6301 (diff)
parent20e3f02c2de4efd4ccf56112b39b6056582f283a (diff)
downloadframeworks_base-61d2bec6ce1cea4ce4a33b3d4320ad449c28b053.zip
frameworks_base-61d2bec6ce1cea4ce4a33b3d4320ad449c28b053.tar.gz
frameworks_base-61d2bec6ce1cea4ce4a33b3d4320ad449c28b053.tar.bz2
Merge "Add disconnect cause to setDisconnected." into master-nova
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecomm/CallServiceAdapter.java7
-rw-r--r--telecomm/java/android/telecomm/InCallService.java12
-rw-r--r--telecomm/java/com/android/internal/telecomm/ICallServiceAdapter.aidl5
-rw-r--r--telecomm/java/com/android/internal/telecomm/IInCallService.aidl6
4 files changed, 18 insertions, 12 deletions
diff --git a/telecomm/java/android/telecomm/CallServiceAdapter.java b/telecomm/java/android/telecomm/CallServiceAdapter.java
index 0527a6d..d5bb989 100644
--- a/telecomm/java/android/telecomm/CallServiceAdapter.java
+++ b/telecomm/java/android/telecomm/CallServiceAdapter.java
@@ -133,10 +133,13 @@ public final class CallServiceAdapter {
* Sets a call's state to disconnected.
*
* @param callId The unique ID of the call whose state is changing to disconnected.
+ * @param disconnectCause The reason for the disconnection, any of
+ * {@link android.telephony.DisconnectCause}.
+ * @param disconnectMessage Optional call-service-provided message about the disconnect.
*/
- public void setDisconnected(String callId) {
+ public void setDisconnected(String callId, int disconnectCause, String disconnectMessage) {
try {
- mAdapter.setDisconnected(callId);
+ mAdapter.setDisconnected(callId, disconnectCause, disconnectMessage);
} catch (RemoteException e) {
}
}
diff --git a/telecomm/java/android/telecomm/InCallService.java b/telecomm/java/android/telecomm/InCallService.java
index ef15a61..8f1add2 100644
--- a/telecomm/java/android/telecomm/InCallService.java
+++ b/telecomm/java/android/telecomm/InCallService.java
@@ -58,7 +58,7 @@ public abstract class InCallService extends Service {
setActive((String) msg.obj);
break;
case MSG_SET_DISCONNECTED:
- setDisconnected((String) msg.obj);
+ setDisconnected((String) msg.obj, msg.arg1);
break;
case MSG_SET_HOLD:
setOnHold((String) msg.obj);
@@ -93,8 +93,8 @@ public abstract class InCallService extends Service {
/** {@inheritDoc} */
@Override
- public void setDisconnected(String callId) {
- mHandler.obtainMessage(MSG_SET_DISCONNECTED, callId).sendToTarget();
+ public void setDisconnected(String callId, int disconnectCause) {
+ mHandler.obtainMessage(MSG_SET_DISCONNECTED, disconnectCause, 0, callId).sendToTarget();
}
/** {@inheritDoc} */
@@ -149,12 +149,12 @@ public abstract class InCallService extends Service {
/**
* Indicates to the in-call app that a call has been moved to the
* {@link CallState#DISCONNECTED} and the user should be notified.
- * TODO(santoscordon): Needs disconnect-cause either as a numberical constant, string or both
- * depending on what is ultimately needed to support all scenarios.
*
* @param callId The identifier of the call that was disconnected.
+ * @param disconnectCause The reason for the disconnection, any of
+ * {@link android.telephony.DisconnectCause}.
*/
- protected abstract void setDisconnected(String callId);
+ protected abstract void setDisconnected(String callId, int disconnectCause);
/**
* Indicates to the in-call app that a call has been moved to the
diff --git a/telecomm/java/com/android/internal/telecomm/ICallServiceAdapter.aidl b/telecomm/java/com/android/internal/telecomm/ICallServiceAdapter.aidl
index e96defe..bbf4e80 100644
--- a/telecomm/java/com/android/internal/telecomm/ICallServiceAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecomm/ICallServiceAdapter.aidl
@@ -89,8 +89,11 @@ oneway interface ICallServiceAdapter {
* Sets a call's state to disconnected.
*
* @param callId The unique ID of the call whose state is changing to disconnected.
+ * @param disconnectCause The reason for the disconnection, any of
+ * {@link android.telephony.DisconnectCause}.
+ * @param disconnectMessage The call-service-provided message about the disconnect cause.
*/
- void setDisconnected(String callId);
+ void setDisconnected(String callId, int disconnectCause, String disconnectMessage);
/**
* Sets a call's state to be on hold.
diff --git a/telecomm/java/com/android/internal/telecomm/IInCallService.aidl b/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
index 35498a3..4e902a2 100644
--- a/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
@@ -61,12 +61,12 @@ oneway interface IInCallService {
/**
* Indicates to the in-call app that a call has been moved to the
* {@link android.telecomm.CallState#DISCONNECTED} and the user should be notified.
- * TODO(santoscordon): Needs disconnect-cause either as a numberical constant, string or both
- * depending on what is ultimately needed to support all scenarios.
*
* @param callId The identifier of the call that was disconnected.
+ * @param disconnectCause The reason for the disconnection, any of
+ * {@link android.telephony.DisconnectCause}.
*/
- void setDisconnected(String callId);
+ void setDisconnected(String callId, int disconnectCause);
/**
* Indicates to the in-call app that a call has been moved to the