History log of /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
327bd4253115abc757ebaf5f1bddd9f5ad2253e4 22-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Ignore masked EAP passwords

Whenever an app retrieves one of the saved network configuration using
the WifiManager API's, we mask out the |preSharedKey|, |wepKeys| and
|enterpriseConfig.getPassword()| fields. These apps may however pass the
same network configuration (with some changes) back to the
framework via WifiManager.updateNetwork() or WifiManager.connect() API's.
Since the current update API does not specify which field within the
WifiConfiguration is modified, framework tries to copy over all the
fields sent in thus overriding the real password with the masked value
sent by the app.

Ideally the apps should create a new WifiConfiguration with just the
fields that they want to modify and send it via
WifiManager.updateNetwork(). But, since this is a very common mistake
we have some protection against this in the framework for the
|preSharedKey| and |wepKeys|. But, we're missing this protection for the
|enterpriseConfig.getPassword()| fields.

Bug: 62893342
Test: Unit tests.
Test: Manual test to ensure that masked password sent from settings is
ignored.
Test: Regression tests.

Change-Id: I163c8c44b2717364aff88cb7ca1b2faa3aa6cce9
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
ff27ddf1923d9d4d4cfa8cc1a1ddb8748d0f2426 08-May-2017 Ningyuan Wang <nywang@google.com> Do not remove and add the same network

This patch allows SupplicantStatIfaceHal to skip the "remove
and add" process for supplicant network if there is already
the same network saved in supplicant.

This will be helpful when phone reconnects to a EAP-SIM
network. In that case, EAP state parameters will not be cleared by
removing network, so supplicant can take advantage of those
parameters for fast-reauth.

Bug: 37529849
Test: compile. unit test, integration test, manual test

Change-Id: I4326e9f60f4f8a64674a52d1dbbcd34c5e709064
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
9ef555a48ac600c8766f703fa60db15b69e20301 10-Mar-2017 Peter Qiu <zqiu@google.com> WifiConfigurationXmlUtil: persist additional fields for legacy Passpoint configuration

When migrating legacy Passpoint configurations, the configuration will only
get migrated when its owner logs in. In the meantime, we will
need persist all the required data in the share store temporarily.
So persist the additional required fields for Passpoint to the storage
to avoid any data loss in the case when migration took multiple
boots to complete.

Bug: 36099588
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual test updating a device from N to O, verify all configs
are migrated.

Change-Id: I040dfd9f207ed1a9b2e3ccd50eca50560d6e1444
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
f50550926a7bddc24adf822876f35812d7d8c7be 07-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Add support for raw psk

|config.preSharedKey| can either be a quoted ascii passphrase or a raw
psk hexstring. Handle these 2 scenarios and call the corresponding HIDL
methods.

Bug: 36013886
Test: Added Unit tests
Test: Connected to networks with both raw psk and passphrase.
Change-Id: Ifaf31a7ce864aa0f6e86020ec5207ea8dee09205
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
6a8908d2bc0367397eb92444ac78cc8d43160ef6 03-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Fix wep key handling

According to our public documentation, the wep keys can either be a
quoted ASCII string or a hex string. Since this is similar to the SSID
field, rename the helper function in NativeUtil to reuse for both.

Bug: 35907939
Test: Fixed unit test input for wep networks and validated existing
WEP related tests pass.
Change-Id: I180b9261252dc5745fa3e30e4bc980cde054ba2a
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
8757adcc5e1f17354d09b4bacd3abda911974448 03-Feb-2017 Paul Stewart <pstew@google.com> Provide SIM identity for PEAP/SIM configurations

Refactor the TelephonyUtil code to take a WifiConfiguration
instead of an EAP method so it can evaluate both the outer and
inner EAP methods. This allows TelephonyUtil to whitelist SIM
authentication methods tunneled under PEAP for SIM authentication
and to provide the proper SIM identity.

Bug: 34835771
Test: Unit tests + manual tests: connect to a PEAP/EAP-SIM AP
Change-Id: I544c58f53bd1fe27fbd34626300928382095ccda
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
9432358b816df5530aed86d4107756854e5ac4f0 16-Feb-2017 Peter Qiu <zqiu@google.com> WifiConfigStoreLegacy: read legacy Passpoint configuration file

