Skip to content
Commit 4d89e42e authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Watch all networks for job invalidation signals.

Until now, ConnectivityController was only watching for the
system-wide "default" network to change.  Since the "default" network
can change on a per-UID basis, we could end up with jobs not being
rematched correctly.

To resolve this, we start watching for the firehose of all network
changes across the device.  Since this results in increased noise,
we add a local cache of per-UID answers, and only re-evaluate jobs
when the changing network is the "default" network for that UID.

For NetworkPolicyManager.Listener, we only need to listen to
onUidRulesChanged(), since the other events always boil down into
specific rule changes.

Extends unit tests to verify all this logic behaves correctly.

Test: atest com.android.server.job.controllers.ConnectivityControllerTest
Bug: 73553301
Change-Id: I5b23ecd1facb6de723c5a6a7ddf9769a032d439e
parent dac0fe91
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