summaryrefslogtreecommitdiff
path: root/telecomm
diff options
context:
space:
mode:
author Pranav Madapurmath <pmadapurmath@google.com> 2024-02-05 15:05:16 -0800
committer Pranav Madapurmath <pmadapurmath@google.com> 2024-02-10 21:19:30 -0800
commit9ad3039d7511d1af7ae4a258f9402aeccfd0ee22 (patch)
tree2b2c2bbaf587b157dc878970fed201c88c6087a3 /telecomm
parent6892184b02d5f7a5b6f320731e37bd6b83da4fb9 (diff)
Formalize EXTRA_SKIP_CALL_FILTERING as system API
As part of telecom mainline prep, resolve the hidden reference from wear services to EXTRA_SKIP_CALL_FILTERING by promoting it to a system API. Bug: 322518197 Bug: 311773409 Test: m Telecom Test m wear-services-calling-bluetooth & atest WearServicesRoboTests:HfpClientConnectionServiceTest & atest WearServicesRobotTests:HfpClientConnectionTest Change-Id: I47b3f2d6146309157c18246e0e131bab1021c726
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecom/PhoneAccount.java2
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java20
2 files changed, 22 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java
index b7706a926a3d..ab6f4279b086 100644
--- a/telecomm/java/android/telecom/PhoneAccount.java
+++ b/telecomm/java/android/telecom/PhoneAccount.java
@@ -190,6 +190,8 @@ public final class PhoneAccount implements Parcelable {
* this may be used to skip call filtering when it has already been performed on another device.
* @hide
*/
+ @SystemApi
+ @FlaggedApi(com.android.server.telecom.flags.Flags.FLAG_TELECOM_RESOLVE_HIDDEN_DEPENDENCIES)
public static final String EXTRA_SKIP_CALL_FILTERING =
"android.telecom.extra.SKIP_CALL_FILTERING";
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index e62bd90807d1..6ba5d23d9fe1 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -1611,6 +1611,26 @@ public class TelecomManager {
* {@link PhoneAccount} when the upper bound limit, 10, has already been reached.
*
* @param account The complete {@link PhoneAccount}.
+ * @throws UnsupportedOperationException if the caller cannot modify phone state and the device
+ * does not have the Telecom feature.
+ * @throws SecurityException if:
+ * <ol>
+ * <li>the caller cannot modify phone state and the phone account doesn't belong to the
+ * calling user.</li>
+ * <li>the caller is registering a self-managed phone and either they are not allowed to
+ * manage their own calls or if the account is call capable, a connection manager, or a
+ * sim account.</li>
+ * <li>the caller is registering a sim account without the ability to do so.</li>
+ * <li>the caller is registering a multi-user phone account but isn't a system app.</li>
+ * <li>the account can make SIM-based voice calls but the caller cannot register sim
+ * accounts or isn't a sim call manager.</li>
+ * <li>the account defines the EXTRA_SKIP_CALL_FILTERING extra but the caller isn't
+ * able to modify the phone state.</li>
+ * <li>the caller is registering an account for a different user but isn't able to
+ * interact across users.</li>
+ * <li>if simultaneous calling is available and the phone account package name doesn't
+ * correspond to the simultaneous calling accounts associated with this phone account.</li>
+ * </ol>
*/
public void registerPhoneAccount(PhoneAccount account) {
ITelecomService service = getTelecomService();