diff options
author | Andrew Lee <anwlee@google.com> | 2014-07-24 17:49:08 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-07-31 11:16:30 -0700 |
commit | 9c4226952c74f024c09e0bd381048493993c974e (patch) | |
tree | 4ae9e13c84cba7f33ebae1bf5087a7b332870699 /InCallUI/src/com/android/incallui/Call.java | |
parent | 49e24bf10151b64a55cc8d5d4727e27b752e07bc (diff) |
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
Diffstat (limited to 'InCallUI/src/com/android/incallui/Call.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/Call.java | 24 |
1 files changed, 24 insertions, 0 deletions
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<String> 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]", |