summaryrefslogtreecommitdiff
path: root/telecomm/java
diff options
context:
space:
mode:
author Thomas Stuart <tjstuart@google.com> 2023-01-26 23:19:27 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-01-26 23:19:27 +0000
commit66546212e82f7cfa103db17b0f2d604eb635abfb (patch)
tree7b004b2a8e0762b14414e1d760fa0ea288acbc12 /telecomm/java
parent5023847f89c19dc9360143194033a33f88d98c8a (diff)
parentba6c21ca3c8c078a6238c2e2f9bbb6818f752a3d (diff)
Merge "enforce stricter rules when registering phoneAccounts"
Diffstat (limited to 'telecomm/java')
-rw-r--r--telecomm/java/android/telecom/PhoneAccount.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java
index ca15422a848f..b6def1a22205 100644
--- a/telecomm/java/android/telecom/PhoneAccount.java
+++ b/telecomm/java/android/telecom/PhoneAccount.java
@@ -592,6 +592,11 @@ public final class PhoneAccount implements Parcelable {
/**
* Sets the address. See {@link PhoneAccount#getAddress}.
+ * <p>
+ * Note: The entire URI value is limited to 256 characters. This check is
+ * enforced when registering the PhoneAccount via
+ * {@link TelecomManager#registerPhoneAccount(PhoneAccount)} and will cause an
+ * {@link IllegalArgumentException} to be thrown if URI is over 256.
*
* @param value The address of the phone account.
* @return The builder.
@@ -625,6 +630,10 @@ public final class PhoneAccount implements Parcelable {
/**
* Sets the icon. See {@link PhoneAccount#getIcon}.
+ * <p>
+ * Note: An {@link IllegalArgumentException} if the Icon cannot be written to memory.
+ * This check is enforced when registering the PhoneAccount via
+ * {@link TelecomManager#registerPhoneAccount(PhoneAccount)}
*
* @param icon The icon to set.
*/
@@ -663,6 +672,10 @@ public final class PhoneAccount implements Parcelable {
/**
* Specifies an additional URI scheme supported by the {@link PhoneAccount}.
*
+ * <p>
+ * Each URI scheme is limited to 256 characters. Adding a scheme over 256 characters will
+ * cause an {@link IllegalArgumentException} to be thrown when the account is registered.
+ *
* @param uriScheme The URI scheme.
* @return The builder.
*/
@@ -676,6 +689,12 @@ public final class PhoneAccount implements Parcelable {
/**
* Specifies the URI schemes supported by the {@link PhoneAccount}.
*
+ * <p>
+ * A max of 10 URI schemes can be added per account. Additionally, each URI scheme is
+ * limited to 256 characters. Adding more than 10 URI schemes or 256 characters on any
+ * scheme will cause an {@link IllegalArgumentException} to be thrown when the account
+ * is registered.
+ *
* @param uriSchemes The URI schemes.
* @return The builder.
*/