summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt34
-rw-r--r--core/java/android/provider/CallLog.java12
-rw-r--r--telecomm/java/android/telecomm/Call.java24
-rw-r--r--telecomm/java/android/telecomm/CallState.java6
-rw-r--r--telecomm/java/android/telecomm/ConnectionRequest.java14
-rw-r--r--telecomm/java/android/telecomm/ConnectionService.java4
-rw-r--r--telecomm/java/android/telecomm/InCallAdapter.java6
-rw-r--r--telecomm/java/android/telecomm/InCallCall.java16
-rw-r--r--telecomm/java/android/telecomm/PhoneAccount.aidl (renamed from telecomm/java/android/telecomm/PhoneAccountMetadata.aidl)2
-rw-r--r--telecomm/java/android/telecomm/PhoneAccount.java (renamed from telecomm/java/android/telecomm/PhoneAccountMetadata.java)75
-rw-r--r--telecomm/java/android/telecomm/RemoteConnectionManager.java19
-rw-r--r--telecomm/java/android/telecomm/RemoteConnectionService.java2
-rw-r--r--telecomm/java/android/telecomm/TelecommManager.java36
-rw-r--r--telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl2
-rw-r--r--telecomm/java/com/android/internal/telecomm/ITelecommService.aidl8
15 files changed, 129 insertions, 131 deletions
diff --git a/api/current.txt b/api/current.txt
index bd74f4d..1807ece 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -28312,7 +28312,7 @@ package android.telecomm {
}
public static class Call.Details {
- method public android.telecomm.PhoneAccountHandle getAccount();
+ method public android.telecomm.PhoneAccountHandle getAccountHandle();
method public java.lang.String getCallerDisplayName();
method public int getCallerDisplayNamePresentation();
method public int getCapabilities();
@@ -28498,7 +28498,7 @@ package android.telecomm {
public final class ConnectionRequest implements android.os.Parcelable {
ctor public ConnectionRequest(android.telecomm.PhoneAccountHandle, java.lang.String, android.net.Uri, int, android.os.Bundle, int);
method public int describeContents();
- method public android.telecomm.PhoneAccountHandle getAccount();
+ method public android.telecomm.PhoneAccountHandle getAccountHandle();
method public java.lang.String getCallId();
method public android.os.Bundle getExtras();
method public android.net.Uri getHandle();
@@ -28557,7 +28557,7 @@ package android.telecomm {
public final class InCallCall implements android.os.Parcelable {
method public int describeContents();
- method public android.telecomm.PhoneAccountHandle getAccount();
+ method public android.telecomm.PhoneAccountHandle getAccountHandle();
method public android.telecomm.RemoteCallVideoProvider getCallVideoProvider() throws android.os.RemoteException;
method public java.lang.String getCallerDisplayName();
method public int getCallerDisplayNamePresentation();
@@ -28602,19 +28602,10 @@ package android.telecomm {
method public void onCallRemoved(android.telecomm.Phone, android.telecomm.Call);
}
- public class PhoneAccountHandle implements android.os.Parcelable {
- ctor public PhoneAccountHandle(android.content.ComponentName, java.lang.String);
- method public int describeContents();
- method public android.content.ComponentName getComponentName();
- method public java.lang.String getId();
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator CREATOR;
- }
-
- public class PhoneAccountMetadata implements android.os.Parcelable {
- ctor public PhoneAccountMetadata(android.telecomm.PhoneAccountHandle, android.net.Uri, java.lang.String, int, int, java.lang.String, java.lang.String, boolean);
+ public class PhoneAccount implements android.os.Parcelable {
+ ctor public PhoneAccount(android.telecomm.PhoneAccountHandle, android.net.Uri, java.lang.String, int, int, java.lang.String, java.lang.String, boolean);
method public int describeContents();
- method public android.telecomm.PhoneAccountHandle getAccount();
+ method public android.telecomm.PhoneAccountHandle getAccountHandle();
method public int getCapabilities();
method public android.net.Uri getHandle();
method public android.graphics.drawable.Drawable getIcon(android.content.Context);
@@ -28630,6 +28621,15 @@ package android.telecomm {
field public static final android.os.Parcelable.Creator CREATOR;
}
+ public class PhoneAccountHandle implements android.os.Parcelable {
+ ctor public PhoneAccountHandle(android.content.ComponentName, java.lang.String);
+ method public int describeContents();
+ method public android.content.ComponentName getComponentName();
+ method public java.lang.String getId();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator CREATOR;
+ }
+
public class RemoteCallVideoClient implements android.os.IBinder.DeathRecipient {
method public void binderDied();
method public void handleCallSessionEvent(int) throws android.os.RemoteException;
@@ -28722,8 +28722,8 @@ package android.telecomm {
method public void clearAccounts(java.lang.String);
method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount();
method public java.util.List<android.telecomm.PhoneAccountHandle> getEnabledPhoneAccounts();
- method public android.telecomm.PhoneAccountMetadata getPhoneAccountMetadata(android.telecomm.PhoneAccountHandle);
- method public void registerPhoneAccount(android.telecomm.PhoneAccountMetadata);
+ method public android.telecomm.PhoneAccount getPhoneAccount(android.telecomm.PhoneAccountHandle);
+ method public void registerPhoneAccount(android.telecomm.PhoneAccount);
method public void unregisterPhoneAccount(android.telecomm.PhoneAccountHandle);
field public static final java.lang.String ACTION_CONNECTION_SERVICE;
field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.intent.action.CONNECTION_SERVICE_CONFIGURE";
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index 023988c..1a30c67 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -343,7 +343,7 @@ public class CallLog {
* "allowed", "payphone", "restricted" or "unknown"
* @param callType enumerated values for "incoming", "outgoing", or "missed"
* @param features features of the call (e.g. Video).
- * @param account The account object describing the provider of the call
+ * @param accountHandle The accountHandle object identifying the provider of the call
* @param start time stamp for the call in milliseconds
* @param duration call duration in seconds
* @param dataUsage data usage for the call in bytes, null if data usage was not tracked for
@@ -352,7 +352,7 @@ public class CallLog {
* {@hide}
*/
public static Uri addCall(CallerInfo ci, Context context, String number,
- int presentation, int callType, int features, PhoneAccountHandle account,
+ int presentation, int callType, int features, PhoneAccountHandle accountHandle,
long start, int duration, Long dataUsage) {
final ContentResolver resolver = context.getContentResolver();
int numberPresentation = PRESENTATION_ALLOWED;
@@ -377,12 +377,12 @@ public class CallLog {
}
}
- // account information
+ // accountHandle information
String accountComponentString = null;
String accountId = null;
- if (account != null) {
- accountComponentString = account.getComponentName().flattenToString();
- accountId = account.getId();
+ if (accountHandle != null) {
+ accountComponentString = accountHandle.getComponentName().flattenToString();
+ accountId = accountHandle.getId();
}
ContentValues values = new ContentValues(6);
diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java
index b1175f2..f982a44 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 PhoneAccountHandle mAccount;
+ private final PhoneAccountHandle mAccountHandle;
private final int mCapabilities;
private final int mDisconnectCauseCode;
private final String mDisconnectCauseMsg;
@@ -117,8 +117,8 @@ public final class Call {
* @return The {@code PhoneAccountHandle} whereby the {@code Call} is currently being
* routed.
*/
- public PhoneAccountHandle getAccount() {
- return mAccount;
+ public PhoneAccountHandle getAccountHandle() {
+ return mAccountHandle;
}
/**
@@ -185,7 +185,7 @@ public final class Call {
Objects.equals(mCallerDisplayName, d.mCallerDisplayName) &&
Objects.equals(mCallerDisplayNamePresentation,
d.mCallerDisplayNamePresentation) &&
- Objects.equals(mAccount, d.mAccount) &&
+ Objects.equals(mAccountHandle, d.mAccountHandle) &&
Objects.equals(mCapabilities, d.mCapabilities) &&
Objects.equals(mDisconnectCauseCode, d.mDisconnectCauseCode) &&
Objects.equals(mDisconnectCauseMsg, d.mDisconnectCauseMsg) &&
@@ -204,7 +204,7 @@ public final class Call {
Objects.hashCode(mHandlePresentation) +
Objects.hashCode(mCallerDisplayName) +
Objects.hashCode(mCallerDisplayNamePresentation) +
- Objects.hashCode(mAccount) +
+ Objects.hashCode(mAccountHandle) +
Objects.hashCode(mCapabilities) +
Objects.hashCode(mDisconnectCauseCode) +
Objects.hashCode(mDisconnectCauseMsg) +
@@ -220,7 +220,7 @@ public final class Call {
int handlePresentation,
String callerDisplayName,
int callerDisplayNamePresentation,
- PhoneAccountHandle account,
+ PhoneAccountHandle accountHandle,
int capabilities,
int disconnectCauseCode,
String disconnectCauseMsg,
@@ -232,7 +232,7 @@ public final class Call {
mHandlePresentation = handlePresentation;
mCallerDisplayName = callerDisplayName;
mCallerDisplayNamePresentation = callerDisplayNamePresentation;
- mAccount = account;
+ mAccountHandle = accountHandle;
mCapabilities = capabilities;
mDisconnectCauseCode = disconnectCauseCode;
mDisconnectCauseMsg = disconnectCauseMsg;
@@ -458,11 +458,11 @@ public final class Call {
}
/**
- * Notifies this {@code Call} the a {@code PhoneAccountHandle} has been selected and to proceed
- * with placing an outgoing call.
+ * Notifies this {@code Call} that an account has been selected and to proceed with placing
+ * an outgoing call.
*/
- public void phoneAccountSelected(PhoneAccountHandle account) {
- mInCallAdapter.phoneAccountSelected(mTelecommCallId, account);
+ public void phoneAccountSelected(PhoneAccountHandle accountHandle) {
+ mInCallAdapter.phoneAccountSelected(mTelecommCallId, accountHandle);
}
@@ -589,7 +589,7 @@ public final class Call {
inCallCall.getHandlePresentation(),
inCallCall.getCallerDisplayName(),
inCallCall.getCallerDisplayNamePresentation(),
- inCallCall.getAccount(),
+ inCallCall.getAccountHandle(),
inCallCall.getCapabilities(),
inCallCall.getDisconnectCauseCode(),
inCallCall.getDisconnectCauseMsg(),
diff --git a/telecomm/java/android/telecomm/CallState.java b/telecomm/java/android/telecomm/CallState.java
index e5c1613..9cb05db 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 PhoneAccountHandle} is
- * set, this is the state where the InCallUI is waiting for the user to select a
- * {@link PhoneAccountHandle} to call from.
+ * 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.
*/
PRE_DIAL_WAIT,
diff --git a/telecomm/java/android/telecomm/ConnectionRequest.java b/telecomm/java/android/telecomm/ConnectionRequest.java
index 7a907fb..4d945a3 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 PhoneAccountHandle mAccount;
+ private final PhoneAccountHandle mAccountHandle;
private final String mCallId;
private final Uri mHandle;
private final int mHandlePresentation;
@@ -38,7 +38,7 @@ public final class ConnectionRequest implements Parcelable {
private final int mVideoState;
/**
- * @param account The account which should be used to place the call.
+ * @param accountHandle The accountHandle which should be used to place the call.
* @param callId An identifier for this call.
* @param handle The handle (e.g., phone number) to which the {@link Connection} is to connect.
* @param handlePresentation The {@link CallPropertyPresentation} which controls how the handle
@@ -47,13 +47,13 @@ public final class ConnectionRequest implements Parcelable {
* @param videoState Determines the video state for the connection.
*/
public ConnectionRequest(
- PhoneAccountHandle account,
+ PhoneAccountHandle accountHandle,
String callId,
Uri handle,
int handlePresentation,
Bundle extras,
int videoState) {
- mAccount = account;
+ mAccountHandle = accountHandle;
mCallId = callId;
mHandle = handle;
mHandlePresentation = handlePresentation;
@@ -62,7 +62,7 @@ public final class ConnectionRequest implements Parcelable {
}
private ConnectionRequest(Parcel in) {
- mAccount = in.readParcelable(getClass().getClassLoader());
+ mAccountHandle = in.readParcelable(getClass().getClassLoader());
mCallId = in.readString();
mHandle = in.readParcelable(getClass().getClassLoader());
mHandlePresentation = in.readInt();
@@ -73,7 +73,7 @@ public final class ConnectionRequest implements Parcelable {
/**
* The account which should be used to place the call.
*/
- public PhoneAccountHandle getAccount() { return mAccount; }
+ public PhoneAccountHandle getAccountHandle() { return mAccountHandle; }
/**
* An identifier for this call.
@@ -140,7 +140,7 @@ public final class ConnectionRequest implements Parcelable {
@Override
public void writeToParcel(Parcel destination, int flags) {
- destination.writeParcelable(mAccount, 0);
+ destination.writeParcelable(mAccountHandle, 0);
destination.writeString(mCallId);
destination.writeParcelable(mHandle, 0);
destination.writeInt(mHandlePresentation);
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java
index a6b01a7..c8a548d 100644
--- a/telecomm/java/android/telecomm/ConnectionService.java
+++ b/telecomm/java/android/telecomm/ConnectionService.java
@@ -281,7 +281,7 @@ public abstract class ConnectionService extends Service {
break;
}
case MSG_ON_PHONE_ACCOUNT_CLICKED:
- onPhoneAccountClicked((String) msg.obj);
+ onPhoneAccountHandleClicked((String) msg.obj);
break;
default:
break;
@@ -553,7 +553,7 @@ public abstract class ConnectionService extends Service {
findConnectionForAction(callId, "stopDtmfTone").onPostDialContinue(proceed);
}
- private void onPhoneAccountClicked(String callId) {
+ private void onPhoneAccountHandleClicked(String callId) {
Log.d(this, "onPhoneAccountClicked %s", callId);
findConnectionForAction(callId, "onPhoneAccountClicked").onPhoneAccountClicked();
}
diff --git a/telecomm/java/android/telecomm/InCallAdapter.java b/telecomm/java/android/telecomm/InCallAdapter.java
index 0b8a75d..816c456 100644
--- a/telecomm/java/android/telecomm/InCallAdapter.java
+++ b/telecomm/java/android/telecomm/InCallAdapter.java
@@ -204,11 +204,11 @@ public final class InCallAdapter {
* Instructs Telecomm to add a PhoneAccountHandle to the specified call
*
* @param callId The identifier of the call
- * @param account The PhoneAccountHandle through which to place the call
+ * @param accountHandle The PhoneAccountHandle through which to place the call
*/
- public void phoneAccountSelected(String callId, PhoneAccountHandle account) {
+ public void phoneAccountSelected(String callId, PhoneAccountHandle accountHandle) {
try {
- mAdapter.phoneAccountSelected(callId, account);
+ mAdapter.phoneAccountSelected(callId, accountHandle);
} catch (RemoteException e) {
}
}
diff --git a/telecomm/java/android/telecomm/InCallCall.java b/telecomm/java/android/telecomm/InCallCall.java
index e5269f9..34d09f3 100644
--- a/telecomm/java/android/telecomm/InCallCall.java
+++ b/telecomm/java/android/telecomm/InCallCall.java
@@ -43,7 +43,7 @@ public final class InCallCall implements Parcelable {
private final String mCallerDisplayName;
private final int mCallerDisplayNamePresentation;
private final GatewayInfo mGatewayInfo;
- private final PhoneAccountHandle mAccount;
+ private final PhoneAccountHandle mAccountHandle;
private final ICallVideoProvider mCallVideoProvider;
private RemoteCallVideoProvider mRemoteCallVideoProvider;
private final String mParentCallId;
@@ -65,7 +65,7 @@ public final class InCallCall implements Parcelable {
String callerDisplayName,
int callerDisplayNamePresentation,
GatewayInfo gatewayInfo,
- PhoneAccountHandle account,
+ PhoneAccountHandle accountHandle,
ICallVideoProvider callVideoProvider,
String parentCallId,
List<String> childCallIds,
@@ -83,7 +83,7 @@ public final class InCallCall implements Parcelable {
mCallerDisplayName = callerDisplayName;
mCallerDisplayNamePresentation = callerDisplayNamePresentation;
mGatewayInfo = gatewayInfo;
- mAccount = account;
+ mAccountHandle = accountHandle;
mCallVideoProvider = callVideoProvider;
mParentCallId = parentCallId;
mChildCallIds = childCallIds;
@@ -160,8 +160,8 @@ public final class InCallCall implements Parcelable {
}
/** PhoneAccountHandle information for the call. */
- public PhoneAccountHandle getAccount() {
- return mAccount;
+ public PhoneAccountHandle getAccountHandle() {
+ return mAccountHandle;
}
/**
@@ -233,7 +233,7 @@ public final class InCallCall implements Parcelable {
String callerDisplayName = source.readString();
int callerDisplayNamePresentation = source.readInt();
GatewayInfo gatewayInfo = source.readParcelable(classLoader);
- PhoneAccountHandle account = source.readParcelable(classLoader);
+ PhoneAccountHandle accountHandle = source.readParcelable(classLoader);
ICallVideoProvider callVideoProvider =
ICallVideoProvider.Stub.asInterface(source.readStrongBinder());
String parentCallId = source.readString();
@@ -244,7 +244,7 @@ public final class InCallCall implements Parcelable {
return new InCallCall(id, state, disconnectCauseCode, disconnectCauseMsg,
cannedSmsResponses, capabilities, connectTimeMillis, handle, handlePresentation,
callerDisplayName, callerDisplayNamePresentation, gatewayInfo,
- account, callVideoProvider, parentCallId, childCallIds, statusHints,
+ accountHandle, callVideoProvider, parentCallId, childCallIds, statusHints,
videoState);
}
@@ -275,7 +275,7 @@ public final class InCallCall implements Parcelable {
destination.writeString(mCallerDisplayName);
destination.writeInt(mCallerDisplayNamePresentation);
destination.writeParcelable(mGatewayInfo, 0);
- destination.writeParcelable(mAccount, 0);
+ destination.writeParcelable(mAccountHandle, 0);
destination.writeStrongBinder(
mCallVideoProvider != null ? mCallVideoProvider.asBinder() : null);
destination.writeString(mParentCallId);
diff --git a/telecomm/java/android/telecomm/PhoneAccountMetadata.aidl b/telecomm/java/android/telecomm/PhoneAccount.aidl
index 55b8900..15377df 100644
--- a/telecomm/java/android/telecomm/PhoneAccountMetadata.aidl
+++ b/telecomm/java/android/telecomm/PhoneAccount.aidl
@@ -19,4 +19,4 @@ package android.telecomm;
/**
* {@hide}
*/
-parcelable PhoneAccountMetadata;
+parcelable PhoneAccount;
diff --git a/telecomm/java/android/telecomm/PhoneAccountMetadata.java b/telecomm/java/android/telecomm/PhoneAccount.java
index a81260a..3f4dbfe 100644
--- a/telecomm/java/android/telecomm/PhoneAccountMetadata.java
+++ b/telecomm/java/android/telecomm/PhoneAccount.java
@@ -26,15 +26,12 @@ import android.os.Parcelable;
import java.util.MissingResourceException;
/**
- * Provides user interface description information for a {@code PhoneAccountHandle}.
- *
- * TODO: Per feedback from API Council, rename to "PhoneAccountHandle". See also comment on class
- * PhoneAccountHandle.
+ * Provides user interface description information for a {@code PhoneAccount}.
*/
-public class PhoneAccountMetadata implements Parcelable {
+public class PhoneAccount implements Parcelable {
/**
- * Flag indicating that this {@code PhoneAccountHandle} can act as a call manager for
+ * 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
@@ -48,7 +45,7 @@ public class PhoneAccountMetadata implements Parcelable {
public static final int CAPABILITY_SIM_CALL_MANAGER = 0x1;
/**
- * Flag indicating that this {@code PhoneAccountHandle} can make phone calls in place of
+ * 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
@@ -59,14 +56,14 @@ public class PhoneAccountMetadata implements Parcelable {
public static final int CAPABILITY_CALL_PROVIDER = 0x2;
/**
- * Flag indicating that this {@code PhoneAccountHandle} represents built-in PSTN SIM
+ * Flag indicating that this {@code PhoneAccount} 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 PhoneAccountHandle mAccount;
+ private final PhoneAccountHandle mAccountHandle;
private final Uri mHandle;
private final String mSubscriptionNumber;
private final int mCapabilities;
@@ -75,7 +72,7 @@ public class PhoneAccountMetadata implements Parcelable {
private final String mShortDescription;
private boolean mVideoCallingSupported;
- public PhoneAccountMetadata(
+ public PhoneAccount(
PhoneAccountHandle account,
Uri handle,
String subscriptionNumber,
@@ -84,7 +81,7 @@ public class PhoneAccountMetadata implements Parcelable {
String label,
String shortDescription,
boolean supportsVideoCalling) {
- mAccount = account;
+ mAccountHandle = account;
mHandle = handle;
mSubscriptionNumber = subscriptionNumber;
mCapabilities = capabilities;
@@ -99,15 +96,15 @@ public class PhoneAccountMetadata implements Parcelable {
*
* @return A {@code PhoneAccountHandle}.
*/
- public PhoneAccountHandle getAccount() {
- return mAccount;
+ public PhoneAccountHandle getAccountHandle() {
+ return mAccountHandle;
}
/**
- * The handle (e.g., a phone number) associated with this {@code PhoneAccountHandle}. This
- * represents the destination from which outgoing calls using this {@code PhoneAccountHandle}
+ * 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 PhoneAccountHandle} may be addressed.
+ * {@code PhoneAccount} may be addressed.
*
* @return A handle expressed as a {@code Uri}, for example, a phone number.
*/
@@ -127,34 +124,34 @@ public class PhoneAccountMetadata implements Parcelable {
}
/**
- * The capabilities of this {@code PhoneAccountHandle}.
+ * The capabilities of this {@code PhoneAccount}.
*
- * @return A bit field of flags describing this {@code PhoneAccountHandle}'s capabilities.
+ * @return A bit field of flags describing this {@code PhoneAccount}'s capabilities.
*/
public int getCapabilities() {
return mCapabilities;
}
/**
- * A short string label describing a {@code PhoneAccountHandle}.
+ * A short string label describing a {@code PhoneAccount}.
*
- * @return A label for this {@code PhoneAccountHandle}.
+ * @return A label for this {@code PhoneAccount}.
*/
public String getLabel() {
return mLabel;
}
/**
- * A short paragraph describing a {@code PhoneAccountHandle}.
+ * A short paragraph describing a {@code PhoneAccount}.
*
- * @return A description for this {@code PhoneAccountHandle}.
+ * @return A description for this {@code PhoneAccount}.
*/
public String getShortDescription() {
return mShortDescription;
}
/**
- * The icon resource ID for the icon of this {@code PhoneAccountHandle}.
+ * The icon resource ID for the icon of this {@code PhoneAccount}.
*
* @return A resource ID.
*/
@@ -163,9 +160,9 @@ public class PhoneAccountMetadata implements Parcelable {
}
/**
- * An icon to represent this {@code PhoneAccountHandle} in a user interface.
+ * An icon to represent this {@code PhoneAccount} in a user interface.
*
- * @return An icon for this {@code PhoneAccountHandle}.
+ * @return An icon for this {@code PhoneAccount}.
*/
public Drawable getIcon(Context context) {
return getIcon(context, mIconResId);
@@ -175,24 +172,24 @@ public class PhoneAccountMetadata implements Parcelable {
Context packageContext;
try {
packageContext = context.createPackageContext(
- mAccount.getComponentName().getPackageName(), 0);
+ mAccountHandle.getComponentName().getPackageName(), 0);
} catch (PackageManager.NameNotFoundException e) {
- Log.w(this, "Cannot find package %s", mAccount.getComponentName().getPackageName());
+ Log.w(this, "Cannot find package %s", mAccountHandle.getComponentName().getPackageName());
return null;
}
try {
return packageContext.getResources().getDrawable(resId);
} catch (MissingResourceException e) {
Log.e(this, e, "Cannot find icon %d in package %s",
- resId, mAccount.getComponentName().getPackageName());
+ resId, mAccountHandle.getComponentName().getPackageName());
return null;
}
}
/**
- * Determines whether this {@code PhoneAccountHandle} supports video calling.
+ * Determines whether this {@code PhoneAccount} supports video calling.
*
- * @return {@code true} if this {@code PhoneAccountHandle} supports video calling.
+ * @return {@code true} if this {@code PhoneAccount} supports video calling.
*/
public boolean isVideoCallingSupported() {
return mVideoCallingSupported;
@@ -209,7 +206,7 @@ public class PhoneAccountMetadata implements Parcelable {
@Override
public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(mAccount, 0);
+ out.writeParcelable(mAccountHandle, 0);
out.writeParcelable(mHandle, 0);
out.writeString(mSubscriptionNumber);
out.writeInt(mCapabilities);
@@ -219,21 +216,21 @@ public class PhoneAccountMetadata implements Parcelable {
out.writeInt(mVideoCallingSupported ? 1 : 0);
}
- public static final Creator<PhoneAccountMetadata> CREATOR
- = new Creator<PhoneAccountMetadata>() {
+ public static final Creator<PhoneAccount> CREATOR
+ = new Creator<PhoneAccount>() {
@Override
- public PhoneAccountMetadata createFromParcel(Parcel in) {
- return new PhoneAccountMetadata(in);
+ public PhoneAccount createFromParcel(Parcel in) {
+ return new PhoneAccount(in);
}
@Override
- public PhoneAccountMetadata[] newArray(int size) {
- return new PhoneAccountMetadata[size];
+ public PhoneAccount[] newArray(int size) {
+ return new PhoneAccount[size];
}
};
- private PhoneAccountMetadata(Parcel in) {
- mAccount = in.readParcelable(getClass().getClassLoader());
+ private PhoneAccount(Parcel in) {
+ mAccountHandle = in.readParcelable(getClass().getClassLoader());
mHandle = in.readParcelable(getClass().getClassLoader());
mSubscriptionNumber = in.readString();
mCapabilities = in.readInt();
diff --git a/telecomm/java/android/telecomm/RemoteConnectionManager.java b/telecomm/java/android/telecomm/RemoteConnectionManager.java
index eac9200..b2d3dc7 100644
--- a/telecomm/java/android/telecomm/RemoteConnectionManager.java
+++ b/telecomm/java/android/telecomm/RemoteConnectionManager.java
@@ -45,27 +45,28 @@ public class RemoteConnectionManager {
}
List<PhoneAccountHandle> getAccounts(Uri handle) {
- List<PhoneAccountHandle> accounts = new LinkedList<>();
- Log.d(this, "Getting accounts: " + mRemoteConnectionServices.keySet());
+ List<PhoneAccountHandle> accountHandles = new LinkedList<>();
+ Log.d(this, "Getting accountHandles: " + mRemoteConnectionServices.keySet());
for (RemoteConnectionService remoteService : mRemoteConnectionServices.values()) {
// TODO(santoscordon): Eventually this will be async.
- accounts.addAll(remoteService.lookupAccounts(handle));
+ accountHandles.addAll(remoteService.lookupAccounts(handle));
}
- return accounts;
+ return accountHandles;
}
public void createRemoteConnection(
ConnectionRequest request,
ConnectionService.CreateConnectionResponse response,
boolean isIncoming) {
- PhoneAccountHandle account = request.getAccount();
- if (account == null) {
- throw new IllegalArgumentException("account must be specified.");
+ PhoneAccountHandle accountHandle = request.getAccountHandle();
+ if (accountHandle == null) {
+ throw new IllegalArgumentException("accountHandle must be specified.");
}
- ComponentName componentName = request.getAccount().getComponentName();
+ ComponentName componentName = request.getAccountHandle().getComponentName();
if (!mRemoteConnectionServices.containsKey(componentName)) {
- throw new UnsupportedOperationException("account not supported: " + componentName);
+ throw new UnsupportedOperationException("accountHandle not supported: "
+ + componentName);
} else {
RemoteConnectionService remoteService = mRemoteConnectionServices.get(componentName);
remoteService.createRemoteConnection(request, response, isIncoming);
diff --git a/telecomm/java/android/telecomm/RemoteConnectionService.java b/telecomm/java/android/telecomm/RemoteConnectionService.java
index 9ec39ca..29461af 100644
--- a/telecomm/java/android/telecomm/RemoteConnectionService.java
+++ b/telecomm/java/android/telecomm/RemoteConnectionService.java
@@ -420,7 +420,7 @@ final class RemoteConnectionService implements DeathRecipient {
if (mConnectionId == null) {
String id = UUID.randomUUID().toString();
ConnectionRequest newRequest = new ConnectionRequest(
- request.getAccount(),
+ request.getAccountHandle(),
id,
request.getHandle(),
request.getHandlePresentation(),
diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecomm/TelecommManager.java
index 32ef570..4060742 100644
--- a/telecomm/java/android/telecomm/TelecommManager.java
+++ b/telecomm/java/android/telecomm/TelecommManager.java
@@ -247,12 +247,12 @@ public class TelecommManager {
}
/**
- * 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
+ * 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
* 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 PhoneAccountHandle}. In this case, apps
+ * 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_HANDLE}, or present the user with an affordance
@@ -261,7 +261,7 @@ public class TelecommManager {
* An {@link android.content.Intent#ACTION_CALL} or {@link android.content.Intent#ACTION_DIAL}
* {@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}.
+ * affordance, if necessary, to choose a {@code PhoneAccount}.
*/
public PhoneAccountHandle getDefaultOutgoingPhoneAccount() {
try {
@@ -293,33 +293,33 @@ public class TelecommManager {
}
/**
- * Return the metadata for a specified {@link PhoneAccountHandle}. Metadata includes resources
- * which can be used in a user interface.
+ * Return the {@link PhoneAccount} for a specified {@link PhoneAccountHandle}. Object includes
+ * resources which can be used in a user interface.
*
* @param account The {@link PhoneAccountHandle}.
*
- * @return The metadata for the account.
+ * @return The {@link PhoneAccount} object.
*/
- public PhoneAccountMetadata getPhoneAccountMetadata(PhoneAccountHandle account) {
+ public PhoneAccount getPhoneAccount(PhoneAccountHandle account) {
try {
if (isServiceConnected()) {
- return getTelecommService().getPhoneAccountMetadata(account);
+ return getTelecommService().getPhoneAccount(account);
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#getPhoneAccountMetadata", e);
+ Log.e(TAG, "Error calling ITelecommService#getPhoneAccount", e);
}
return null;
}
/**
- * Register a {@link PhoneAccountHandle} for use by the system.
+ * Register a {@link PhoneAccount} for use by the system.
*
- * @param metadata The complete {@link PhoneAccountMetadata}.
+ * @param account The complete {@link PhoneAccount}.
*/
- public void registerPhoneAccount(PhoneAccountMetadata metadata) {
+ public void registerPhoneAccount(PhoneAccount account) {
try {
if (isServiceConnected()) {
- getTelecommService().registerPhoneAccount(metadata);
+ getTelecommService().registerPhoneAccount(account);
}
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelecommService#registerPhoneAccount", e);
@@ -327,14 +327,14 @@ public class TelecommManager {
}
/**
- * Remove a {@link PhoneAccountHandle} registration from the system.
+ * Remove a {@link PhoneAccount} registration from the system.
*
- * @param account An Account.
+ * @param accountHandle A {@link PhoneAccountHandle} for the {@link PhoneAccount} to unregister.
*/
- public void unregisterPhoneAccount(PhoneAccountHandle account) {
+ public void unregisterPhoneAccount(PhoneAccountHandle accountHandle) {
try {
if (isServiceConnected()) {
- getTelecommService().unregisterPhoneAccount(account);
+ getTelecommService().unregisterPhoneAccount(accountHandle);
}
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelecommService#unregisterPhoneAccount", e);
diff --git a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl b/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
index b014a10..17e14aa 100644
--- a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
@@ -49,7 +49,7 @@ oneway interface IInCallAdapter {
void phoneAccountClicked(String callId);
- void phoneAccountSelected(String callId, in PhoneAccountHandle account);
+ void phoneAccountSelected(String callId, in PhoneAccountHandle accountHandle);
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 d407c45..1536442 100644
--- a/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
+++ b/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
@@ -18,7 +18,7 @@ package com.android.internal.telecomm;
import android.content.ComponentName;
import android.telecomm.PhoneAccountHandle;
-import android.telecomm.PhoneAccountMetadata;
+import android.telecomm.PhoneAccount;
/**
* Interface used to interact with Telecomm. Mostly this is used by TelephonyManager for passing
@@ -44,14 +44,14 @@ interface ITelecommService {
List<PhoneAccountHandle> getEnabledPhoneAccounts();
/**
- * @see TelecommManager#getPhoneAccountMetadata
+ * @see TelecommManager#getPhoneAccount
*/
- PhoneAccountMetadata getPhoneAccountMetadata(in PhoneAccountHandle account);
+ PhoneAccount getPhoneAccount(in PhoneAccountHandle account);
/**
* @see TelecommManager#registerPhoneAccount
*/
- void registerPhoneAccount(in PhoneAccountMetadata metadata);
+ void registerPhoneAccount(in PhoneAccount metadata);
/**
* @see TelecommManager#unregisterPhoneAccount