summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/TelecomManager.java
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2020-11-16 12:06:52 -0800
committerJustin DeMartino <jjdemartino@google.com>2020-11-17 08:25:32 -0800
commitd3ff2de786af936a9af8739f5c98972804dd5823 (patch)
treeb7e582570fca298b4876aa354f668b9df334e67b /telecomm/java/android/telecom/TelecomManager.java
parentf2b9cf60566ebee53ce8453a093e964b60444c05 (diff)
parent5ba20685f9b25bcec335ed842f0da7f567cff5e9 (diff)
Merge SP1A.201116.001
Change-Id: I51f7864ca57206ba4034be7db7ae9f36d5c53f59
Diffstat (limited to 'telecomm/java/android/telecom/TelecomManager.java')
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java49
1 files changed, 14 insertions, 35 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 53c1b264bd02..0953808c603d 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -384,6 +384,14 @@ public class TelecomManager {
"android.telecom.extra.CALL_DISCONNECT_MESSAGE";
/**
+ * A string value for {@link #EXTRA_CALL_DISCONNECT_MESSAGE}, indicates the call was dropped by
+ * lower layers
+ * @hide
+ */
+ public static final String CALL_AUTO_DISCONNECT_MESSAGE_STRING =
+ "Call dropped by lower layers";
+
+ /**
* Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
* containing the component name of the associated connection service.
* @hide
@@ -1002,8 +1010,6 @@ public class TelecomManager {
* <p>
* If no {@link PhoneAccount} fits the criteria above, this method will return {@code null}.
*
- * Requires permission: {@link android.Manifest.permission#READ_PHONE_STATE}
- *
* @param uriScheme The URI scheme.
* @return The {@link PhoneAccountHandle} corresponding to the account to be used.
*/
@@ -1180,8 +1186,6 @@ public class TelecomManager {
* calls. The returned list includes only those accounts which have been explicitly enabled
* by the user.
*
- * Requires permission: {@link android.Manifest.permission#READ_PHONE_STATE}
- *
* @see #EXTRA_PHONE_ACCOUNT_HANDLE
* @return A list of {@code PhoneAccountHandle} objects.
*/
@@ -1252,7 +1256,7 @@ public class TelecomManager {
* @hide
*/
@SystemApi
- @SuppressLint("Doclava125")
+ @SuppressLint("RequiresPermission")
@Deprecated
public List<PhoneAccountHandle> getPhoneAccountsForPackage() {
try {
@@ -1381,7 +1385,7 @@ public class TelecomManager {
* @hide
*/
@SystemApi
- @SuppressLint("Doclava125")
+ @SuppressLint("RequiresPermission")
public void clearPhoneAccounts() {
clearAccounts();
}
@@ -1391,7 +1395,7 @@ public class TelecomManager {
* @hide
*/
@SystemApi
- @SuppressLint("Doclava125")
+ @SuppressLint("RequiresPermission")
public void clearAccounts() {
try {
if (isServiceConnected()) {
@@ -1423,7 +1427,7 @@ public class TelecomManager {
* @hide
*/
@SystemApi
- @SuppressLint("Doclava125")
+ @SuppressLint("RequiresPermission")
public ComponentName getDefaultPhoneApp() {
try {
if (isServiceConnected()) {
@@ -1484,9 +1488,6 @@ public class TelecomManager {
* the specified package does not correspond to an installed dialer, or is already
* the default dialer.
*
- * Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE}
- * Requires permission: {@link android.Manifest.permission#WRITE_SECURE_SETTINGS}
- *
* @hide
* @deprecated Use
* {@link android.app.role.RoleManager#addRoleHolderAsUser(String, String, int, UserHandle,
@@ -1530,8 +1531,6 @@ public class TelecomManager {
* Return whether a given phone number is the configured voicemail number for a
* particular phone account.
*
- * Requires permission: {@link android.Manifest.permission#READ_PHONE_STATE}
- *
* @param accountHandle The handle for the account to check the voicemail number against
* @param number The number to look up.
*/
@@ -1551,8 +1550,6 @@ public class TelecomManager {
/**
* Return the voicemail number for a given phone account.
*
- * Requires permission: {@link android.Manifest.permission#READ_PHONE_STATE}
- *
* @param accountHandle The handle for the phone account.
* @return The voicemail number for the phone account, and {@code null} if one has not been
* configured.
@@ -1604,8 +1601,6 @@ public class TelecomManager {
/**
* Returns whether there is an ongoing phone call (can be in dialing, ringing, active or holding
* states) originating from either a manager or self-managed {@link ConnectionService}.
- * <p>
- * Requires permission: {@link android.Manifest.permission#READ_PHONE_STATE}
*
* @return {@code true} if there is an ongoing call in either a managed or self-managed
* {@link ConnectionService}, {@code false} otherwise.
@@ -1654,8 +1649,6 @@ public class TelecomManager {
* <p>
* If you also need to know if there are ongoing self-managed calls, use {@link #isInCall()}
* instead.
- * <p>
- * Requires permission: {@link android.Manifest.permission#READ_PHONE_STATE}
*
* @return {@code true} if there is an ongoing call in a managed {@link ConnectionService},
* {@code false} otherwise.
@@ -1729,8 +1722,6 @@ public class TelecomManager {
* If there is a ringing call, calling this method rejects the ringing call. Otherwise the
* foreground call is ended.
* <p>
- * Requires permission {@link android.Manifest.permission#ANSWER_PHONE_CALLS}.
- * <p>
* Note: this method CANNOT be used to end ongoing emergency calls and will return {@code false}
* if an attempt is made to end an emergency call.
*
@@ -1760,9 +1751,6 @@ public class TelecomManager {
* the incoming call requests. This means, for example, that an incoming call requesting
* {@link VideoProfile#STATE_BIDIRECTIONAL} will be answered, accepting that state.
*
- * Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE} or
- * {@link android.Manifest.permission#ANSWER_PHONE_CALLS}
- *
* @deprecated Companion apps for wearable devices should use the {@link InCallService} API
* instead.
*/
@@ -1785,9 +1773,6 @@ public class TelecomManager {
* If there is a ringing incoming call, this method accepts the call on behalf of the user,
* with the specified video state.
*
- * Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE} or
- * {@link android.Manifest.permission#ANSWER_PHONE_CALLS}
- *
* @param videoState The desired video state to answer the call with.
* @deprecated Companion apps for wearable devices should use the {@link InCallService} API
* instead.
@@ -1999,8 +1984,6 @@ public class TelecomManager {
* Requires that the method-caller be set as the system dialer app.
* </p>
*
- * Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE}
- *
* @param dialString The digits to dial.
* @return True if the digits were processed as an MMI code, false otherwise.
*/
@@ -2025,8 +2008,6 @@ public class TelecomManager {
* Requires that the method-caller be set as the system dialer app.
* </p>
*
- * Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE}
- *
* @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.
@@ -2046,8 +2027,8 @@ public class TelecomManager {
}
/**
- * Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE}
- *
+ * Returns a URI (with the content:// scheme) specific to the specified {@link PhoneAccount}
+ * for ADN content retrieval.
* @param accountHandle The handle for the account to derive an adn query URI for or
* {@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}
@@ -2071,8 +2052,6 @@ public class TelecomManager {
* <p>
* Requires that the method-caller be set as the system dialer app.
* </p>
- *
- * Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE}
*/
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public void cancelMissedCallsNotification() {