Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 612d13a1 authored by erfanian's avatar erfanian Committed by Copybara-Service
Browse files

Better support for multi call.

Bug: 73775453,73775590
Test: unit tests
PiperOrigin-RevId: 191657758
Change-Id: If1ae5505185191f04fd57aa828ae5bcc9c21b173
parent ed677ef1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
  private boolean didShowVideoCallScreen;
  private boolean didShowRttCallScreen;
  private boolean didShowSpeakEasyScreen;
  private String lastShownSpeakEasyScreenUniqueCallid = "";
  private boolean dismissKeyguard;
  private boolean isInShowMainInCallFragment;
  private boolean isRecreating; // whether the activity is going to be recreated
@@ -1353,15 +1354,18 @@ public class InCallActivity extends TransactionSafeFragmentActivity

  private boolean showSpeakEasyFragment(FragmentTransaction transaction, DialerCall call) {

    // TODO(erfanian): Support multiple speakeasy screens.
    if (didShowSpeakEasyScreen) {
      if (lastShownSpeakEasyScreenUniqueCallid.equals(call.getUniqueCallId())) {
        return false;
      }
      hideSpeakEasyFragment(transaction);
    }

    Optional<Fragment> speakEasyFragment = speakEasyCallManager.getSpeakEasyFragment(call);
    if (speakEasyFragment.isPresent()) {
      transaction.add(R.id.main, speakEasyFragment.get(), Tags.SPEAK_EASY_SCREEN);
      didShowSpeakEasyScreen = true;
      lastShownSpeakEasyScreenUniqueCallid = call.getUniqueCallId();
      return true;
    }
    return false;