summaryrefslogtreecommitdiff
path: root/java/com/android/incallui
diff options
context:
space:
mode:
authorroldenburg <roldenburg@google.com>2018-04-09 14:47:15 -0700
committerCopybara-Service <copybara-piper@google.com>2018-04-09 14:49:50 -0700
commit42099014f33bd5285be779689a581b6000a3e96b (patch)
treedee15dbfbd4829d4d35e559b75c3983786e09fbd /java/com/android/incallui
parent62b96291dd2bf025f0f84ba0376301a31a6b8776 (diff)
Ensure listeners are added each time setUp is called
Bug: 77666799 Test: existing tests in InCallPresenterTest PiperOrigin-RevId: 192191167 Change-Id: Ifa35451cf94d925f9d73397460b48754952cb216
Diffstat (limited to 'java/com/android/incallui')
-rw-r--r--java/com/android/incallui/InCallPresenter.java16
1 files changed, 6 insertions, 10 deletions
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);