summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerfanian <erfanian@google.com>2018-06-19 14:36:18 -0700
committerCopybara-Service <copybara-piper@google.com>2018-06-19 15:33:20 -0700
commit94a7b3bfef206aabd0198c4aa5629f83b14ae758 (patch)
tree30d374ed346797b19bdd8b71c9dd7defe717a3dd
parent3378014127595d2e541c25771e8e5376bba1f619 (diff)
Add call eligibility checks.
Test: none PiperOrigin-RevId: 201242961 Change-Id: I09e6c09a573ac3d740a42749775d9ec18aa9ee6d
-rw-r--r--java/com/android/incallui/StatusBarNotifier.java8
1 files 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)) {