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

Commit 94a7b3bf authored by erfanian's avatar erfanian Committed by Copybara-Service
Browse files

Add call eligibility checks.

Test: none
PiperOrigin-RevId: 201242961
Change-Id: I09e6c09a573ac3d740a42749775d9ec18aa9ee6d
parent 33780141
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ public class StatusBarNotifier
        addVideoCallAction(builder);
      } else {
        addAnswerAction(builder);
        addSpeakeasyAnswerAction(builder);
        addSpeakeasyAnswerAction(builder, call);
      }
    }
  }
@@ -874,7 +874,11 @@ public class StatusBarNotifier
            .build());
  }

  private void addSpeakeasyAnswerAction(Notification.Builder builder) {
  private void addSpeakeasyAnswerAction(Notification.Builder builder, DialerCall call) {
    if (!call.isSpeakEasyEligible()) {
      return;
    }

    if (!ConfigProviderComponent.get(context)
        .getConfigProvider()
        .getBoolean("enable_speakeasy_notification_button", false)) {