Merge "Rename SliceInfo to NetworkSliceInfo." into sc-dev

This commit is contained in:
Amit Mahajan
2021-03-18 20:20:13 +00:00
committed by Android (Google) Code Review
6 changed files with 60 additions and 59 deletions

View File

@@ -12044,7 +12044,7 @@ package android.telephony.data {
method public int getPduSessionId();
method public int getProtocolType();
method public long getRetryDurationMillis();
method @Nullable public android.telephony.data.SliceInfo getSliceInfo();
method @Nullable public android.telephony.data.NetworkSliceInfo getSliceInfo();
method @Deprecated public int getSuggestedRetryTime();
method @NonNull public java.util.List<android.telephony.data.TrafficDescriptor> getTrafficDescriptors();
method public void writeToParcel(android.os.Parcel, int);
@@ -12080,7 +12080,7 @@ package android.telephony.data {
method @NonNull public android.telephony.data.DataCallResponse.Builder setPduSessionId(@IntRange(from=android.telephony.data.DataCallResponse.PDU_SESSION_ID_NOT_SET, to=15) int);
method @NonNull public android.telephony.data.DataCallResponse.Builder setProtocolType(int);
method @NonNull public android.telephony.data.DataCallResponse.Builder setRetryDurationMillis(long);
method @NonNull public android.telephony.data.DataCallResponse.Builder setSliceInfo(@Nullable android.telephony.data.SliceInfo);
method @NonNull public android.telephony.data.DataCallResponse.Builder setSliceInfo(@Nullable android.telephony.data.NetworkSliceInfo);
method @Deprecated @NonNull public android.telephony.data.DataCallResponse.Builder setSuggestedRetryTime(int);
method @NonNull public android.telephony.data.DataCallResponse.Builder setTrafficDescriptors(@NonNull java.util.List<android.telephony.data.TrafficDescriptor>);
}
@@ -12153,7 +12153,7 @@ package android.telephony.data {
method public void setDataProfile(@NonNull java.util.List<android.telephony.data.DataProfile>, boolean, @NonNull android.telephony.data.DataServiceCallback);
method public void setInitialAttachApn(@NonNull android.telephony.data.DataProfile, boolean, @NonNull android.telephony.data.DataServiceCallback);
method public void setupDataCall(int, @NonNull android.telephony.data.DataProfile, boolean, boolean, int, @Nullable android.net.LinkProperties, @NonNull android.telephony.data.DataServiceCallback);
method public void setupDataCall(int, @NonNull android.telephony.data.DataProfile, boolean, boolean, int, @Nullable android.net.LinkProperties, @IntRange(from=0, to=15) int, @Nullable android.telephony.data.SliceInfo, @Nullable android.telephony.data.TrafficDescriptor, boolean, @NonNull android.telephony.data.DataServiceCallback);
method public void setupDataCall(int, @NonNull android.telephony.data.DataProfile, boolean, boolean, int, @Nullable android.net.LinkProperties, @IntRange(from=0, to=15) int, @Nullable android.telephony.data.NetworkSliceInfo, @Nullable android.telephony.data.TrafficDescriptor, boolean, @NonNull android.telephony.data.DataServiceCallback);
}
public class DataServiceCallback {
@@ -12183,6 +12183,32 @@ package android.telephony.data {
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.EpsBearerQosSessionAttributes> CREATOR;
}
public final class NetworkSliceInfo implements android.os.Parcelable {
method public int describeContents();
method @IntRange(from=android.telephony.data.NetworkSliceInfo.MIN_SLICE_DIFFERENTIATOR, to=android.telephony.data.NetworkSliceInfo.MAX_SLICE_DIFFERENTIATOR) public int getMappedHplmnSliceDifferentiator();
method public int getMappedHplmnSliceServiceType();
method @IntRange(from=android.telephony.data.NetworkSliceInfo.MIN_SLICE_DIFFERENTIATOR, to=android.telephony.data.NetworkSliceInfo.MAX_SLICE_DIFFERENTIATOR) public int getSliceDifferentiator();
method public int getSliceServiceType();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.NetworkSliceInfo> CREATOR;
field public static final int MAX_SLICE_DIFFERENTIATOR = 16777214; // 0xfffffe
field public static final int MIN_SLICE_DIFFERENTIATOR = -1; // 0xffffffff
field public static final int SLICE_DIFFERENTIATOR_NO_SLICE = -1; // 0xffffffff
field public static final int SLICE_SERVICE_TYPE_EMBB = 1; // 0x1
field public static final int SLICE_SERVICE_TYPE_MIOT = 3; // 0x3
field public static final int SLICE_SERVICE_TYPE_NONE = 0; // 0x0
field public static final int SLICE_SERVICE_TYPE_URLLC = 2; // 0x2
}
public static final class NetworkSliceInfo.Builder {
ctor public NetworkSliceInfo.Builder();
method @NonNull public android.telephony.data.NetworkSliceInfo build();
method @NonNull public android.telephony.data.NetworkSliceInfo.Builder setMappedHplmnSliceDifferentiator(@IntRange(from=android.telephony.data.NetworkSliceInfo.MIN_SLICE_DIFFERENTIATOR, to=android.telephony.data.NetworkSliceInfo.MAX_SLICE_DIFFERENTIATOR) int);
method @NonNull public android.telephony.data.NetworkSliceInfo.Builder setMappedHplmnSliceServiceType(int);
method @NonNull public android.telephony.data.NetworkSliceInfo.Builder setSliceDifferentiator(@IntRange(from=android.telephony.data.NetworkSliceInfo.MIN_SLICE_DIFFERENTIATOR, to=android.telephony.data.NetworkSliceInfo.MAX_SLICE_DIFFERENTIATOR) int);
method @NonNull public android.telephony.data.NetworkSliceInfo.Builder setSliceServiceType(int);
}
public abstract class QualifiedNetworksService extends android.app.Service {
ctor public QualifiedNetworksService();
method @NonNull public abstract android.telephony.data.QualifiedNetworksService.NetworkAvailabilityProvider onCreateNetworkAvailabilityProvider(int);
@@ -12197,32 +12223,6 @@ package android.telephony.data {
method public final void updateQualifiedNetworkTypes(int, @NonNull java.util.List<java.lang.Integer>);
}
public final class SliceInfo implements android.os.Parcelable {
method public int describeContents();
method @IntRange(from=android.telephony.data.SliceInfo.MIN_SLICE_DIFFERENTIATOR, to=android.telephony.data.SliceInfo.MAX_SLICE_DIFFERENTIATOR) public int getMappedHplmnSliceDifferentiator();
method public int getMappedHplmnSliceServiceType();
method @IntRange(from=android.telephony.data.SliceInfo.MIN_SLICE_DIFFERENTIATOR, to=android.telephony.data.SliceInfo.MAX_SLICE_DIFFERENTIATOR) public int getSliceDifferentiator();
method public int getSliceServiceType();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.SliceInfo> CREATOR;
field public static final int MAX_SLICE_DIFFERENTIATOR = 16777214; // 0xfffffe
field public static final int MIN_SLICE_DIFFERENTIATOR = -1; // 0xffffffff
field public static final int SLICE_DIFFERENTIATOR_NO_SLICE = -1; // 0xffffffff
field public static final int SLICE_SERVICE_TYPE_EMBB = 1; // 0x1
field public static final int SLICE_SERVICE_TYPE_MIOT = 3; // 0x3
field public static final int SLICE_SERVICE_TYPE_NONE = 0; // 0x0
field public static final int SLICE_SERVICE_TYPE_URLLC = 2; // 0x2
}
public static final class SliceInfo.Builder {
ctor public SliceInfo.Builder();
method @NonNull public android.telephony.data.SliceInfo build();
method @NonNull public android.telephony.data.SliceInfo.Builder setMappedHplmnSliceDifferentiator(@IntRange(from=android.telephony.data.SliceInfo.MIN_SLICE_DIFFERENTIATOR, to=android.telephony.data.SliceInfo.MAX_SLICE_DIFFERENTIATOR) int);
method @NonNull public android.telephony.data.SliceInfo.Builder setMappedHplmnSliceServiceType(int);
method @NonNull public android.telephony.data.SliceInfo.Builder setSliceDifferentiator(@IntRange(from=android.telephony.data.SliceInfo.MIN_SLICE_DIFFERENTIATOR, to=android.telephony.data.SliceInfo.MAX_SLICE_DIFFERENTIATOR) 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();

View File

@@ -139,7 +139,7 @@ public final class DataCallResponse implements Parcelable {
private final int mPduSessionId;
private final Qos mDefaultQos;
private final List<QosBearerSession> mQosBearerSessions;
private final SliceInfo mSliceInfo;
private final NetworkSliceInfo mSliceInfo;
private final List<TrafficDescriptor> mTrafficDescriptors;
/**
@@ -202,7 +202,8 @@ public final class DataCallResponse implements Parcelable {
@Nullable List<InetAddress> pcscfAddresses, int mtu, int mtuV4, int mtuV6,
@HandoverFailureMode int handoverFailureMode, int pduSessionId,
@Nullable Qos defaultQos, @Nullable List<QosBearerSession> qosBearerSessions,
@Nullable SliceInfo sliceInfo, @Nullable List<TrafficDescriptor> trafficDescriptors) {
@Nullable NetworkSliceInfo sliceInfo,
@Nullable List<TrafficDescriptor> trafficDescriptors) {
mCause = cause;
mSuggestedRetryTime = suggestedRetryTime;
mId = id;
@@ -255,7 +256,7 @@ public final class DataCallResponse implements Parcelable {
mDefaultQos = source.readParcelable(Qos.class.getClassLoader());
mQosBearerSessions = new ArrayList<>();
source.readList(mQosBearerSessions, QosBearerSession.class.getClassLoader());
mSliceInfo = source.readParcelable(SliceInfo.class.getClassLoader());
mSliceInfo = source.readParcelable(NetworkSliceInfo.class.getClassLoader());
mTrafficDescriptors = new ArrayList<>();
source.readList(mTrafficDescriptors, TrafficDescriptor.class.getClassLoader());
}
@@ -410,7 +411,7 @@ public final class DataCallResponse implements Parcelable {
* @return The slice info related to this data connection.
*/
@Nullable
public SliceInfo getSliceInfo() {
public NetworkSliceInfo getSliceInfo() {
return mSliceInfo;
}
@@ -626,7 +627,7 @@ public final class DataCallResponse implements Parcelable {
private List<QosBearerSession> mQosBearerSessions = new ArrayList<>();
private SliceInfo mSliceInfo;
private NetworkSliceInfo mSliceInfo;
private List<TrafficDescriptor> mTrafficDescriptors = new ArrayList<>();
@@ -865,13 +866,13 @@ public final class DataCallResponse implements Parcelable {
* The Slice used for this data connection.
* <p/>
* If a handover occurs from EPDG to 5G,
* this is the {@link SliceInfo} used in {@link DataService#setupDataCall}.
* this is the {@link NetworkSliceInfo} used in {@link DataService#setupDataCall}.
*
* @param sliceInfo the slice info for the data call
*
* @return The same instance of the builder.
*/
public @NonNull Builder setSliceInfo(@Nullable SliceInfo sliceInfo) {
public @NonNull Builder setSliceInfo(@Nullable NetworkSliceInfo sliceInfo) {
mSliceInfo = sliceInfo;
return this;
}

View File

@@ -218,7 +218,7 @@ public abstract class DataService extends Service {
boolean isRoaming, boolean allowRoaming,
@SetupDataReason int reason,
@Nullable LinkProperties linkProperties,
@IntRange(from = 0, to = 15) int pduSessionId, @Nullable SliceInfo sliceInfo,
@IntRange(from = 0, to = 15) int pduSessionId, @Nullable NetworkSliceInfo sliceInfo,
@Nullable TrafficDescriptor trafficDescriptor, boolean matchAllRuleAllowed,
@NonNull DataServiceCallback callback) {
/* Call the old version since the new version isn't supported */
@@ -418,13 +418,13 @@ public abstract class DataService extends Service {
public final int reason;
public final LinkProperties linkProperties;
public final int pduSessionId;
public final SliceInfo sliceInfo;
public final NetworkSliceInfo sliceInfo;
public final TrafficDescriptor trafficDescriptor;
public final boolean matchAllRuleAllowed;
public final IDataServiceCallback callback;
SetupDataCallRequest(int accessNetworkType, DataProfile dataProfile, boolean isRoaming,
boolean allowRoaming, int reason, LinkProperties linkProperties, int pduSessionId,
SliceInfo sliceInfo, TrafficDescriptor trafficDescriptor,
NetworkSliceInfo sliceInfo, TrafficDescriptor trafficDescriptor,
boolean matchAllRuleAllowed, IDataServiceCallback callback) {
this.accessNetworkType = accessNetworkType;
this.dataProfile = dataProfile;
@@ -711,7 +711,7 @@ public abstract class DataService extends Service {
@Override
public void setupDataCall(int slotIndex, int accessNetworkType, DataProfile dataProfile,
boolean isRoaming, boolean allowRoaming, int reason,
LinkProperties linkProperties, int pduSessionId, SliceInfo sliceInfo,
LinkProperties linkProperties, int pduSessionId, NetworkSliceInfo sliceInfo,
TrafficDescriptor trafficDescriptor, boolean matchAllRuleAllowed,
IDataServiceCallback callback) {
mHandler.obtainMessage(DATA_SERVICE_REQUEST_SETUP_DATA_CALL, slotIndex, 0,

View File

@@ -19,7 +19,7 @@ package android.telephony.data;
import android.net.LinkProperties;
import android.telephony.data.DataProfile;
import android.telephony.data.IDataServiceCallback;
import android.telephony.data.SliceInfo;
import android.telephony.data.NetworkSliceInfo;
import android.telephony.data.TrafficDescriptor;
/**
@@ -31,7 +31,7 @@ oneway interface IDataService
void removeDataServiceProvider(int slotId);
void setupDataCall(int slotId, int accessNetwork, in DataProfile dataProfile, boolean isRoaming,
boolean allowRoaming, int reason, in LinkProperties linkProperties,
int pduSessionId, in SliceInfo sliceInfo,
int pduSessionId, in NetworkSliceInfo sliceInfo,
in TrafficDescriptor trafficDescriptor, boolean matchAllRuleAllowed,
IDataServiceCallback callback);
void deactivateDataCall(int slotId, int cid, int reason, IDataServiceCallback callback);

View File

@@ -17,4 +17,4 @@
/** @hide */
package android.telephony.data;
parcelable SliceInfo;
parcelable NetworkSliceInfo;

View File

@@ -34,7 +34,7 @@ import java.util.Objects;
* @hide
*/
@SystemApi
public final class SliceInfo implements Parcelable {
public final class NetworkSliceInfo implements Parcelable {
/**
* When set on a Slice Differentiator, this value indicates that there is no corresponding
* Slice.
@@ -93,7 +93,7 @@ public final class SliceInfo implements Parcelable {
@IntRange(from = MIN_SLICE_DIFFERENTIATOR, to = MAX_SLICE_DIFFERENTIATOR)
private final int mMappedHplmnSliceDifferentiator;
private SliceInfo(@SliceServiceType int sliceServiceType,
private NetworkSliceInfo(@SliceServiceType int sliceServiceType,
int sliceDifferentiator, int mappedHplmnSliceServiceType,
int mappedHplmnSliceDifferentiator) {
mSliceServiceType = sliceServiceType;
@@ -136,7 +136,7 @@ public final class SliceInfo implements Parcelable {
}
/**
* This Slice Differentiator corresponds to a {@link SliceInfo} (S-NSSAI) of the HPLMN;
* This Slice Differentiator corresponds to a {@link NetworkSliceInfo} (S-NSSAI) of the HPLMN;
* {@link #getSliceDifferentiator()} is mapped to this value.
* <p/>
* Returns {@link #SLICE_DIFFERENTIATOR_NO_SLICE} if either of the following are true:
@@ -152,7 +152,7 @@ public final class SliceInfo implements Parcelable {
return mMappedHplmnSliceDifferentiator;
}
private SliceInfo(@NonNull Parcel in) {
private NetworkSliceInfo(@NonNull Parcel in) {
mSliceServiceType = in.readInt();
mSliceDifferentiator = in.readInt();
mMappedHplmnSliceServiceType = in.readInt();
@@ -172,18 +172,18 @@ public final class SliceInfo implements Parcelable {
dest.writeInt(mMappedHplmnSliceDifferentiator);
}
public static final @android.annotation.NonNull Parcelable.Creator<SliceInfo> CREATOR =
new Parcelable.Creator<SliceInfo>() {
public static final @android.annotation.NonNull Parcelable.Creator<NetworkSliceInfo> CREATOR =
new Parcelable.Creator<NetworkSliceInfo>() {
@Override
@NonNull
public SliceInfo createFromParcel(@NonNull Parcel source) {
return new SliceInfo(source);
public NetworkSliceInfo createFromParcel(@NonNull Parcel source) {
return new NetworkSliceInfo(source);
}
@Override
@NonNull
public SliceInfo[] newArray(int size) {
return new SliceInfo[size];
public NetworkSliceInfo[] newArray(int size) {
return new NetworkSliceInfo[size];
}
};
@@ -217,7 +217,7 @@ public final class SliceInfo implements Parcelable {
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SliceInfo sliceInfo = (SliceInfo) o;
NetworkSliceInfo sliceInfo = (NetworkSliceInfo) o;
return mSliceServiceType == sliceInfo.mSliceServiceType
&& mSliceDifferentiator == sliceInfo.mSliceDifferentiator
&& mMappedHplmnSliceServiceType == sliceInfo.mMappedHplmnSliceServiceType
@@ -231,7 +231,7 @@ public final class SliceInfo implements Parcelable {
}
/**
* Provides a convenient way to set the fields of a {@link SliceInfo} when creating a
* Provides a convenient way to set the fields of a {@link NetworkSliceInfo} when creating a
* new instance.
*
* <p>The example below shows how you might create a new {@code SliceInfo}:
@@ -329,13 +329,13 @@ public final class SliceInfo implements Parcelable {
}
/**
* Build the {@link SliceInfo}.
* Build the {@link NetworkSliceInfo}.
*
* @return the {@link SliceInfo} object.
* @return the {@link NetworkSliceInfo} object.
*/
@NonNull
public SliceInfo build() {
return new SliceInfo(this.mSliceServiceType, this.mSliceDifferentiator,
public NetworkSliceInfo build() {
return new NetworkSliceInfo(this.mSliceServiceType, this.mSliceDifferentiator,
this.mMappedHplmnSliceServiceType, this.mMappedHplmnSliceDifferentiator);
}
}