summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/InCallPresenter.java
diff options
context:
space:
mode:
authoryueg <yueg@google.com>2018-01-10 13:50:29 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-10 15:22:42 -0800
commit7f5acbe82a8b4a9c27cbf2419a2dc31e9dba882e (patch)
treef81869f61021d12dd2485a99769994ccbb36777f /java/com/android/incallui/InCallPresenter.java
parent379d2fc4db13330cccbab818fa416b119c442fa9 (diff)
Roll forward the broadcast in-call UI changes.
Test: InCallPresenterTest PiperOrigin-RevId: 181512032 Change-Id: Id120d9fe6f46ad157eab7f97614d0c18b6aef8e1
Diffstat (limited to 'java/com/android/incallui/InCallPresenter.java')
-rw-r--r--java/com/android/incallui/InCallPresenter.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java
index ae25f4dc1..f0d3adc7a 100644
--- a/java/com/android/incallui/InCallPresenter.java
+++ b/java/com/android/incallui/InCallPresenter.java
@@ -260,6 +260,8 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud
private VideoSurfaceTexture localVideoSurfaceTexture;
private VideoSurfaceTexture remoteVideoSurfaceTexture;
+ private MotorolaInCallUiNotifier motorolaInCallUiNotifier;
+
/** Inaccessible constructor. Must use getRunningInstance() to get this singleton. */
@VisibleForTesting
InCallPresenter() {}
@@ -382,6 +384,15 @@ 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);
+ }
+
LogUtil.d("InCallPresenter.setUp", "Finished InCallPresenter.setUp");
Trace.endSection();
}