summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2016-03-02 00:10:49 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-03-02 00:10:49 +0000
commitde54e21cafdf72fc5a4c4ac6e30d03294d096c1f (patch)
tree55b20e7c05ec9e7ad26698342fb7ea86ab65f49b /InCallUI
parentc44630349eb2b17c58da4c96a60c2f9a32d731db (diff)
parent9ae9630e9caad36bd338a4cb5e009d47adc9223e (diff)
Merge "Fix issue where video does not un-pause after call waiting dismissed." into nyc-dev
am: 9ae9630e9c * commit '9ae9630e9caad36bd338a4cb5e009d47adc9223e': Fix issue where video does not un-pause after call waiting dismissed.
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/VideoPauseController.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/VideoPauseController.java b/InCallUI/src/com/android/incallui/VideoPauseController.java
index a529d20d3..01b6b0dea 100644
--- a/InCallUI/src/com/android/incallui/VideoPauseController.java
+++ b/InCallUI/src/com/android/incallui/VideoPauseController.java
@@ -23,6 +23,8 @@ import com.android.incallui.InCallPresenter.IncomingCallListener;
import com.android.incallui.InCallVideoCallCallbackNotifier.SessionModificationListener;
import com.google.common.base.Preconditions;
+import android.telecom.VideoProfile;
+
/**
* This class is responsible for generating video pause/resume requests when the InCall UI is sent
* to the background and subsequently brought back to the foreground.
@@ -192,10 +194,11 @@ class VideoPauseController implements InCallStateListener, IncomingCallListener
Preconditions.checkState(!areSame(call, mPrimaryCallContext));
final boolean canVideoPause = VideoUtils.canVideoPause(call);
- if ((isIncomingCall(mPrimaryCallContext) || isDialing(mPrimaryCallContext))
+ if ((isIncomingCall(mPrimaryCallContext) || isDialing(mPrimaryCallContext) ||
+ (call != null && VideoProfile.isPaused(call.getVideoState())))
&& canVideoPause && !mIsInBackground) {
- // Send resume request for the active call, if user rejects incoming call or ends
- // dialing call and UI is in the foreground.
+ // Send resume request for the active call, if user rejects incoming call, ends dialing
+ // call, or the call was previously in a paused state and UI is in the foreground.
sendRequest(call, true);
} else if (isIncomingCall(call) && canVideoPause(mPrimaryCallContext)) {
// Send pause request if there is an active video call, and we just received a new