summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-11-08 15:49:16 -0800
committerEvan Charlton <evanc@google.com>2014-11-10 11:52:31 -0800
commit0e094d926c306c3667bcdf6f23c52cc7181f25f3 (patch)
tree4a41b85db95d9e74e3f2955083cef3d348927676 /telecomm
parent6c912b7d056c67b41fd46f31de168795e97c2336 (diff)
downloadframeworks_base-0e094d926c306c3667bcdf6f23c52cc7181f25f3.zip
frameworks_base-0e094d926c306c3667bcdf6f23c52cc7181f25f3.tar.gz
frameworks_base-0e094d926c306c3667bcdf6f23c52cc7181f25f3.tar.bz2
Apply @hide / @SystemApi to android.telecom.*
Move the android.telecom.* namespace back to @hide, and also mark it with @SystemApi so that system-privileged apps can use them. Bug: 18302450 Change-Id: I33ae1b9b0dfdb1c5eff51ca3c829196bcfc9411c
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecom/AudioState.java3
-rw-r--r--telecomm/java/android/telecom/Conference.java4
-rw-r--r--telecomm/java/android/telecom/Connection.java3
-rw-r--r--telecomm/java/android/telecom/ConnectionRequest.java3
-rw-r--r--telecomm/java/android/telecom/ConnectionService.java3
-rw-r--r--telecomm/java/android/telecom/DisconnectCause.java3
-rw-r--r--telecomm/java/android/telecom/GatewayInfo.java2
-rw-r--r--telecomm/java/android/telecom/PhoneAccount.java3
-rw-r--r--telecomm/java/android/telecom/PhoneAccountHandle.java3
-rw-r--r--telecomm/java/android/telecom/PhoneCapabilities.java4
-rw-r--r--telecomm/java/android/telecom/RemoteConference.java3
-rw-r--r--telecomm/java/android/telecom/RemoteConnection.java3
-rw-r--r--telecomm/java/android/telecom/StatusHints.java3
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java40
14 files changed, 78 insertions, 2 deletions
diff --git a/telecomm/java/android/telecom/AudioState.java b/telecomm/java/android/telecom/AudioState.java
index 43da38f..f78ce29 100644
--- a/telecomm/java/android/telecom/AudioState.java
+++ b/telecomm/java/android/telecom/AudioState.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +25,9 @@ import java.util.Locale;
/**
* Encapsulates the telecom audio state, including the current audio routing, supported audio
* routing and mute.
+ * @hide
*/
+@SystemApi
public final class AudioState implements Parcelable {
/** Direct the audio stream through the device's earpiece. */
public static final int ROUTE_EARPIECE = 0x00000001;
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index 32bdbe0..215c682 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -16,6 +16,8 @@
package android.telecom;
+import android.annotation.SystemApi;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -25,7 +27,9 @@ import java.util.concurrent.CopyOnWriteArraySet;
/**
* Represents a conference call which can contain any number of {@link Connection} objects.
+ * @hide
*/
+@SystemApi
public abstract class Conference {
/** @hide */
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 61b471c..63b44a6 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -19,6 +19,7 @@ package android.telecom;
import com.android.internal.telecom.IVideoCallback;
import com.android.internal.telecom.IVideoProvider;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
@@ -43,7 +44,9 @@ import java.util.concurrent.ConcurrentHashMap;
* Implementations are then responsible for updating the state of the {@code Connection}, and
* must call {@link #destroy()} to signal to the framework that the {@code Connection} is no
* longer used and associated resources may be recovered.
+ * @hide
*/
+@SystemApi
public abstract class Connection {
public static final int STATE_INITIALIZING = 0;
diff --git a/telecomm/java/android/telecom/ConnectionRequest.java b/telecomm/java/android/telecom/ConnectionRequest.java
index 71b481b..f691c17 100644
--- a/telecomm/java/android/telecom/ConnectionRequest.java
+++ b/telecomm/java/android/telecom/ConnectionRequest.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
@@ -24,7 +25,9 @@ import android.os.Parcelable;
/**
* Simple data container encapsulating a request to some entity to
* create a new {@link Connection}.
+ * @hide
*/
+@SystemApi
public final class ConnectionRequest implements Parcelable {
// TODO: Token to limit recursive invocations
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 65d48f1..48e6ff3 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -17,6 +17,7 @@
package android.telecom;
import android.annotation.SdkConstant;
+import android.annotation.SystemApi;
import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
@@ -71,7 +72,9 @@ import java.util.concurrent.ConcurrentHashMap;
* receives call-commands such as answer, reject, hold and disconnect.
* <p>
* When there are no more live calls, telecom will unbind from the {@code ConnectionService}.
+ * @hide
*/
+@SystemApi
public abstract class ConnectionService extends Service {
/**
* The {@link Intent} that must be declared as handled by the service.
diff --git a/telecomm/java/android/telecom/DisconnectCause.java b/telecomm/java/android/telecom/DisconnectCause.java
index 73bcd0c..130d676 100644
--- a/telecomm/java/android/telecom/DisconnectCause.java
+++ b/telecomm/java/android/telecom/DisconnectCause.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.media.ToneGenerator;
@@ -29,7 +30,9 @@ import java.util.Objects;
* 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.
+ * @hide
*/
+@SystemApi
public final class DisconnectCause implements Parcelable {
/** Disconnected because of an unknown or unspecified reason. */
diff --git a/telecomm/java/android/telecom/GatewayInfo.java b/telecomm/java/android/telecom/GatewayInfo.java
index 7105602..5b8e4ab 100644
--- a/telecomm/java/android/telecom/GatewayInfo.java
+++ b/telecomm/java/android/telecom/GatewayInfo.java
@@ -34,7 +34,9 @@ import android.text.TextUtils;
* <li> Call the appropriate gateway address.
* <li> Display information about how the call is being routed to the user.
* </ol>
+ * @hide
*/
+@SystemApi
public class GatewayInfo implements Parcelable {
private final String mGatewayProviderPackageName;
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java
index 3fc1d3d..f9ee5d2 100644
--- a/telecomm/java/android/telecom/PhoneAccount.java
+++ b/telecomm/java/android/telecom/PhoneAccount.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.annotation.SystemApi;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -45,7 +46,9 @@ import java.util.MissingResourceException;
* alternative options when placing a phone call. When building a {@link PhoneAccount}, the app
* should supply a valid {@link PhoneAccountHandle} that references the {@link ConnectionService}
* implementation Telecom will use to interact with the app.
+ * @hide
*/
+@SystemApi
public class PhoneAccount implements Parcelable {
/**
diff --git a/telecomm/java/android/telecom/PhoneAccountHandle.java b/telecomm/java/android/telecom/PhoneAccountHandle.java
index bc4cc8c..7bcf147 100644
--- a/telecomm/java/android/telecom/PhoneAccountHandle.java
+++ b/telecomm/java/android/telecom/PhoneAccountHandle.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.annotation.SystemApi;
import android.content.ComponentName;
import android.os.Parcel;
import android.os.Parcelable;
@@ -33,7 +34,9 @@ import java.util.Objects;
*
* See {@link PhoneAccount},
* {@link TelecomManager#registerPhoneAccount TelecomManager.registerPhoneAccount}.
+ * @hide
*/
+@SystemApi
public class PhoneAccountHandle implements Parcelable {
private ComponentName mComponentName;
private String mId;
diff --git a/telecomm/java/android/telecom/PhoneCapabilities.java b/telecomm/java/android/telecom/PhoneCapabilities.java
index f61d39c..feb7a95 100644
--- a/telecomm/java/android/telecom/PhoneCapabilities.java
+++ b/telecomm/java/android/telecom/PhoneCapabilities.java
@@ -16,10 +16,14 @@
package android.telecom;
+import android.annotation.SystemApi;
+
/**
* Defines capabilities for {@link Connection}s and {@link Conference}s such as hold, swap, and
* merge.
+ * @hide
*/
+@SystemApi
public final class PhoneCapabilities {
/** Call can currently be put on hold or unheld. */
public static final int HOLD = 0x00000001;
diff --git a/telecomm/java/android/telecom/RemoteConference.java b/telecomm/java/android/telecom/RemoteConference.java
index eba7580..b548274 100644
--- a/telecomm/java/android/telecom/RemoteConference.java
+++ b/telecomm/java/android/telecom/RemoteConference.java
@@ -18,6 +18,7 @@ package android.telecom;
import com.android.internal.telecom.IConnectionService;
+import android.annotation.SystemApi;
import android.os.RemoteException;
import java.util.ArrayList;
@@ -29,7 +30,9 @@ import java.util.concurrent.CopyOnWriteArraySet;
/**
* Represents a conference call which can contain any number of {@link Connection} objects.
+ * @hide
*/
+@SystemApi
public final class RemoteConference {
public abstract static class Callback {
diff --git a/telecomm/java/android/telecom/RemoteConnection.java b/telecomm/java/android/telecom/RemoteConnection.java
index 816e2bf..d70ddf6 100644
--- a/telecomm/java/android/telecom/RemoteConnection.java
+++ b/telecomm/java/android/telecom/RemoteConnection.java
@@ -20,6 +20,7 @@ import com.android.internal.telecom.IConnectionService;
import com.android.internal.telecom.IVideoCallback;
import com.android.internal.telecom.IVideoProvider;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.IBinder;
import android.os.RemoteException;
@@ -37,7 +38,9 @@ import java.util.concurrent.ConcurrentHashMap;
*
* @see ConnectionService#createRemoteOutgoingConnection(PhoneAccountHandle, ConnectionRequest)
* @see ConnectionService#createRemoteIncomingConnection(PhoneAccountHandle, ConnectionRequest)
+ * @hide
*/
+@SystemApi
public final class RemoteConnection {
public static abstract class Callback {
diff --git a/telecomm/java/android/telecom/StatusHints.java b/telecomm/java/android/telecom/StatusHints.java
index a32eae7..dd3a639 100644
--- a/telecomm/java/android/telecom/StatusHints.java
+++ b/telecomm/java/android/telecom/StatusHints.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.annotation.SystemApi;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -29,7 +30,9 @@ import java.util.Objects;
/**
* Contains status label and icon displayed in the in-call UI.
+ * @hide
*/
+@SystemApi
public final class StatusHints implements Parcelable {
private final ComponentName mPackageName;
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index ecf6005..05108c7 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -33,8 +33,7 @@ import java.util.List;
/**
* 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.
+ * Apps can use methods in this class to determine the current call state.
* <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)}.
@@ -71,7 +70,9 @@ public class TelecomManager {
/**
* The {@link android.content.Intent} action used to configure a
* {@link android.telecom.ConnectionService}.
+ * @hide
*/
+ @SystemApi
public static final String ACTION_CONNECTION_SERVICE_CONFIGURE =
"android.telecom.action.CONNECTION_SERVICE_CONFIGURE";
@@ -84,7 +85,9 @@ public class TelecomManager {
/**
* The {@link android.content.Intent} action used to show the settings page used to configure
* {@link PhoneAccount} preferences.
+ * @hide
*/
+ @SystemApi
public static final String ACTION_CHANGE_PHONE_ACCOUNTS =
"android.telecom.action.CHANGE_PHONE_ACCOUNTS";
@@ -114,7 +117,9 @@ public class TelecomManager {
* {@link PhoneAccountHandle} to use when making the call.
* <p class="note">
* Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
+ * @hide
*/
+ @SystemApi
public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
"android.telecom.extra.PHONE_ACCOUNT_HANDLE";
@@ -125,6 +130,7 @@ public class TelecomManager {
*
* @hide
*/
+ @SystemApi
public static final String EXTRA_INCOMING_CALL_EXTRAS =
"android.telecom.extra.INCOMING_CALL_EXTRAS";
@@ -136,6 +142,7 @@ public class TelecomManager {
*
* @hide
*/
+ @SystemApi
public static final String EXTRA_OUTGOING_CALL_EXTRAS =
"android.telecom.extra.OUTGOING_CALL_EXTRAS";
@@ -162,7 +169,9 @@ public class TelecomManager {
/**
* Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
* containing the component name of the associated connection service.
+ * @hide
*/
+ @SystemApi
public static final String EXTRA_CONNECTION_SERVICE =
"android.telecom.extra.CONNECTION_SERVICE";
@@ -197,7 +206,9 @@ public class TelecomManager {
* {@link ConnectionService}s which interact with {@link RemoteConnection}s should only populate
* this if the {@link android.telephony.TelephonyManager#getLine1Number()} value, as that is the
* user's expected caller ID.
+ * @hide
*/
+ @SystemApi
public static final String EXTRA_CALL_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
/**
@@ -338,7 +349,9 @@ public class TelecomManager {
* @param uriScheme The URI scheme.
* @return The {@link PhoneAccountHandle} corresponding to the user-chosen default for outgoing
* phone calls for a specified URI scheme.
+ * @hide
*/
+ @SystemApi
public PhoneAccountHandle getDefaultOutgoingPhoneAccount(String uriScheme) {
try {
if (isServiceConnected()) {
@@ -441,7 +454,9 @@ public class TelecomManager {
* {@code PhoneAccount}.
*
* @return The phone account handle of the current connection manager.
+ * @hide
*/
+ @SystemApi
public PhoneAccountHandle getConnectionManager() {
return getSimCallManager();
}
@@ -457,7 +472,9 @@ public class TelecomManager {
*
* @param uriScheme The URI scheme.
* @return A list of {@code PhoneAccountHandle} objects supporting the URI scheme.
+ * @hide
*/
+ @SystemApi
public List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(String uriScheme) {
try {
if (isServiceConnected()) {
@@ -496,7 +513,9 @@ public class TelecomManager {
*
* @return {@code true} if the device has more than one account registered and {@code false}
* otherwise.
+ * @hide
*/
+ @SystemApi
public boolean hasMultipleCallCapableAccounts() {
return getCallCapablePhoneAccounts().size() > 1;
}
@@ -505,7 +524,9 @@ public class TelecomManager {
* Returns a list of all {@link PhoneAccount}s registered for the calling package.
*
* @return A list of {@code PhoneAccountHandle} objects.
+ * @hide
*/
+ @SystemApi
public List<PhoneAccountHandle> getPhoneAccountsForPackage() {
try {
if (isServiceConnected()) {
@@ -523,7 +544,9 @@ public class TelecomManager {
*
* @param account The {@link PhoneAccountHandle}.
* @return The {@link PhoneAccount} object.
+ * @hide
*/
+ @SystemApi
public PhoneAccount getPhoneAccount(PhoneAccountHandle account) {
try {
if (isServiceConnected()) {
@@ -602,7 +625,10 @@ public class TelecomManager {
* {@link PhoneAccountHandle#getComponentName()} does not match the package name of the app.
*
* @param account The complete {@link PhoneAccount}.
+ *
+ * @hide
*/
+ @SystemApi
public void registerPhoneAccount(PhoneAccount account) {
try {
if (isServiceConnected()) {
@@ -617,7 +643,9 @@ public class TelecomManager {
* Remove a {@link PhoneAccount} registration from the system.
*
* @param accountHandle A {@link PhoneAccountHandle} for the {@link PhoneAccount} to unregister.
+ * @hide
*/
+ @SystemApi
public void unregisterPhoneAccount(PhoneAccountHandle accountHandle) {
try {
if (isServiceConnected()) {
@@ -630,7 +658,9 @@ public class TelecomManager {
/**
* Remove all Accounts that belong to the calling package from the system.
+ * @hide
*/
+ @SystemApi
public void clearAccounts() {
try {
if (isServiceConnected()) {
@@ -853,7 +883,9 @@ public class TelecomManager {
* {@link #registerPhoneAccount}.
* @param extras A bundle that will be passed through to
* {@link ConnectionService#onCreateIncomingConnection}.
+ * @hide
*/
+ @SystemApi
public void addNewIncomingCall(PhoneAccountHandle phoneAccount, Bundle extras) {
try {
if (isServiceConnected()) {
@@ -923,7 +955,9 @@ public class TelecomManager {
* @param accountHandle The handle for the account the MMI code should apply to.
* @param dialString The digits to dial.
* @return True if the digits were processed as an MMI code, false otherwise.
+ * @hide
*/
+ @SystemApi
public boolean handleMmi(PhoneAccountHandle accountHandle, String dialString) {
ITelecomService service = getTelecomService();
if (service != null) {
@@ -941,7 +975,9 @@ public class TelecomManager {
* {@code null} to return a URI which will use the default account.
* @return The URI (with the content:// scheme) specific to the specified {@link PhoneAccount}
* for the the content retrieve.
+ * @hide
*/
+ @SystemApi
public Uri getAdnUriForPhoneAccount(PhoneAccountHandle accountHandle) {
ITelecomService service = getTelecomService();
if (service != null && accountHandle != null) {