Use API TcpKeepalivePacketData in ClientModeImpl

Instead of statically linking against and jarjaring
TcpKeepalivePacketData, use the new android.net.TcpKeepalivePacketData
API for S. On R, build the KeepalivePacketDataParcelable from the base
KeepalivePacketData class.

The current ClientModeImpl code that uses a statically linked
TcpKeepalivePacketData is actually broken, as since R the system_server
has been sending a @hide android.net.TcpKeepalivePacketData, and
ClientModeImpl was testing it against com.android.wifi.x.android.net.*.
To fix this on R, this change rebuilds a
TcpKeepalivePacketDataParcelable class from the packet data included in
the base KeepalivePacketData class.

Bug: 172789687
Test: atest ConnectivityManagerTest#testCreateTcpKeepalive
      See associated test change
Change-Id: Ia1028036713dfd733253b78d6f20f64900a752e1
1 file changed