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

Commit 793af039 authored by Daniel Bright's avatar Daniel Bright
Browse files

Changed ApnThrottleStatus to ThrottleStatus

* Changed verbiage to be more generic at request of the API council

Bug: 175092152
Test: make & flash
Change-Id: I8bec64b0c38be94bcd3f3b99bcebfb378384c970
parent 366ef607
Loading
Loading
Loading
Loading
+29 −29
Original line number Original line Diff line number Diff line
@@ -11420,34 +11420,6 @@ package android.telephony.data {
    field public static final String TYPE_XCAP_STRING = "xcap";
    field public static final String TYPE_XCAP_STRING = "xcap";
  }
  }
  public final class ApnThrottleStatus implements android.os.Parcelable {
    method public int describeContents();
    method public int getApnType();
    method public int getRetryType();
    method public int getSlotIndex();
    method public long getThrottleExpiryTimeMillis();
    method public int getThrottleType();
    method public int getTransportType();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.ApnThrottleStatus> CREATOR;
    field public static final int RETRY_TYPE_HANDOVER = 3; // 0x3
    field public static final int RETRY_TYPE_NEW_CONNECTION = 2; // 0x2
    field public static final int RETRY_TYPE_NONE = 1; // 0x1
    field public static final int THROTTLE_TYPE_ELAPSED_TIME = 2; // 0x2
    field public static final int THROTTLE_TYPE_NONE = 1; // 0x1
  }
  public static final class ApnThrottleStatus.Builder {
    ctor public ApnThrottleStatus.Builder();
    method @NonNull public android.telephony.data.ApnThrottleStatus build();
    method @NonNull public android.telephony.data.ApnThrottleStatus.Builder setApnType(int);
    method @NonNull public android.telephony.data.ApnThrottleStatus.Builder setNoThrottle();
    method @NonNull public android.telephony.data.ApnThrottleStatus.Builder setRetryType(int);
    method @NonNull public android.telephony.data.ApnThrottleStatus.Builder setSlotIndex(int);
    method @NonNull public android.telephony.data.ApnThrottleStatus.Builder setThrottleExpiryTimeMillis(long);
    method @NonNull public android.telephony.data.ApnThrottleStatus.Builder setTransportType(int);
  }
  public final class DataCallResponse implements android.os.Parcelable {
  public final class DataCallResponse implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method @NonNull public java.util.List<android.net.LinkAddress> getAddresses();
    method @NonNull public java.util.List<android.net.LinkAddress> getAddresses();
@@ -11604,7 +11576,7 @@ package android.telephony.data {
    ctor public QualifiedNetworksService.NetworkAvailabilityProvider(int);
    ctor public QualifiedNetworksService.NetworkAvailabilityProvider(int);
    method public abstract void close();
    method public abstract void close();
    method public final int getSlotIndex();
    method public final int getSlotIndex();
    method public void reportApnThrottleStatusChanged(@NonNull java.util.List<android.telephony.data.ApnThrottleStatus>);
    method public void reportThrottleStatusChanged(@NonNull java.util.List<android.telephony.data.ThrottleStatus>);
    method public final void updateQualifiedNetworkTypes(int, @NonNull java.util.List<java.lang.Integer>);
    method public final void updateQualifiedNetworkTypes(int, @NonNull java.util.List<java.lang.Integer>);
  }
  }
