telecom-bluetooth DND bug
Bugs came in about Do Not Disturb being on but still
interrupting users of incoming calls. Turns out, this was a
result of BluetoothInCallService putting the headset into ring
mode before Telecom informed the InCallService to not ring.
Fix is to add a new EXTRA called EXTRA_IS_SUPPRESSED_BY_DO_NOT_DISTURB.
The extra is intended for InCallServices that may interrupt the user of
an incoming call.
Bug: 208652088
Test: maual + unit tests,
3 DndCallFilter tests,
2 RingerTests,
1 CallTests
Change-Id: If8abec19dfc90999b2fc2ef3e4f5584c55d6fc2a
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index 432af3a..5cef2cb 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -168,6 +168,18 @@
public static final String AVAILABLE_PHONE_ACCOUNTS = "selectPhoneAccountAccounts";
/**
+ * Extra key intended for {@link InCallService}s that notify the user of an incoming call. When
+ * EXTRA_IS_SUPPRESSED_BY_DO_NOT_DISTURB returns true, the {@link InCallService} should not
+ * interrupt the user of the incoming call because the call is being suppressed by Do Not
+ * Disturb settings.
+ *
+ * This extra will be removed from the {@link Call} object for {@link InCallService}s that do
+ * not hold the {@link android.Manifest.permission#READ_CONTACTS} permission.
+ */
+ public static final String EXTRA_IS_SUPPRESSED_BY_DO_NOT_DISTURB =
+ "android.telecom.extra.IS_SUPPRESSED_BY_DO_NOT_DISTURB";
+
+ /**
* Key for extra used to pass along a list of {@link PhoneAccountSuggestion}s to the in-call
* UI when a call enters the {@link #STATE_SELECT_PHONE_ACCOUNT} state. The list included here
* will have the same length and be in the same order as the list passed with