summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-06-19 23:23:42 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-06-19 23:23:42 +0000
commitfe710890000e2e9fad144f3279779d50a3336309 (patch)
tree30d374ed346797b19bdd8b71c9dd7defe717a3dd /java
parent3378014127595d2e541c25771e8e5376bba1f619 (diff)
parent94a7b3bfef206aabd0198c4aa5629f83b14ae758 (diff)
Merge "Add call eligibility checks."
Diffstat (limited to 'java')
-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)) {