@@ -11634,6 +11606,34 @@ package android.telephony.data {
    method @NonNull public android.telephony.data.SliceInfo.Builder setSliceServiceType(int);
    method @NonNull public android.telephony.data.SliceInfo.Builder setSliceServiceType(int);
  }
  }
  public final class ThrottleStatus implements android.os.Parcelable {
    method public int describeContents();
    method public int getApnType();
    method public int getRetryType();
    method public int getSlotIndex();
    method public long getThrottleExpiryTimeMillis();
    method public int getThrottleType();
    method public int getTransportType();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.ThrottleStatus> CREATOR;
    field public static final int RETRY_TYPE_HANDOVER = 3; // 0x3
    field public static final int RETRY_TYPE_NEW_CONNECTION = 2; // 0x2
    field public static final int RETRY_TYPE_NONE = 1; // 0x1
    field public static final int THROTTLE_TYPE_ELAPSED_TIME = 2; // 0x2
    field public static final int THROTTLE_TYPE_NONE = 1; // 0x1
  }
  public static final class ThrottleStatus.Builder {
    ctor public ThrottleStatus.Builder();
    method @NonNull public android.telephony.data.ThrottleStatus build();
    method @NonNull public android.telephony.data.ThrottleStatus.Builder setApnType(int);
    method @NonNull public android.telephony.data.ThrottleStatus.Builder setNoThrottle();
    method @NonNull public android.telephony.data.ThrottleStatus.Builder setRetryType(int);
    method @NonNull public android.telephony.data.ThrottleStatus.Builder setSlotIndex(int);
    method @NonNull public android.telephony.data.ThrottleStatus.Builder setThrottleExpiryTimeMillis(long);
    method @NonNull public android.telephony.data.ThrottleStatus.Builder setTransportType(int);
  }
}
}
package android.telephony.euicc {
package android.telephony.euicc {
+2 −2
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
package android.telephony.data;
package android.telephony.data;


import android.telephony.data.IQualifiedNetworksServiceCallback;
import android.telephony.data.IQualifiedNetworksServiceCallback;
import android.telephony.data.ApnThrottleStatus;
import android.telephony.data.ThrottleStatus;


/**
/**
 * {@hide}
 * {@hide}
@@ -26,5 +26,5 @@ interface IQualifiedNetworksService
{
{
    oneway void createNetworkAvailabilityProvider(int slotId, IQualifiedNetworksServiceCallback callback);
    oneway void createNetworkAvailabilityProvider(int slotId, IQualifiedNetworksServiceCallback callback);
    oneway void removeNetworkAvailabilityProvider(int slotId);
    oneway void removeNetworkAvailabilityProvider(int slotId);
    oneway void reportApnThrottleStatusChanged(int slotId, in List<ApnThrottleStatus> statuses);
    oneway void reportThrottleStatusChanged(int slotId, in List<ThrottleStatus> statuses);
}
}
+6 −6
Original line number Original line Diff line number Diff line
@@ -168,8 +168,8 @@ public abstract class QualifiedNetworksService extends Service {
         *
         *
         * @param statuses the statuses that have changed
         * @param statuses the statuses that have changed
         */
         */
        public void reportApnThrottleStatusChanged(@NonNull List<ApnThrottleStatus> statuses) {
        public void reportThrottleStatusChanged(@NonNull List<ThrottleStatus> statuses) {
            Log.d(TAG, "reportApnThrottleStatusChanged: statuses size=" + statuses.size());
            Log.d(TAG, "reportThrottleStatusChanged: statuses size=" + statuses.size());
        }
        }


        /**
        /**
@@ -212,8 +212,8 @@ public abstract class QualifiedNetworksService extends Service {
                    break;
                    break;
                case QNS_APN_THROTTLE_STATUS_CHANGED:
                case QNS_APN_THROTTLE_STATUS_CHANGED:
                    if (provider != null) {
                    if (provider != null) {
                        List<ApnThrottleStatus> statuses = (List<ApnThrottleStatus>) message.obj;
                        List<ThrottleStatus> statuses = (List<ThrottleStatus>) message.obj;
                        provider.reportApnThrottleStatusChanged(statuses);
                        provider.reportThrottleStatusChanged(statuses);
                    }
                    }
                    break;
                    break;


@@ -307,8 +307,8 @@ public abstract class QualifiedNetworksService extends Service {
        }
        }


        @Override
        @Override
        public void reportApnThrottleStatusChanged(int slotIndex,
        public void reportThrottleStatusChanged(int slotIndex,
                List<ApnThrottleStatus> statuses) {
                List<ThrottleStatus> statuses) {
            mHandler.obtainMessage(QNS_APN_THROTTLE_STATUS_CHANGED, slotIndex, 0, statuses)
            mHandler.obtainMessage(QNS_APN_THROTTLE_STATUS_CHANGED, slotIndex, 0, statuses)
                    .sendToTarget();
                    .sendToTarget();
        }
        }
+1 −1
Original line number Original line Diff line number Diff line
@@ -17,4 +17,4 @@
/** @hide */
/** @hide */
package android.telephony.data;
package android.telephony.data;


parcelable ApnThrottleStatus;
parcelable ThrottleStatus;
+29 −29
Original line number Original line Diff line number Diff line
@@ -35,7 +35,7 @@ import java.util.Objects;
 * @hide
 * @hide
 */
 */
@SystemApi
@SystemApi
public final class ApnThrottleStatus implements Parcelable {
public final class ThrottleStatus implements Parcelable {
    /**
    /**
     * The APN type is not throttled.
     * The APN type is not throttled.
     */
     */
@@ -43,14 +43,14 @@ public final class ApnThrottleStatus implements Parcelable {


    /**
    /**
     * The APN type is throttled until {@link android.os.SystemClock#elapsedRealtime()}
     * The APN type is throttled until {@link android.os.SystemClock#elapsedRealtime()}
     * has reached {@link ApnThrottleStatus#getThrottleExpiryTimeMillis}
     * has reached {@link ThrottleStatus#getThrottleExpiryTimeMillis}
     */
     */
    public static final int THROTTLE_TYPE_ELAPSED_TIME = 2;
    public static final int THROTTLE_TYPE_ELAPSED_TIME = 2;


    /** {@hide} */
    /** {@hide} */
    @IntDef(flag = true, prefix = {"THROTTLE_TYPE_"}, value = {
    @IntDef(flag = true, prefix = {"THROTTLE_TYPE_"}, value = {
            ApnThrottleStatus.THROTTLE_TYPE_NONE,
            ThrottleStatus.THROTTLE_TYPE_NONE,
            ApnThrottleStatus.THROTTLE_TYPE_ELAPSED_TIME,
            ThrottleStatus.THROTTLE_TYPE_ELAPSED_TIME,
    })
    })
    public @interface ThrottleType {
    public @interface ThrottleType {
    }
    }
@@ -72,9 +72,9 @@ public final class ApnThrottleStatus implements Parcelable {


    /** {@hide} */
    /** {@hide} */
    @IntDef(flag = true, prefix = {"RETRY_TYPE_"}, value = {
    @IntDef(flag = true, prefix = {"RETRY_TYPE_"}, value = {
            ApnThrottleStatus.RETRY_TYPE_NONE,
            ThrottleStatus.RETRY_TYPE_NONE,
            ApnThrottleStatus.RETRY_TYPE_NEW_CONNECTION,
            ThrottleStatus.RETRY_TYPE_NEW_CONNECTION,
            ApnThrottleStatus.RETRY_TYPE_HANDOVER,
            ThrottleStatus.RETRY_TYPE_HANDOVER,
    })
    })
    public @interface RetryType {
    public @interface RetryType {
    }
    }
@@ -141,7 +141,7 @@ public final class ApnThrottleStatus implements Parcelable {
     * {@link SystemClock#elapsedRealtime}.
     * {@link SystemClock#elapsedRealtime}.
     *
     *
     * This value only applies when the throttle type is set to
     * This value only applies when the throttle type is set to
     * {@link ApnThrottleStatus#THROTTLE_TYPE_ELAPSED_TIME}.
     * {@link ThrottleStatus#THROTTLE_TYPE_ELAPSED_TIME}.
     *
     *
     * A value of {@link Long#MAX_VALUE} implies that the APN type is throttled indefinitely.
     * A value of {@link Long#MAX_VALUE} implies that the APN type is throttled indefinitely.
     *
     *
@@ -152,7 +152,7 @@ public final class ApnThrottleStatus implements Parcelable {
        return mThrottleExpiryTimeMillis;
        return mThrottleExpiryTimeMillis;
    }
    }


    private ApnThrottleStatus(int slotIndex,
    private ThrottleStatus(int slotIndex,
            @AccessNetworkConstants.TransportType int transportType,
            @AccessNetworkConstants.TransportType int transportType,
            @Annotation.ApnType int apnTypes,
            @Annotation.ApnType int apnTypes,
            @ThrottleType int throttleType,
            @ThrottleType int throttleType,
@@ -166,7 +166,7 @@ public final class ApnThrottleStatus implements Parcelable {
        mRetryType = retryType;
        mRetryType = retryType;
    }
    }


    private ApnThrottleStatus(@NonNull Parcel source) {
    private ThrottleStatus(@NonNull Parcel source) {
        mSlotIndex = source.readInt();
        mSlotIndex = source.readInt();
        mTransportType = source.readInt();
        mTransportType = source.readInt();
        mApnType = source.readInt();
        mApnType = source.readInt();
@@ -185,16 +185,16 @@ public final class ApnThrottleStatus implements Parcelable {
        dest.writeInt(mThrottleType);
        dest.writeInt(mThrottleType);
    }
    }


    public static final @NonNull Parcelable.Creator<ApnThrottleStatus> CREATOR =
    public static final @NonNull Parcelable.Creator<ThrottleStatus> CREATOR =
            new Parcelable.Creator<ApnThrottleStatus>() {
            new Parcelable.Creator<ThrottleStatus>() {
                @Override
                @Override
                public ApnThrottleStatus createFromParcel(@NonNull Parcel source) {
                public ThrottleStatus createFromParcel(@NonNull Parcel source) {
                    return new ApnThrottleStatus(source);
                    return new ThrottleStatus(source);
                }
                }


                @Override
                @Override
                public ApnThrottleStatus[] newArray(int size) {
                public ThrottleStatus[] newArray(int size) {
                    return new ApnThrottleStatus[size];
                    return new ThrottleStatus[size];
                }
                }
            };
            };


@@ -213,8 +213,8 @@ public final class ApnThrottleStatus implements Parcelable {
    public boolean equals(Object obj) {
    public boolean equals(Object obj) {
        if (obj == null) {
        if (obj == null) {
            return false;
            return false;
        } else if (obj instanceof ApnThrottleStatus) {
        } else if (obj instanceof ThrottleStatus) {
            ApnThrottleStatus other = (ApnThrottleStatus) obj;
            ThrottleStatus other = (ThrottleStatus) obj;
            return this.mSlotIndex == other.mSlotIndex
            return this.mSlotIndex == other.mSlotIndex
                    && this.mApnType == other.mApnType
                    && this.mApnType == other.mApnType
                    && this.mRetryType == other.mRetryType
                    && this.mRetryType == other.mRetryType
@@ -228,7 +228,7 @@ public final class ApnThrottleStatus implements Parcelable {


    @Override
    @Override
    public String toString() {
    public String toString() {
        return "ApnThrottleStatus{"
        return "ThrottleStatus{"
                + "mSlotIndex=" + mSlotIndex
                + "mSlotIndex=" + mSlotIndex
                + ", mTransportType=" + mTransportType
                + ", mTransportType=" + mTransportType
                + ", mApnType=" + ApnSetting.getApnTypeString(mApnType)
                + ", mApnType=" + ApnSetting.getApnTypeString(mApnType)
@@ -239,18 +239,18 @@ public final class ApnThrottleStatus implements Parcelable {
    }
    }


    /**
    /**
     * Provides a convenient way to set the fields of an {@link ApnThrottleStatus} when creating a
     * Provides a convenient way to set the fields of an {@link ThrottleStatus} when creating a
     * new instance.
     * new instance.
     *
     *
     * <p>The example below shows how you might create a new {@code ApnThrottleStatus}:
     * <p>The example below shows how you might create a new {@code ThrottleStatus}:
     *
     *
     * <pre><code>
     * <pre><code>
     *
     *
     * DataCallResponseApnThrottleStatus = new ApnThrottleStatus.Builder()
     * ThrottleStatus = new ThrottleStatus.Builder()
     *     .setSlotIndex(1)
     *     .setSlotIndex(1)
     *     .setApnType({@link ApnSetting#TYPE_EMERGENCY})
     *     .setApnType({@link ApnSetting#TYPE_EMERGENCY})
     *     .setNoThrottle()
     *     .setNoThrottle()
     *     .setRetryType({@link ApnThrottleStatus#RETRY_TYPE_NEW_CONNECTION})
     *     .setRetryType({@link ThrottleStatus#RETRY_TYPE_NEW_CONNECTION})
     *     .build();
     *     .build();
     * </code></pre>
     * </code></pre>
     */
     */
@@ -316,7 +316,7 @@ public final class ApnThrottleStatus implements Parcelable {
         * {@link SystemClock#elapsedRealtime}.
         * {@link SystemClock#elapsedRealtime}.
         *
         *
         * When setting this value, the throttle type is set to
         * When setting this value, the throttle type is set to
         * {@link ApnThrottleStatus#THROTTLE_TYPE_ELAPSED_TIME}.
         * {@link ThrottleStatus#THROTTLE_TYPE_ELAPSED_TIME}.
         *
         *
         * A value of {@link Long#MAX_VALUE} implies that the APN type is throttled indefinitely.
         * A value of {@link Long#MAX_VALUE} implies that the APN type is throttled indefinitely.
         *
         *
@@ -342,7 +342,7 @@ public final class ApnThrottleStatus implements Parcelable {
         * Sets the status of the APN type as not being throttled.
         * Sets the status of the APN type as not being throttled.
         *
         *
         * When setting this value, the throttle type is set to
         * When setting this value, the throttle type is set to
         * {@link ApnThrottleStatus#THROTTLE_TYPE_NONE} and the expiry time is set to
         * {@link ThrottleStatus#THROTTLE_TYPE_NONE} and the expiry time is set to
         * {@link Builder#NO_THROTTLE_EXPIRY_TIME}.
         * {@link Builder#NO_THROTTLE_EXPIRY_TIME}.
         *
         *
         * @return The same instance of the builder.
         * @return The same instance of the builder.
@@ -369,13 +369,13 @@ public final class ApnThrottleStatus implements Parcelable {
        }
        }


        /**
        /**
         * Build the {@link ApnThrottleStatus}
         * Build the {@link ThrottleStatus}
         *
         *
         * @return the {@link ApnThrottleStatus} object
         * @return the {@link ThrottleStatus} object
         */
         */
        @NonNull
        @NonNull
        public ApnThrottleStatus build() {
        public ThrottleStatus build() {
            return new ApnThrottleStatus(
            return new ThrottleStatus(
                    mSlotIndex,
                    mSlotIndex,
                    mTransportType,
                    mTransportType,
                    mApnType,
                    mApnType,