Renamed retry interval to retry duration am: 133b7dc759

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537161

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4ce350c443a17eb3abc5caa4abb73182d659d96b
This commit is contained in:
Jack Yu
2021-01-06 02:12:25 +00:00
committed by Automerger Merge Worker
2 changed files with 23 additions and 16 deletions

View File

@@ -10510,7 +10510,7 @@ package android.telephony.data {
method @NonNull public java.util.List<java.net.InetAddress> getPcscfAddresses();
method public int getPduSessionId();
method public int getProtocolType();
method public long getRetryIntervalMillis();
method public long getRetryDurationMillis();
method @Deprecated public int getSuggestedRetryTime();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.DataCallResponse> CREATOR;
@@ -10524,7 +10524,7 @@ package android.telephony.data {
field public static final int LINK_STATUS_INACTIVE = 0; // 0x0
field public static final int LINK_STATUS_UNKNOWN = -1; // 0xffffffff
field public static final int PDU_SESSION_ID_NOT_SET = 0; // 0x0
field public static final int RETRY_INTERVAL_UNDEFINED = -1; // 0xffffffff
field public static final int RETRY_DURATION_UNDEFINED = -1; // 0xffffffff
}
public static final class DataCallResponse.Builder {
@@ -10544,7 +10544,7 @@ package android.telephony.data {
method @NonNull public android.telephony.data.DataCallResponse.Builder setPcscfAddresses(@NonNull java.util.List<java.net.InetAddress>);
method @NonNull public android.telephony.data.DataCallResponse.Builder setPduSessionId(int);
method @NonNull public android.telephony.data.DataCallResponse.Builder setProtocolType(int);
method @NonNull public android.telephony.data.DataCallResponse.Builder setRetryIntervalMillis(long);
method @NonNull public android.telephony.data.DataCallResponse.Builder setRetryDurationMillis(long);
method @Deprecated @NonNull public android.telephony.data.DataCallResponse.Builder setSuggestedRetryTime(int);
}

View File

@@ -109,10 +109,10 @@ public final class DataCallResponse implements Parcelable {
public static final int HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_SETUP_NORMAL = 3;
/**
* Indicates that data retry interval is not specified. Platform can determine when to
* Indicates that data retry duration is not specified. Platform can determine when to
* perform data setup appropriately.
*/
public static final int RETRY_INTERVAL_UNDEFINED = -1;
public static final int RETRY_DURATION_UNDEFINED = -1;
/**
* Indicates that the pdu session id is not set.
@@ -254,19 +254,26 @@ public final class DataCallResponse implements Parcelable {
/**
* @return The suggested data retry time in milliseconds.
*
* @deprecated Use {@link #getRetryIntervalMillis()} instead.
* @deprecated Use {@link #getRetryDurationMillis()} instead.
*/
@Deprecated
public int getSuggestedRetryTime() {
// To match the pre-deprecated getSuggestedRetryTime() behavior.
if (mSuggestedRetryTime == RETRY_DURATION_UNDEFINED) {
return 0;
} else if (mSuggestedRetryTime > Integer.MAX_VALUE) {
return Integer.MAX_VALUE;
}
return (int) mSuggestedRetryTime;
}
/**
* @return The network suggested data retry interval in milliseconds. {@code Long.MAX_VALUE}
* indicates data retry should not occur. {@link #RETRY_INTERVAL_UNDEFINED} indicates network
* did not suggest any retry interval.
* @return The network suggested data retry duration in milliseconds. {@code Long.MAX_VALUE}
* indicates data retry should not occur. {@link #RETRY_DURATION_UNDEFINED} indicates network
* did not suggest any retry duration.
*/
public long getRetryIntervalMillis() {
public long getRetryDurationMillis() {
return mSuggestedRetryTime;
}
@@ -537,7 +544,7 @@ public final class DataCallResponse implements Parcelable {
public static final class Builder {
private @DataFailureCause int mCause;
private long mSuggestedRetryTime = RETRY_INTERVAL_UNDEFINED;
private long mSuggestedRetryTime = RETRY_DURATION_UNDEFINED;
private int mId;
@@ -592,7 +599,7 @@ public final class DataCallResponse implements Parcelable {
* @param suggestedRetryTime The suggested data retry time in milliseconds.
* @return The same instance of the builder.
*
* @deprecated Use {@link #setRetryIntervalMillis(long)} instead.
* @deprecated Use {@link #setRetryDurationMillis(long)} instead.
*/
@Deprecated
public @NonNull Builder setSuggestedRetryTime(int suggestedRetryTime) {
@@ -601,13 +608,13 @@ public final class DataCallResponse implements Parcelable {
}
/**
* Set the network suggested data retry interval.
* Set the network suggested data retry duration.
*
* @param retryIntervalMillis The suggested data retry interval in milliseconds.
* @param retryDurationMillis The suggested data retry duration in milliseconds.
* @return The same instance of the builder.
*/
public @NonNull Builder setRetryIntervalMillis(long retryIntervalMillis) {
mSuggestedRetryTime = retryIntervalMillis;
public @NonNull Builder setRetryDurationMillis(long retryDurationMillis) {
mSuggestedRetryTime = retryDurationMillis;
return this;
}