Merge "Make TelecomManager#endCall a public API." into pi-dev
am: 872a039ab3
Change-Id: Ic52e1705ce497b0a46bb4107ad854a8b939b38b0
This commit is contained in:
@@ -41426,6 +41426,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();
|
||||
|
||||
@@ -1299,13 +1299,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()) {
|
||||
|
||||
Reference in New Issue
Block a user