Read and load Passpoint configuration from the legacy Passpoint
configuration file (PerProviderSubscription.conf). Copy the missing
configuration fields to WifiConfiguration, so that a WifiConfiguration
will contained all configuration data for Hotspot 2.0 Release 1
configuration.

The WifiConfiguration for Passpoint configuration will be stored
temporarily in the share store until its owner logs in. When the
configuration owner logs in, the configuration will be converted
to PasspointConfiguration and added to PasspointManager. Then the
shared WifiConfiguration will be removed to complete the migration.
This will be done in the follow-on CLs.

Bug: 34206769
Test: frameworks/opt/net/tests/wifitests/runtests.sh
Change-Id: I946984822599b46e7e79babdf84272290ecf2431
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
cb9565f0cb8fa92346549bcacdfbf91cdf8e6bd3 16-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface: Expose the 2 ISupplicant methods

These are 2 methods exposed in the top level ISupplicant object, which
needs to be exposed to WifiNative.

While there,
Add the new EAP phase 2 method conversions in SupplicantStaNetworkHal.

Bug: 33383725
Test: Unit tests
Change-Id: I46abd77b0616e4e3da7e9bbe3d2751e0783e93fe
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
6296902ef69724b106973b57b268c30ea4f1ab51 10-Feb-2017 Roshan Pius <rpius@google.com> XmlUtil: Persist WifiConfiguration.status field

Since WifiConfiguration.status field is publicly exposed we need
to persist this field across reboots. We could either,
a) Directly persist this field, or
b) Reset the field on every load using the retrieved NetworkSelectionStatus.

Going with option a) since i want to try and avoid too much logic like
this in the data loading path as much as possible. We don't use this
field internally and it's only used for external apps to check the
status of the network.

Bug: 35210874
Test: Unit test
Change-Id: I80d692affe628a29c29ad2f4b66f8c1e522b114b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
64950d46f5469e5e6ce32ccc81a1f751c40f4202 07-Feb-2017 Roshan Pius <rpius@google.com> ISupplicantStaNetwork save & load WifiEnterpriseConfigs

Methods to set/get network variables from wpa_supplicant to
WifiEnterpriseConfiguration & vice versa.

Test: Unit tests
Bug: 33383725
Change-Id: I82ce772db84ebdeadbd54e8ac5b11f4a4b10cb14
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
66e9f4ab597136cbf4accadb8e009fc68ff071a7 03-Feb-2017 Glen Kuhne <kuh@google.com> ISupplicantStaNetwork save & load WifiConfigs

Methods to set/get network variables from wpa_supplicant to
WifiConfiguration & vice versa.

TODO: Enterprise config params will be added in a further CL.

Test: Unit tests
Bug: 33383725
Change-Id: Ib002266a93b4738d0634cd1bbc925b61a86c1df7
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
d7e8058288bdc5085b54fef77dbfa38597cea348 01-Feb-2017 Peter Qiu <zqiu@google.com> WifiConfigManager: do not delete certificates and keys for passpoint network

They will be deleted when the Passpoint profile is uninstalled.

While there, avoid triggering a perisistent store save when adding or
removing a WifiConfiguration for a Passpoint network.

Bug: 34888235
Test: Verify connecting to a Passpoint network works after
is disconnected previously

Change-Id: I204eaf7053d047b5f4983c6167e6e520bcf643ff
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
0d14dbc1da819e72054b9f168c8e3db767dd34bf 01-Sep-2016 Glen Kuhne <kuh@google.com> Http Proxy Profile & Device Owner permission check

Adding permissions checks to ensure callers of
WifiManager.SAVE_NETWORK and addOrUpdateNetwork() have either
Profile Owner policy, Device Owner policy, or the System Uid. if
they're setting the Http Proxy.

While I was here: Fixed a bug where IpManager wasn't notified of an IP
settings change when a WifiConfiguration's STATIC proxy was modified.

