Skip to content
Commit a4a35a92 authored by Ken Chen's avatar Ken Chen
Browse files

Add tagSocket/untagSocket NDK APIs

Provide native APIs to tag the various sockets used for network
transfer, which helps apps tracking down data usage inside their app.

We've had equivalent Java APIs since API level 14.
https://developer.android.com/reference/android/net/TrafficStats.html#tagSocket(java.net.Socket)
https://developer.android.com/reference/android/net/TrafficStats.html#untagSocket(java.net.Socket)

Given that these Java APIs are implemented in native side, providing
NDK APIs directly will be easier for native users to use it.

Bug: 29761778
Bug: 202086915
Test: Tests in change Ic6554d9b98cef9b41b7eae06315d284c574c0a45
Change-Id: I802ce62f82199ce087bf8feb03afb26de1ce526e
parent b0c14897
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment