History log of /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2fc3d4dcabb6ddcd72dc335d908aa192c38c5e5f 26-Mar-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: use configKey instead of SSID as unique ID in
...readNetworkVariablesFromSupplicantFile

Use the configKey stored in the id_str field of wpa_supplicant.conf,
rather than SSID, to uniquely identify networks in
readNetworkVariablesFromSupplicantFile.

Also:
- Remove WifiConfigStore.readNetworkVariableFromSupplicantFile(),
and move the logic in that method into
WifiConfigManager.readNetworkVariableFromSupplicantFile().
- Add a helper method, WifiConfigStore.readNetworkVariablesFromReader(),
so that we can inject a test supplicant config file during testing.
- Add WifiConfigStoreTest.java, which currently only contains unit tests
for WifiConfigStore.readNetworkVariablesFromSupplicantFile().

BUG: 26733972
Change-Id: Ice2dcdae0c2e95b4df6459f75f3a98df30290256
TEST: 'runtest frameworks-wifi' succeeds.
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
c2a0ff06d58e1cfb9b69fa5b6a8fef5929812f27 22-Feb-2016 Roshan Pius <rpius@google.com> Rename WifiConfigStore to WifiConfigManager

Rename WifiConfigStore class to WifiConfigManager and replace all
existing occurences of WifiConfigStore.
This is in preparation of refactoring WifiConfigStore into a
separate class which will only deal with storing/reading configurations
from a perisistent database.

BUG: 27296463
Change-Id: Ib4c4bd3bdf3fa28771a646e1f3d244f73b690d5e
TEST: Ran unit-tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
c1bc5a14b94276421f741eaebb54daa8e63e4a05 22-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Remove IpConfigStore inheritance

Move IpconfigStore instance to be a member of the WifiConfigStore and
create a new DelayedDiskWriter for writing the other configurations.

BUG: 27293150
Change-Id: I76654d49848c417599996b0a8b510ff2b04a3d4a
TEST: `runtest frameworks-wifi`
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
5c3c06082b24f9ff0d479e82a63b52220c86598b 12-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigStore: API for fetching PNO network list

Modify the existing API for retrieving PNO network list to
differentiate the list for disconnected vs connected PNO scenarios.
The network sorting orders are different for each of these PNO
scenarios. Use different comparator objects to sort the network list for
the 2 scenarios.

Also, merging the existing ePNO network class (WifiPnoNetwork) with the
supplicant based PNO network class (PnoNetworkPriority). This allows the
Connectivity manager to use a single class for all types of PNO.

While there,
Remove dead code in WifiConfigStore (buildPnoList) which was written for
ePNO.

While there,
Add back the numAssociation counter increment because we're now using
it to sort PNO list.

BUG: 27151228
Change-Id: I6d48dab367a2106eef4f1d3f396f391c57a22339
TEST: Ran unit tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
ae815bc71287f8a85727034c40bb07247a3d9415 26-Jan-2016 Vinit Deshpande <vinitd@google.com> UnitTests for MOManager and AnqpCache

MOManager is the repository that holds management
objects for Passpoint networks. This change adds tests
to add/remove and modify management objects.

AnqpCache holds results to save power; this test
verifies basic adding/querying and expiry of entries.

Change-Id: I9b12a6661f689227f7564cc6a7e0fd7e338e1e8a
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.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/WifiConfigStoreTest.java
fa6ad93d7d4ba58e0609f8eceeadecc76cea25d1 10-Feb-2016 Mitchell Wills <mwills@google.com> Migrate WiifConfigStoreTest to JUnit4

Bug: 27049088
Change-Id: I2dfc5e383710ca7bd2f38b0ed3a4142fd254cefc
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
ac9ad3283508db15b65b1cbb89b841278973276b 28-Jan-2016 Roshan Pius <rpius@google.com> Update network priorities before PNO is triggered

The max SSID watch list size for PNO supported by wlan drivers is fixed
to a certain size. wpa_supplicant sorts this SSID watch list based on
the priorities assigned to those networks. This may result in us losing
some frequently used networks from the PNO list because they have lower
priorities. This is a side effect of how we assign priorities to
network configuration as they're added.
So before we trigger PNO, re-sort the network list based on the
'numAssociation' value and assign them relative priorities. This will make
sure that the PNO SSID watch list contains all the frequent SSID's to
which we were connected to.
PS: This change has a side-effect of ignoring the configured priorities
during PNO.

While there,
1. Add a common test utils class for common utility functions for all
tests.
2. Annotate all tests in WifiConfigStore so that
|WifiTestUtil.getTestMethod| works reliably.

