diff options
author | Eric Erfanian <erfanian@google.com> | 2018-04-25 19:00:11 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-04-25 19:00:11 +0000 |
commit | 43ed0dc0666e9d2e2837a2019e2765f10f43dff8 (patch) | |
tree | ac6491831c0d331f8582a65eda60143cb0798fd0 /java/com/android/incallui/InCallPresenter.java | |
parent | 34ed7da073bbac5b8a4283c495c588ef3b0ea32b (diff) | |
parent | 79a407ee27e6c8f6447f3a8c71ae2c7f6b33f591 (diff) |
Merge changes I5b8ad5ca,I0011019c,I8ee43ce8,I35e0748a,I9e9947ad, ...
* changes:
Show clear frequents option in the toolbar if there are suggested contacts.
Use UI listener for preferred account worker in in call UI
Make SIM Selection hint multi-line
Convert CequintCallerIdContact into an @AutoValue
Newly starred SpeedDialUiItems now have SpeedDialEntry ids set.
Disable entries in CallingAccountSelector that are not selectable
Add "enabled" to SelectPhoneAccountDialogFragment.
Add skeleton for CequintPhoneLookup
Log send button impressions for RTT call.
Show international call on wifi dialog without InCallActivity.
Expose active calls from in call UI
Diffstat (limited to 'java/com/android/incallui/InCallPresenter.java')
-rw-r--r-- | java/com/android/incallui/InCallPresenter.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java index 5e08c6969..526cc64d3 100644 --- a/java/com/android/incallui/InCallPresenter.java +++ b/java/com/android/incallui/InCallPresenter.java @@ -71,6 +71,8 @@ import com.android.incallui.latencyreport.LatencyReport; import com.android.incallui.legacyblocking.BlockedNumberContentObserver; import com.android.incallui.spam.SpamCallListListener; import com.android.incallui.speakeasy.SpeakEasyCallManager; +import com.android.incallui.telecomeventui.InternationalCallOnWifiDialogActivity; +import com.android.incallui.telecomeventui.InternationalCallOnWifiDialogFragment; import com.android.incallui.videosurface.bindings.VideoSurfaceBindings; import com.android.incallui.videosurface.protocol.VideoSurfaceTexture; import com.android.incallui.videotech.utils.VideoUtils; @@ -197,6 +199,7 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud private InCallCameraManager inCallCameraManager; private FilteredNumberAsyncQueryHandler filteredQueryHandler; private CallList.Listener spamCallListListener; + private CallList.Listener activeCallsListener; /** Whether or not we are currently bound and waiting for Telecom to send us a new call. */ private boolean boundAndWaitingForOutgoingCall; /** Determines if the InCall UI is in fullscreen mode or not. */ @@ -383,6 +386,8 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud new SpamCallListListener( context, DialerExecutorComponent.get(context).dialerExecutorFactory()); this.callList.addListener(spamCallListListener); + activeCallsListener = new ActiveCallsCallListListener(context); + this.callList.addListener(activeCallsListener); VideoPauseController.getInstance().setUp(this); @@ -772,8 +777,22 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud @Override public void onInternationalCallOnWifi(@NonNull DialerCall call) { LogUtil.enterBlock("InCallPresenter.onInternationalCallOnWifi"); + + if (!InternationalCallOnWifiDialogFragment.shouldShow(context)) { + LogUtil.i( + "InCallPresenter.onInternationalCallOnWifi", + "InternationalCallOnWifiDialogFragment.shouldShow returned false"); + return; + } + if (inCallActivity != null) { inCallActivity.showDialogForInternationalCallOnWifi(call); + } else { + Intent intent = new Intent(context, InternationalCallOnWifiDialogActivity.class); + // Prevent showing MainActivity with InternationalCallOnWifiDialogActivity on above + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK); + intent.putExtra(InternationalCallOnWifiDialogActivity.EXTRA_CALL_ID, call.getId()); + context.startActivity(intent); } } @@ -858,6 +877,7 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud callList.getActiveOrBackgroundCall() != null || callList.getOutgoingCall() != null; inCallActivity.dismissKeyguard(hasCall); } + Trace.endSection(); } |