diff --git a/telecomm/java/android/telecom/AudioState.java b/telecomm/java/android/telecom/AudioState.java index d0e2860424616..43da38f3648cc 100644 --- a/telecomm/java/android/telecom/AudioState.java +++ b/telecomm/java/android/telecom/AudioState.java @@ -22,7 +22,8 @@ import android.os.Parcelable; import java.util.Locale; /** - * Encapsulates all audio states during a call. + * Encapsulates the telecom audio state, including the current audio routing, supported audio + * routing and mute. */ public final class AudioState implements Parcelable { /** Direct the audio stream through the device's earpiece. */ @@ -53,10 +54,10 @@ public final class AudioState implements Parcelable { /** True if the call is muted, false otherwise. */ public final boolean isMuted; - /** The route to use for the audio stream. */ + /** The current audio route being used. */ public final int route; - /** Bit vector of all routes supported by this call. */ + /** Bit mask of all routes supported by this call. */ public final int supportedRouteMask; public AudioState(boolean isMuted, int route, int supportedRouteMask) { diff --git a/telecomm/java/android/telecom/DisconnectCause.java b/telecomm/java/android/telecom/DisconnectCause.java index 9be01380956ad..206046d6db0b8 100644 --- a/telecomm/java/android/telecom/DisconnectCause.java +++ b/telecomm/java/android/telecom/DisconnectCause.java @@ -25,9 +25,10 @@ import java.util.Objects; /** * Describes the cause of a disconnected call. This always includes a code describing the generic - * cause of the disconnect. Optionally, it may include a localized label and/or localized description - * to display to the user which is provided by the {@link ConnectionService}. It also may contain a - * reason for the the disconnect, which is intended for logging and not for display to the user. + * cause of the disconnect. Optionally, it may include a label and/or description to display to the + * user. It is the responsibility of the {@link ConnectionService} to provide localized versions of + * the label and description. It also may contain a reason for the disconnect, which is intended for + * logging and not for display to the user. */ public final class DisconnectCause implements Parcelable { @@ -85,6 +86,7 @@ public final class DisconnectCause implements Parcelable { /** * Creates a new DisconnectCause. + * * @param label The localized label to show to the user to explain the disconnect. * @param code The code for the disconnect cause. * @param description The localized description to show to the user to explain the disconnect. diff --git a/telecomm/java/android/telecom/PhoneAccountHandle.java b/telecomm/java/android/telecom/PhoneAccountHandle.java index 768188b81c498..bc4cc8ce4e832 100644 --- a/telecomm/java/android/telecom/PhoneAccountHandle.java +++ b/telecomm/java/android/telecom/PhoneAccountHandle.java @@ -23,7 +23,16 @@ import android.os.Parcelable; import java.util.Objects; /** - * The unique identifier for a {@link PhoneAccount}. + * The unique identifier for a {@link PhoneAccount}. A {@code PhoneAccountHandle} is made of two + * parts: + *
+ * Apps do not instantiate this class directly; instead, they retrieve a reference to an instance + * through {@link Context#getSystemService Context.getSystemService(Context.TELECOM_SERVICE)}. + *
+ * Note that access to some telecom information is permission-protected. Your app cannot access the + * protected information or gain access to protected functionality unless it has the appropriate + * permissions declared in its manifest file. Where permissions apply, they are noted in the method + * descriptions. */ public class TelecomManager { @@ -582,7 +592,16 @@ public class TelecomManager { } /** - * Register a {@link PhoneAccount} for use by the system. + * Register a {@link PhoneAccount} for use by the system. When registering + * {@link PhoneAccount}s, existing registrations will be overwritten if the + * {@link PhoneAccountHandle} matches that of a {@link PhoneAccount} which is already + * registered. Once registered, the {@link PhoneAccount} is listed to the user as an option + * when placing calls. The user may still need to enable the {@link PhoneAccount} within + * the phone app settings before the account is usable. + *
+ * A {@link SecurityException} will be thrown if an app tries to register a + * {@link PhoneAccountHandle} where the package name specified within + * {@link PhoneAccountHandle#getComponentName()} does not match the package name of the app. * * @param account The complete {@link PhoneAccount}. */