Merge "Changed ApnThrottleStatus to ThrottleStatus"
This commit is contained in:
@@ -10738,34 +10738,6 @@ package android.telephony.cdma {
|
||||
|
||||
package android.telephony.data {
|
||||
|
||||
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 {
|
||||
method public int describeContents();
|
||||
method @NonNull public java.util.List<android.net.LinkAddress> getAddresses();
|
||||
@@ -10935,7 +10907,7 @@ package android.telephony.data {
|
||||
ctor public QualifiedNetworksService.NetworkAvailabilityProvider(int);
|
||||
method public abstract void close();
|
||||
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>);
|
||||
}
|
||||
|
||||
@@ -10965,6 +10937,34 @@ package android.telephony.data {
|
||||
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 {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package android.telephony.data;
|
||||
|
||||
import android.telephony.data.IQualifiedNetworksServiceCallback;
|
||||
import android.telephony.data.ApnThrottleStatus;
|
||||
import android.telephony.data.ThrottleStatus;
|
||||
|
||||
/**
|
||||
* {@hide}
|
||||
@@ -26,5 +26,5 @@ interface IQualifiedNetworksService
|
||||
{
|
||||
oneway void createNetworkAvailabilityProvider(int slotId, IQualifiedNetworksServiceCallback callback);
|
||||
oneway void removeNetworkAvailabilityProvider(int slotId);
|
||||
oneway void reportApnThrottleStatusChanged(int slotId, in List<ApnThrottleStatus> statuses);
|
||||
oneway void reportThrottleStatusChanged(int slotId, in List<ThrottleStatus> statuses);
|
||||
}
|
||||
|
||||
@@ -168,8 +168,8 @@ public abstract class QualifiedNetworksService extends Service {
|
||||
*
|
||||
* @param statuses the statuses that have changed
|
||||
*/
|
||||
public void reportApnThrottleStatusChanged(@NonNull List<ApnThrottleStatus> statuses) {
|
||||
Log.d(TAG, "reportApnThrottleStatusChanged: statuses size=" + statuses.size());
|
||||
public void reportThrottleStatusChanged(@NonNull List<ThrottleStatus> statuses) {
|
||||
Log.d(TAG, "reportThrottleStatusChanged: statuses size=" + statuses.size());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,8 +212,8 @@ public abstract class QualifiedNetworksService extends Service {
|
||||
break;
|
||||
case QNS_APN_THROTTLE_STATUS_CHANGED:
|
||||
if (provider != null) {
|
||||
List<ApnThrottleStatus> statuses = (List<ApnThrottleStatus>) message.obj;
|
||||
provider.reportApnThrottleStatusChanged(statuses);
|
||||
List<ThrottleStatus> statuses = (List<ThrottleStatus>) message.obj;
|
||||
provider.reportThrottleStatusChanged(statuses);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -307,8 +307,8 @@ public abstract class QualifiedNetworksService extends Service {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reportApnThrottleStatusChanged(int slotIndex,
|
||||
List<ApnThrottleStatus> statuses) {
|
||||
public void reportThrottleStatusChanged(int slotIndex,
|
||||
List<ThrottleStatus> statuses) {
|
||||
mHandler.obtainMessage(QNS_APN_THROTTLE_STATUS_CHANGED, slotIndex, 0, statuses)
|
||||
.sendToTarget();
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/** @hide */
|
||||
package android.telephony.data;
|
||||
|
||||
parcelable ApnThrottleStatus;
|
||||
parcelable ThrottleStatus;
|
||||
@@ -35,7 +35,7 @@ import java.util.Objects;
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public final class ApnThrottleStatus implements Parcelable {
|
||||
public final class ThrottleStatus implements Parcelable {
|
||||
/**
|
||||
* 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()}
|
||||
* has reached {@link ApnThrottleStatus#getThrottleExpiryTimeMillis}
|
||||
* has reached {@link ThrottleStatus#getThrottleExpiryTimeMillis}
|
||||
*/
|
||||
public static final int THROTTLE_TYPE_ELAPSED_TIME = 2;
|
||||
|
||||
/** {@hide} */
|
||||
@IntDef(flag = true, prefix = {"THROTTLE_TYPE_"}, value = {
|
||||
ApnThrottleStatus.THROTTLE_TYPE_NONE,
|
||||
ApnThrottleStatus.THROTTLE_TYPE_ELAPSED_TIME,
|
||||
ThrottleStatus.THROTTLE_TYPE_NONE,
|
||||
ThrottleStatus.THROTTLE_TYPE_ELAPSED_TIME,
|
||||
})
|
||||
public @interface ThrottleType {
|
||||
}
|
||||
@@ -72,9 +72,9 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
|
||||
/** {@hide} */
|
||||
@IntDef(flag = true, prefix = {"RETRY_TYPE_"}, value = {
|
||||
ApnThrottleStatus.RETRY_TYPE_NONE,
|
||||
ApnThrottleStatus.RETRY_TYPE_NEW_CONNECTION,
|
||||
ApnThrottleStatus.RETRY_TYPE_HANDOVER,
|
||||
ThrottleStatus.RETRY_TYPE_NONE,
|
||||
ThrottleStatus.RETRY_TYPE_NEW_CONNECTION,
|
||||
ThrottleStatus.RETRY_TYPE_HANDOVER,
|
||||
})
|
||||
public @interface RetryType {
|
||||
}
|
||||
@@ -141,7 +141,7 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
* {@link SystemClock#elapsedRealtime}.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
@@ -152,7 +152,7 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
return mThrottleExpiryTimeMillis;
|
||||
}
|
||||
|
||||
private ApnThrottleStatus(int slotIndex,
|
||||
private ThrottleStatus(int slotIndex,
|
||||
@AccessNetworkConstants.TransportType int transportType,
|
||||
@Annotation.ApnType int apnTypes,
|
||||
@ThrottleType int throttleType,
|
||||
@@ -166,7 +166,7 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
mRetryType = retryType;
|
||||
}
|
||||
|
||||
private ApnThrottleStatus(@NonNull Parcel source) {
|
||||
private ThrottleStatus(@NonNull Parcel source) {
|
||||
mSlotIndex = source.readInt();
|
||||
mTransportType = source.readInt();
|
||||
mApnType = source.readInt();
|
||||
@@ -185,16 +185,16 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
dest.writeInt(mThrottleType);
|
||||
}
|
||||
|
||||
public static final @NonNull Parcelable.Creator<ApnThrottleStatus> CREATOR =
|
||||
new Parcelable.Creator<ApnThrottleStatus>() {
|
||||
public static final @NonNull Parcelable.Creator<ThrottleStatus> CREATOR =
|
||||
new Parcelable.Creator<ThrottleStatus>() {
|
||||
@Override
|
||||
public ApnThrottleStatus createFromParcel(@NonNull Parcel source) {
|
||||
return new ApnThrottleStatus(source);
|
||||
public ThrottleStatus createFromParcel(@NonNull Parcel source) {
|
||||
return new ThrottleStatus(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApnThrottleStatus[] newArray(int size) {
|
||||
return new ApnThrottleStatus[size];
|
||||
public ThrottleStatus[] newArray(int size) {
|
||||
return new ThrottleStatus[size];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -213,8 +213,8 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (obj instanceof ApnThrottleStatus) {
|
||||
ApnThrottleStatus other = (ApnThrottleStatus) obj;
|
||||
} else if (obj instanceof ThrottleStatus) {
|
||||
ThrottleStatus other = (ThrottleStatus) obj;
|
||||
return this.mSlotIndex == other.mSlotIndex
|
||||
&& this.mApnType == other.mApnType
|
||||
&& this.mRetryType == other.mRetryType
|
||||
@@ -228,7 +228,7 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ApnThrottleStatus{"
|
||||
return "ThrottleStatus{"
|
||||
+ "mSlotIndex=" + mSlotIndex
|
||||
+ ", mTransportType=" + mTransportType
|
||||
+ ", 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.
|
||||
*
|
||||
* <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>
|
||||
*
|
||||
* DataCallResponseApnThrottleStatus = new ApnThrottleStatus.Builder()
|
||||
* ThrottleStatus = new ThrottleStatus.Builder()
|
||||
* .setSlotIndex(1)
|
||||
* .setApnType({@link ApnSetting#TYPE_EMERGENCY})
|
||||
* .setNoThrottle()
|
||||
* .setRetryType({@link ApnThrottleStatus#RETRY_TYPE_NEW_CONNECTION})
|
||||
* .setRetryType({@link ThrottleStatus#RETRY_TYPE_NEW_CONNECTION})
|
||||
* .build();
|
||||
* </code></pre>
|
||||
*/
|
||||
@@ -316,7 +316,7 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
* {@link SystemClock#elapsedRealtime}.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
@@ -342,7 +342,7 @@ public final class ApnThrottleStatus implements Parcelable {
|
||||
* Sets the status of the APN type as not being throttled.
|
||||
*
|
||||
* 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}.
|
||||
*
|
||||
* @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
|
||||
public ApnThrottleStatus build() {
|
||||
return new ApnThrottleStatus(
|
||||
public ThrottleStatus build() {
|
||||
return new ThrottleStatus(
|
||||
mSlotIndex,
|
||||
mTransportType,
|
||||
mApnType,
|
||||
Reference in New Issue
Block a user