diff options
Diffstat (limited to 'telecomm/java/android/telecom/TelecomManager.java')
-rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 59 |
1 files changed, 10 insertions, 49 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index ab7864b..60b9cb9 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -55,8 +55,6 @@ public class TelecomManager { * Input: get*Extra field {@link #EXTRA_PHONE_ACCOUNT_HANDLE} contains the component name of the * {@link android.telecom.ConnectionService} that Telecom should bind to. Telecom will then * ask the connection service for more information about the call prior to showing any UI. - * - * @hide */ public static final String ACTION_INCOMING_CALL = "android.telecom.action.INCOMING_CALL"; @@ -97,9 +95,7 @@ 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"; @@ -145,10 +141,7 @@ public class TelecomManager { * Optional extra for {@link #ACTION_INCOMING_CALL} containing a {@link Bundle} which contains * metadata about the call. This {@link Bundle} will be returned to the * {@link ConnectionService}. - * - * @hide */ - @SystemApi public static final String EXTRA_INCOMING_CALL_EXTRAS = "android.telecom.extra.INCOMING_CALL_EXTRAS"; @@ -221,9 +214,7 @@ 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"; /** @@ -364,9 +355,7 @@ 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()) { @@ -419,7 +408,6 @@ public class TelecomManager { * {@code null}, indicating that there currently exists no user-chosen default * {@code PhoneAccount}. * @return The phone account handle of the current sim call manager. - * @hide */ public PhoneAccountHandle getSimCallManager() { try { @@ -532,19 +520,6 @@ public class TelecomManager { } /** - * Determine whether the device has more than one account registered that can make and receive - * phone calls. - * - * @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; - } - - /** * Returns a list of all {@link PhoneAccount}s registered for the calling package. * * @return A list of {@code PhoneAccountHandle} objects. @@ -647,10 +622,7 @@ 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()) { @@ -665,9 +637,7 @@ 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()) { @@ -683,6 +653,15 @@ public class TelecomManager { * @hide */ @SystemApi + public void clearPhoneAccounts() { + clearAccounts(); + } + /** + * Remove all Accounts that belong to the calling package from the system. + * @deprecated Use {@link #clearPhoneAccounts()} instead. + * @hide + */ + @SystemApi public void clearAccounts() { try { if (isServiceConnected()) { @@ -728,10 +707,7 @@ public class TelecomManager { * * @param accountHandle The handle for the account to check the voicemail number against * @param number The number to look up. - * - * @hide */ - @SystemApi public boolean isVoiceMailNumber(PhoneAccountHandle accountHandle, String number) { try { if (isServiceConnected()) { @@ -748,10 +724,7 @@ public class TelecomManager { * * @param accountHandle The handle for the account to check for a voicemail number. * @return {@code true} If the given phone account has a voicemail number. - * - * @hide */ - @SystemApi public boolean hasVoiceMailNumber(PhoneAccountHandle accountHandle) { try { if (isServiceConnected()) { @@ -768,10 +741,7 @@ public class TelecomManager { * * @param accountHandle The handle for the account retrieve a number for. * @return A string representation of the line 1 phone number. - * - * @hide */ - @SystemApi public String getLine1Number(PhoneAccountHandle accountHandle) { try { if (isServiceConnected()) { @@ -881,10 +851,7 @@ public class TelecomManager { /** * Silences the ringer if a ringing call exists. - * - * @hide */ - @SystemApi public void silenceRinger() { try { if (isServiceConnected()) { @@ -945,9 +912,7 @@ 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()) { @@ -1017,10 +982,8 @@ 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) { + public boolean handleMmi(String dialString, PhoneAccountHandle accountHandle) { ITelecomService service = getTelecomService(); if (service != null) { try { @@ -1037,9 +1000,7 @@ 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) { |