diff options
3 files changed, 29 insertions, 26 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 0ddd5ff72590..b363055204fb 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -10686,11 +10686,11 @@ package android.telephony.data { public final class EpsBearerQosSessionAttributes implements android.os.Parcelable android.net.QosSessionAttributes { method public int describeContents(); - method public long getGuaranteedDownlinkBitRate(); - method public long getGuaranteedUplinkBitRate(); - method public long getMaxDownlinkBitRate(); - method public long getMaxUplinkBitRate(); - method public int getQci(); + method public long getGuaranteedDownlinkBitRateKbps(); + method public long getGuaranteedUplinkBitRateKbps(); + method public long getMaxDownlinkBitRateKbps(); + method public long getMaxUplinkBitRateKbps(); + method public int getQosIdentifier(); method @NonNull public java.util.List<java.net.InetSocketAddress> getRemoteAddresses(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.EpsBearerQosSessionAttributes> CREATOR; @@ -10698,13 +10698,13 @@ package android.telephony.data { public final class NrQosSessionAttributes implements android.os.Parcelable android.net.QosSessionAttributes { method public int describeContents(); - method public int get5Qi(); - method public long getAveragingWindow(); - method public long getGuaranteedDownlinkBitRate(); - method public long getGuaranteedUplinkBitRate(); - method public long getMaxDownlinkBitRate(); - method public long getMaxUplinkBitRate(); - method public int getQfi(); + method @NonNull public java.time.Duration getBitRateWindowDuration(); + method public long getGuaranteedDownlinkBitRateKbps(); + method public long getGuaranteedUplinkBitRateKbps(); + method public long getMaxDownlinkBitRateKbps(); + method public long getMaxUplinkBitRateKbps(); + method @IntRange(from=1, to=63) public int getQosFlowIdentifier(); + method public int getQosIdentifier(); method @NonNull public java.util.List<java.net.InetSocketAddress> getRemoteAddresses(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.NrQosSessionAttributes> CREATOR; diff --git a/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java b/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java index 406c38bf60ef..9bc7a5c6cf96 100644 --- a/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java +++ b/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java @@ -53,7 +53,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi * * @return the qci of the session */ - public int getQci() { + public int getQosIdentifier() { return mQci; } @@ -66,7 +66,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi * * @return the guaranteed bit rate in kbps */ - public long getGuaranteedUplinkBitRate() { + public long getGuaranteedUplinkBitRateKbps() { return mGuaranteedUplinkBitRate; } @@ -79,7 +79,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi * * @return the guaranteed bit rate in kbps */ - public long getGuaranteedDownlinkBitRate() { + public long getGuaranteedDownlinkBitRateKbps() { return mGuaranteedDownlinkBitRate; } @@ -92,7 +92,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi * * @return the max uplink bit rate in kbps */ - public long getMaxUplinkBitRate() { + public long getMaxUplinkBitRateKbps() { return mMaxUplinkBitRate; } @@ -105,7 +105,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi * * @return the max downlink bit rate in kbps */ - public long getMaxDownlinkBitRate() { + public long getMaxDownlinkBitRateKbps() { return mMaxDownlinkBitRate; } diff --git a/telephony/java/android/telephony/data/NrQosSessionAttributes.java b/telephony/java/android/telephony/data/NrQosSessionAttributes.java index 857ccb960d52..4c37687910a1 100644 --- a/telephony/java/android/telephony/data/NrQosSessionAttributes.java +++ b/telephony/java/android/telephony/data/NrQosSessionAttributes.java @@ -16,6 +16,7 @@ package android.telephony.data; +import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.SystemApi; import android.net.QosSessionAttributes; @@ -26,6 +27,7 @@ import android.util.Log; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.UnknownHostException; +import java.time.Duration; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -40,7 +42,7 @@ import java.util.Objects; public final class NrQosSessionAttributes implements Parcelable, QosSessionAttributes { private static final String TAG = NrQosSessionAttributes.class.getSimpleName(); private final int m5Qi; - private final int mQfi; + private final @IntRange(from=1, to=63) int mQfi; private final long mMaxUplinkBitRate; private final long mMaxDownlinkBitRate; private final long mGuaranteedUplinkBitRate; @@ -55,7 +57,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri * * @return the 5QI of the QOS flow */ - public int get5Qi() { + public int getQosIdentifier() { return m5Qi; } @@ -65,7 +67,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri * * @return the QOS flow identifier of the session */ - public int getQfi() { + public @IntRange(from=1, to=63) int getQosFlowIdentifier() { return mQfi; } @@ -78,7 +80,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri * * @return the guaranteed bit rate in kbps */ - public long getGuaranteedUplinkBitRate() { + public long getGuaranteedUplinkBitRateKbps() { return mGuaranteedUplinkBitRate; } @@ -91,7 +93,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri * * @return the guaranteed bit rate in kbps */ - public long getGuaranteedDownlinkBitRate() { + public long getGuaranteedDownlinkBitRateKbps() { return mGuaranteedDownlinkBitRate; } @@ -104,7 +106,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri * * @return the max uplink bit rate in kbps */ - public long getMaxUplinkBitRate() { + public long getMaxUplinkBitRateKbps() { return mMaxUplinkBitRate; } @@ -117,7 +119,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri * * @return the max downlink bit rate in kbps */ - public long getMaxDownlinkBitRate() { + public long getMaxDownlinkBitRateKbps() { return mMaxDownlinkBitRate; } @@ -129,8 +131,9 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri * * @return the averaging window duration in milliseconds */ - public long getAveragingWindow() { - return mAveragingWindow; + @NonNull + public Duration getBitRateWindowDuration() { + return Duration.ofMillis(mAveragingWindow); } /** |