diff options
author | Yorke Lee <yorkelee@google.com> | 2015-04-08 17:59:58 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-04-09 11:24:48 -0700 |
commit | 55576e529a3fa7183a698669374b9c2dd28ad5c5 (patch) | |
tree | 857d5ce331703ad8e75e375fbd54bbc16a83330f /InCallUI/src/com/android/incallui | |
parent | c846fef0f0183115dff49ee753ee1990c532c03e (diff) |
Show progress spinner when upgrading to video
Show spinner when waiting for remote consent.
Also correctly propagate sessionModification state when
downgrading to audio.
Bug: 20090442
Change-Id: If733ce99683436c751a26a6511e6a41bac637c30
Diffstat (limited to 'InCallUI/src/com/android/incallui')
3 files changed, 12 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index 401187a83..b327ed64c 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -249,6 +249,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> } maybeShowManageConferenceCallButton(); + maybeShowProgressSpinner(); final boolean enableEndCallButton = Call.State.isConnectingOrConnected(callState) && callState != Call.State.INCOMING && mPrimary != null; @@ -309,6 +310,13 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> getUi().showManageConferenceCallButton(shouldShowManageConference()); } + private void maybeShowProgressSpinner() { + final boolean show = mPrimary != null && mPrimary.getSessionModificationState() + == Call.SessionModificationState.WAITING_FOR_RESPONSE + && mPrimary.getState() == Call.State.ACTIVE; + getUi().setProgressSpinnerVisible(show); + } + /** * Determines if the manage conference button should be visible, based on the current primary * call. diff --git a/InCallUI/src/com/android/incallui/InCallVideoCallListener.java b/InCallUI/src/com/android/incallui/InCallVideoCallListener.java index cf2b859e0..24c911949 100644 --- a/InCallUI/src/com/android/incallui/InCallVideoCallListener.java +++ b/InCallUI/src/com/android/incallui/InCallVideoCallListener.java @@ -87,8 +87,10 @@ public class InCallVideoCallListener extends VideoCall.Listener { boolean isVideoCall = VideoProfile.VideoState.isVideo(responseProfile.getVideoState()); if (modifySucceeded && isVideoCall) { InCallVideoCallListenerNotifier.getInstance().upgradeToVideoSuccess(mCall); - } else if (!modifySucceeded) { + } else if (!modifySucceeded && isVideoCall) { InCallVideoCallListenerNotifier.getInstance().upgradeToVideoFail(status, mCall); + } else if (modifySucceeded && !isVideoCall) { + InCallVideoCallListenerNotifier.getInstance().downgradeToAudio(mCall); } } else { Log.d(this, "onSessionModifyResponseReceived request and response Profiles are null"); diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java index 3f8a827c3..8ee30f2b3 100644 --- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java +++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java @@ -941,6 +941,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi @Override public void onDowngradeToAudio(Call call) { + call.setSessionModificationState(Call.SessionModificationState.NO_REQUEST); // exit video mode exitVideoMode(); } |