summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/Connection.java
diff options
context:
space:
mode:
authorHall Liu <hallliu@google.com>2021-01-15 11:41:48 -0800
committerHall Liu <hallliu@google.com>2021-01-15 17:52:37 -0800
commit49cabccc17920a7adb60b74e95c50e776e08ec99 (patch)
tree9cb192254fe27980204676280d46a1d18ba10b87 /telecomm/java/android/telecom/Connection.java
parentcae6ddb11d77cfc34abb5fb895b8b1361f67a414 (diff)
Add API to inform Telephony that call filtering is complete
Add an API that gets called once call filtering finishes. Meant to trigger download of call composer images. Bug: 177613111 Test: atest ConnectionServiceTest Change-Id: I4e06f19c859022ddb933f697dde13e459a3d354e
Diffstat (limited to 'telecomm/java/android/telecom/Connection.java')
-rw-r--r--telecomm/java/android/telecom/Connection.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 04b365f4a5c7..717040adfac9 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -18,6 +18,7 @@ package android.telecom;
import static android.Manifest.permission.MODIFY_PHONE_STATE;
+import android.Manifest;
import android.annotation.ElapsedRealtimeLong;
import android.annotation.IntDef;
import android.annotation.IntRange;
@@ -3357,6 +3358,24 @@ public abstract class Connection extends Conferenceable {
*/
public void handleRttUpgradeResponse(@Nullable RttTextStream rttTextStream) {}
+ /**
+ * Indicates that call filtering in Telecom is complete
+ *
+ * This method is called for a connection created via
+ * {@link ConnectionService#onCreateIncomingConnection} when call filtering completes in
+ * Telecom, including checking the blocked number db, per-contact settings, and custom call
+ * filtering apps.
+ *
+ * @param isBlocked {@code true} if the call was blocked, {@code false} otherwise. If this is
+ * {@code true}, {@link #onDisconnect()} will be called soon after
+ * this is called.
+ * @param isInContacts Indicates whether the caller is in the user's contacts list.
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(Manifest.permission.READ_CONTACTS)
+ public void onCallFilteringCompleted(boolean isBlocked, boolean isInContacts) { }
+
static String toLogSafePhoneNumber(String number) {
// For unknown number, log empty string.
if (number == null) {