Bug: 14669153
Bug: 32584568
Test: extended WifiConfigManagerTest
Change-Id: I5bc3b1bff6628ffeea7bf6ecd0f6f25a671ab682
Merged-In: I5bc3b1bff6628ffeea7bf6ecd0f6f25a671ab682
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
9cc8b06885dc5889a1ed503b25faff5b83d20978 04-Jan-2017 Peter Qiu <zqiu@google.com> Fix unit tests related to EAP networks

Currently, the tests assumes all EAP networks are Passpoint networks,
which is not true. So remove this assumption and fix tests that
are broken by this.

Bug: 34076701
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Id340fa1162035741e7391849b274295f30a66bdb
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
1fe1065da82165183fa057ddbbd2e33bc5708c1b 01-Dec-2016 Robin Lee <rgl@google.com> Send CMD_DISCONNECT after removing app/user configs

Otherwise they might linger in wpa_supplicant longer than they were
supposed to.

This is already done by every other callsite for removing networks which
might still be in use.

Test: runtest -x tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
Bug: 32660379
Change-Id: I45b0bcc87129be02bcce940f07f7c48543207bf0
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
9eba9df34d6235da16f2b08be81ac79ae2367f08 30-Sep-2016 Peter Qiu <zqiu@google.com> Remove test files for frameworks/base/wifi (android.net.wifi.*)

Those test files had already been copied over to frameworks/base/wifi/tests.

Bug: 31745421
Test: frameworks/opt/net/wifi/tests/wifitests/runtest.sh

Change-Id: I2fe972e57e11951a9fffbf1cbba854e2a67a56f2
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
241605aebc6a8f55624026e8b72246bceb1c2ac2 03-Sep-2016 Roshan Pius <rpius@google.com> XmlUtil: Add couple of missing elements in WifiConfiguration

Add the cipher elements missing in the serialization/deserialization of
WifiConfiguration data. These fields generally have a default value set
in wpa_supplicant and so it wasn't detected earlier.
Also, add the missing requirePMF field.

BUG: 31246524
TEST: Unit tests
TEST: Verified that we can still connect to an EAP TLS network after
reboot.
Change-Id: I7bf1850738f15ec9d25b32521312db0b678c1e19
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
d83ef7d8c4948afc328d8ef0e746b32c195f271e 02-Sep-2016 Roshan Pius <rpius@google.com> Changes in tests for the WifiEnterpriseConfig refactor

The |getFieldValue| with prefix has been made private now. So, change to
the public version of it everywhere.

BUG: 31246524
TEST: Unit tests
TEST: Integrated with config store and verified that a previous TLS
EAP connection failure is no longer seen.

Change-Id: Ib23a384088ad17bcd928c7b5c1ac997e5e289c94
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
009ba55ea70190ab6f98d72698d6ee426bcefd9e 30-Aug-2016 Roshan Pius <rpius@google.com> QNS: Integrate new config manager

Changes in the CL:
1. Replaced all old WifiConfigManager methods with equivalent ones in
the new WifiConfigManager class.
2. Use setters for updating any configuration. The new WifiConfigManager
class provides copies of network configuration, so any local updates
will not take effect in the central store.
3. Modified all tests to reflect the same.
4. Modified the "currentNetworkNotQualifiedDueToOpenNetwork" test
because |isOpenNetwork| is moved to the |WifiConfigurationUtil| now and
hence cannot be mocked.
5. Read all device configs and cache it locally.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: I10c12fa5a229f1ae4fc2457a064c6d09ee5f9a94
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
8600bb5b23872d2f67cf7a12c3d8c40c5f990e84 06-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Implement linking of networks

Implement the linking of networks for QNS roaming decisions.

Networks are considered linked if:
1. Share the same GW MAC address.
2. Scan results for the networks have AP's with MAC address which
differ only in the last nibble.

BUG: 30156343
TEST: Added Unit tests

Change-Id: I84f9949f07d6f6739a9270a8d047441648416f03
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
0e2540a1c1ba3c541a229b039a90789f93c41ee7 28-Jul-2016 Roshan Pius <rpius@google.com> XmlUtil: Store NetworkSelectionStatus strings

