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

Commit 1197fa72 authored by erfanian's avatar erfanian Committed by Copybara-Service
Browse files

Add voip call checks.

Bug: 110177989
Test: manual
PiperOrigin-RevId: 202337281
Change-Id: I277fcbc77ad50c4ed04f92d0541b67043bc8bef8
parent 11272af4
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -1731,7 +1731,27 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
        && !isConferenceCall()
        && !isVideoCall()
        && !isVoiceMailNumber()
        && !hasReceivedVideoUpgradeRequest();
        && !hasReceivedVideoUpgradeRequest()
        && !isVoipCallNotSupportedBySpeakeasy();
  }

  private boolean isVoipCallNotSupportedBySpeakeasy() {
    Bundle extras = getIntentExtras();

    if (extras == null) {
      return false;
    }

    // Indicates an VOIP call.
    String callid = extras.getString("callid");

    if (TextUtils.isEmpty(callid)) {
      LogUtil.i("DialerCall.isVoipCallNotSupportedBySpeakeasy", "callid was empty");
      return false;
    }

    LogUtil.i("DialerCall.isVoipCallNotSupportedBySpeakeasy", "call is not eligible");
    return true;
  }

  /** Indicates the user has selected SpeakEasy */