OSDN Git Service

[KA01] export SocketKeepalive API for NAT-T keepalive
authorjunyulai <junyulai@google.com>
Thu, 27 Dec 2018 09:25:29 +0000 (17:25 +0800)
committerjunyulai <junyulai@google.com>
Wed, 23 Jan 2019 15:17:17 +0000 (23:17 +0800)
commit48eac1d4c8507c794aa162bd93a4c7319c52bff4
tree00baf657553ad454eb24984372475d7c5c324698
parente62097f71d7719df24430e1e1405ba4ecaaf4b01
[KA01] export SocketKeepalive API for NAT-T keepalive

The new set of API replace the PacketKeepalive system API
which is only specific for IPsec NAT-T keepalive packet. Allows
applications to request different types of keepalives through
the same set of API.

By using keepalives, applications could request system to
periodically send specific packets on their behalf, using
hardware offload to save battery power.

This change would only address interface change and test part of
original functionality. After all reference of PacketKeepalive
are removed, another change would be submitted to remove old
API.

Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: I3367666810acc44d5ad20e19acd4bf936e8b5d9c
api/current.txt
core/java/android/net/ConnectivityManager.java
core/java/android/net/NattSocketKeepalive.java [new file with mode: 0644]
core/java/android/net/SocketKeepalive.java [new file with mode: 0644]
tests/net/java/com/android/server/ConnectivityServiceTest.java