From 9c4226952c74f024c09e0bd381048493993c974e Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 24 Jul 2014 17:49:08 -0700 Subject: Status labels for video calls. - Display the appropriate status labels for video calls, mostly depending on whether one is in a video call, and whether one has requested video and is waiting for a response, or a video request has failed. - Add a handler to the CallCardPresenter, so we can show an error message in the fail case, but only show the message for a time. - Add video icon in layout. - Renamed CallVideoClientNotifier to reflect newer nomenclature. - Add session modification state information on InCallUI call. This helps us track state to know what strings to display on the card. Bug: 16013340 Change-Id: Ib2bf84d93a05664adbf7fe838848b7d7b54a8254 --- InCallUI/src/com/android/incallui/Call.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'InCallUI/src/com/android/incallui/Call.java') diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index f145bfde9..9c0ce6454 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -98,6 +98,16 @@ public final class Call { } } + /** + * Defines different states of session modify requests, which are used to upgrade to video, or + * downgrade to audio. + */ + public static class SessionModificationState { + public static final int NO_REQUEST = 0; + public static final int WAITING_FOR_RESPONSE = 1; + public static final int REQUEST_FAILED = 1; + } + private static final String ID_PREFIX = Call.class.getSimpleName() + "_"; private static int sIdCounter = 0; @@ -161,6 +171,7 @@ public final class Call { private int mState = State.INVALID; private int mDisconnectCause; private String mParentCallId; + private int mSessionModificationState; private final List mChildCallIds = new ArrayList<>(); private InCallVideoCallListener mVideoCallListener; @@ -335,6 +346,19 @@ public final class Call { return VideoCallProfile.VideoState.isBidirectional(getVideoState()); } + public void setSessionModificationState(int state) { + boolean hasChanged = mSessionModificationState != state; + mSessionModificationState = state; + + if (hasChanged) { + update(); + } + } + + public int getSessionModificationState() { + return mSessionModificationState; + } + @Override public String toString() { return String.format(Locale.US, "[%s, %s, %s, children:%s, parent:%s, videoState:%d]", -- cgit v1.2.3