docs: added Android P behavior change note to untagSocket reference

staged here:
https://android-dot-devsite.googleplex.com/reference/android/net/TrafficStats#untagSocket(java.net.Socket)

Test: make ds-docs

Exempt-From-Owner-Approval: Docs-only change

Bug: 110484513
Change-Id: I24575e6f4451a019b60c5bf60e17e14a928c6cc3
This commit is contained in:
kopriva
2018-07-23 18:19:39 -07:00
committed by Todd Kopriva
parent 0b4a66a1c2
commit c134e24a77

View File

@@ -329,6 +329,14 @@ public class TrafficStats {
/**
* Remove any statistics parameters from the given {@link Socket}.
* <p>
* In Android 8.1 (API level 27) and lower, a socket is automatically
* untagged when it's sent to another process using binder IPC with a
* {@code ParcelFileDescriptor} container. In Android 9.0 (API level 28)
* and higher, the socket tag is kept when the socket is sent to another
* process using binder IPC. You can mimic the previous behavior by
* calling {@code untagSocket()} before sending the socket to another
* process.
*/
public static void untagSocket(Socket socket) throws SocketException {
SocketTagger.get().untag(socket);