diff options
| author | 2022-01-26 06:37:08 +0000 | |
|---|---|---|
| committer | 2022-01-26 06:37:08 +0000 | |
| commit | b476f8b522089a76dbd41b147ccf7ff641210c4f (patch) | |
| tree | 6cb3c4a8927a8c79afdfc2eb573b690ae97c8483 /telecomm/java | |
| parent | 92d4b9f7951b7cbd779ba1afba75e1936ed9b909 (diff) | |
| parent | 2526568630228e3f7c11a16aef7afae6e69de4ba (diff) | |
Merge "APIs for SIM call manager voice status"
Diffstat (limited to 'telecomm/java')
| -rw-r--r-- | telecomm/java/android/telecom/PhoneAccount.java | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java index e332d3ff2b4d..ec18c6a696b8 100644 --- a/telecomm/java/android/telecom/PhoneAccount.java +++ b/telecomm/java/android/telecom/PhoneAccount.java @@ -380,7 +380,45 @@ public final class PhoneAccount implements Parcelable { */ public static final int CAPABILITY_CALL_COMPOSER = 0x8000; - /* NEXT CAPABILITY: 0x10000 */ + /** + * Flag indicating that this {@link PhoneAccount} provides SIM-based voice calls, potentially as + * an over-the-top solution such as wi-fi calling. + * + * <p>Similar to {@link #CAPABILITY_SUPPORTS_VIDEO_CALLING}, this capability indicates this + * {@link PhoneAccount} has the ability to make voice calls (but not necessarily at this time). + * Whether this {@link PhoneAccount} can make a voice call is ultimately controlled by {@link + * #CAPABILITY_VOICE_CALLING_AVAILABLE}, which indicates whether this {@link PhoneAccount} is + * currently capable of making a voice call. Consider a case where, for example, a {@link + * PhoneAccount} supports making voice calls (e.g. {@link + * #CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS}), but a current lack of network connectivity + * prevents voice calls from being made (e.g. {@link #CAPABILITY_VOICE_CALLING_AVAILABLE}). + * + * <p>In order to declare this capability, this {@link PhoneAccount} must also declare {@link + * #CAPABILITY_SIM_SUBSCRIPTION} or {@link #CAPABILITY_CONNECTION_MANAGER} and satisfy the + * associated requirements. + * + * @see #CAPABILITY_VOICE_CALLING_AVAILABLE + * @see #getCapabilities + */ + public static final int CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS = 0x10000; + + /** + * Flag indicating that this {@link PhoneAccount} is <em>currently</em> able to place SIM-based + * voice calls, similar to {@link #CAPABILITY_VIDEO_CALLING}. + * + * <p>See also {@link #CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS}, which indicates whether + * the {@code PhoneAccount} supports placing SIM-based voice calls or not. + * + * <p>In order to declare this capability, this {@link PhoneAccount} must also declare {@link + * #CAPABILITY_SIM_SUBSCRIPTION} or {@link #CAPABILITY_CONNECTION_MANAGER} and satisfy the + * associated requirements. + * + * @see #CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS + * @see #getCapabilities + */ + public static final int CAPABILITY_VOICE_CALLING_AVAILABLE = 0x20000; + + /* NEXT CAPABILITY: 0x40000 */ /** * URI scheme for telephone number URIs. @@ -1102,14 +1140,20 @@ public final class PhoneAccount implements Parcelable { sb.append("SimSub "); } if (hasCapabilities(CAPABILITY_RTT)) { - sb.append("Rtt"); + sb.append("Rtt "); } if (hasCapabilities(CAPABILITY_ADHOC_CONFERENCE_CALLING)) { - sb.append("AdhocConf"); + sb.append("AdhocConf "); } if (hasCapabilities(CAPABILITY_CALL_COMPOSER)) { sb.append("CallComposer "); } + if (hasCapabilities(CAPABILITY_SUPPORTS_VOICE_CALLING_INDICATIONS)) { + sb.append("SuppVoice "); + } + if (hasCapabilities(CAPABILITY_VOICE_CALLING_AVAILABLE)) { + sb.append("Voice "); + } return sb.toString(); } |