From 2f50009c19955fe0cad4868182c289a65bdd0a5c Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Mon, 18 Nov 2024 20:32:33 +0000 Subject: Deprecate IMS TelephonyManager methods Deprecate the IMS methods in TelephonyManager and update docs to point users to the correct versions of those methods in ImsMmTelManager. Change-Id: Icfe4593036251a894824c042a29ead4af3c1ad2a Flag: EXEMPT dics only change Fixes: 316231661 Test: docs only change - presubmit --- telephony/java/android/telephony/TelephonyManager.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 6f2c8623fd71..9c961c1f0df0 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -12239,9 +12239,10 @@ public class TelephonyManager { * @param subId Subscription ID * @return true if IMS status is registered, false if the IMS status is not registered or a * RemoteException occurred. - * Use {@link ImsMmTelManager.RegistrationCallback} instead. * @hide + * @deprecated Use {@link ImsMmTelManager#getRegistrationState(Executor, Consumer)} instead. */ + @Deprecated public boolean isImsRegistered(int subId) { try { return getITelephony().isImsRegistered(subId); @@ -12259,8 +12260,10 @@ public class TelephonyManager { * @return true if IMS status is registered, false if the IMS status is not registered or a * RemoteException occurred. * @see SubscriptionManager#getDefaultSubscriptionId() + * @deprecated Use {@link ImsMmTelManager#getRegistrationState(Executor, Consumer)} instead. * @hide */ + @Deprecated @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public boolean isImsRegistered() { try { @@ -12277,9 +12280,10 @@ public class TelephonyManager { * @return true if Voice over LTE is available or false if it is unavailable or unknown. * @see SubscriptionManager#getDefaultSubscriptionId() *

- * Use {@link ImsMmTelManager#isAvailable(int, int)} instead. + * @Deprecated Use {@link ImsMmTelManager#isAvailable(int, int)} instead. * @hide */ + @Deprecated @UnsupportedAppUsage public boolean isVolteAvailable() { try { @@ -12297,9 +12301,10 @@ public class TelephonyManager { * used during creation, the default subscription ID will be used. To query the * underlying technology that VT is available on, use {@link #getImsRegTechnologyForMmTel}. * @return true if VT is available, or false if it is unavailable or unknown. - * Use {@link ImsMmTelManager#isAvailable(int, int)} instead. + * @Deprecated Use {@link ImsMmTelManager#isAvailable(int, int)} instead. * @hide */ + @Deprecated @UnsupportedAppUsage public boolean isVideoTelephonyAvailable() { try { @@ -12313,9 +12318,10 @@ public class TelephonyManager { * Returns the Status of Wi-Fi calling (Voice over WiFi) for the subscription ID specified. * @param subId the subscription ID. * @return true if VoWiFi is available, or false if it is unavailable or unknown. - * Use {@link ImsMmTelManager#isAvailable(int, int)} instead. + * @Deprecated Use {@link ImsMmTelManager#isAvailable(int, int)} instead. * @hide */ + @Deprecated @UnsupportedAppUsage public boolean isWifiCallingAvailable() { try { @@ -12336,9 +12342,11 @@ public class TelephonyManager { * other sim's internet, or * - {@link ImsRegistrationImplBase#REGISTRATION_TECH_NONE} if we are not registered or the * result is unavailable. - * Use {@link ImsMmTelManager.RegistrationCallback} instead. + * @Deprecated Use {@link ImsMmTelManager#registerImsRegistrationCallback(Executor, RegistrationCallback)} + * or {@link ImsMmTelManager#getRegistrationTransportType(Executor, Consumer)} instead. * @hide */ + @Deprecated public @ImsRegistrationImplBase.ImsRegistrationTech int getImsRegTechnologyForMmTel() { try { return getITelephony().getImsRegTechnologyForMmTel(getSubId()); -- cgit v1.2.3-59-g8ed1b