Merge "Fix QOS API review comments"

This commit is contained in:
Jayachandran Chinnakkannu
2021-03-25 16:08:44 +00:00
committed by Gerrit Code Review
3 changed files with 29 additions and 26 deletions

View File

@@ -10686,11 +10686,11 @@ package android.telephony.data {
public final class EpsBearerQosSessionAttributes implements android.os.Parcelable android.net.QosSessionAttributes { public final class EpsBearerQosSessionAttributes implements android.os.Parcelable android.net.QosSessionAttributes {
method public int describeContents(); method public int describeContents();
method public long getGuaranteedDownlinkBitRate(); method public long getGuaranteedDownlinkBitRateKbps();
method public long getGuaranteedUplinkBitRate(); method public long getGuaranteedUplinkBitRateKbps();
method public long getMaxDownlinkBitRate(); method public long getMaxDownlinkBitRateKbps();
method public long getMaxUplinkBitRate(); method public long getMaxUplinkBitRateKbps();
method public int getQci(); method public int getQosIdentifier();
method @NonNull public java.util.List<java.net.InetSocketAddress> getRemoteAddresses(); method @NonNull public java.util.List<java.net.InetSocketAddress> getRemoteAddresses();
method public void writeToParcel(@NonNull android.os.Parcel, int); method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.EpsBearerQosSessionAttributes> CREATOR; 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 { public final class NrQosSessionAttributes implements android.os.Parcelable android.net.QosSessionAttributes {
method public int describeContents(); method public int describeContents();
method public int get5Qi(); method @NonNull public java.time.Duration getBitRateWindowDuration();
method public long getAveragingWindow(); method public long getGuaranteedDownlinkBitRateKbps();
method public long getGuaranteedDownlinkBitRate(); method public long getGuaranteedUplinkBitRateKbps();
method public long getGuaranteedUplinkBitRate(); method public long getMaxDownlinkBitRateKbps();
method public long getMaxDownlinkBitRate(); method public long getMaxUplinkBitRateKbps();
method public long getMaxUplinkBitRate(); method @IntRange(from=1, to=63) public int getQosFlowIdentifier();
method public int getQfi(); method public int getQosIdentifier();
method @NonNull public java.util.List<java.net.InetSocketAddress> getRemoteAddresses(); method @NonNull public java.util.List<java.net.InetSocketAddress> getRemoteAddresses();
method public void writeToParcel(@NonNull android.os.Parcel, int); method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.NrQosSessionAttributes> CREATOR; field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.NrQosSessionAttributes> CREATOR;

View File

@@ -53,7 +53,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi
* *
* @return the qci of the session * @return the qci of the session
*/ */
public int getQci() { public int getQosIdentifier() {
return mQci; return mQci;
} }
@@ -66,7 +66,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi
* *
* @return the guaranteed bit rate in kbps * @return the guaranteed bit rate in kbps
*/ */
public long getGuaranteedUplinkBitRate() { public long getGuaranteedUplinkBitRateKbps() {
return mGuaranteedUplinkBitRate; return mGuaranteedUplinkBitRate;
} }
@@ -79,7 +79,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi
* *
* @return the guaranteed bit rate in kbps * @return the guaranteed bit rate in kbps
*/ */
public long getGuaranteedDownlinkBitRate() { public long getGuaranteedDownlinkBitRateKbps() {
return mGuaranteedDownlinkBitRate; return mGuaranteedDownlinkBitRate;
} }
@@ -92,7 +92,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi
* *
* @return the max uplink bit rate in kbps * @return the max uplink bit rate in kbps
*/ */
public long getMaxUplinkBitRate() { public long getMaxUplinkBitRateKbps() {
return mMaxUplinkBitRate; return mMaxUplinkBitRate;
} }
@@ -105,7 +105,7 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi
* *
* @return the max downlink bit rate in kbps * @return the max downlink bit rate in kbps
*/ */
public long getMaxDownlinkBitRate() { public long getMaxDownlinkBitRateKbps() {
return mMaxDownlinkBitRate; return mMaxDownlinkBitRate;
} }

View File

@@ -16,6 +16,7 @@
package android.telephony.data; package android.telephony.data;
import android.annotation.IntRange;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.net.QosSessionAttributes; import android.net.QosSessionAttributes;
@@ -26,6 +27,7 @@ import android.util.Log;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.time.Duration;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@@ -40,7 +42,7 @@ import java.util.Objects;
public final class NrQosSessionAttributes implements Parcelable, QosSessionAttributes { public final class NrQosSessionAttributes implements Parcelable, QosSessionAttributes {
private static final String TAG = NrQosSessionAttributes.class.getSimpleName(); private static final String TAG = NrQosSessionAttributes.class.getSimpleName();
private final int m5Qi; private final int m5Qi;
private final int mQfi; private final @IntRange(from=1, to=63) int mQfi;
private final long mMaxUplinkBitRate; private final long mMaxUplinkBitRate;
private final long mMaxDownlinkBitRate; private final long mMaxDownlinkBitRate;
private final long mGuaranteedUplinkBitRate; private final long mGuaranteedUplinkBitRate;
@@ -55,7 +57,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri
* *
* @return the 5QI of the QOS flow * @return the 5QI of the QOS flow
*/ */
public int get5Qi() { public int getQosIdentifier() {
return m5Qi; return m5Qi;
} }
@@ -65,7 +67,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri
* *
* @return the QOS flow identifier of the session * @return the QOS flow identifier of the session
*/ */
public int getQfi() { public @IntRange(from=1, to=63) int getQosFlowIdentifier() {
return mQfi; return mQfi;
} }
@@ -78,7 +80,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri
* *
* @return the guaranteed bit rate in kbps * @return the guaranteed bit rate in kbps
*/ */
public long getGuaranteedUplinkBitRate() { public long getGuaranteedUplinkBitRateKbps() {
return mGuaranteedUplinkBitRate; return mGuaranteedUplinkBitRate;
} }
@@ -91,7 +93,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri
* *
* @return the guaranteed bit rate in kbps * @return the guaranteed bit rate in kbps
*/ */
public long getGuaranteedDownlinkBitRate() { public long getGuaranteedDownlinkBitRateKbps() {
return mGuaranteedDownlinkBitRate; return mGuaranteedDownlinkBitRate;
} }
@@ -104,7 +106,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri
* *
* @return the max uplink bit rate in kbps * @return the max uplink bit rate in kbps
*/ */
public long getMaxUplinkBitRate() { public long getMaxUplinkBitRateKbps() {
return mMaxUplinkBitRate; return mMaxUplinkBitRate;
} }
@@ -117,7 +119,7 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri
* *
* @return the max downlink bit rate in kbps * @return the max downlink bit rate in kbps
*/ */
public long getMaxDownlinkBitRate() { public long getMaxDownlinkBitRateKbps() {
return mMaxDownlinkBitRate; return mMaxDownlinkBitRate;
} }
@@ -129,8 +131,9 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri
* *
* @return the averaging window duration in milliseconds * @return the averaging window duration in milliseconds
*/ */
public long getAveragingWindow() { @NonNull
return mAveragingWindow; public Duration getBitRateWindowDuration() {
return Duration.ofMillis(mAveragingWindow);
} }
/** /**