summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2016-02-17 15:18:36 -0800
committerTyler Gunn <tgunn@google.com>2016-02-18 10:42:35 -0800
commit207029be4c95b6d66ef4bd3c2277a9ba9e0c62a1 (patch)
tree10dc904dcea1917bdfcca362f7684ffaa7905e92 /InCallUI/src/com/android/incallui/InCallVideoCallCallback.java
parent9172c905b311816eba1d24659f02facfab95b0b3 (diff)
IMS-VT: Moving upgradeVideoRequest handling to InCallPresenter
When user pressed back key InCallActviity will be destroyed and corresponding listeners in VideoCallPresenter will be removed. Due to this we are unable to process the upgrade request. Moving handling of upgrade Video Call request handling from VideoCallPresenter to InCallPresenter as InCallPresenter will be available even InCallActivity is destroyed. Bug: 27130345 Change-Id: Idbd3348cea9d712c8391319d091642d1fd60964f
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallVideoCallCallback.java')
-rw-r--r--InCallUI/src/com/android/incallui/InCallVideoCallCallback.java21
1 files changed, 3 insertions, 18 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java b/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java
index 76f8c09fc..99e6d5129 100644
--- a/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java
+++ b/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java
@@ -55,10 +55,8 @@ public class InCallVideoCallCallback extends VideoCall.Callback {
boolean wasVideoCall = VideoUtils.isVideoCall(previousVideoState);
boolean isVideoCall = VideoUtils.isVideoCall(newVideoState);
- // Check for upgrades to video and downgrades to audio.
- if (wasVideoCall && !isVideoCall) {
- InCallVideoCallCallbackNotifier.getInstance().downgradeToAudio(mCall);
- } else if (previousVideoState != newVideoState) {
+ // Check for upgrades to video.
+ if (!wasVideoCall && isVideoCall && previousVideoState != newVideoState) {
InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoRequest(mCall,
newVideoState);
}
@@ -93,21 +91,8 @@ public class InCallVideoCallCallback extends VideoCall.Callback {
Call.SessionModificationState.REQUEST_FAILED);
}
}
- InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoFail(status, mCall);
- } else if (requestedProfile != null && responseProfile != null) {
- boolean modifySucceeded = requestedProfile.getVideoState() ==
- responseProfile.getVideoState();
- boolean isVideoCall = VideoUtils.isVideoCall(responseProfile.getVideoState());
- if (modifySucceeded && isVideoCall) {
- InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoSuccess(mCall);
- } else if (!modifySucceeded && isVideoCall) {
- InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoFail(status, mCall);
- } else if (modifySucceeded && !isVideoCall) {
- InCallVideoCallCallbackNotifier.getInstance().downgradeToAudio(mCall);
- }
- } else {
- Log.d(this, "onSessionModifyResponseReceived request and response Profiles are null");
}
+
// Finally clear the outstanding request.
mCall.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
}