diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-06-05 20:28:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-06-05 20:28:39 +0000 |
commit | 875c43fa97d11043e6d6c82d1851921a5a00c5f2 (patch) | |
tree | ce81492ae04c9c663fa18768702686a09a2724f2 | |
parent | 1f6216ca54ed8303e24c06716d1bd0baa1149cb2 (diff) | |
parent | fb0cfff5fc540ec5872464f812f730349fb1e5ad (diff) |
Merge "Dismiss RTT request dialog if RTT is already active."
-rw-r--r-- | java/com/android/incallui/InCallActivity.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java index 7d9608a56..7e1519724 100644 --- a/java/com/android/incallui/InCallActivity.java +++ b/java/com/android/incallui/InCallActivity.java @@ -159,6 +159,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity private int[] backgroundDrawableColors; @DialpadRequestType private int showDialpadRequest = DIALPAD_REQUEST_NONE; private SpeakEasyCallManager speakEasyCallManager; + private DialogFragment rttRequestDialogFragment; public static Intent getIntent( Context context, boolean showDialpad, boolean newOutgoingCall, boolean isForFullScreen) { @@ -1175,8 +1176,8 @@ public class InCallActivity extends TransactionSafeFragmentActivity public void showDialogForRttRequest(DialerCall call, int rttRequestId) { LogUtil.enterBlock("InCallActivity.showDialogForRttRequest"); - DialogFragment fragment = RttRequestDialogFragment.newInstance(call.getId(), rttRequestId); - fragment.show(getSupportFragmentManager(), Tags.RTT_REQUEST_DIALOG); + rttRequestDialogFragment = RttRequestDialogFragment.newInstance(call.getId(), rttRequestId); + rttRequestDialogFragment.show(getSupportFragmentManager(), Tags.RTT_REQUEST_DIALOG); } public void setAllowOrientationChange(boolean allowOrientationChange) { @@ -1564,6 +1565,13 @@ public class InCallActivity extends TransactionSafeFragmentActivity transaction.add(R.id.main, rttCallScreen.getRttCallScreenFragment(), Tags.RTT_CALL_SCREEN); Logger.get(this).logScreenView(ScreenEvent.Type.INCALL, this); didShowRttCallScreen = true; + // In some cases such as VZW, RTT request will be automatically accepted by modem. So the dialog + // won't make any sense and should be dismissed if it's already switched to RTT. + if (rttRequestDialogFragment != null) { + LogUtil.i("InCallActivity.showRttCallScreenFragment", "dismiss RTT request dialog"); + rttRequestDialogFragment.dismiss(); + rttRequestDialogFragment = null; + } return true; } |