diff options
author | Santos Cordon <santoscordon@gmail.com> | 2014-03-27 12:15:38 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2014-03-31 14:58:11 -0700 |
commit | 20e3f02c2de4efd4ccf56112b39b6056582f283a (patch) | |
tree | 07df9350cc25ab78707a04e683ee83a31aac1e08 /telecomm/java/android | |
parent | 75e1341f890e81135eb8706c4ec362d30a6af375 (diff) | |
download | frameworks_base-20e3f02c2de4efd4ccf56112b39b6056582f283a.zip frameworks_base-20e3f02c2de4efd4ccf56112b39b6056582f283a.tar.gz frameworks_base-20e3f02c2de4efd4ccf56112b39b6056582f283a.tar.bz2 |
Add disconnect cause to setDisconnected.
Change-Id: I4ba9b8f47a942b82b7a3d4bed43c0ca945957592
Diffstat (limited to 'telecomm/java/android')
-rw-r--r-- | telecomm/java/android/telecomm/CallServiceAdapter.java | 7 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/InCallService.java | 12 |
2 files changed, 11 insertions, 8 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 |