History log of /frameworks/base/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
938ab4fa3942398e942d98aa7b16dd87dfb7ff11 11-Feb-2017 Hugo Benichi <hugobenichi@google.com> Move back networking policy logic into NetworkPolicyManagerService

This patch removes from ConnectivityService the logic involved in
deciding if a uid has access to networking based on networking policies.

This logic is moved into NetworkPolicyManagerService which is the source
of truth with regards to the state of networking policie, both for
existing networks and uids.

Instead ConnectivityService directly queries NetworkPolicyManagerService
in a synchronous fashion for a specific uid or a (uid, network) pair.

This eliminates the need to keep a copy of the uid policy rules inside
ConnectivityService and ensures that ConnectivityService takes
networking decisions based on the correct state of networking policies,
and therefore eliminates certain data races in ConnectivityManager API
that applications are exposed to.

Test: $ runtest frameworks-net
$ runtest -x frameworks/base/services/tests/../NetworkPolicyManagerServiceTest.java
$ runtest -c com.android.server.net.ConnOnActivityStartTest frameworks-services
Bug: 32069544, 30919851
Change-Id: Ic75d4f7a8853e6be20e51262c4b59805ec35093a
/frameworks/base/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java
d17fda40cdcf875002086fbe98bf34ba7cbdb03c 29-Apr-2016 Felipe Leme <felipeal@google.com> Added option to reset network policies for a given user.

BUG: 28429571
Change-Id: I675e4ee5484a865f6819d7a0eef34133be11306f
/frameworks/base/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java