Migrate to the asynchronous version of getActiveNetworkForUid.
Register a network callback to get the active network for each UID that
schedules a job with a network constraint. Using the asynchronous
version means that JS no longer has to call any synchronous network APIs.
The networking stack has a hard limit on the number of callbacks that can
be scheduled, so we try to prioritize the UIDs that we register callbacks
for based on certain characteristics.
Bug: 134978280
Bug: 165835257
Bug: 179501234
Bug: 183089482
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job
Test: atest CtsJobSchedulerTestCases
Change-Id: Ie93cd22b11cc28135a385c0cf6ad6b577b61d1b7
2 files changed