Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f50009c authored by Brad Ebinger's avatar Brad Ebinger
Browse files

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
parent c0936945
Loading
Loading
Loading
Loading
+13 −5
Original line number Original line Diff line number Diff line
@@ -12239,9 +12239,10 @@ public class TelephonyManager {
     * @param subId Subscription ID
     * @param subId Subscription ID
     * @return true if IMS status is registered, false if the IMS status is not registered or a
     * @return true if IMS status is registered, false if the IMS status is not registered or a
     * RemoteException occurred.
     * RemoteException occurred.
     * Use {@link ImsMmTelManager.RegistrationCallback} instead.
     * @hide
     * @hide
     * @deprecated Use {@link ImsMmTelManager#getRegistrationState(Executor, Consumer)} instead.
     */
     */
    @Deprecated
    public boolean isImsRegistered(int subId) {
    public boolean isImsRegistered(int subId) {
        try {
        try {
            return getITelephony().isImsRegistered(subId);
            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
     * @return true if IMS status is registered, false if the IMS status is not registered or a
     * RemoteException occurred.
     * RemoteException occurred.
     * @see SubscriptionManager#getDefaultSubscriptionId()
     * @see SubscriptionManager#getDefaultSubscriptionId()
     * @deprecated Use {@link ImsMmTelManager#getRegistrationState(Executor, Consumer)} instead.
     * @hide
     * @hide
     */
     */
    @Deprecated
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    public boolean isImsRegistered() {
    public boolean isImsRegistered() {
       try {
       try {
@@ -12277,9 +12280,10 @@ public class TelephonyManager {
     * @return true if Voice over LTE is available or false if it is unavailable or unknown.
     * @return true if Voice over LTE is available or false if it is unavailable or unknown.
     * @see SubscriptionManager#getDefaultSubscriptionId()
     * @see SubscriptionManager#getDefaultSubscriptionId()
     * <p>
     * <p>
     * Use {@link ImsMmTelManager#isAvailable(int, int)} instead.
     * @Deprecated Use {@link ImsMmTelManager#isAvailable(int, int)} instead.
     * @hide
     * @hide
     */
     */
    @Deprecated
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    public boolean isVolteAvailable() {
    public boolean isVolteAvailable() {
        try {
        try {
@@ -12297,9 +12301,10 @@ public class TelephonyManager {
     * used during creation, the default subscription ID will be used. To query the
     * used during creation, the default subscription ID will be used. To query the
     * underlying technology that VT is available on, use {@link #getImsRegTechnologyForMmTel}.
     * underlying technology that VT is available on, use {@link #getImsRegTechnologyForMmTel}.
     * @return true if VT is available, or false if it is unavailable or unknown.
     * @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
     * @hide
     */
     */
    @Deprecated
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    public boolean isVideoTelephonyAvailable() {
    public boolean isVideoTelephonyAvailable() {
        try {
        try {
@@ -12313,9 +12318,10 @@ public class TelephonyManager {
     * Returns the Status of Wi-Fi calling (Voice over WiFi) for the subscription ID specified.
     * Returns the Status of Wi-Fi calling (Voice over WiFi) for the subscription ID specified.
     * @param subId the subscription ID.
     * @param subId the subscription ID.
     * @return true if VoWiFi is available, or false if it is unavailable or unknown.
     * @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
     * @hide
     */
     */
    @Deprecated
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    public boolean isWifiCallingAvailable() {
    public boolean isWifiCallingAvailable() {
       try {
       try {
@@ -12336,9 +12342,11 @@ public class TelephonyManager {
     *  other sim's internet, or
     *  other sim's internet, or
     *  - {@link ImsRegistrationImplBase#REGISTRATION_TECH_NONE} if we are not registered or the
     *  - {@link ImsRegistrationImplBase#REGISTRATION_TECH_NONE} if we are not registered or the
     *  result is unavailable.
     *  result is unavailable.
     *  Use {@link ImsMmTelManager.RegistrationCallback} instead.
     *  @Deprecated Use {@link ImsMmTelManager#registerImsRegistrationCallback(Executor, RegistrationCallback)}
     *      or {@link ImsMmTelManager#getRegistrationTransportType(Executor, Consumer)} instead.
     *  @hide
     *  @hide
     */
     */
    @Deprecated
    public @ImsRegistrationImplBase.ImsRegistrationTech int getImsRegTechnologyForMmTel() {
    public @ImsRegistrationImplBase.ImsRegistrationTech int getImsRegTechnologyForMmTel() {
        try {
        try {
            return getITelephony().getImsRegTechnologyForMmTel(getSubId());
            return getITelephony().getImsRegTechnologyForMmTel(getSubId());