Merge "Update TelecommManager per API requirements. (1/3)" into lmp-dev
This commit is contained in:
@@ -28477,7 +28477,7 @@ package android.telecomm {
|
||||
public class TelecommManager {
|
||||
method public void addNewIncomingCall(android.telecomm.PhoneAccountHandle, android.os.Bundle);
|
||||
method public void cancelMissedCallsNotification();
|
||||
method public void clearAccounts(java.lang.String);
|
||||
method public void clearAccounts();
|
||||
method public android.telecomm.PhoneAccountHandle getConnectionManager();
|
||||
method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount(java.lang.String);
|
||||
method public java.util.List<android.telecomm.PhoneAccountHandle> getEnabledPhoneAccounts();
|
||||
@@ -28500,6 +28500,8 @@ package android.telecomm {
|
||||
field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecomm.extra.CONNECTION_SERVICE";
|
||||
field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telecomm.extra.PHONE_ACCOUNT_HANDLE";
|
||||
field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecomm.extra.START_CALL_WITH_SPEAKERPHONE";
|
||||
field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecomm.extra.GATEWAY_ORIGINAL_ADDRESS";
|
||||
field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecomm.extra.GATEWAY_PROVIDER_PACKAGE";
|
||||
field public static final int PRESENTATION_ALLOWED = 1; // 0x1
|
||||
field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
|
||||
field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
|
||||
|
||||
@@ -141,6 +141,30 @@ public class TelecommManager {
|
||||
public static final String EXTRA_CONNECTION_SERVICE =
|
||||
"android.telecomm.extra.CONNECTION_SERVICE";
|
||||
|
||||
/**
|
||||
* An optional {@link android.content.Intent#ACTION_CALL} intent extra denoting the
|
||||
* package name of the app specifying an alternative gateway for the call.
|
||||
* The value is a string.
|
||||
*
|
||||
* (The following comment corresponds to the all GATEWAY_* extras)
|
||||
* An app which sends the {@link android.content.Intent#ACTION_CALL} intent can specify an
|
||||
* alternative address to dial which is different from the one specified and displayed to
|
||||
* the user. This alternative address is referred to as the gateway address.
|
||||
*/
|
||||
public static final String GATEWAY_PROVIDER_PACKAGE =
|
||||
"android.telecomm.extra.GATEWAY_PROVIDER_PACKAGE";
|
||||
|
||||
/**
|
||||
* An optional {@link android.content.Intent#ACTION_CALL} intent extra corresponding to the
|
||||
* original address to dial for the call. This is used when an alternative gateway address is
|
||||
* provided to recall the original address.
|
||||
* The value is a {@link android.net.Uri}.
|
||||
*
|
||||
* (See {@link #GATEWAY_PROVIDER_PACKAGE} for details)
|
||||
*/
|
||||
public static final String GATEWAY_ORIGINAL_ADDRESS =
|
||||
"android.telecomm.extra.GATEWAY_ORIGINAL_ADDRESS";
|
||||
|
||||
/**
|
||||
* The number which the party on the other side of the line will see (and use to return the
|
||||
* call).
|
||||
@@ -288,7 +312,7 @@ public class TelecommManager {
|
||||
* <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
|
||||
* 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()}.
|
||||
@@ -579,15 +603,13 @@ public class TelecommManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all Accounts for a given package from the system.
|
||||
*
|
||||
* @param packageName A package name that may have registered Accounts.
|
||||
* Remove all Accounts that belong to the calling package from the system.
|
||||
*/
|
||||
@SystemApi
|
||||
public void clearAccounts(String packageName) {
|
||||
public void clearAccounts() {
|
||||
try {
|
||||
if (isServiceConnected()) {
|
||||
getTelecommService().clearAccounts(packageName);
|
||||
getTelecommService().clearAccounts(mContext.getPackageName());
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling ITelecommService#clearAccounts", e);
|
||||
|
||||
Reference in New Issue
Block a user