Do not show speaker hint in pip.

This commit is contained in:
Cody Henthorne
2020-12-08 17:18:22 -05:00
committed by Greyson Parrelli
parent 9f8e31db78
commit a564aae80a
3 changed files with 25 additions and 22 deletions

View File

@@ -245,6 +245,7 @@ public class WebRtcCallActivity extends AppCompatActivity implements SafetyNumbe
viewModel.getCallParticipantListUpdate().observe(this, participantUpdateWindow::addCallParticipantListUpdate);
viewModel.getSafetyNumberChangeEvent().observe(this, this::handleSafetyNumberChangeEvent);
viewModel.getGroupMembers().observe(this, unused -> updateGroupMembersForGroupCall());
viewModel.shouldShowSpeakerHint().observe(this, this::updateSpeakerHint);
callScreen.getViewTreeObserver().addOnGlobalLayoutListener(() -> {
CallParticipantsState state = viewModel.getCallParticipantsState().getValue();
@@ -286,10 +287,6 @@ public class WebRtcCallActivity extends AppCompatActivity implements SafetyNumbe
videoTooltip.dismiss();
videoTooltip = null;
}
} else if (event instanceof WebRtcCallViewModel.Event.ShowSpeakerViewHint) {
callScreen.showSpeakerViewHint();
} else if (event instanceof WebRtcCallViewModel.Event.HideSpeakerViewHint) {
callScreen.hideSpeakerViewHint();
} else {
throw new IllegalArgumentException("Unknown event: " + event);
}
@@ -517,6 +514,14 @@ public class WebRtcCallActivity extends AppCompatActivity implements SafetyNumbe
startService(new Intent(this, WebRtcCallService.class).setAction(WebRtcCallService.ACTION_GROUP_REQUEST_UPDATE_MEMBERS));
}
private void updateSpeakerHint(boolean showSpeakerHint) {
if (showSpeakerHint) {
callScreen.showSpeakerViewHint();
} else {
callScreen.hideSpeakerViewHint();
}
}
@Override
public void onSendAnywayAfterSafetyNumberChange(@NonNull List<RecipientId> changedRecipients) {
CallParticipantsState state = viewModel.getCallParticipantsState().getValue();