Fix keepalive CTS fail for devices with kernel older than 4.8

If kernel < 4.8 then it doesn't support get socket option
TCP_REPAIR_WINDOW, thus TCP keepalive cannot be supported.
However, it might still support NAT-T keepalive. Test TCP
keepalive only if it is supported by kernel.

Bug: 133652079
Test: atest android.net.cts.ConnectivityManagerTest#testMajorMinorVersionCompare \
    android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimit \
    android.net.cts.ConnectivityManagerTest#testSocketKeepaliveUnprivileged \
    android.net.cts.ConnectivityManagerTest#testKeepaliveUnsupported \
    android.net.cts.ConnectivityManagerTest#testCreateTcpKeepalive

Change-Id: I3f8456deea2b4ded762a413c8e27b58ce54ce0aa
1 file changed