From 94a7b3bfef206aabd0198c4aa5629f83b14ae758 Mon Sep 17 00:00:00 2001 From: erfanian Date: Tue, 19 Jun 2018 14:36:18 -0700 Subject: Add call eligibility checks. Test: none PiperOrigin-RevId: 201242961 Change-Id: I09e6c09a573ac3d740a42749775d9ec18aa9ee6d --- java/com/android/incallui/StatusBarNotifier.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java index 4026be712..1d73fe8e7 100644 --- a/java/com/android/incallui/StatusBarNotifier.java +++ b/java/com/android/incallui/StatusBarNotifier.java @@ -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)) { -- cgit v1.2.3