diff options
author | 2018-05-09 16:22:44 +0000 | |
---|---|---|
committer | 2018-05-09 16:22:44 +0000 | |
commit | d63982cc030de12f94c7fae7ac7461e3d3c47b9c (patch) | |
tree | 92b33271e7b48e5b61cebaea1c08894a25bf7522 | |
parent | 6982bf4bde335a44f7557fbcf929c193b30bb9e9 (diff) | |
parent | f858a0e8d23e43fa815962f0c3edbef293d37f7f (diff) |
Merge "Make TelecomManager#endCall a public API."
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 15 |
2 files changed, 11 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt index b9ae49736b8c..07dc4d215830 100644 --- a/api/current.txt +++ b/api/current.txt @@ -39837,6 +39837,7 @@ package android.telecom { method public void addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle); method public void cancelMissedCallsNotification(); method public android.content.Intent createManageBlockedNumbersIntent(); + method public boolean endCall(); method public android.net.Uri getAdnUriForPhoneAccount(android.telecom.PhoneAccountHandle); method public java.util.List<android.telecom.PhoneAccountHandle> getCallCapablePhoneAccounts(); method public java.lang.String getDefaultDialerPackage(); diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 05a30205e6c8..99d47aa8c03e 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -1291,13 +1291,18 @@ public class TelecomManager { } /** - * Ends an ongoing call. - * TODO: L-release - need to convert all invocations of ITelecomService#endCall to use this - * method (clockwork & gearhead). - * @hide + * Ends the foreground call on the device. + * <p> + * 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}. + * + * @return {@code true} if there is a call which will be rejected or terminated, {@code false} + * otherwise. */ + @RequiresPermission(Manifest.permission.ANSWER_PHONE_CALLS) @SystemApi - @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean endCall() { try { if (isServiceConnected()) { |