From 78b57077d6b5373a2aad2170981bfef84786d1de Mon Sep 17 00:00:00 2001 From: Hall Liu Date: Mon, 17 Sep 2018 18:10:58 -0700 Subject: [PATCH] Mark old APIs as @removed Remove deprecated SystemApis as a part of a refactor. Bug: 115943523 Test: unit, manual Change-Id: Ic8955be6f57411ba18b5f049c6519d1c1d01d937 --- api/system-current.txt | 2 -- api/system-removed.txt | 9 +++++++++ .../android/telephony/TelephonyManager.java | 17 +++-------------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/api/system-current.txt b/api/system-current.txt index 1df9a466ddc7c..e3f52a0f2d215 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5230,7 +5230,6 @@ package android.telephony { } public class TelephonyManager { - method public deprecated void answerRingingCall(); method public deprecated void call(java.lang.String, java.lang.String); method public int checkCarrierPrivilegesForPackage(java.lang.String); method public int checkCarrierPrivilegesForPackageAnyPhone(java.lang.String); @@ -5238,7 +5237,6 @@ package android.telephony { method public boolean disableDataConnectivity(); method public boolean enableDataConnectivity(); method public void enableVideoCalling(boolean); - method public deprecated boolean endCall(); method public java.util.List getAllowedCarriers(int); method public java.util.List getCarrierPackageNamesForIntent(android.content.Intent); method public java.util.List getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int); diff --git a/api/system-removed.txt b/api/system-removed.txt index 961026b827e82..69ad3ea000180 100644 --- a/api/system-removed.txt +++ b/api/system-removed.txt @@ -143,3 +143,12 @@ package android.service.notification { } +package android.telephony { + + public class TelephonyManager { + method public deprecated void answerRingingCall(); + method public deprecated boolean endCall(); + } + +} + diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 2cc175c395e07..c86cc6fc62da4 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -6260,36 +6260,25 @@ public class TelephonyManager { /** * @deprecated Use {@link android.telecom.TelecomManager#endCall()} instead. * @hide + * @removed */ @Deprecated @SystemApi @RequiresPermission(android.Manifest.permission.CALL_PHONE) public boolean endCall() { - try { - ITelephony telephony = getITelephony(); - if (telephony != null) - return telephony.endCall(); - } catch (RemoteException e) { - Log.e(TAG, "Error calling ITelephony#endCall", e); - } return false; } /** * @deprecated Use {@link android.telecom.TelecomManager#acceptRingingCall} instead * @hide + * @removed */ @Deprecated @SystemApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void answerRingingCall() { - try { - ITelephony telephony = getITelephony(); - if (telephony != null) - telephony.answerRingingCall(); - } catch (RemoteException e) { - Log.e(TAG, "Error calling ITelephony#answerRingingCall", e); - } + } /**