From 17fcc3204f2bb5cb622c01ebf996d3726a0c3550 Mon Sep 17 00:00:00 2001 From: Oya Masafumi Date: Thu, 31 May 2018 12:25:04 +0900 Subject: Fix issue that the hold label is not shown during remote video holding Hold label is not shown even if a remote party holds a video call because VideoCallFragment#updateRemoteOffView is not called. A condition checking shouldShowRemote whether to call the method was added in #I4be3488. But shouldShowRemote is not updated in this case. To solve this issue, checks isRemotelyHeld that indicates hold status of remote party and calls #updateRemoteOffView if it is updated. Test: manual - Check that the hold label is shown when a remote party holds a video call Bug: 110244504 Change-Id: I2dfac18b1a913de50adfbe4cc76f073678f5e186 --- java/com/android/incallui/video/impl/VideoCallFragment.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'java/com') diff --git a/java/com/android/incallui/video/impl/VideoCallFragment.java b/java/com/android/incallui/video/impl/VideoCallFragment.java index 11b80ceb9..02dd80471 100644 --- a/java/com/android/incallui/video/impl/VideoCallFragment.java +++ b/java/com/android/incallui/video/impl/VideoCallFragment.java @@ -696,9 +696,17 @@ public class VideoCallFragment extends Fragment videoCallScreenDelegate.getLocalVideoSurfaceTexture().attachToTextureView(previewTextureView); videoCallScreenDelegate.getRemoteVideoSurfaceTexture().attachToTextureView(remoteTextureView); - this.isRemotelyHeld = isRemotelyHeld; + boolean updateRemoteOffView = false; if (this.shouldShowRemote != shouldShowRemote) { this.shouldShowRemote = shouldShowRemote; + updateRemoteOffView = true; + } + if (this.isRemotelyHeld != isRemotelyHeld) { + this.isRemotelyHeld = isRemotelyHeld; + updateRemoteOffView = true; + } + + if (updateRemoteOffView) { updateRemoteOffView(); } if (this.shouldShowPreview != shouldShowPreview) { -- cgit v1.2.3