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
Loading
Please register or sign in to comment