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

Commit 9b490a16 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Call out IllegalArgumentException in docs for ImsMmTelManager

There are situations where the ImsMmTelManager APIs will
throw an IllegalArgumentException that were not explicitly called
out. These situations are now documented correctly.

Also internally moved to a SystemSpecificException that is
rethrown as an IllegalArgumentException in case we need to
add other Exception cases to the API.

Will follow up with API changes that deprecate the current
APIs and throw a checked exception instead.

Bug: 137222412
Bug: 137225292
Test: manual
Change-Id: I416b20dc4e7723c752cc028866348c97dbeeb5a8
parent 0eea7ac8
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.content.pm.PackageManager;
import android.telephony.SubscriptionManager;
import android.text.TextUtils;

import java.lang.annotation.Retention;
@@ -55,12 +56,23 @@ public final class ImsException extends Exception {
     */
    public static final int CODE_ERROR_UNSUPPORTED_OPERATION = 2;

    /**
     * The subscription ID associated with this operation is invalid or not active.
     * <p>
     * This is a configuration error and there should be no retry. The subscription used for this
     * operation is either invalid or has become inactive. The active subscriptions can be queried
     * with {@link SubscriptionManager#getActiveSubscriptionInfoList()}.
     * @hide
     */
    public static final int CODE_ERROR_INVALID_SUBSCRIPTION = 3;

    /**@hide*/
    @Retention(RetentionPolicy.SOURCE)
    @IntDef(prefix = "CODE_ERROR_", value = {
            CODE_ERROR_UNSPECIFIED,
            CODE_ERROR_SERVICE_UNAVAILABLE,
            CODE_ERROR_UNSUPPORTED_OPERATION
            CODE_ERROR_UNSUPPORTED_OPERATION,
            CODE_ERROR_INVALID_SUBSCRIPTION
    })
    public @interface ImsErrorCode {}

+162 −17

File changed.

Preview size limit exceeded, changes collapsed.