Get NetworkCapabilities from NetworkCallback
Register network callback for all networks and record NetworkCapabilities for every networks. Once onDnsEvent is triggered, use the netId it passes in to find the corresponding NetworkCapabilities instead of using netId to create a Network object(hidden API) then get the NetworkCapabilities by ConnectivityManager#getNetworkCapabilities. Bug: 182963397 Test: m Test: atest IpConnectivityMetricsTest Test: atest NetdEventListenerServiceTest Change-Id: I91d68ca33253831b78def1ddeb074ba944a5d6ad Merged-In: I91d68ca33253831b78def1ddeb074ba944a5d6ad (cherry-picked from ag/13959432)
Loading
Please register or sign in to comment