am c1c86151: Merge "More updates to javadocs for Telecom APIs." into lmp-mr1-dev

* commit 'c1c86151b033a2c866c10970553b567dfb359ba9':
  More updates to javadocs for Telecom APIs.
This commit is contained in:
Santos Cordon
2014-10-30 20:05:30 +00:00
committed by Android Git Automerger
4 changed files with 40 additions and 9 deletions

View File

@@ -22,7 +22,8 @@ import android.os.Parcelable;
import java.util.Locale; 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 { public final class AudioState implements Parcelable {
/** Direct the audio stream through the device's earpiece. */ /** 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. */ /** True if the call is muted, false otherwise. */
public final boolean isMuted; public final boolean isMuted;
/** The route to use for the audio stream. */ /** The current audio route being used. */
public final int route; 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 final int supportedRouteMask;
public AudioState(boolean isMuted, int route, int supportedRouteMask) { public AudioState(boolean isMuted, int route, int supportedRouteMask) {

View File

@@ -25,9 +25,10 @@ import java.util.Objects;
/** /**
* Describes the cause of a disconnected call. This always includes a code describing the generic * 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 * cause of the disconnect. Optionally, it may include a label and/or description to display to the
* to display to the user which is provided by the {@link ConnectionService}. It also may contain a * user. It is the responsibility of the {@link ConnectionService} to provide localized versions of
* reason for the the disconnect, which is intended for logging and not for display to the user. * 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 { public final class DisconnectCause implements Parcelable {
@@ -85,6 +86,7 @@ public final class DisconnectCause implements Parcelable {
/** /**
* Creates a new DisconnectCause. * Creates a new DisconnectCause.
*
* @param label The localized label to show to the user to explain the disconnect. * @param label The localized label to show to the user to explain the disconnect.
* @param code The code for the disconnect cause. * @param code The code for the disconnect cause.
* @param description The localized description to show to the user to explain the disconnect. * @param description The localized description to show to the user to explain the disconnect.

View File

@@ -23,7 +23,16 @@ import android.os.Parcelable;
import java.util.Objects; 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:
* <ul>
* <li>The component name of the associated {@link ConnectionService}.</li>
* <li>A string identifier that is unique across {@code PhoneAccountHandle}s with the same
* component name.</li>
* </ul>
*
* See {@link PhoneAccount},
* {@link TelecomManager#registerPhoneAccount TelecomManager.registerPhoneAccount}.
*/ */
public class PhoneAccountHandle implements Parcelable { public class PhoneAccountHandle implements Parcelable {
private ComponentName mComponentName; private ComponentName mComponentName;

View File

@@ -31,7 +31,17 @@ import java.util.Collections;
import java.util.List; import java.util.List;
/** /**
* Provides access to Telecom-related functionality. * Provides access to information about active calls and registration/call-management functionality.
* Apps can use methods in this class to determine the current call state. Apps can also register new
* {@link PhoneAccount}s and get a listing of existing {@link PhoneAccount}s.
* <p>
* Apps do not instantiate this class directly; instead, they retrieve a reference to an instance
* through {@link Context#getSystemService Context.getSystemService(Context.TELECOM_SERVICE)}.
* <p>
* 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 { public class TelecomManager {
@@ -583,7 +593,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.
* <p>
* 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}. * @param account The complete {@link PhoneAccount}.
*/ */