summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-08-06 12:14:21 -0700
committerAndrew Lee <anwlee@google.com>2014-08-06 14:37:06 -0700
commit1f6bbd292050973aa6e2ac5a1669cd04822e06d1 (patch)
treea6b34ea1e30f15d3753d3a04d7127600c00fb874 /telecomm/java/android
parent06eaf193bde2f8455a3f957f1df4b1c328ac1432 (diff)
downloadframeworks_base-1f6bbd292050973aa6e2ac5a1669cd04822e06d1.zip
frameworks_base-1f6bbd292050973aa6e2ac5a1669cd04822e06d1.tar.gz
frameworks_base-1f6bbd292050973aa6e2ac5a1669cd04822e06d1.tar.bz2
"Implement" formerly abstract methods VideoCallProvider.
Provide null-op methods so there is greater flexibility for classes which extend this base class, but might not support all its methods. In the future, if we add more methods to the *.aidl interface, this class can work with binaries which extend this class but don't implement all the methods since the superclass now implements those methods. Left onSetPreviewSurface and onSetDisplaySurface as abstract. Bug: 16842159 Change-Id: Ie7fea6ef5d473e3924ef370392f380603a568800
Diffstat (limited to 'telecomm/java/android')
-rw-r--r--telecomm/java/android/telecomm/ConnectionService.java53
1 files changed, 39 insertions, 14 deletions
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java
index 53b304a..fddc9b0 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}.