diff --git a/Android.mk b/Android.mk index 5485e9f10de84..cd2cebbc00904 100644 --- a/Android.mk +++ b/Android.mk @@ -368,6 +368,8 @@ LOCAL_SRC_FILES += \ telephony/java/com/android/ims/internal/IImsStreamMediaSession.aidl \ telephony/java/com/android/ims/internal/IImsUt.aidl \ telephony/java/com/android/ims/internal/IImsUtListener.aidl \ + telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl \ + telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl \ telephony/java/com/android/ims/ImsConfigListener.aidl \ telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \ telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \ diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java index 5e6bf87a462d6..34d35bfcf05b1 100644 --- a/telecomm/java/android/telecomm/ConnectionService.java +++ b/telecomm/java/android/telecomm/ConnectionService.java @@ -1073,7 +1073,7 @@ public abstract class ConnectionService extends Service { // To be implemented by subclass. } - /**te + /** * Provides a response to a request to change the current call session video * properties. * This is in response to a request the InCall UI has received via @@ -1139,8 +1139,8 @@ public abstract class ConnectionService extends Service { * @param requestedProfile The original request which was sent to the remote device. * @param responseProfile The actual profile changes made by the remote device. */ - public void receiveSessionModifyResponse(int status, - VideoCallProfile requestedProfile, VideoCallProfile responseProfile) { + public void receiveSessionModifyResponse( + int status, VideoCallProfile requestedProfile, VideoCallProfile responseProfile) { if (mVideoCallListener != null) { try { mVideoCallListener.receiveSessionModifyResponse( diff --git a/telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl b/telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl index a71ab0af6ce46..1a8f68e7629b4 100644 --- a/telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl +++ b/telecomm/java/com/android/internal/telecomm/IVideoCallCallback.aidl @@ -19,14 +19,14 @@ package com.android.internal.telecomm; import android.telecomm.CallCameraCapabilities; import android.telecomm.VideoCallProfile; - /** - * Internal definition of the a callback interface, used for an InCallUi to respond to video - * telephony changes. - * - * @see android.telecomm.InCallService.VideoCall.Listener - * - * {@hide} - */ +/** + * Internal definition of a callback interface, used for an InCallUi to respond to video telephony + * changes. + * + * @see android.telecomm.InCallService.VideoCall.Listener + * + * {@hide} + */ oneway interface IVideoCallCallback { void receiveSessionModifyRequest(in VideoCallProfile videoCallProfile); diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl index 5f2ff360bd4cd..ba4cb01714cb6 100644 --- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl +++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl @@ -19,6 +19,7 @@ package com.android.ims.internal; import com.android.ims.ImsCallProfile; import com.android.ims.ImsStreamMediaProfile; import com.android.ims.internal.IImsCallSessionListener; +import com.android.ims.internal.IImsVideoCallProvider; /** * An IMS session that is associated with a SIP dialog which is established from/to @@ -216,4 +217,11 @@ interface IImsCallSession { * @param ussdMessage USSD message to send */ void sendUssd(String ussdMessage); + + /** + * Returns a binder for the video call provider implementation contained within the IMS service + * process. This binder is used by the VideoCallProvider subclass in Telephony which + * intermediates between the propriety implementation and Telecomm/InCall. + */ + IImsVideoCallProvider getVideoCallProvider(); } diff --git a/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl b/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl new file mode 100644 index 0000000000000..6b8ec5246e026 --- /dev/null +++ b/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.ims.internal; + +import android.telecomm.CallCameraCapabilities; +import android.telecomm.VideoCallProfile; + +/** + * Internal remote interface for IMS's video call provider. + * + * At least initially, this aidl mirrors telecomm's {@link VideoCallCallback}. We created a + * separate aidl interface for invoking callbacks in Telephony from the IMS Service to without + * accessing internal interfaces. See {@link IImsVideoCallProvider} for additional detail. + * + * @see android.telecomm.internal.IVideoCallCallback + * @see android.telecomm.VideoCallImpl + * + * {@hide} + */ +oneway interface IImsVideoCallCallback { + void receiveSessionModifyRequest(in VideoCallProfile videoCallProfile); + + void receiveSessionModifyResponse(int status, in VideoCallProfile requestedProfile, + in VideoCallProfile responseProfile); + + void handleCallSessionEvent(int event); + + void changePeerDimensions(int width, int height); + + void changeCallDataUsage(int dataUsage); + + void changeCameraCapabilities(in CallCameraCapabilities callCameraCapabilities); +} diff --git a/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl b/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl new file mode 100644 index 0000000000000..f8389ecf14c66 --- /dev/null +++ b/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.ims.internal; + +import android.view.Surface; +import android.telecomm.VideoCallProfile; + +import com.android.ims.internal.IImsVideoCallCallback; + +/** + * Internal remote interface for IMS's video call provider. + * + * At least initially, this aidl mirrors telecomm's {@link IVideoCallProvider}. We created a + * separate aidl interface even though the methods and parameters are same because the + * {@link IVideoCallProvider} was specifically created as a binder for inter-process communication + * between Telecomm and Telephony. + * + * We don't want to use the same aidl in other places for communication, namely communication + * between Telephony and the IMS Service, even if that communication may be for similar methods. + * This decouples the communication among these processes. Similarly, third parties implementing a + * video call provider will not have the benefit of accessing the internal + * {@link IVideoCallProvider} aidl for interprocess communication. + * + * @see android.telecomm.internal.IVideoCallProvider + * @see android.telecomm.VideoCallProvider + * @hide + */ +oneway interface IImsVideoCallProvider { + void setCallback(IImsVideoCallCallback callback); + + void setCamera(String cameraId); + + void setPreviewSurface(in Surface surface); + + void setDisplaySurface(in Surface surface); + + void setDeviceOrientation(int rotation); + + void setZoom(float value); + + void sendSessionModifyRequest(in VideoCallProfile reqProfile); + + void sendSessionModifyResponse(in VideoCallProfile responseProfile); + + void requestCameraCapabilities(); + + void requestCallDataUsage(); + + void setPauseImage(String uri); +}