diff options
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallVideoCallCallback.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallVideoCallCallback.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java b/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java index ba4ab660d..ede1129cd 100644 --- a/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java +++ b/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java @@ -80,6 +80,19 @@ public class InCallVideoCallCallback extends VideoCall.Callback { Log.d(this, "onSessionModifyResponseReceived status=" + status + " requestedProfile=" + requestedProfile + " responseProfile=" + responseProfile); if (status != VideoProvider.SESSION_MODIFY_REQUEST_SUCCESS) { + // Report the reason the upgrade failed as the new session modification state. + if (status == VideoProvider.SESSION_MODIFY_REQUEST_TIMED_OUT) { + mCall.setSessionModificationState( + Call.SessionModificationState.UPGRADE_TO_VIDEO_REQUEST_TIMED_OUT); + } else { + if (status == VideoProvider.SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE) { + mCall.setSessionModificationState( + Call.SessionModificationState.REQUEST_REJECTED); + } else { + mCall.setSessionModificationState( + Call.SessionModificationState.REQUEST_FAILED); + } + } InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoFail(status, mCall); } else if (requestedProfile != null && responseProfile != null) { boolean modifySucceeded = requestedProfile.getVideoState() == @@ -95,6 +108,8 @@ public class InCallVideoCallCallback extends VideoCall.Callback { } else { Log.d(this, "onSessionModifyResponseReceived request and response Profiles are null"); } + // Finally clear the outstanding request. + mCall.setSessionModificationState(Call.SessionModificationState.NO_REQUEST); } /** |