summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-07-19 18:18:19 -0700
committerEvan Charlton <evanc@google.com>2014-07-20 10:34:59 -0700
commit6eb262c3515c927df19340b3eee8c74bc9478d16 (patch)
tree71f75498b32c103baba393032c6304e32339e840 /telecomm
parent8b4f091b49820d1debaae316933e575b500f8605 (diff)
downloadframeworks_base-6eb262c3515c927df19340b3eee8c74bc9478d16.zip
frameworks_base-6eb262c3515c927df19340b3eee8c74bc9478d16.tar.gz
frameworks_base-6eb262c3515c927df19340b3eee8c74bc9478d16.tar.bz2
Rename PhoneAccount to PhoneAccountHandle
Change-Id: I2e97b348e6316a8b3ccc39fd81013e7f514a2889
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecomm/Call.java13
-rw-r--r--telecomm/java/android/telecomm/CallState.java6
-rw-r--r--telecomm/java/android/telecomm/ConnectionRequest.java6
-rw-r--r--telecomm/java/android/telecomm/ConnectionService.java5
-rw-r--r--telecomm/java/android/telecomm/InCallAdapter.java6
-rw-r--r--telecomm/java/android/telecomm/InCallCall.java11
-rw-r--r--telecomm/java/android/telecomm/PhoneAccountHandle.aidl (renamed from telecomm/java/android/telecomm/PhoneAccount.aidl)2
-rw-r--r--telecomm/java/android/telecomm/PhoneAccountHandle.java (renamed from telecomm/java/android/telecomm/PhoneAccount.java)35
-rw-r--r--telecomm/java/android/telecomm/PhoneAccountMetadata.java68
-rw-r--r--telecomm/java/android/telecomm/RemoteConnectionManager.java6
-rw-r--r--telecomm/java/android/telecomm/RemoteConnectionService.java6
-rw-r--r--telecomm/java/android/telecomm/TelecommManager.java82
-rw-r--r--telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl4
-rw-r--r--telecomm/java/com/android/internal/telecomm/ITelecommService.aidl10
14 files changed, 130 insertions, 130 deletions
diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java
index 4cb75be..b1175f2 100644
--- a/telecomm/java/android/telecomm/Call.java
+++ b/telecomm/java/android/telecomm/Call.java
@@ -73,7 +73,7 @@ public final class Call {
private final int mHandlePresentation;
private final String mCallerDisplayName;
private final int mCallerDisplayNamePresentation;
- private final PhoneAccount mAccount;
+ private final PhoneAccountHandle mAccount;
private final int mCapabilities;
private final int mDisconnectCauseCode;
private final String mDisconnectCauseMsg;
@@ -114,9 +114,10 @@ public final class Call {
}
/**
- * @return The {@code PhoneAccount} whereby the {@code Call} is currently being routed.
+ * @return The {@code PhoneAccountHandle} whereby the {@code Call} is currently being
+ * routed.
*/
- public PhoneAccount getAccount() {
+ public PhoneAccountHandle getAccount() {
return mAccount;
}
@@ -219,7 +220,7 @@ public final class Call {
int handlePresentation,
String callerDisplayName,
int callerDisplayNamePresentation,
- PhoneAccount account,
+ PhoneAccountHandle account,
int capabilities,
int disconnectCauseCode,
String disconnectCauseMsg,
@@ -457,10 +458,10 @@ public final class Call {
}
/**
- * Notifies this {@code Call} the a {@code PhoneAccount} has been selected and to proceed
+ * Notifies this {@code Call} the a {@code PhoneAccountHandle} has been selected and to proceed
* with placing an outgoing call.
*/
- public void phoneAccountSelected(PhoneAccount account) {
+ public void phoneAccountSelected(PhoneAccountHandle account) {
mInCallAdapter.phoneAccountSelected(mTelecommCallId, account);
}
diff --git a/telecomm/java/android/telecomm/CallState.java b/telecomm/java/android/telecomm/CallState.java
index 7abf4ab..e5c1613 100644
--- a/telecomm/java/android/telecomm/CallState.java
+++ b/telecomm/java/android/telecomm/CallState.java
@@ -33,9 +33,9 @@ public enum CallState {
/**
* Indicates that the call is about to go into the outgoing and dialing state but is waiting for
- * user input before it proceeds. For example, where no default {@link PhoneAccount} is set,
- * this is the state where the InCallUI is waiting for the user to select a {@link PhoneAccount}
- * to call from.
+ * user input before it proceeds. For example, where no default {@link PhoneAccountHandle} is
+ * set, this is the state where the InCallUI is waiting for the user to select a
+ * {@link PhoneAccountHandle} to call from.
*/
PRE_DIAL_WAIT,
diff --git a/telecomm/java/android/telecomm/ConnectionRequest.java b/telecomm/java/android/telecomm/ConnectionRequest.java
index 5888d6a..7a907fb 100644
--- a/telecomm/java/android/telecomm/ConnectionRequest.java
+++ b/telecomm/java/android/telecomm/ConnectionRequest.java
@@ -30,7 +30,7 @@ public final class ConnectionRequest implements Parcelable {
// TODO: Token to limit recursive invocations
// TODO: Consider upgrading "mHandle" to ordered list of handles, indicating a set of phone
// numbers that would satisfy the client's needs, in order of preference
- private final PhoneAccount mAccount;
+ private final PhoneAccountHandle mAccount;
private final String mCallId;
private final Uri mHandle;
private final int mHandlePresentation;
@@ -47,7 +47,7 @@ public final class ConnectionRequest implements Parcelable {
* @param videoState Determines the video state for the connection.
*/
public ConnectionRequest(
- PhoneAccount account,
+ PhoneAccountHandle account,
String callId,
Uri handle,
int handlePresentation,
@@ -73,7 +73,7 @@ public final class ConnectionRequest implements Parcelable {
/**
* The account which should be used to place the call.
*/
- public PhoneAccount getAccount() { return mAccount; }
+ public PhoneAccountHandle getAccount() { return mAccount; }
/**
* An identifier for this call.
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java
index 76a826e..a6b01a7 100644
--- a/telecomm/java/android/telecomm/ConnectionService.java
+++ b/telecomm/java/android/telecomm/ConnectionService.java
@@ -26,7 +26,6 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
-import android.telecomm.CallVideoProvider;
import com.android.internal.os.SomeArgs;
import com.android.internal.telecomm.IConnectionService;
@@ -68,7 +67,7 @@ public abstract class ConnectionService extends Service {
private final Map<Connection, String> mIdByConnection = new HashMap<>();
private final RemoteConnectionManager mRemoteConnectionManager = new RemoteConnectionManager();
- private SimpleResponse<Uri, List<PhoneAccount>> mAccountLookupResponse;
+ private SimpleResponse<Uri, List<PhoneAccountHandle>> mAccountLookupResponse;
private Uri mAccountLookupHandle;
private boolean mAreAccountsInitialized = false;
private final ConnectionServiceAdapter mAdapter = new ConnectionServiceAdapter();
@@ -597,7 +596,7 @@ public abstract class ConnectionService extends Service {
}
public final void lookupRemoteAccounts(
- Uri handle, SimpleResponse<Uri, List<PhoneAccount>> response) {
+ Uri handle, SimpleResponse<Uri, List<PhoneAccountHandle>> response) {
mAccountLookupResponse = response;
mAccountLookupHandle = handle;
maybeRespondToAccountLookup();
diff --git a/telecomm/java/android/telecomm/InCallAdapter.java b/telecomm/java/android/telecomm/InCallAdapter.java
index 5153cf4..0b8a75d 100644
--- a/telecomm/java/android/telecomm/InCallAdapter.java
+++ b/telecomm/java/android/telecomm/InCallAdapter.java
@@ -201,12 +201,12 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to add a PhoneAccount to the specified call
+ * Instructs Telecomm to add a PhoneAccountHandle to the specified call
*
* @param callId The identifier of the call
- * @param account The PhoneAccount through which to place the call
+ * @param account The PhoneAccountHandle through which to place the call
*/
- public void phoneAccountSelected(String callId, PhoneAccount account) {
+ public void phoneAccountSelected(String callId, PhoneAccountHandle account) {
try {
mAdapter.phoneAccountSelected(callId, account);
} catch (RemoteException e) {
diff --git a/telecomm/java/android/telecomm/InCallCall.java b/telecomm/java/android/telecomm/InCallCall.java
index db8395c..e5269f9 100644
--- a/telecomm/java/android/telecomm/InCallCall.java
+++ b/telecomm/java/android/telecomm/InCallCall.java
@@ -25,7 +25,6 @@ import android.telephony.DisconnectCause;
import com.android.internal.telecomm.ICallVideoProvider;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
/**
@@ -44,7 +43,7 @@ public final class InCallCall implements Parcelable {
private final String mCallerDisplayName;
private final int mCallerDisplayNamePresentation;
private final GatewayInfo mGatewayInfo;
- private final PhoneAccount mAccount;
+ private final PhoneAccountHandle mAccount;
private final ICallVideoProvider mCallVideoProvider;
private RemoteCallVideoProvider mRemoteCallVideoProvider;
private final String mParentCallId;
@@ -66,7 +65,7 @@ public final class InCallCall implements Parcelable {
String callerDisplayName,
int callerDisplayNamePresentation,
GatewayInfo gatewayInfo,
- PhoneAccount account,
+ PhoneAccountHandle account,
ICallVideoProvider callVideoProvider,
String parentCallId,
List<String> childCallIds,
@@ -160,8 +159,8 @@ public final class InCallCall implements Parcelable {
return mGatewayInfo;
}
- /** PhoneAccount information for the call. */
- public PhoneAccount getAccount() {
+ /** PhoneAccountHandle information for the call. */
+ public PhoneAccountHandle getAccount() {
return mAccount;
}
@@ -234,7 +233,7 @@ public final class InCallCall implements Parcelable {
String callerDisplayName = source.readString();
int callerDisplayNamePresentation = source.readInt();
GatewayInfo gatewayInfo = source.readParcelable(classLoader);
- PhoneAccount account = source.readParcelable(classLoader);
+ PhoneAccountHandle account = source.readParcelable(classLoader);
ICallVideoProvider callVideoProvider =
ICallVideoProvider.Stub.asInterface(source.readStrongBinder());
String parentCallId = source.readString();
diff --git a/telecomm/java/android/telecomm/PhoneAccount.aidl b/telecomm/java/android/telecomm/PhoneAccountHandle.aidl
index b98cf41..3be5a2e 100644
--- a/telecomm/java/android/telecomm/PhoneAccount.aidl
+++ b/telecomm/java/android/telecomm/PhoneAccountHandle.aidl
@@ -19,4 +19,4 @@ package android.telecomm;
/**
* {@hide}
*/
-parcelable PhoneAccount;
+parcelable PhoneAccountHandle;
diff --git a/telecomm/java/android/telecomm/PhoneAccount.java b/telecomm/java/android/telecomm/PhoneAccountHandle.java
index 4d7638b..f14766c 100644
--- a/telecomm/java/android/telecomm/PhoneAccount.java
+++ b/telecomm/java/android/telecomm/PhoneAccountHandle.java
@@ -16,9 +16,6 @@
package android.telecomm;
-import org.json.JSONException;
-import org.json.JSONObject;
-
import android.content.ComponentName;
import android.os.Parcel;
import android.os.Parcelable;
@@ -28,15 +25,12 @@ import java.util.Objects;
/**
* Represents a distinct account, line of service or call placement method that
* the system can use to place phone calls.
- *
- * TODO: Per feedback from API Council, rename to "PhoneAccountHandle". See also comment on class
- * PhoneAccountMetadata.
*/
-public class PhoneAccount implements Parcelable {
+public class PhoneAccountHandle implements Parcelable {
private ComponentName mComponentName;
private String mId;
- public PhoneAccount(
+ public PhoneAccountHandle(
ComponentName componentName,
String id) {
mComponentName = componentName;
@@ -45,7 +39,7 @@ public class PhoneAccount implements Parcelable {
/**
* The {@code ComponentName} of the {@link android.telecomm.ConnectionService} which is
- * responsible for making phone calls using this {@code PhoneAccount}.
+ * responsible for making phone calls using this {@code PhoneAccountHandle}.
*
* @return A suitable {@code ComponentName}.
*/
@@ -54,10 +48,10 @@ public class PhoneAccount implements Parcelable {
}
/**
- * A unique identifier for this {@code PhoneAccount}, generated by and meaningful to the
+ * A unique identifier for this {@code PhoneAccountHandle}, generated by and meaningful to the
* {@link android.telecomm.ConnectionService} that created it.
*
- * @return A unique identifier for this {@code PhoneAccount}.
+ * @return A unique identifier for this {@code PhoneAccountHandle}.
*/
public String getId() {
return mId;
@@ -79,9 +73,10 @@ public class PhoneAccount implements Parcelable {
@Override
public boolean equals(Object other) {
return other != null &&
- other instanceof PhoneAccount &&
- Objects.equals(((PhoneAccount) other).getComponentName(), getComponentName()) &&
- Objects.equals(((PhoneAccount) other).getId(), getId());
+ other instanceof PhoneAccountHandle &&
+ Objects.equals(((PhoneAccountHandle) other).getComponentName(),
+ getComponentName()) &&
+ Objects.equals(((PhoneAccountHandle) other).getId(), getId());
}
//
@@ -99,19 +94,19 @@ public class PhoneAccount implements Parcelable {
out.writeString(mId);
}
- public static final Creator<PhoneAccount> CREATOR = new Creator<PhoneAccount>() {
+ public static final Creator<PhoneAccountHandle> CREATOR = new Creator<PhoneAccountHandle>() {
@Override
- public PhoneAccount createFromParcel(Parcel in) {
- return new PhoneAccount(in);
+ public PhoneAccountHandle createFromParcel(Parcel in) {
+ return new PhoneAccountHandle(in);
}
@Override
- public PhoneAccount[] newArray(int size) {
- return new PhoneAccount[size];
+ public PhoneAccountHandle[] newArray(int size) {
+ return new PhoneAccountHandle[size];
}
};
- private PhoneAccount(Parcel in) {
+ private PhoneAccountHandle(Parcel in) {
mComponentName = in.readParcelable(getClass().getClassLoader());
mId = in.readString();
}
diff --git a/telecomm/java/android/telecomm/PhoneAccountMetadata.java b/telecomm/java/android/telecomm/PhoneAccountMetadata.java
index c52a6fc..a81260a 100644
--- a/telecomm/java/android/telecomm/PhoneAccountMetadata.java
+++ b/telecomm/java/android/telecomm/PhoneAccountMetadata.java
@@ -26,18 +26,19 @@ import android.os.Parcelable;
import java.util.MissingResourceException;
/**
- * Provides user interface description information for a {@code PhoneAccount}.
+ * Provides user interface description information for a {@code PhoneAccountHandle}.
*
- * TODO: Per feedback from API Council, rename to "PhoneAccount". See also comment on class
- * PhoneAccount.
+ * TODO: Per feedback from API Council, rename to "PhoneAccountHandle". See also comment on class
+ * PhoneAccountHandle.
*/
public class PhoneAccountMetadata implements Parcelable {
/**
- * Flag indicating that this {@code PhoneAccount} can act as a call manager for traditional
- * SIM-based telephony calls. The {@link ConnectionService} associated with this phone-account
- * will be allowed to manage SIM-based phone calls including using its own proprietary
- * phone-call implementation (like VoIP calling) to make calls instead of the telephony stack.
+ * Flag indicating that this {@code PhoneAccountHandle} can act as a call manager for
+ * traditional SIM-based telephony calls. The {@link ConnectionService} associated with this
+ * phone-account will be allowed to manage SIM-based phone calls including using its own
+ * proprietary phone-call implementation (like VoIP calling) to make calls instead of the
+ * telephony stack.
* When a user opts to place a call using the SIM-based telephony stack, the connection-service
* associated with this phone-account will be attempted first if the user has explicitly
* selected it to be used as the default call-manager.
@@ -47,24 +48,25 @@ public class PhoneAccountMetadata implements Parcelable {
public static final int CAPABILITY_SIM_CALL_MANAGER = 0x1;
/**
- * Flag indicating that this {@code PhoneAccount} can make phone calls in place of traditional
- * SIM-based telephony calls. This account will be treated as a distinct method for placing
- * calls alongside the traditional SIM-based telephony stack. This flag is distinct from
- * {@link #CAPABILITY_SIM_CALL_MANAGER} in that it is not allowed to manage calls from or use
- * the built-in telephony stack to place its calls.
+ * Flag indicating that this {@code PhoneAccountHandle} can make phone calls in place of
+ * traditional SIM-based telephony calls. This account will be treated as a distinct method
+ * for placing calls alongside the traditional SIM-based telephony stack. This flag is
+ * distinct from {@link #CAPABILITY_SIM_CALL_MANAGER} in that it is not allowed to manage
+ * calls from or use the built-in telephony stack to place its calls.
* <p>
* See {@link #getCapabilities}
*/
public static final int CAPABILITY_CALL_PROVIDER = 0x2;
/**
- * Flag indicating that this {@code PhoneAccount} represents built-in PSTN SIM subscription.
+ * Flag indicating that this {@code PhoneAccountHandle} represents built-in PSTN SIM
+ * subscription.
* <p>
* Only the android framework can set this capability on a phone account.
*/
public static final int CAPABILITY_SIM_SUBSCRIPTION = 0x4;
- private final PhoneAccount mAccount;
+ private final PhoneAccountHandle mAccount;
private final Uri mHandle;
private final String mSubscriptionNumber;
private final int mCapabilities;
@@ -74,7 +76,7 @@ public class PhoneAccountMetadata implements Parcelable {
private boolean mVideoCallingSupported;
public PhoneAccountMetadata(
- PhoneAccount account,
+ PhoneAccountHandle account,
Uri handle,
String subscriptionNumber,
int capabilities,
@@ -93,19 +95,19 @@ public class PhoneAccountMetadata implements Parcelable {
}
/**
- * The {@code PhoneAccount} to which this metadata pertains.
+ * The {@code PhoneAccountHandle} to which this metadata pertains.
*
- * @return A {@code PhoneAccount}.
+ * @return A {@code PhoneAccountHandle}.
*/
- public PhoneAccount getAccount() {
+ public PhoneAccountHandle getAccount() {
return mAccount;
}
/**
- * The handle (e.g., a phone number) associated with this {@code PhoneAccount}. This represents
- * the destination from which outgoing calls using this {@code PhoneAccount} will appear to
- * come, if applicable, and the destination to which incoming calls using this
- * {@code PhoneAccount} may be addressed.
+ * The handle (e.g., a phone number) associated with this {@code PhoneAccountHandle}. This
+ * represents the destination from which outgoing calls using this {@code PhoneAccountHandle}
+ * will appear to come, if applicable, and the destination to which incoming calls using this
+ * {@code PhoneAccountHandle} may be addressed.
*
* @return A handle expressed as a {@code Uri}, for example, a phone number.
*/
@@ -125,34 +127,34 @@ public class PhoneAccountMetadata implements Parcelable {
}
/**
- * The capabilities of this {@code PhoneAccount}.
+ * The capabilities of this {@code PhoneAccountHandle}.
*
- * @return A bit field of flags describing this {@code PhoneAccount}'s capabilities.
+ * @return A bit field of flags describing this {@code PhoneAccountHandle}'s capabilities.
*/
public int getCapabilities() {
return mCapabilities;
}
/**
- * A short string label describing a {@code PhoneAccount}.
+ * A short string label describing a {@code PhoneAccountHandle}.
*
- * @return A label for this {@code PhoneAccount}.
+ * @return A label for this {@code PhoneAccountHandle}.
*/
public String getLabel() {
return mLabel;
}
/**
- * A short paragraph describing a {@code PhoneAccount}.
+ * A short paragraph describing a {@code PhoneAccountHandle}.
*
- * @return A description for this {@code PhoneAccount}.
+ * @return A description for this {@code PhoneAccountHandle}.
*/
public String getShortDescription() {
return mShortDescription;
}
/**
- * The icon resource ID for the icon of this {@code PhoneAccount}.
+ * The icon resource ID for the icon of this {@code PhoneAccountHandle}.
*
* @return A resource ID.
*/
@@ -161,9 +163,9 @@ public class PhoneAccountMetadata implements Parcelable {
}
/**
- * An icon to represent this {@code PhoneAccount} in a user interface.
+ * An icon to represent this {@code PhoneAccountHandle} in a user interface.
*
- * @return An icon for this {@code PhoneAccount}.
+ * @return An icon for this {@code PhoneAccountHandle}.
*/
public Drawable getIcon(Context context) {
return getIcon(context, mIconResId);
@@ -188,9 +190,9 @@ public class PhoneAccountMetadata implements Parcelable {
}
/**
- * Determines whether this {@code PhoneAccount} supports video calling.
+ * Determines whether this {@code PhoneAccountHandle} supports video calling.
*
- * @return {@code true} if this {@code PhoneAccount} supports video calling.
+ * @return {@code true} if this {@code PhoneAccountHandle} supports video calling.
*/
public boolean isVideoCallingSupported() {
return mVideoCallingSupported;
diff --git a/telecomm/java/android/telecomm/RemoteConnectionManager.java b/telecomm/java/android/telecomm/RemoteConnectionManager.java
index 0a0b245..eac9200 100644
--- a/telecomm/java/android/telecomm/RemoteConnectionManager.java
+++ b/telecomm/java/android/telecomm/RemoteConnectionManager.java
@@ -44,8 +44,8 @@ public class RemoteConnectionManager {
}
}
- List<PhoneAccount> getAccounts(Uri handle) {
- List<PhoneAccount> accounts = new LinkedList<>();
+ List<PhoneAccountHandle> getAccounts(Uri handle) {
+ List<PhoneAccountHandle> accounts = new LinkedList<>();
Log.d(this, "Getting accounts: " + mRemoteConnectionServices.keySet());
for (RemoteConnectionService remoteService : mRemoteConnectionServices.values()) {
// TODO(santoscordon): Eventually this will be async.
@@ -58,7 +58,7 @@ public class RemoteConnectionManager {
ConnectionRequest request,
ConnectionService.CreateConnectionResponse response,
boolean isIncoming) {
- PhoneAccount account = request.getAccount();
+ PhoneAccountHandle account = request.getAccount();
if (account == null) {
throw new IllegalArgumentException("account must be specified.");
}
diff --git a/telecomm/java/android/telecomm/RemoteConnectionService.java b/telecomm/java/android/telecomm/RemoteConnectionService.java
index 6c024c6..9ec39ca 100644
--- a/telecomm/java/android/telecomm/RemoteConnectionService.java
+++ b/telecomm/java/android/telecomm/RemoteConnectionService.java
@@ -439,11 +439,11 @@ final class RemoteConnectionService implements DeathRecipient {
}
}
- final List<PhoneAccount> lookupAccounts(Uri handle) {
+ final List<PhoneAccountHandle> lookupAccounts(Uri handle) {
// TODO(santoscordon): Update this so that is actually calls into the RemoteConnection
// each time.
- List<PhoneAccount> accounts = new LinkedList<>();
- accounts.add(new PhoneAccount(
+ List<PhoneAccountHandle> accounts = new LinkedList<>();
+ accounts.add(new PhoneAccountHandle(
mComponentName,
null /* id */));
return accounts;
diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecomm/TelecommManager.java
index d1526ca..32ef570 100644
--- a/telecomm/java/android/telecomm/TelecommManager.java
+++ b/telecomm/java/android/telecomm/TelecommManager.java
@@ -38,7 +38,7 @@ public class TelecommManager {
* to find and bind to the appropriate {@link ConnectionService} which
* Telecomm will ultimately use to control and get information about the call.</p>
*
- * <p>Input: get*Extra field {@link #EXTRA_PHONE_ACCOUNT} contains the component name of the
+ * <p>Input: get*Extra field {@link #EXTRA_PHONE_ACCOUNT_HANDLE} contains the component name of the
* {@link ConnectionService} that Telecomm should bind to. Telecomm will then
* ask the connection service for more information about the call prior to showing any UI.
*
@@ -48,26 +48,28 @@ public class TelecommManager {
public static final String ACTION_INCOMING_CALL = "android.intent.action.INCOMING_CALL";
/**
- * The service action used to bind to {@link android.telecomm.ConnectionService} implementations.
+ * The service action used to bind to {@link android.telecomm.ConnectionService}
+ * implementations.
*/
public static final String ACTION_CONNECTION_SERVICE = ConnectionService.class.getName();
/**
- * The {@link android.content.Intent} action used to configure a {@link android.telecomm.ConnectionService}.
+ * The {@link android.content.Intent} action used to configure a
+ * {@link android.telecomm.ConnectionService}.
*/
public static final String ACTION_CONNECTION_SERVICE_CONFIGURE =
"android.intent.action.CONNECTION_SERVICE_CONFIGURE";
/**
- * Optional extra for {@link android.content.Intent#ACTION_CALL} containing a boolean that determines whether
- * the speakerphone should be automatically turned on for an outgoing call.
+ * Optional extra for {@link android.content.Intent#ACTION_CALL} containing a boolean that
+ * determines whether the speakerphone should be automatically turned on for an outgoing call.
*/
public static final String EXTRA_START_CALL_WITH_SPEAKERPHONE =
"android.intent.extra.START_CALL_WITH_SPEAKERPHONE";
/**
- * Optional extra for {@link android.content.Intent#ACTION_CALL} containing an integer that determines the
- * desired video state for an outgoing call.
+ * Optional extra for {@link android.content.Intent#ACTION_CALL} containing an integer that
+ * determines the desired video state for an outgoing call.
* Valid options: {@link android.telecomm.VideoCallProfile#VIDEO_STATE_AUDIO_ONLY},
* {@link android.telecomm.VideoCallProfile#VIDEO_STATE_BIDIRECTIONAL},
* {@link android.telecomm.VideoCallProfile#VIDEO_STATE_RX_ENABLED},
@@ -79,39 +81,40 @@ public class TelecommManager {
/**
* The extra used with an {@link android.content.Intent#ACTION_CALL},
* {@link #ACTION_INCOMING_CALL}, {@link android.content.Intent#ACTION_DIAL} {@code Intent} to
- * specify a {@link android.telecomm.PhoneAccount} to use when making the call.
+ * specify a {@link PhoneAccountHandle} to use when making the call.
*
* <p class="note">
* Retrieve with
* {@link android.content.Intent#getParcelableExtra(String)}.
*/
- public static final String EXTRA_PHONE_ACCOUNT = "android.intent.extra.PHONE_ACCOUNT";
+ public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
+ "android.intent.extra.PHONE_ACCOUNT_HANDLE";
/**
- * Optional extra for {@link #ACTION_INCOMING_CALL} containing a {@link android.os.Bundle} which contains
- * metadata about the call. This {@link android.os.Bundle} will be returned to the
- * {@link android.telecomm.ConnectionService}.
+ * Optional extra for {@link #ACTION_INCOMING_CALL} containing a {@link android.os.Bundle}
+ * which contains metadata about the call. This {@link android.os.Bundle} will be returned to
+ * the {@link android.telecomm.ConnectionService}.
*/
public static final String EXTRA_INCOMING_CALL_EXTRAS =
"android.intent.extra.INCOMING_CALL_EXTRAS";
/**
- * Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED} containing the
- * disconnect code.
+ * Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
+ * containing the disconnect code.
*/
public static final String EXTRA_CALL_DISCONNECT_CAUSE =
"android.telecomm.extra.CALL_DISCONNECT_CAUSE";
/**
- * Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED} containing the
- * disconnect message.
+ * Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
+ * containing the disconnect message.
*/
public static final String EXTRA_CALL_DISCONNECT_MESSAGE =
"android.telecomm.extra.CALL_DISCONNECT_MESSAGE";
/**
- * Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED} containing the
- * component name of the associated connection service.
+ * Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
+ * containing the component name of the associated connection service.
*/
public static final String EXTRA_CONNECTION_SERVICE =
"android.telecomm.extra.CONNECTION_SERVICE";
@@ -244,23 +247,23 @@ public class TelecommManager {
}
/**
- * Return the {@link PhoneAccount} which is the user-chosen default for making outgoing
- * phone calls. This {@code PhoneAccount} will always be a member of the list which is
+ * Return the {@link PhoneAccountHandle} which is the user-chosen default for making outgoing
+ * phone calls. This {@code PhoneAccountHandle} will always be a member of the list which is
* returned from calling {@link #getEnabledPhoneAccounts()}.
* <p>
* Apps must be prepared for this method to return {@code null}, indicating that there
- * currently exists no user-chosen default {@code PhoneAccount}. In this case, apps wishing to
- * initiate a phone call must either create their {@link android.content.Intent#ACTION_CALL} or
- * {@link android.content.Intent#ACTION_DIAL} {@code Intent} with no
- * {@link TelecommManager#EXTRA_PHONE_ACCOUNT}, or present the user with an affordance
+ * currently exists no user-chosen default {@code PhoneAccountHandle}. In this case, apps
+ * wishing to initiate a phone call must either create their {@link android.content
+ * .Intent#ACTION_CALL} or {@link android.content.Intent#ACTION_DIAL} {@code Intent} with no
+ * {@link TelecommManager#EXTRA_PHONE_ACCOUNT_HANDLE}, or present the user with an affordance
* to select one of the elements of {@link #getEnabledPhoneAccounts()}.
* <p>
* An {@link android.content.Intent#ACTION_CALL} or {@link android.content.Intent#ACTION_DIAL}
- * {@code Intent} with no {@link TelecommManager#EXTRA_PHONE_ACCOUNT} is valid, and subsequent
- * steps in the phone call flow are responsible for presenting the user with an affordance, if
- * necessary, to choose a {@code PhoneAccount}.
+ * {@code Intent} with no {@link TelecommManager#EXTRA_PHONE_ACCOUNT_HANDLE} is valid, and
+ * subsequent steps in the phone call flow are responsible for presenting the user with an
+ * affordance, if necessary, to choose a {@code PhoneAccountHandle}.
*/
- public PhoneAccount getDefaultOutgoingPhoneAccount() {
+ public PhoneAccountHandle getDefaultOutgoingPhoneAccount() {
try {
if (isServiceConnected()) {
return getTelecommService().getDefaultOutgoingPhoneAccount();
@@ -272,12 +275,13 @@ public class TelecommManager {
}
/**
- * Return a list of {@link PhoneAccount}s which can be used to make and receive phone calls.
+ * Return a list of {@link PhoneAccountHandle}s which can be used to make and receive phone
+ * calls.
*
- * @see #EXTRA_PHONE_ACCOUNT
- * @return A list of {@code PhoneAccount} objects.
+ * @see #EXTRA_PHONE_ACCOUNT_HANDLE
+ * @return A list of {@code PhoneAccountHandle} objects.
*/
- public List<PhoneAccount> getEnabledPhoneAccounts() {
+ public List<PhoneAccountHandle> getEnabledPhoneAccounts() {
try {
if (isServiceConnected()) {
return getTelecommService().getEnabledPhoneAccounts();
@@ -289,14 +293,14 @@ public class TelecommManager {
}
/**
- * Return the metadata for a specified {@link PhoneAccount}. Metadata includes resources which
- * can be used in a user interface.
+ * Return the metadata for a specified {@link PhoneAccountHandle}. Metadata includes resources
+ * which can be used in a user interface.
*
- * @param account The {@link PhoneAccount}.
+ * @param account The {@link PhoneAccountHandle}.
*
* @return The metadata for the account.
*/
- public PhoneAccountMetadata getPhoneAccountMetadata(PhoneAccount account) {
+ public PhoneAccountMetadata getPhoneAccountMetadata(PhoneAccountHandle account) {
try {
if (isServiceConnected()) {
return getTelecommService().getPhoneAccountMetadata(account);
@@ -308,7 +312,7 @@ public class TelecommManager {
}
/**
- * Register a {@link PhoneAccount} for use by the system.
+ * Register a {@link PhoneAccountHandle} for use by the system.
*
* @param metadata The complete {@link PhoneAccountMetadata}.
*/
@@ -323,11 +327,11 @@ public class TelecommManager {
}
/**
- * Remove a {@link PhoneAccount} registration from the system.
+ * Remove a {@link PhoneAccountHandle} registration from the system.
*
* @param account An Account.
*/
- public void unregisterPhoneAccount(PhoneAccount account) {
+ public void unregisterPhoneAccount(PhoneAccountHandle account) {
try {
if (isServiceConnected()) {
getTelecommService().unregisterPhoneAccount(account);
diff --git a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl b/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
index aca8c0a..b014a10 100644
--- a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
@@ -17,7 +17,7 @@
package com.android.internal.telecomm;
import android.telecomm.CallAudioState;
-import android.telecomm.PhoneAccount;
+import android.telecomm.PhoneAccountHandle;
/**
* Internal remote callback interface for in-call services.
@@ -49,7 +49,7 @@ oneway interface IInCallAdapter {
void phoneAccountClicked(String callId);
- void phoneAccountSelected(String callId, in PhoneAccount account);
+ void phoneAccountSelected(String callId, in PhoneAccountHandle account);
void conference(String callId);
diff --git a/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl b/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
index 59393ed..d407c45 100644
--- a/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
+++ b/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
@@ -17,7 +17,7 @@
package com.android.internal.telecomm;
import android.content.ComponentName;
-import android.telecomm.PhoneAccount;
+import android.telecomm.PhoneAccountHandle;
import android.telecomm.PhoneAccountMetadata;
/**
@@ -36,17 +36,17 @@ interface ITelecommService {
/**
* @see TelecommManager#getDefaultOutgoingPhoneAccount
*/
- PhoneAccount getDefaultOutgoingPhoneAccount();
+ PhoneAccountHandle getDefaultOutgoingPhoneAccount();
/**
* @see TelecommManager#getEnabledPhoneAccounts
*/
- List<PhoneAccount> getEnabledPhoneAccounts();
+ List<PhoneAccountHandle> getEnabledPhoneAccounts();
/**
* @see TelecommManager#getPhoneAccountMetadata
*/
- PhoneAccountMetadata getPhoneAccountMetadata(in PhoneAccount account);
+ PhoneAccountMetadata getPhoneAccountMetadata(in PhoneAccountHandle account);
/**
* @see TelecommManager#registerPhoneAccount
@@ -56,7 +56,7 @@ interface ITelecommService {
/**
* @see TelecommManager#unregisterPhoneAccount
*/
- void unregisterPhoneAccount(in PhoneAccount account);
+ void unregisterPhoneAccount(in PhoneAccountHandle account);
/**
* @see TelecommManager#clearAccounts