Storing direct enum values in the XML file makes it difficult to
deprecate these enums later. So, instead store the string associated
with these status/disable reason in the XML file. If any of the
status/disable reason is deprecated, the reverse lookup of the index
from the corresponding string array will fail. Such networks are
restored as enabled (along with any temp disabled networks).

Also, moved the existing logic to re-enable temporarily disabled
networks to the |parseFromXml| method since we anyway need to perform
the above checks there.

BUG: 30448209
Change-Id: Ib8b8b1ab2b730853dddb7a1d716a2150b1a0f491
TEST: Unit tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
22b5eca14a99c2bbeeae8361c665923ce71e1603 28-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Scan results to config lookup

Add methods to perform:
1. Scan results to saved network lookup.
2. Cache the scan results for each saved network. Also, need to maintain
this list so that it doesn't grow uncontrolled.
3. Rename ScanDetailUtil to ScanResultUtil to accomodate scan result
helper classes for encryption type lookup.
4. Change ScanDetailCache to always trim the cache to the provided fixed
size.

While there,
Fix couple of checkstyle errors in the test.

BUG:29822168
TEST: Unit tests
Change-Id: I281ddcd606d73b8d04d6c9b33b9fc2d4f408f173
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
1fa858ae90e82658e2d5332f66c62c671e736bfb 27-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Change the config merge logic

Modify the merging logic from using |TextUtils.isEmpty()| to determine
if the field has a value to be merged or not to a simple null check. The
older check would prevent apps from resetting some fields later
if needed.

While there,
1. Add a unit test for |WifiEnterpriseConfig| object updates.
2. Add null checks for all publicly exposed fields in |WifiConfiguration|.

PS: |WifiEnterpriseConfig| copy constructor already merges the
provided configuration by checking if the value is set or not. So, we
don't need to add any special merging logic in WifiConfigManagerNew.

BUG: 29641570
Change-Id: Ic98147a9c07d2d3a878f103a9b2ea4988f96924f
TEST: Unit tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
50eed92fe9556fdd9934683690181fea77ce4eac 22-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Implement add/update & remove

Implement the network addition/updation & remove methods.
This doesn't yet include passpoint/ephemeral network handling and other
stuff like sending broadcasts, etc.

For network additions, we need to:
1. Set defaults for the network.
2. Merge parameters set in the provided configuration.

For network updates, we need to:
1. Ensure that the UID has the necessary permission for updates.
2. Merge parameters set in the provided configuration.

BUG: 29606878
Change-Id: I14eac8d34ff8004ae0edd06063423e0bf29e979a
TEST: Unit tests.
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
f03d366f869da748d97706dbcfbd30b989186f4e 22-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigurationTestUtil: Add helper methods

Move all the network configuration creation methods for different types
of networks (open, psk, wep, etc) to a common place. These tests don't
really care for the params like SSID, etc being set in the
configuration. So, there is no need for them to live in individual test.

While there,
Add the missing |updateTime| assertion in the comparator method.

BUG: 29577220
Change-Id: I1606773ad865b4766a84da6fdc8994cab072e808
TEST: Uni tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
f918b154ddceb58c3d214d75ad02180d1907429a 13-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreData: Add unit tests

Add unit tests for serialization/deserialization of config store data.

BUG: 29251019
Change-Id: I0fca803670f72f729c5003802ad196775dc3717e
TEST: Unit tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
642b0bb43ed856bac0503d3169d67026de2c1b02 13-Jun-2016 Roshan Pius <rpius@google.com> XmlUtil: Add WifiEnterpriseConfigXmlUtil

Add a utility for |WifiEnterpriseConfig| class serialization/
deserialization.

While there,
Add missing java doc on the |writeToXml| methods.

BUG: 29318473
Change-Id: I83266631e17f42f55ce1b1a4fc263c975f414419
TEST: Unit tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
5d3609b1931180c37d7292619146ad7d33df9a21 10-Jun-2016 Roshan Pius <rpius@google.com> NetworkSelectionStatusXmlUtil: Add utility