BUG: 26763375
Change-Id: I2c82254b2cb83aef0dd4da9e7d9b2eb5b376bead
TEST: `adb shell am instrument -e class
'com.android.server.wifi.WifiConfigStoreTest' -w
'com.android.server.wifi.test/android.support.test.runner.AndroidJUnitRunner'`
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
79d691a718a3b8980f99940cbeae8d434c469858 09-Feb-2016 Mitchell Wills <mwills@google.com> Remove generic type argument from AnswerWithArguments

It does not add any type safety and was wrong in a number of usages.

Change-Id: I93a76ff60f8dd2fc5eb9786bc312f96f9cfdeaaa
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
2e814680f4dd27a5f825afab189843582235cedc 24-Jan-2016 Jan Nordqvist <jannq@google.com> New System APIs for Passpoint r2 app.

Change-Id: If23e6ab432e871a407cbff94292673524c6d72bd
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
8541f6411048c5c6281699153b8c7c73e1f30c4c 28-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Merge "Test that WifiConfigStore handles duplicate configurations correctly" into mm-wireless-dev
75a766bae85ee8e94fbaad8fb5214804e7ff97e4 26-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Test that WifiConfigStore handles duplicate configurations correctly

When loading network configurations from the wpa_supplicant, the
WifiConfigStore may encounter duplicate entries caused by WPS. This CL
adds a test which verifies that the WifiConfigStore handles such
duplicates correctly (by having the second configuraiton overwrite the
first)

BUG:25600871
Change-Id: Iec8fd9a6dc04849192a0761a9d26a0aacd401c0b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
78463be32c01259841f4c0b670b742c3c2040cf3 29-Nov-2015 Rubin Xu <rubinxu@google.com> Support multiple CA certificates for EAP network

Copy all configured CA certificates to key store and set up their aliases
when adding networks. Remove all certificates when the network is removed.

Bug: 22547958
Change-Id: I91836911bfc84ec2922c5db4e9019a2872f361f0
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
bcdabb1fa1894fcca610692ec94459fe623afa74 22-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Implement private network configurations in WifiService

* Make ConfigurationMap aware of the current foreground user. Suffix each
accessor with one of:
- ForCurrentUser() (operates on network configurations visible to the
current user only)
- ForAllUsers() (operates on all network configurations)
* Make WifiConfigStore aware of the current foreground user:
- Whenever the user changes, networks that are no longer visible are
disabled and networks that newly became visible are enabled.
- Account for the fact that the configKey cannot be computed from
information stored in wpa_supplicant.conf alone while loading
network configurations from disk.
- Have all public methods that add/remove/modify network configurations
operate on configurations visible to the current foreground user only.

BUG=25600871

Change-Id: Id1e81dd649ac5253c94e65b6a25e239fc3cf09a4
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
fbb081b7c28c18f0644701061a1ab38a4627db27 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Store configKey in wpa_supplicant.conf

With per-user networks, the data normally present in wpa_supplicant.conf
will no longer be sufficient to reconstruct a network's configKey. The
configKey must thus explicitly be stored with each wpa_supplicant.conf
entry.

The wpa_supplicant.conf format provides a single variable for keeping
such metadata, "id_str". Since that variable is already used to store the
FQDN for Passpoint networks, it must be extended to hold both the FQDN
and the configKey. This is done by changing the variable's data format to
a serialized JSON dictionary. For future reference, the configuration's
creator UID is also added to the dictionary.

BUG=25600871

Change-Id: I2d63e21d1a87bb9645fed957479dcdb3d2642e38
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
39c3574fa3be035eafbf86462f3ca1bb859060fa 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Revert "Store configKey in wpa_supplicant.conf"

This reverts commit 3552d3bc8329aa9bc843f62c3a854e5ad2b41037.

Change-Id: Ib0d425baa3ac38a20d3ba660e5e5da490a1551e0
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
3552d3bc8329aa9bc843f62c3a854e5ad2b41037 14-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Store configKey in wpa_supplicant.conf

With per-user networks, the data normally present in wpa_supplicant.conf
will no longer be sufficient to reconstruct a network's configKey. The
configKey must thus explicitly be stored with each wpa_supplicant.conf
entry.

The wpa_supplicant.conf format provides a single variable for keeping
such metadata, "id_str". Since that variable is already used to store the
FQDN for Passpoint networks, it must be extended to hold both the FQDN
and the configKey. This is done by changing the variable's data format to
a serialized JSON dictionary. For future reference, the configuration's
creator UID is also added to the dictionary.

BUG=25600871

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