summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt20
-rw-r--r--telecomm/java/android/telecomm/ConnectionService.java53
2 files changed, 49 insertions, 24 deletions
diff --git a/api/current.txt b/api/current.txt
index ea842d567cb6..89881fdac0ff 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -28801,16 +28801,16 @@ package android.telecomm {
method public void changeCameraCapabilities(android.telecomm.CallCameraCapabilities);
method public void changePeerDimensions(int, int);
method public void handleCallSessionEvent(int);
- method public abstract void onRequestCallDataUsage();
- method public abstract void onRequestCameraCapabilities();
- method public abstract void onSendSessionModifyRequest(android.telecomm.VideoCallProfile);
- method public abstract void onSendSessionModifyResponse(android.telecomm.VideoCallProfile);
- method public abstract void onSetCamera(java.lang.String);
- method public abstract void onSetDeviceOrientation(int);
- method public abstract void onSetDisplaySurface(android.view.Surface);
- method public abstract void onSetPauseImage(java.lang.String);
- method public abstract void onSetPreviewSurface(android.view.Surface);
- method public abstract void onSetZoom(float);
+ method public void onRequestCallDataUsage();
+ method public void onRequestCameraCapabilities();
+ method public void onSendSessionModifyRequest(android.telecomm.VideoCallProfile);
+ method public void onSendSessionModifyResponse(android.telecomm.VideoCallProfile);
+ method public void onSetCamera(java.lang.String);
+ method public void onSetDeviceOrientation(int);
+ method public void onSetDisplaySurface(android.view.Surface);
+ method public void onSetPauseImage(java.lang.String);
+ method public void onSetPreviewSurface(android.view.Surface);
+ method public void onSetZoom(float);
method public void receiveSessionModifyRequest(android.telecomm.VideoCallProfile);
method public void receiveSessionModifyResponse(int, android.telecomm.VideoCallProfile, android.telecomm.VideoCallProfile);
}
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java
index 53b304a31654..fddc9b0898bb 100644
--- a/telecomm/java/android/telecomm/ConnectionService.java
+++ b/telecomm/java/android/telecomm/ConnectionService.java
@@ -880,6 +880,11 @@ public abstract class ConnectionService extends Service {
return sNullConnection;
}
+ /**
+ * Abstraction for a class which provides video call functionality. This class contains no base
+ * implementation for its methods. It is expected that subclasses will override these
+ * functions to provide the desired behavior if it is supported.
+ */
public static abstract class VideoCallProvider {
private static final int MSG_SET_VIDEO_CALL_LISTENER = 1;
private static final int MSG_SET_CAMERA = 2;
@@ -1012,38 +1017,48 @@ public abstract class ConnectionService extends Service {
*
* @param cameraId The id of the camera.
*/
- public abstract void onSetCamera(String cameraId);
+ public void onSetCamera(String cameraId) {
+ // To be implemented by subclass.
+ }
/**
* Sets the surface to be used for displaying a preview of what the user's camera is
- * currently capturing. When video transmission is enabled, this is the video signal which is
- * sent to the remote device.
+ * currently capturing. When video transmission is enabled, this is the video signal which
+ * is sent to the remote device.
*
* @param surface The surface.
*/
- public abstract void onSetPreviewSurface(Surface surface);
+ public void onSetPreviewSurface(Surface surface) {
+ // To be implemented by subclass.
+ }
/**
* Sets the surface to be used for displaying the video received from the remote device.
*
* @param surface The surface.
*/
- public abstract void onSetDisplaySurface(Surface surface);
+ public void onSetDisplaySurface(Surface surface) {
+ // To be implemented by subclass.
+ }
/**
- * Sets the device orientation, in degrees. Assumes that a standard portrait orientation of the
- * device is 0 degrees.
+ * Sets the device orientation, in degrees. Assumes that a standard portrait orientation of
+ * the device is 0 degrees.
*
* @param rotation The device orientation, in degrees.
*/
- public abstract void onSetDeviceOrientation(int rotation);
+ public void onSetDeviceOrientation(int rotation) {
+ // To be implemented by subclass.
+ }
/**
* Sets camera zoom ratio.
*
* @param value The camera zoom ratio.
*/
- public abstract void onSetZoom(float value);
+ public void onSetZoom(float value) {
+ // To be implemented by subclass.
+ }
/**
* Issues a request to modify the properties of the current session. The request is sent to
@@ -1054,7 +1069,9 @@ public abstract class ConnectionService extends Service {
*
* @param requestProfile The requested call video properties.
*/
- public abstract void onSendSessionModifyRequest(VideoCallProfile requestProfile);
+ public void onSendSessionModifyRequest(VideoCallProfile requestProfile) {
+ // To be implemented by subclass.
+ }
/**te
* Provides a response to a request to change the current call session video
@@ -1066,21 +1083,27 @@ public abstract class ConnectionService extends Service {
*
* @param responseProfile The response call video properties.
*/
- public abstract void onSendSessionModifyResponse(VideoCallProfile responseProfile);
+ public void onSendSessionModifyResponse(VideoCallProfile responseProfile) {
+ // To be implemented by subclass.
+ }
/**
* Issues a request to the video provider to retrieve the camera capabilities.
* Camera capabilities are reported back to the caller via
* {@link InCallService.VideoCall.Listener#onCameraCapabilitiesChanged(CallCameraCapabilities)}.
*/
- public abstract void onRequestCameraCapabilities();
+ public void onRequestCameraCapabilities() {
+ // To be implemented by subclass.
+ }
/**
* Issues a request to the video telephony framework to retrieve the cumulative data usage for
* the current call. Data usage is reported back to the caller via
* {@link InCallService.VideoCall.Listener#onCallDataUsageChanged}.
*/
- public abstract void onRequestCallDataUsage();
+ public void onRequestCallDataUsage() {
+ // To be implemented by subclass.
+ }
/**
* Provides the video telephony framework with the URI of an image to be displayed to remote
@@ -1088,7 +1111,9 @@ public abstract class ConnectionService extends Service {
*
* @param uri URI of image to display.
*/
- public abstract void onSetPauseImage(String uri);
+ public void onSetPauseImage(String uri) {
+ // To be implemented by subclass.
+ }
/**
* Invokes callback method defined in {@link InCallService.VideoCall.Listener}.