From 7edbe283be759139c451acdb81f3f9ce100a9315 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Fri, 8 Aug 2014 15:22:40 -0700 Subject: [PATCH] Adding camera failure/ready session events. The VT provider can use these to inform In-Call of a camera failure and the camera becoming ready again after recovery. Bug: 16900653 Change-Id: I279176860b30d02f55732b327ac3385eff8d19a8 --- api/current.txt | 2 ++ .../java/android/telecomm/InCallService.java | 21 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/api/current.txt b/api/current.txt index d8ff2b152bd98..51aac838bd465 100644 --- a/api/current.txt +++ b/api/current.txt @@ -28901,6 +28901,8 @@ package android.telecomm { method public abstract void setPreviewSurface(android.view.Surface); method public abstract void setVideoCallListener(android.telecomm.InCallService.VideoCall.Listener); method public abstract void setZoom(float); + field public static final int SESSION_EVENT_CAMERA_FAILURE = 5; // 0x5 + field public static final int SESSION_EVENT_CAMERA_READY = 6; // 0x6 field public static final int SESSION_EVENT_RX_PAUSE = 1; // 0x1 field public static final int SESSION_EVENT_RX_RESUME = 2; // 0x2 field public static final int SESSION_EVENT_TX_START = 3; // 0x3 diff --git a/telecomm/java/android/telecomm/InCallService.java b/telecomm/java/android/telecomm/InCallService.java index a88e1ccefff08..b2758094ffd31 100644 --- a/telecomm/java/android/telecomm/InCallService.java +++ b/telecomm/java/android/telecomm/InCallService.java @@ -207,11 +207,24 @@ public abstract class InCallService extends Service { public static final int SESSION_EVENT_TX_START = 3; /** - * Video transmission has stopped. This occur after a negotiated stop of video transmission when - * the underlying protocol has actually stopped transmitting video to the remote party. + * Video transmission has stopped. This occurs after a negotiated stop of video transmission + * when the underlying protocol has actually stopped transmitting video to the remote party. */ public static final int SESSION_EVENT_TX_STOP = 4; + /** + * A camera failure has occurred for the selected camera. The In-Call UI can use this as a + * cue to inform the user the camera is not available. + */ + public static final int SESSION_EVENT_CAMERA_FAILURE = 5; + + /** + * Issued after {@code SESSION_EVENT_CAMERA_FAILURE} when the camera is once again ready for + * operation. The In-Call UI can use this as a cue to inform the user that the camera has + * become available again. + */ + public static final int SESSION_EVENT_CAMERA_READY = 6; + /** * Session modify request was successful. */ @@ -359,7 +372,9 @@ public abstract class InCallService extends Service { * Valid values are: {@link VideoCall#SESSION_EVENT_RX_PAUSE}, * {@link VideoCall#SESSION_EVENT_RX_RESUME}, * {@link VideoCall#SESSION_EVENT_TX_START}, - * {@link VideoCall#SESSION_EVENT_TX_STOP} + * {@link VideoCall#SESSION_EVENT_TX_STOP}, + * {@link VideoCall#SESSION_EVENT_CAMERA_FAILURE}, + * {@link VideoCall#SESSION_EVENT_CAMERA_READY} * * @param event The event. */