Merge "Replace fields with getters in keepalive API" am: 445fd7e9d9 am: e5bc9e1aa1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669345 Change-Id: I1cf5e79229e5ffda0a77ac65b552ba0875b347f3
This commit is contained in:
@@ -455,14 +455,14 @@ package android.net {
|
|||||||
public final class TcpKeepalivePacketData extends android.net.KeepalivePacketData implements android.os.Parcelable {
|
public final class TcpKeepalivePacketData extends android.net.KeepalivePacketData implements android.os.Parcelable {
|
||||||
ctor public TcpKeepalivePacketData(@NonNull java.net.InetAddress, int, @NonNull java.net.InetAddress, int, @NonNull byte[], int, int, int, int, int, int) throws android.net.InvalidPacketException;
|
ctor public TcpKeepalivePacketData(@NonNull java.net.InetAddress, int, @NonNull java.net.InetAddress, int, @NonNull byte[], int, int, int, int, int, int) throws android.net.InvalidPacketException;
|
||||||
method public int describeContents();
|
method public int describeContents();
|
||||||
|
method public int getIpTos();
|
||||||
|
method public int getIpTtl();
|
||||||
|
method public int getTcpAck();
|
||||||
|
method public int getTcpSeq();
|
||||||
|
method public int getTcpWindow();
|
||||||
|
method public int getTcpWindowScale();
|
||||||
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.net.TcpKeepalivePacketData> CREATOR;
|
field @NonNull public static final android.os.Parcelable.Creator<android.net.TcpKeepalivePacketData> CREATOR;
|
||||||
field public final int ipTos;
|
|
||||||
field public final int ipTtl;
|
|
||||||
field public final int tcpAck;
|
|
||||||
field public final int tcpSeq;
|
|
||||||
field public final int tcpWindow;
|
|
||||||
field public final int tcpWindowScale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,22 +32,39 @@ import java.util.Objects;
|
|||||||
public final class TcpKeepalivePacketData extends KeepalivePacketData implements Parcelable {
|
public final class TcpKeepalivePacketData extends KeepalivePacketData implements Parcelable {
|
||||||
private static final String TAG = "TcpKeepalivePacketData";
|
private static final String TAG = "TcpKeepalivePacketData";
|
||||||
|
|
||||||
/** TCP sequence number. */
|
/**
|
||||||
|
* TCP sequence number.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
public final int tcpSeq;
|
public final int tcpSeq;
|
||||||
|
|
||||||
/** TCP ACK number. */
|
/**
|
||||||
|
* TCP ACK number.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
public final int tcpAck;
|
public final int tcpAck;
|
||||||
|
|
||||||
/** TCP RCV window. */
|
/**
|
||||||
|
* TCP RCV window.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
public final int tcpWindow;
|
public final int tcpWindow;
|
||||||
|
|
||||||
/** TCP RCV window scale. */
|
/** TCP RCV window scale.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
public final int tcpWindowScale;
|
public final int tcpWindowScale;
|
||||||
|
|
||||||
/** IP TOS. */
|
/**
|
||||||
|
* IP TOS.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
public final int ipTos;
|
public final int ipTos;
|
||||||
|
|
||||||
/** IP TTL. */
|
/**
|
||||||
|
* IP TTL.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
public final int ipTtl;
|
public final int ipTtl;
|
||||||
|
|
||||||
public TcpKeepalivePacketData(@NonNull final InetAddress srcAddress, int srcPort,
|
public TcpKeepalivePacketData(@NonNull final InetAddress srcAddress, int srcPort,
|
||||||
@@ -63,6 +80,56 @@ public final class TcpKeepalivePacketData extends KeepalivePacketData implements
|
|||||||
this.ipTtl = ipTtl;
|
this.ipTtl = ipTtl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the TCP sequence number.
|
||||||
|
*
|
||||||
|
* See https://tools.ietf.org/html/rfc793#page-15.
|
||||||
|
*/
|
||||||
|
public int getTcpSeq() {
|
||||||
|
return tcpSeq;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the TCP ACK number.
|
||||||
|
*
|
||||||
|
* See https://tools.ietf.org/html/rfc793#page-15.
|
||||||
|
*/
|
||||||
|
public int getTcpAck() {
|
||||||
|
return tcpAck;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the TCP RCV window.
|
||||||
|
*
|
||||||
|
* See https://tools.ietf.org/html/rfc793#page-15.
|
||||||
|
*/
|
||||||
|
public int getTcpWindow() {
|
||||||
|
return tcpWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the TCP RCV window scale.
|
||||||
|
*
|
||||||
|
* See https://tools.ietf.org/html/rfc793#page-15.
|
||||||
|
*/
|
||||||
|
public int getTcpWindowScale() {
|
||||||
|
return tcpWindowScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the IP type of service.
|
||||||
|
*/
|
||||||
|
public int getIpTos() {
|
||||||
|
return ipTos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the IP TTL.
|
||||||
|
*/
|
||||||
|
public int getIpTtl() {
|
||||||
|
return ipTtl;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(@Nullable final Object o) {
|
public boolean equals(@Nullable final Object o) {
|
||||||
if (!(o instanceof TcpKeepalivePacketData)) return false;
|
if (!(o instanceof TcpKeepalivePacketData)) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user