Add a utility for |NetworkSelectionStatus| class serialization/
deserialization.

While there,
Fix the doc strings in the existing utils to add links to the original
object they're trying to serialize deserialize.

PS: Will add a follow up CL to shorten the method names of all these
utils: NetworkSelectionStatusXmlUtil.parseFromXml/writeToXml. The
current names are unnecessarily long.

BUG: 29273147
Change-Id: I59f056a2b99e8583930b716707284d4ccf14392a
TEST: Added Unit tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
030c5debfefddf0512cd53fec48b269c08d9972e 10-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigurationXmlUtil: Serialize all data for store

Add the remaining elements of WifiConfiguration that needs to be
persisted in config store and add unit-tests for verification.

PS: These elements are not serialized for backup/restore. Backup/Restore
only stores a selected subset of elements from WifiConfiguration.

While there,
Add the missing EAP configuration serialization unit tests.

BUG: 29251622
Change-Id: Ic1f22191ed1d7e654190fde5e70bfdf3545eb5d4
TEST: Unit-tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
2fafcc56fda54b1adf8b6743beaac59dbb84dfec 08-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Handle network UIDs

Don't save creatorUID element for backup/restore. All networks will be
restored with the System UID set as the creatorUID. The creator UID is
hard to preserve across backup/restore.

Also, since the creatorUID is not being backed, there are genuine cases
where the configKey mismatch might occur. So, move the |configKey|
mismatch check out of |XmlUtil| and let backup/restore & config store
handle it differently as needed.

PS: Need to also figure out if we should stop backing up all networks
not saved by settings agent (creatorUid != SYSTEM_UD). Will wait for
discussions in b/29201888 to decide on that.

BUG: 29201888
TEST: Unit-tests
Change-Id: I668281893de9260a803872c04646b5af28ee45e5
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
e33a4bb414892435c016486585c26022cafdab68 06-Jun-2016 Roshan Pius <rpius@google.com> XmlUtil: Move Wifi/IP-Configuration serialization

Move the serialization/deserialization of WifiConfiguration &
IpConfiguration objects to XmlUtil. This helps us to share this logic
between WifiBackupRestore & WifiConfigStore.

Changes in the CL:
1. Create |WifiConfigurationXmlUtil| for WifiConfiguration
serialization.
2. Create |IpConfigurationXmlUtil| for IpConfiguration
serialization.
3. Change the XML structure of backup data to remove nesting of objects.
Nesting of objects makes it difficult to deserialize especially when we
start adding elements in future revisions. So, move |IpConfiguration|
object outside the |WifiConfiguration| object.

BUG: 29071904
Change-Id: Id08040bf11e4914638ec9f8d9d27d7983e27e42a
TEST: Unit-tests
TEST: Manual verification of backup/restore using bmgr commands.
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
0fb9cf43830d67894b519c9a6271320c4842a5c0 12-Feb-2016 Bartosz Fabianowski <bartfab@google.com> Allow managed profile to modify networks

If the current foreground user has a managed profile, apps running in that
profile should have the same permissions to add/remove/modify networks as
apps running as the foreground user itself.

This is a re-submit of
https://partner-android-review.googlesource.com/#/c/529950/
with updated unit tests that will also work after merging to N/master.

BUG=26867426

Change-Id: If97734abad801ae1264919c91c3ef4236469cfde
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
9f8586ea6d640e86560efd9a2d9c1909b08a3ef4 11-Feb-2016 Mitchell Wills <mwills@google.com> Revert "Allow managed profile to modify networks"

This reverts commit bbb3149f3bc301e81c202438b77c45574a90a851.

Bug: 27145628
Change-Id: I05ac9c714373b98fa73e0dba21ec4d815200af75
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
bbb3149f3bc301e81c202438b77c45574a90a851 11-Feb-2016 Bartosz Fabianowski <bartfab@google.com> Allow managed profile to modify networks

If the current foreground user has a managed profile, apps running in that
profile should have the same permissions to add/remove/modify networks as
apps running as the foreground user itself.

BUG:26867426

Change-Id: I6ab891625b673e617e1c38863b9c6e71e4938a0b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java