From 42099014f33bd5285be779689a581b6000a3e96b Mon Sep 17 00:00:00 2001 From: roldenburg Date: Mon, 9 Apr 2018 14:47:15 -0700 Subject: Ensure listeners are added each time setUp is called Bug: 77666799 Test: existing tests in InCallPresenterTest PiperOrigin-RevId: 192191167 Change-Id: Ifa35451cf94d925f9d73397460b48754952cb216 --- java/com/android/incallui/InCallPresenter.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'java/com/android/incallui') diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java index 7ea2fadf3..7468b83ac 100644 --- a/java/com/android/incallui/InCallPresenter.java +++ b/java/com/android/incallui/InCallPresenter.java @@ -266,8 +266,6 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud private VideoSurfaceTexture localVideoSurfaceTexture; private VideoSurfaceTexture remoteVideoSurfaceTexture; - private MotorolaInCallUiNotifier motorolaInCallUiNotifier; - private SpeakEasyCallManager speakEasyCallManager; private boolean shouldStartInBubbleMode; @@ -398,14 +396,12 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud AudioModeProvider.getInstance().addListener(this); - if (motorolaInCallUiNotifier == null) { - // Add listener to notify Telephony process when the incoming call screen is started or - // finished. This is for hiding USSD dialog because the incoming call screen should have - // higher precedence over this dialog. - motorolaInCallUiNotifier = new MotorolaInCallUiNotifier(context); - addInCallUiListener(motorolaInCallUiNotifier); - addListener(motorolaInCallUiNotifier); - } + // Add listener to notify Telephony process when the incoming call screen is started or + // finished. This is for hiding USSD dialog because the incoming call screen should have + // higher precedence over this dialog. + MotorolaInCallUiNotifier motorolaInCallUiNotifier = new MotorolaInCallUiNotifier(context); + addInCallUiListener(motorolaInCallUiNotifier); + addListener(motorolaInCallUiNotifier); this.shouldStartInBubbleMode = shouldStartInBubbleMode(intent); -- cgit v1.2.3