diff --git a/Android.mk b/Android.mk index 8813a99b573a3..dd7d5bcf0042d 100644 --- a/Android.mk +++ b/Android.mk @@ -277,6 +277,10 @@ LOCAL_SRC_FILES += \ media/java/android/media/IRemoteDisplayProvider.aidl \ media/java/android/media/IRemoteVolumeObserver.aidl \ media/java/android/media/IRingtonePlayer.aidl \ + telecomm/java/android/telecomm/ICallService.aidl \ + telecomm/java/android/telecomm/ICallServiceAdapter.aidl \ + telecomm/java/android/telecomm/ICallServiceProvider.aidl \ + telecomm/java/android/telecomm/ICallServiceProviderAdapter.aidl \ telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \ telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \ telephony/java/com/android/internal/telephony/ITelephony.aidl \ @@ -426,11 +430,6 @@ aidl_files := \ frameworks/base/location/java/android/location/FusedBatchOptions.aidl \ frameworks/base/location/java/com/android/internal/location/ProviderProperties.aidl \ frameworks/base/location/java/com/android/internal/location/ProviderRequest.aidl \ - frameworks/base/telecomm/java/android/telecomm/CallInfo.aidl \ - frameworks/base/telecomm/java/android/telecomm/ICallService.aidl \ - frameworks/base/telecomm/java/android/telecomm/ICallServiceAdapter.aidl \ - frameworks/base/telecomm/java/android/telecomm/ICallServiceProvider.aidl \ - frameworks/base/telecomm/java/android/telecomm/ICallServiceProviderAdapter.aidl \ frameworks/base/telephony/java/android/telephony/ServiceState.aidl \ frameworks/base/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \ frameworks/base/telephony/java/com/android/internal/telephony/ITelephony.aidl \ diff --git a/telecomm/java/android/telecomm/CallService.java b/telecomm/java/android/telecomm/CallService.java index 35989583b491f..9c5af3d4dc6b8 100644 --- a/telecomm/java/android/telecomm/CallService.java +++ b/telecomm/java/android/telecomm/CallService.java @@ -22,8 +22,8 @@ import android.os.Handler; import android.os.IBinder; import android.os.Message; -import android.ICallService; -import android.ICallServiceAdapter; +import android.telecomm.ICallService; +import android.telecomm.ICallServiceAdapter; /** * Base implementation of CallService which can be used to provide calls for the system diff --git a/telecomm/java/android/telecomm/ICallService.aidl b/telecomm/java/android/telecomm/ICallService.aidl index 0ff42fdbbae4e..6764e4e56ce99 100644 --- a/telecomm/java/android/telecomm/ICallService.aidl +++ b/telecomm/java/android/telecomm/ICallService.aidl @@ -37,13 +37,18 @@ oneway interface ICallService { * Sets an implementation of ICallServiceAdapter which the call service can use to add new calls * and communicate state changes of existing calls. This is the first method that is called * after a the framework binds to the call service. + * + * @param callServiceAdapter Interface to CallsManager for adding and updating calls. */ - void setCallServiceAdapter(ICallServiceAdapter callServiceAdapter); + void setCallServiceAdapter(in ICallServiceAdapter callServiceAdapter); /** * Determines if the CallService can make calls to the handle. * TODO(santoscordon): Move this method into its own service interface long term. * TODO(santoscordon): Add response callback parameter. + * + * @param handle The destination handle to test against. Method should return true via the + * response callback if it can make a call to this handle. */ void isCompatibleWith(String handle); @@ -54,11 +59,15 @@ oneway interface ICallService { * handle-calling systems. See {@link #isCompatibleWith}. * TODO(santoscordon): Should this have a response attached to it to ensure that the call * service actually plans to make the call? + * + * @param handle The destination handle to call. */ void call(String handle); /** * Disconnects the call identified by callId. + * + * @param callId The identifier of the call to disconnect. */ void disconnect(String callId); } diff --git a/telecomm/java/android/telecomm/ICallServiceAdapter.aidl b/telecomm/java/android/telecomm/ICallServiceAdapter.aidl index af80e2a51425e..01f785cd40ea4 100644 --- a/telecomm/java/android/telecomm/ICallServiceAdapter.aidl +++ b/telecomm/java/android/telecomm/ICallServiceAdapter.aidl @@ -32,32 +32,51 @@ oneway interface ICallServiceAdapter { /** * Tells CallsManager of a new incoming call. + * + * @param callId The unique ID (via {@link #getNextCallId}) of the new incoming call. + * @param info Information about the new call including but not limited to the start time of the + * call and information about the caller's handle. */ - void newIncomingCall(String callId, CallInfo info); + void newIncomingCall(String callId, in CallInfo info); /** - * Tells CallsManager of a new outgoing call. + * Tells CallsManager of a new outgoing call. Use of this method should always follow + * {@link ICallService#call}. + * + * @param callId The unique ID (via {@link #getNextCallId}) of the new outgoing call. + * TODO(santoscordon): May be easier to have ICallService#call provide an ID instead of + * requiring a separate call to getNextCallId(). + * @param info Information about the new call including but not limited to the start time of the + * call and information about the caller's handle. */ - void newOutgoingCall(String callId, CallInfo info); + void newOutgoingCall(String callId, in CallInfo info); /** * Sets a call's state to active (e.g., an ongoing call where two parties can actively * communicate). + * + * @param callId The unique ID of the call whose state is changing to active. */ void setActive(String callId); /** * Sets a call's state to ringing (e.g., an inbound ringing call). + * + * @param callId The unique ID of the call whose state is changing to ringing. */ void setRinging(String callId); /** * Sets a call's state to dialing (e.g., dialing an outbound call). + * + * @param callId The unique ID of the call whose state is changing to dialing. */ void setDialing(String callId); /** * Sets a call's state to disconnected. + * + * @param callId The unique ID of the call whose state is changing to disconnected. */ void setDisconnected(String callId); } diff --git a/telecomm/java/android/telecomm/ICallServiceProvider.aidl b/telecomm/java/android/telecomm/ICallServiceProvider.aidl index 0803cbc1fee49..1bd8d1fde376a 100644 --- a/telecomm/java/android/telecomm/ICallServiceProvider.aidl +++ b/telecomm/java/android/telecomm/ICallServiceProvider.aidl @@ -16,6 +16,8 @@ package android.telecomm; +import android.telecomm.ICallServiceProviderAdapter; + /** * Interface for applications interested in providing call-service implementations. Only used in * outgoing-call scenarios where the best-candidate service to issue the call over may need to be @@ -36,8 +38,11 @@ oneway interface ICallServiceProvider { /** * Sets an implementation of ICallServiceProviderAdapter to allow call-service providers to * communicate with the CallsManager. + * + * @param callServiceProviderAdapter The interface through which {@link ICallService} + * implementations are passed to CallsManager. */ - void setCallServiceProviderAdapter(ICallServiceProviderAdapter callServiceProviderAdapter); + void setCallServiceProviderAdapter(in ICallServiceProviderAdapter callServiceProviderAdapter); /** * Provides the application with the opportunity to "register" ICallServiceProvider diff --git a/telecomm/java/android/telecomm/ICallServiceProviderAdapter.aidl b/telecomm/java/android/telecomm/ICallServiceProviderAdapter.aidl index 6c43d16a53803..ec88a06e44717 100644 --- a/telecomm/java/android/telecomm/ICallServiceProviderAdapter.aidl +++ b/telecomm/java/android/telecomm/ICallServiceProviderAdapter.aidl @@ -16,7 +16,7 @@ package android.telecomm; -import android.telecomm.CallService; +import android.telecomm.ICallService; /** * Provides ICallServiceProvider implementations with the relevant CallsManager APIs. @@ -26,7 +26,10 @@ oneway interface ICallServiceProviderAdapter { /** * Provides the CallsManager with the services made available by this application. - * @param callServices the relevant services to make the CallManager aware of. + * + * @param callServices The relevant services to make the CallsManager aware of. Parameter is + * a list of IBinder which can be cast to ICallService. + * NOTE: IBinder is required by AIDL processor when passing a list of interfaces. */ - void registerCallServices(List callServices); + void registerCallServices(in List callServices); }