Wifi: Migrate DO/PO check to public APIs
Since wifi stack is now running out of system_server, we cannot use
LocalServices/DevicePolicyManager internal. Migrate to using public
APIs available for retrieving the same info.
Note:
a) This also addresses a @hide API usage within the wifi stack.
b) There are some privileged (settings/setupwizard) remove/forget/enable
APIs which passes in "null" as package name to
|WifiConfigManager.canModifyNetwork|. For all these calls, we will
bypass DO/PO checks (which should be fine since these APIs can never
be called by DO/PO apps)
Bug: 141943671
Test: atest com.android.server.wifi
Test: ACTS presubmit tests
Change-Id: I1ba528b6db0d752c683c0912af9cf34c483338e5
16 files changed