History log of /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1f6626d7488bba014b42bab8bbcd4720694df485 25-May-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add mode to softap update

Plumb the softap target mode in to WifiStateMachine so we can add it to
the softap state change broadcast.

Also cleaned up some of the error and stopping states noticed due to the
mode updates and tests. This removes extra calls to clear the requests
and uses the ap state change broadcast to notify registered callers
about the LOHS stopping instead of attempting to get intermediate state.

Bug: 62076211
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Icff0a9b30e1eb9e5aa945d289d274da7ec8910eb
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
2f47b2755faffaa1a011ddeb8527bd9c99bb6106 25-May-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add iface name to ap updates

When softap mode changes state, add the interface name to the
ap state change broadcast. This will be used by ConnectivityService to
properly track interface updates and changes.

Bug: 62076211
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: softap integration tests locally
Test: manually toggled and confirmed in logs
Test: wifi integration tests
Change-Id: I655dbdbf522c582973bb3fa8a2c42dadceb85a8d
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
6f91c8e110e38d1856b2006f4d60437dcaade5d8 30-May-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Reset network ID for WPS

|WifiNative.migrateNetworksFromSupplicant| retrieves the network ID of
the configuration from wpa_supplicant. This is useful for migration of
config store from N to O, but we don't need this network ID information
for WPS operations since the network ID's allocated by wpa_supplicant
will clash with network ID's allocated by framework. So, reset the
network ID before we add it to WifiConfigManager.

Bug: 62156507
Test: Unit tests
Change-Id: I1c24c60dc2de2d039b3c372d52d10d55cc4d0241
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
54a43675ba622c77dbbcc4ff12fa2c4a92578683 18-May-2017 Roshan Pius <rpius@google.com> SelfRecovery: Module for initiating internal stack restarts

Adding a new module for initiating stack restarts when we detect some
kind of failure internally. This module essentially moves the
|restartWifiStack| functionality out of WifiLastResortWatchdog so that it
can be reused by WifiStateMachine for HAL/wificond crashes.
The 3 reasons for triggering self recovery currently are:
1. Last resort watchdog bite.
2. HAL crash.
3. Wificond crash.

TBD: We could potentially perform the same recovery on a supplicant crash.

Bug: 36586897
Test: Manual tests by crashing the HAL & wificond.
Test: Unit tests.
Change-Id: Id3e0c2cc7b339ff02ae4a5597a1f2009cb946125
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
8131b04dc799cb0c75240c7b9eb0517ba1f00be8 13-May-2017 Roshan Pius <rpius@google.com> WifiNative: Add VINTF check for vendor HAL

Currently, we're ignoring HAL start failures to support devices like
gce, hikey which did not have any vendor HAL support previously.

To solve that problem:
1. Remove the Vendor HAL daemon (HIDL shim) from such device's
device.mk.
Handled by other CL's in the topic.
2. Add the Wifi HAL's to the VINTF (manifest.xml) on all devices which
has the Vendor HAL daemon running. (Unfortunately, there is no automatic
translation from the module missing in device.mk to manifest.xml
currently).
Handled by other CL's in the topic.
3. Use the HalDeviceManager to query the VINTF to figure out if the
Vendor HAL is present on the device or not.
4a. If the Vendor HAL is not supported, ignore start/stop calls.
4b. If the Vendor HAL is present, report failure if start/stop fails.

Also, fixed a few invalid mock expectations set.

Bug: 36886769
Test: Device boots up and connects to wifi on 2017 devices.
Test: Unit tests.
Change-Id: Ia3d90c8fafe2f8c156c843f5f47b94deaabe5a56
(cherry picked from commit 30f34829e0e7e49dc09c897c72dd0ded7d9805eb)
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
b1ccc1af4a8023f351baf2983adadf372eedcbd5 12-May-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Return false when disableNetwork fails

This was returning the wrong result when WifiConfigManager fails the
operation. WifiConfigManager in previous releases would always return
success for the operation and hence the bug was masked.

Bug: 37976256
Test: Unit tests
Change-Id: I69939d935d91b894cf5b8e35e5d40282de21838b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
a3458ecb3c1b1a7dae295a6c728242dcc06a04f3 05-May-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: properly update wifi enabling

When switching modes, WifiStateMachine should only update the wifi state
to enabling when actually heading to connect mode. This is currently
not the case and we end up seeing the UI update the wifi icon to show
that wifi is starting up.

Bug: 37925273
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie3a092c7805b64316c42f2781b14deb3986d2572
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
e4a99c6c3d3ce34ac33c7fb63fc4202468580a91 12-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix START_WPS null exception" into oc-dev
781fa6d27f15a1e3b8cc3d3cd7aaa63b38c8d56e 07-Apr-2017 Glen Kuhne <kuh@google.com> Fix START_WPS null exception

Fixed an uncaught null being passed in through the startWps API.

Bug: 36491634
Test: Added a unit test
Change-Id: Ic8f5cec9d43332b4c8701582455e662a6f885f20
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
9a89f4f412a0bac946ad842b437ab9e5e3b59828 28-Mar-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: exclude CMD_RSSI_POLL for LogRecs

Due to the frequency with which we execute CMD_RSSI_POLL
(every 3 seconds, when the screen is on), the CMD_RSSI_POLL
LogRecs often crowd out more useful information.

To resolve this problem: don't include CMD_RSSI_POLL
in the log records maintained by StateMachine. But, to
facilitate debugging of CMD_RSSI_POLL issues, _do_
include CMD_RSSI_POLL when verbose logging is enabled.

Ideally, we'd solve this in some other way, so that the
LogRecs include all commands processed by the WifiStateMachine.
My hope is that we don't lose too much relevant information with
this change, because the consumers of the RSSI data do their
own logging.

Bug: 26960649
Test: unit tests
Change-Id: Icea22f9fe23c29cb5d2ad97b10955b74977d5e1a
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
24ee320f5ef7359514bd5167a4a11e31813e5019 05-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WSM: Support add/update/enable network in any state" into oc-dev
e87ca83103d68c0b9d0166069ccbfa52da533d88 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Reland] hotspot2: track creator UID for installed providers" into oc-dev
f581432bf2e9d11d2c1d959c203f76ba1fb90573 03-Apr-2017 Roshan Pius <rpius@google.com> WifiStateMachineTest: Fix test flake

Bug: 36843246
Bug: 36796809
Test: runtest.sh
Change-Id: I6a4f204e3266dd249b85a15e60110d4fef641993
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
07816a4745b8030911869ceb58fa735e47834fe4 03-Apr-2017 Peter Qiu <zqiu@google.com> [Reland] hotspot2: track creator UID for installed providers

This is purely for debugging purpose. It is not used for restricting
apps that can update/remove configs. Since for Passpoint configuration,
the app that's responsible for adding a config might not be the app
that's responsible for removing that config.

Bug: 36566563
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: verify Creator UID in the output of "adb shell dumpsys"
and the config store file

Change-Id: I5c651fb204b6e07c2b1d6324350d63d25a38c894
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
dc5eab67d9ca3e0453318071746e76b5d16990d6 30-Mar-2017 Roshan Pius <rpius@google.com> WSM: Support add/update/enable network in any state

WifiConfigManager can support network addition/updation as soon as the
config store is read at bootup. So, add support for it in WSM.

ENABLE_NETWORK handling is duplicated because when wifi is off, we don't
want to trigger a connection request (when disableOthers is true).

Bug: 36773940
Test: Unit tests.
Change-Id: Ib4089e45e61062e1043329b2b77d1d19579cb3c0
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
6ecd7a8dcde46e3524c15c4a07075ca06ab681b5 30-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: initiate disconnect when updating current network's provider

When a Passpoint provider configuration that's being used for
the current network connection is updated, we should initiate
a disconnect from the current connection so that updated
provider configuration (e.g. credential) will be used.

Bug: 36777009
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: verify WiFi is disconnect then reconnect when updating
Passpoint provider that's used for the current connection

Change-Id: Id5ed0883a75ef8b0ca6d238f4e8e52d7a4d36ea7
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
bab957bb2055ee595f66bf4a87614efb1327b905 29-Mar-2017 Glen Kuhne <kuh@google.com> Merge "Reset & Stop updating WifiInfo outside ConnectMode" into oc-dev
47b8bdb173893084115ead905ea7ffe847840ca2 23-Mar-2017 Glen Kuhne <kuh@google.com> Reset & Stop updating WifiInfo outside ConnectMode

Added a WifiInfo reset call on entering and exiting ConnectModeState, as
well as setting WifiInfo SupplicantState to Disconnected.
Also removed handling of SUPPLICANT_STATE_CHANGE_EVENT from
ScanModeState, which results in no updates to WifiInfo.
This fixes an issue where WifiConnectivityManager could become frozen
due to wpa_supplicant shenanigans in ScanModeState.

Test: Added a unit test
Bug: 36416438
Change-Id: Id8f4bd6434937ece08978a6186f6a9b1a6ab9c37
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
17c2a7b30e5680b11fc0073ce322ee7bc14ef2c5 03-Feb-2017 Randy Pan <zpan@google.com> Local log buffer shared by connectivity modules

Move the creation of the local log buffer for connectivity modules to
WifiInjector. Then pass it over to all the connectivity modules.
Dump the log buffer via WifiConnectivityManager.

While there, removed the null check in localLog() for all the
connectivity modules.

Bug: 35642622
Test: runtest.sh and manual test
Change-Id: I31866c6fecdd9f50061f47e34e16c701ff230a6c
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
af0e32cfa2f7402c60b9df88a0d9bd19f421026c 22-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Handle vendor HAL death

The handling is similar to wificond binder death handling. We go back to
initial state on the vendor HAL death.

Also fixed couple of nits:
1. Fixed the vendor Hal test failures due to mockito change.
2. Renamed the log event handler variable (fixing a previous sed).

Bug: 34859006
Test: Unit tests
Test: Crashed the vendor HAL manually and verified WSM returned to
Initial State

Change-Id: Ia2c8249ca5b6857af09f8e996900881ac8a844ec
Merged-In: Ia2c8249ca5b6857af09f8e996900881ac8a844ec
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
e7f3bdb1ecc717966166c8397a0d49b6493ba637 22-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachineTest: update string matchers

This CL fixes test failures introduced by the change for matchers in
mockito. The test used anyString() where the test value was null. The
test now sets the value and uses it in the matcher.

Bug: 36407367
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh -e class
com.android.server.wifi.WifiStateMachineTest

Change-Id: Iaae2db2766392fabd4458c2c376655a78eafde34
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
56ee240e9e4c6a4967f08faa50cef95bfd5c2949 20-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Remove networks on enter/exit ConnectMode

Bug: 36189070
Test: Unit tests
Test: Turned on/off wifi several times & verified that the networks are
removed.
Change-Id: I0faf4cffacb440746516122845667a7a7a5e6546
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
a21bea22a9d442b5886207855ddf63ffee972f0b 14-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Fix WPS handling

Since wpa_supplicant is no longer our config store, we need to read the
network params out of it add it to WifiConfigManager after WPS network
addition.

Bug: 34714021
Test: Manual tests. Able to connect to wps networks now.
Test: Some unit tests. It can be better, but need to figure out how to
extract the message reply from WSM.
Change-Id: I41231698c7e99ec46d34a60a70c04a6ee25ebfe4
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
48c93da3c53650a62bc827199840137417c0825a 09-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: add support for WifiStateMachine#syncGetMatchingWifiConfig

This function will try to match a Passpoint AP to an installed Passpoint
provider. Once a match is found, it will generate and return a
WifiConfiguration for the given Passpoint AP, which will contain
all necessary credentials for connecting to it.

Note that, the generated configuration is not added to WifiConfigManager.
The consumer of this WifiConfiguration (e.g. Settings app) can use
this WifiConfiguration to initiate a connection via WifiManager's API.

This operation is only supported in client mode, since PasspointManager
might issue ANQP requests when matching scan result to a provider.

Bug: 35888100
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: install Global Reach Passpoint profile and verify the Global
Reach Passpoint AP in the Settings UI is shown with
"available via xxx" text.

Change-Id: I9bbd57819326d285367e89a342f21da79fc33555
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
a1727e40dc6b2742df5b32451f1dfa787fc6aa98 14-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Note user selection only for settings app

The previous CL for this bug also modified the user selection when we let
non-settings app to initiate connection. This bug CL reverts that,
non-settings app can only initiate connection, but not set user connect
choice.

Bug: 36040264
Test: Unit tests
Change-Id: If70fe974274277bd804f5cc17a5751dee76f44e3
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
4a5f4e08d677a6da1b436e58d027de99518a97cf 09-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Allow any app to initiate connection

This brings the existing API's in parity with behaviour in N. We allow
apps to initiate connection to a network even if they have no permission
to modify it.

Bug: 36040264
Test: Unit tests
Change-Id: I3316877ea88969fe4397552fea9461acb4d52cf2
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
b8b3fb8228a1f90106bad8c59ce006b81ef7921c 09-Mar-2017 Roshan Pius <rpius@google.com> Remove all legacy HAL usage from framework

WifiNative now just becomes a module to route calls into the appropriate
native module: WifiVendorHal, WificondControl, SupplicantStaIfaceHal,
SupplicantP2pIfaceHal.

Changes in the CL:
1. Cleanup WifiNative to remove the legacy HAL usage.
2. Remove the |HIDL*| flags in WifiNative.
3. Remove static instance of WifiNative/WifiMonitor.
4. Remove WifiMonitor code parsing the string events from
wpa_supplicant.
5. Remove all unused jni code used for legacy HAL interactions.
6. Remove dependency of libwifi-hal & libwifi-system from framework.

Notes:
a) We can now potentially split up WifiNative into separate chunks:
WifiStaNative, WifiP2pNative, WifiRttNative, etc instead of having a
monolithic WifiNative instance.
b) We may have to add back the local log in WifiNative (b/36059665).

Bug: 35702893
Bug: 34457880
Bug: 34884202
Bug: 35421721
Test: Compiles, existing unit tests pass.
Test: Device boots up and connects to wifi networks.
Test: Verified with wifi regression (b/36068282)

Change-Id: I3e13522c912242af8023471e029edb1ce47fd3e9
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
835e781643b79c30fabbab5595770cf01b5861fb 01-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiPermissionsUtil: add checkConfigOverride

Add a helper method to allow callers to check the calling UID for the
override config permission. This CL moves the call from
WifiConfigManager to the util/WifiPermissionsUtil class and adds tests.

Bug: 35870086
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I5aa1bbc82eb86408272564365d45b7ddbf7cc661
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
3a0679d411c5eb889d38ed32181446c82d5bd825 02-Mar-2017 Roshan Pius <rpius@google.com> WifiNative: Use Vendor HAL for mode change

Restructure the WifiNative setup/teardown operations so that vendor HAL
can start & configure the chip in the correct mode and then inform
wificond about it.

Bug: 35765841
Test: Will send for integration tests.
Change-Id: I14ef0011117f83bed99c21fb459f00263a90a793
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
dd97694345f47ba6a952c1162e7dcdd66fb72060 24-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: synchronize Passpoint configuration changes through WifiStateMachine

This is to avoid any race conditions so that all Passpoint configuration
changes and use of those configurations will be done in the WifiStateMachine
thread.

While there, initiate a disconnect when removing a Passpoint provider and
the current connecting/connected network is provided by that provider.

Bug: 33200134, 34202139
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually remove the Global Reach Passpoint profile while the
phone is connected to its network, verified that the profile
is removed and the WiFi connection is torn down

Change-Id: I88feac77d3c1c1836d651df09d01142b73489c54
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
f91a96259d1fbdfb9af907dd20cf905a8da3a119 21-Feb-2017 Mehdi Alizadeh <mett@google.com> WifiStateMachine: Return Succeeded when connecting to the same network

If a caller sends connection request to connect to an already connected
network, we reply with a CONNECT_NETWORK_SUCCEEDED message.

Added one unit test in WifiStateMachineTest that creates and connects to
a network, and then tries to reconnect to the same network.

Bug: 35360668
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I00da335c50f2c98de4ea12a59e927a0af0a54728
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
63e847ec063cdb7567e242104f25352745393707 16-Feb-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: merge scan mode handling

There are two flavors of scan mode that are not handled consistently.
This causes issues like wifi being reported as enabled when it is
disabled.

This CL merges the two scan mode options. SCAN_ONLY_MODE and
SCAN_ONLY_WITH_WIFI_OFF_MODE both are now handled the same way in
WifiStateMachine and will report wifi as disabled (when ScanMode is the
operational state). There will not be special handling between the two
modes. Full cleanup will be done with the WifiStateMachine refactor.

An update to the scan mode transition to connect mode was also cleaned
up. With the cleanup of the connect mode enter method, we now set wifi
enabled, notify p2p and also no longer need to load the configs. These
calls were removed since they are now redundant.

A test was added to check the wifi disabled/enabled state for the
operating modes of connect, scan, softap and disabled (not a real state,
but implemented as the InitialState). A helper function was also added
to advance the state machine thru SupplicantStarting and
SupplicantStarted states. One test name typo was also fixed.

Bug: 33367804
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: passed wifi integration tests
Change-Id: I9d2c2c898a36f8029a108bda5b8a9aabef9c4762
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
cacafd6c7a5fd1b7b61258c9e0b9091eb2ff8c09 24-Feb-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: optimize and improve tests

1. Optimize the run time of a couple of tests, by makin
use of the (newly added) StateMachine.getLogRecMaxSize()
method.
2. Split tests into smaller pieces, to make debugging
failures simpler.

Bug: 35399013
Test: tests/wifitests/runtests.sh

Change-Id: If95cdf5af7507f1e943e2580f2754c151ab6d337
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
6e1cb80a9e4d78f3f0ab203ad1a00db37ce7e569 22-Feb-2017 mukesh agrawal <quiche@google.com> WifiStateMachineTest: use a real Clock

We don't actually need a mock here, since we
don't configure any interesting behavior, or verify
any interaction.

Moreover, the mock instance of Clock is many times
slower than the real thing. This slowness accounts
for about two-thirds of the running time of two
tests:
- disablingVerboseLoggingClearsRecordsAndDecreasesLogRecSize
- enablingVerboseLoggingIncreasesLogRecSize

So just use a real Clock.

Bug: 35644633
Test: tests/wifitests/runtests.sh
Change-Id: I15fc6862479ac7652f9469fe6b9a209e5edafa4a
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
3c0eb618a6398926893508f9d05fa39a99cf4894 03-Feb-2017 Sohani Rao <sohanirao@google.com> Note WifiState in BatteryStats

BatteryStats has APIs which can be used to keep it posted about the
WifiStateMachine state . This can help correlate power usage with
different WifiStates. A helper class WifiStateTracker will convert
WifiStateMachine states to the states of interest in BatteryStats.

Bug: 28908455
Test: Unit tests
Change-Id: I18db4496c1d7388f57e249d7dbdc0115134c1b3b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
a26a8b33616c94859ba33f33403794cf636baa54 16-Feb-2017 Roshan Pius <rpius@google.com> WifiSupplicantControl: Remove this class (Part 1)

Make WifiSupplicantControl instance part of WifiNative and
expose all the public methods of WifiSupplicantControl in WifiNative.
This is a prelude to removing this class altogether. All of this methods
have been exposed in SupplicantStaIface and WifiNative will use that
once we switch over to HIDL.

Note: Some of the existing methods in WifiSupplicantControl were just
wrappers over WifiNative methods and hence removed them altogether.

Bug: 35421721
Test: Existing unit tests.
Test: Will send for regression tests.
Change-Id: I1c90c8d13bec583ff4b2989c8d62b910c5e73e26
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
f9c69201a95062e33cf62d7bacd465e799788a8f 11-Feb-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: allow config removal

Allow FORGET_NETWORK and REMOVE_NETWORK commands to be handled in the
DefaultState. This means we can now remove configs in any state.

Proper handling for loaded config checks are handled by
WifiConfigManager. A test was added to confirm calling removeNetwork
with a random int properly returns false when no network configs are
loaded.

Bug: 32809235
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: All automated Sanity tests passed
Change-Id: I66dbef26530e3376f00537a3f1241bfd4f8a0d8b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
3c5b13dca7ddb243da91def206c344701d699812 11-Feb-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add delete config helper method

In preparation for handing config remove/forget commands when
WifiStateMachine is in any state (ie, not just connect mode), create a
helper method to call WifiConfigManager to delete the configs and send
the proper message reply.

Bug: 32809235
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Id5c1d2f2e65b2166ff1f14183aa448c00504114f
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
70603901b67c48202ecbb1818e59d487bbcceeda 26-Jan-2017 Ningyuan Wang <nywang@google.com> Create new class WificondControl

This creates a new class WificondControl.
WificondControl provides methods for WifiNative to send control commands to
wificond.
This also moves driver reload, disable/enable supplicant, and interface
cleanup from WifiStateMachine to WifiNative and WificondControl.
This also adds corresponding unit tests for changes above.

Bug: 34715459
Bug: 34776808
Test: compile, unit tests, manual tests, integration test.

Change-Id: I5a5436ae54e7dcd1f2f2f7c780a6f0bdce79ffc2
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
d84fd37259c6e956d0f00c261f573dfa319acb91 28-Jan-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Prepare for HIDL integration

Changes in the CL:
1. As a precursor to plumbing through the WifiVendorHal method to
WifiNative, add a |isStaMode| flag to startHal in WifiNative.
WifiVendorHal.startVendorHal() uses this boolean to configure the chip
in the correct mode.
2. Add a new CMD_INITIALIZE message in WifiStateMachine. This will be
used to initialize the HAlDeviceManager module (via
WifiVendorHal.initialize()). This needs to be done
before the WifiVendorHal.startVendorHal() is invoked, so triggering this
when we get notification that the system services are ready.
3. Also added error recovery in WifiVendorHal.start(), any failures will
trigger a HAL stop.
4. Add a flag to enable the HIDL calls.

Bug: 33384303
Test: Compiles
Test: Added unit tests
Test: Devices is able to boot up and configure the chip in STA mode
(via HIDL using some local changes not yet ready to commit).
Test: Devices is able to boot up and connect to an access point (not
via HIDL, making sure nothing is broken if we check this CL without the
rest of HIDL changes).

Change-Id: I8350a2e120edec4941f0e070478fa7e313a01bb3
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
f826a412709e7e30bd993440fa8174596cc384e7 07-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: remove service dependence

The constructor for WifiStateMachine currently depends on other wifi
related services starting in a particular order (ex, p2p starting before
wifi service). This CL removes this dependence and delays retrieval of
other services until after the boot complete command.

Setting the local WifiApConfigStore variable is also moved to the
constructor for consistency with other locally stored state.

This CL additionally alters the WifiStateMachineTest to send a different
message to test log rec sizes when verbose logging settings are changed
(this set of tests seems out of place for WSM, but this CL is not meant
to address that problem).

Bug: 34137732
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually tested wifi connection
Test: manually checked for Wifi Direct peers
Change-Id: I50fcc378bbbcc98ab833a01b9dd6c044c5f85e3d
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
671a6d626dc3297f0de822fb45aedea8a1e4d43a 30-Nov-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: add WifiConnectivityManager"
am: 585cd77a9c

Change-Id: I7666adfdcf01c55bb470267e96c61a7efdbf0e5c
b4de842310ca698d59ed5b9117d38362e2945947 22-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiInjector: add WifiConnectivityManager

Add call to create a WifiConnectivityManager instance to WifiInjector
and remove the direct call from WifiStateMachine.

Bug: 33052869
Test: runtests.sh
Test: verified connection to network after toggling wifi
Change-Id: Ic7a11a3696a24274a178ddedec18e62ca42d3a2d
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
a59f7d1ab2b9e912a9918eef96a29676c1725824 06-Nov-2016 Etan Cohen <etancohen@google.com> [NAN-AWARE] Rename NAN to Aware
am: c29acea6ce

Change-Id: I83892bc745ae27e0b9d5dcee5799d4aa0baab968
c29acea6ceda3aa4ee537c05ce7d05dac2655cf9 26-Oct-2016 Etan Cohen <etancohen@google.com> [NAN-AWARE] Rename NAN to Aware

Rename only (and any reformatting needed to pass lint) - no
functional changes!

(cherry-pick of commit a61b9fb569153917a650f1d48efa20ba8846a9f3)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Merged-In: Idd8d0ad8d1fa1058c1bcd0de169a02e1fad9d070
Change-Id: I761b8f5b588d74eea66d7150a2f9a1e1ac5c1dfd
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
407b67dabe82aa6aa2b7ea56d4b2708af8cd31de 06-Oct-2016 Randy Pan <zpan@google.com> Move WifiNetworkSelector to WifiInjector am: 2dfadf313b
am: c168540bd2

Change-Id: I084ad68ef855de68a614fef435faa1b9894bb9e1
2dfadf313b3e5194d56d2fa24b9270086cda165a 03-Oct-2016 Randy Pan <zpan@google.com> Move WifiNetworkSelector to WifiInjector

While there, move WifiInfo to be an input parameter of
WifiNetworkSelector#selectNetwork and make WifiInfo the
sole source for obtaining information of the currently
connected network.

Bug: 31383992
Test: Wifi framework unit tests
Change-Id: I107ba600165b008079cebf230865f8b2082740a8
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
6c90568a19e32a1825e06a608e59d3f36daff9ca 03-Oct-2016 Randy Pan <zpan@google.com> Move WifiNetworkSelector to WifiInjector

While there, move WifiInfo to be an input parameter of
WifiNetworkSelector#selectNetwork and make WifiInfo the
sole source for obtaining information of the currently
connected network.

Bug: 31383992
Test: Wifi framework unit tests
Change-Id: I107ba600165b008079cebf230865f8b2082740a8
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
458d8dceedd28a99084d17a5d3118f2c03b3c2d9 04-Oct-2016 Erik Kline <ek@google.com> Add more capable Settings abstractions to accomodate IpManager

IpManager contains an AvoidBadWifiTracker which makes various settings
checks. Add a MockContentProvider with noop implementation.

Test: treehugger
Bug: 31827713
Change-Id: I9c03c379d2f94fa6f751e2f97a68a5ba1a8eea8b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
026cb51837e4cf3aea30b903320b992a3f5d0d7b 20-Sep-2016 Christopher Wiley <wiley@google.com> Remove implementation of user selected WiFi bands

This functionality artificially limits WiFi's ability to connect to WiFi
networks and establish connectivity. We already prefer 5Ghz networks
to 2.4Ghz networks, and offer knobs to scan on a particular band.

The UI that exposed this feature has been removed since M.

Bug: 31148223
Test: builds, unit tests pass

Change-Id: I8ae1f9d2b7217d404557fb69eccb2dd42799d4df
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
e18d6159cfdfa9416386836d7b18249c82df0750 13-Sep-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Mask RTT capabilities against System Properties

Report support for RTT features only if the system supports it.
If SystemProperties disabled RTT, remove the RTT capability flags
from the returned bitset.

Change-Id: Iac888af289649596ff2fcc3ccba5f01a13bf5fc7
BUG: 31437934
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
6259b630ddb59b642729a2d2113d81ed8e33a0e3 12-Sep-2016 Roshan Pius <rpius@google.com> WifiScanningService: Change hidden/PNO scan params

Since networks are no longer configured in wpa_supplicant, network
IDs/priorities being passed around for hidden/PNO scanning does not make
any sense. Changing the wifi scanner interface to remove all
network ID/priority references.

For hidden networks, we'll now send a sorted array of <ssid> for
each network (similar to PNO). This should help wificond prioritize
networks when the size exceed the max supported by driver.
Also, since wpa_supplicant already supports sending a list of ssids for
scanning, plumb it all the way through.

NOTE:
1. The backend for all these scans will eventually be replaced by
wificond.
2. Hidden networks are no longer considered in bgscan requests. This was
anyway not workin in HalWifiScanner's gscan backed bgscan.

BUG: 29503772
TEST: Existing unit tests.
TEST: Successfully connected to a hidden network on device
Change-Id: Ie7783353d2eb87c2fd7b9a10f44e3e5df4cbc218
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
dc93140010ce36189b29fd58bc8f25d7636101f5 08-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiInjector: Move WifiScanner to WifiInjector

WifiStateMachine currently obtains an instance of WifiScanner from
FrameworkFacade and this is now relocated to WifiInjector.

This CL also fixes a few style issues.

BUG: 31366047
TEST: frameworks/opt/net/wifi/tests/wifitests/runtests.sh on angler
TEST: manually tested that angler could scan and connect to wifi.
Change-Id: I223fa6dbe8661d46cef3da4d2a072629c9bf6534
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
fe993ca46449a8aab3f7f55e2132456064bcee94 30-Aug-2016 Roshan Pius <rpius@google.com> WSM: Integrate new config manager

Changes in the CL:
1. Separated out the config management control path from wpa_supplicant
interactions.
2. All configuration updates are fully handled in WifiConfigManager and
hence remove all redundant code from WSM.
3. All connection requests are now handled from |CMD_AUTO_CONNECT|. Any
user/app selections will be routed to |CMD_AUTO_CONNECT|. This message
will now mark all wpa_supplicant interations for new connection
attempt. This ensures that we have a single control path for all
connection attempts going forward.
4. Similarly |CMD_AUTO_ROAM| will be used for all roam requests.
5. Replaced all the exiting WifiConfigManager methods with equivalent
ones from the new WifiConfigManager class.
6. All networkId's recieved via WifiMonitor events needs to be
translated to internal networkId using |lookupNetworkId| method.
7. Removed all passpoint config management code and added TODO's for
zqiu to tackle later.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: Id9e209a3cb1b3fef47ba7469c1de020210e3ca60
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
e445510f55e09d4c63ad08d725395563038cee76 23-Aug-2016 Roshan Pius <rpius@google.com> WifiInjector: Add WifiConfigManagerNew and dependencies.

Add the WifiConfigManagerNew object instantiation and all it's dependencies.
Only the WifiConfigManagerNew & WifiSupplicantControl objects need to be
exposed through getters.
Refactored WifiStateMachine object instantiation to add WifiNative instance
in the contructor and modified unit tests.

BUG: 31009287
Change-Id: I6e757ec2a80813a8cc453cd0293cae679e5683ce
TEST: Unit tests.
TEST: Successfully tested Connection to a network on the device.
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
8249dec7f00e21218bcff6e16cf584ef37d87686 10-Aug-2016 Christopher Wiley <wiley@google.com> Rely on wificond to start/stop supplicant

Bug: 30666540
Test: Still able to connect via WiFi

Change-Id: Ia8a706db70be18b2d4b4687400d9a06d0819690e
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
8812ab2ce5def57a6abe55719ee69892d27c70d7 12-Aug-2016 Christopher Wiley <wiley@google.com> Always start/stop wpa_supplicant service on request

For a given product, P2P is either supported or not supported,
depending on the product configuration and hardware support.
Because of this, on a given product, we do not need to determine
which wpa_supplicant configuration to run, we can just use "whatever
the given product supports."

We've changed init files to define a single service "wpa_supplicant".
In places where there were both p2p_supplicant and wpa_supplicant
services defined, we have removed the wpa_supplicant service, and
replaced it with the definition of p2p_supplicant.

Above the supplicant we choose for a given platform, we still keep
the hooks that allow optional P2P support in the framework, since
the framework needs to support hardware with P2P support, and hardware
without.

Bug: 30816535
Test: unit tests pass on bullhead
Test: cts-tradefed run cts-dev \
--module=CtsNetTestCases \
--test=android.net.wifi.cts.ConcurrencyTest passes

Change-Id: I6ea65fde1707f65e70b41c94ca823bb2318d81f0
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
a4fbb5f3e68204a07939a8b544693d6899beb3ed 06-Aug-2016 Christopher Wiley <wiley@google.com> Don't manipulate driver state from WifiController

After this change, all states related to driver state are noops
in the WifiStateMachine. They will be removed in the following change.

Bug: 30764863
Test: unittests pass on bullhead and upcoming devices
Test: WiFi continues to be able to connect/disconnect on bullhead

Change-Id: Ife8bb2d57a300350749d920ff89dee12ad86d310
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
22538d9b292581859bb6d21415527521218b89db 06-Aug-2016 Mitchell Wills <mwills@google.com> Fix downstream breakage by 173dae04272c1b40488292f6392a922b4c4b2949

loadDriver was removed in master

Change-Id: I2ecb78baadd20644a1cb1656e86f54c4c0c2607e
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
e92ef5d5cbdfed45cb3a818499a7eafb63d34b01 05-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: update new mode in initial state am: 173dae0427 am: 5870db3561
am: 673719204b

Change-Id: I7bdebc4a09cdeb8050696c715ee0892bf9f5bfac
173dae04272c1b40488292f6392a922b4c4b2949 05-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: update new mode in initial state

When WifiController calls setOperationalMode a CMD_SET_OPERATIONAL_MODE
message is sent to WifiStateMachine. When this message is received in
the InitialState, it is not handled where it is then dropped in the
default state. Dropping this message causes WifiController and
WifiStateMachine to get out of sync on the operating mode.

BUG:29938263
Change-Id: I8481af8d6826f3da18f5762833a7b145d81b74dd
TEST:runtest frameworks-wifi
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
d3c8b9e63ef211c523199b8676e5c8911ae6e900 04-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use wificond to setup client interfaces"
a598d61dcfdbd14c42c36241e3c148eb661867be 02-Aug-2016 Christopher Wiley <wiley@google.com> Use wificond to setup client interfaces

Bug: 30041062
Test: Can connect to open networks before and after restarting wificond.
unittests pass

Change-Id: I4f76cef3b4960a6c0601519019e1d3a4fa8acc4d
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
259fb5a5265e0a2aa8a851d5e694d28afe9a87f2 28-Jun-2016 Mitchell Wills <mwills@google.com> Move some of the SIM network code out of WifiStateMachine

Also add unit tests

TEST: Unit tests, boots and connects to open network
Bug: 29776729
Change-Id: I79161f87cee55abce464fb1bdbc643a92c069ffb
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
d68fa5a0cb9715a20cc06010b40ccbe6ba8cb64c 29-Jul-2016 mukesh agrawal <quiche@google.com> move WifiDiagnostics creation from facade to injector

We're about to change the WifiDiagnostics ctor, to
take an extra argument. As long as we're going to be
mucking with the WifiDiagnostics ctor, let's move the
WifiDiagnostics construction call over to WifiInjector.
(WifiInjector is where kuh@ and all the cool kids
hang out these days).

Additional benefits of this change:
- The change slightly simplifes the WifiStateMachine
constructor.
- The change makes the behavior of WifiStateMachineTest
more uniform. Previously, the test would sometimes
use a mock BaseWifiDiagnostics, and sometimes use a
(real) WifiDiagnostics. Which path we took would depend
on board-specific resource settings.

BUG=30566652
TEST=wifitests/runtests.sh

Change-Id: Iee374b9ef49db9264c544e666de5d4621defdfc7
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
019fda2109ea79daee3fb4442080b1b83be2e7b3 28-Jul-2016 mukesh agrawal <quiche@google.com> WifiLogger: rename to WifiDiagnostics

WifiLogger is a bit of a misnomer, as the module is
really about gathering diagnostics generally, and
not just logs in the strict sense.

Moreover, using "log" in the name might lead to
confusion with the logging code we're going to
add to the wifi service.

Rename WifiLogger, to minimize confusion.

BUG=30566052
TEST=wifitests/runtest.sh

Change-Id: I2c2e0a1c250e48f4ffcbf14b59b30ae0e3c6a68e
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
eb378fcdad02760bef70552a33061f43db42ab12 29-Jun-2016 Paul Stewart <pstew@google.com> WifiStateMachineTest: Use CountDownLatch to await startup

This avoids possible test flake if sync.wait() returns early
due to spurious wakeups before mP2PThread completes setup.

Change-Id: I77fd6da45af76cc92a46e2706a899cd9fd9d626b
Fixes: 29831467
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
3204fb9682242a7b5a749489076c66d448c42577 03-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Logging changes

Changes in CL:
1. To reduce log spamming, dump out the raw backup data only in
bugreports if verbose logging is enabled.
2. Mask out the passwords from the backup data dump.
3. Move WifiBackupRestore module initialization to |WifiInjector| so
that |WifiStateMachine| can set the verbose loging level.
4. Cleanup some unused variables in |SupplicantNework| class.

BUG: 29051876
Change-Id: I6b58136057549ba1eb8a2845341be9fa072572b4
TEST: Manual tests
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
256ee9e914f0e7470a4a0f804d2d5ce7f1a9697d 21-May-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of cbb193c to master

Change-Id: I8ba39ea770cef1f5163452fd322631356de80d15
ee0ab818341d44614ffe56ae73ecc08b974c2cbb 20-May-2016 Roshan Pius <rpius@google.com> Change clock for time interval/elapsed measurments

1. Use the clock retrieved from WifiInjector in more modules: QNS,
Scanner, WifiConfigManager.
2. Use |elapsedRealtime| for time interval/elapsed measurments. Things
like scan results, config elements still continue to use
|currentTimeMillis|

Also,
1. Had to make |tryEnableQualifiedNetwork| public to prevent mockito from
calling the real method in WifiConfigManager.
2. Move keystore also into WifiInjector.

BUG: 28299258
BUG: 28824635
Change-Id: I91272aa5665abb741da7530d8920d09c8c5ea41f
TEST: Compiles & unit-test passes
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
f4267b6840dbc7f430638c35c5448187b6e83846 19-May-2016 Christopher Wiley <wiley@google.com> Move test components into its own static library

This allows us to share the class with networking code
in frameworks/base/services. Moved:
- MockLooper
- BidirectionalAsyncChannel*
- MockAlarmManager
- MockAnswerUtil

Bug: 28848133
Test: These tests continue to pass

Change-Id: I97bba188da1eb07aa8f6fccf6f051c48b197d5f1
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
b6d6e31dc6ed9a9a0178990a0cec8edb9ad36c77 18-May-2016 mukesh agrawal <quiche@google.com> WifiService: add build properties abstraction

As it turns out, WifiStateMachine isn't the only thing that
wants to change its logging behavior depending on
Build.TYPE.

1) Add an abstraction of Build.TYPE, so that we can
a) check build type in a common way, and
b) test the logging behavior across build types
2) Migrate WifiStateMachine to use this new abstraction.

BUG=28822027
TEST=unit tests

Change-Id: I6f4cb00ccb5f3a4b9a5b67e69f8365aab7fd429c
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
f74a1cfd50d7b44aa7e4b598eb229cd464983dfe 03-May-2016 mukesh agrawal <quiche@google.com> wifi service: abstract away access to SystemProperties

We want the ability to modify the value of a system property,
so that we can dynamically change the logging level for WifiHAL.

This ability depends on permissions that are not available to
the test runner. For example, the process that is running the
wifi service code needs the ability to connect to the
|property_service| socket.

To resolve the problem, we do the following:
- add a PropertyService interface, which abstracts away access
to SystemProperties
- add PropertyService to the dependencies managed by WifiInjector
- add SystemPropertyService, which routes property requests
to android.os.SystemProperties
- update WifiStateMachine, to access properties via PropertyService
- update WifiStateMachineTest, to use a mock implementation of
PropertyService

BUG=27857554
TEST=unit tests

Change-Id: Ic930337a6a8f6a600ae7b4da2ca2eaf5c9e6c2cb
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
8fe3e3497daf08b71ffc8c33cb7b139df6667448 14-Apr-2016 Glen Kuhne <kuh@google.com> WifiLastResortWatchdog failure counting

Implemented watchdog methods and calls to them from WifiStateMachine to
count association rejection, authentication failure & dhcp failures.

This will allow the watchdog to determine when all available networks
are failing, and Wifi Framework has no other options, however this Cl
does not implement that logic.

BUG=27855690
BUG=27856523

Change-Id: I416bfd0e0340823de5ca04f2d040bff7a751b677
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
fa2ac2743307559e8dcc5aaf54873536315fbe62 19-Apr-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Unit tests for rate limit

Adding unit tests to verify the connection attempt rate limiting
functionality. Had to change the way system time is being fetched in
WifiConnectivityManager to achieve this.

BUG: 28242396
Change-Id: I2bfae3a9ea60cba1c3c1405dd5eb58208f12c2db
TEST: Compiles & unit-test passes
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
5ccc0a429dfea8ef452f8f63454b013983eb87fe 07-Apr-2016 Mitchell Wills <mwills@google.com> Run WifiScanner on WifiStateMachine thread

Fixes: 27695292
Change-Id: I34f05fc532c48c7c3eaa735bc6ec95e7da2794aa
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
93332917bf29ddbe853a495816e486150f49da40 29-Mar-2016 Rebecca Silberstein <silberst@google.com> Update hasEverConnected for wifi networks

Set hasEverConnected to true for a network that completes a connection.

Set hasEverConnected to false when a network config changes.

Add tests to confirm hasEverConnected was added on a successful
connection and cleared when connection or credential related
configuration changes are made.

Also removed some unused imports to fix checkstyle issues in
WifiStateMachine and WifiConfigStore.

BUG: 27856374

Change-Id: Ica633166892b4673683f21ff98e3ded1607dedec
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
492900e5895d4480292d5f7518d109e6b3b9fb47 11-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiStateMachine: reduce number of LogRecords" into nyc-dev
cf2c37cff48a96fe221121dfe6a0360a54ed9ebb 06-Apr-2016 mukesh agrawal <quiche@google.com> WifiStateMachine: reduce number of LogRecords

Allowing 3000 LogRecords uses too much memory (we've
seen >1 MB in some cases). Lower this limit to 100
records, as it was before.

To facilitate debugging issues that happen overnight,
allow the user to opt-in to a larger log record buffer.
To do so, the user should "enable wi-fi verbose logging"
under developer options.

BUG=27504679
TEST=unit tests

Change-Id: Iee983e3c815bef1a9e05f7085147bc73c79753f6
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
ac69b83c9cafb9a839b578c3b5b71eb3439244ad 08-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove WifiStateMachine field

Remove the WifiStateMachine field from WifiConfigManager, since the
latter no longer calls methods of the former. Also, change calls
to the WifiConfigManager constructors to accomodate this change.

BUG: 27405059
Change-Id: I468f74259d45d9a1a61e00b987533eaa66846024
TEST: 'runtest frameworks-wifi' succeeds.
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
06636d2de935ad5d2e8fb6483c406fe922c75ff2 05-Apr-2016 Samuel Tan <samueltan@google.com> Remove getCurrentUserId() and getCurrentUserProfiles() from
...WifiStateMachine

Move getCurrentUserId() from WifiStateMachine to WifiConfigManager,
and remove WifiStateMachine.getCurrentUserProfiles(), so that
WifiConfigManager no longer makes calls to WifiStateMachine to
perform these two tasks.

Achieve this by moving the bookkeeping for the current user ID
from WifiStateMachine to WifiConfigManager.

BUG: 27405059
Change-Id: I06a8be88f24fd81cbfe785c4304883ddc44658f8
TEST: 'runtest frameworks-wifi' succeeds.
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
1d540dbd9ddeafc27dda51e26b0303df4a66914d 07-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiNative: Remove PnoMonitor" into nyc-dev
8ba794562167643688ee38352f98345403fa22c8 07-Apr-2016 Roshan Pius <rpius@google.com> WifiNative: Remove PnoMonitor

Remove PNOMonitor from WifiNative since it has been refactored out into
SupplicantScanner now.

BUG: 27677054
Change-Id: I99850a1e59bfe0ee21c674467ae7480df85e76ff
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
7284b9d30f671657dee2f232e01dad46259764b2 07-Apr-2016 Junda Liu <junda@google.com> Merge "Update WifiStateMachineTest to new sim authentication API." into nyc-dev
d6d22df90639c55a15aa6f1b4c5516269689376a 06-Apr-2016 Junda Liu <junda@google.com> Update WifiStateMachineTest to new sim authentication API.

Old getIccSimChallengeResponse has been deprecated. So the mock is updated
to the new getIccAuthentication API.

Bug: b/28021965
Change-Id: I03098b614ae74b8d91527a78c004d3c7fd0e3760
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
74524b55c7aa23d79d0aa5513b5626209482aa8b 31-Mar-2016 Mitchell Wills <mwills@google.com> Fix WifiStateMachineTests after adding WorkSource scan argument

Fixes: 27942752
Change-Id: I6994dea18151060f568b1d5211d8049989eecb53
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
54c9cf8d299b99f8b999bc2cf4adcda1eba81469 18-Mar-2016 Glen Kuhne <kuh@google.com> Remove SupplicantStateTracker dependency on WSM

Removed the SST's dependency on WifiStateMachine, since it doesn't use
it for anything.

BUG=27725788

Change-Id: I209056f8ecc9fe73d184718b86a0b8442e3950ea
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
d02611ce4158fda6c2d14ee13ad7f9553f416d21 02-Mar-2016 Ningyuan Wang <nywang@google.com> Wifi country code refactoring

This CL pulls coutry code logic into one class.
This also refactors all the existing country code logic.
We do not set country code for P2p interface now because
this is redundant. wpa_supplicant will route all the request
to the real interface.
Some initial unittests are added.

Bug: 27477896
TEST: compile, runtest frameworks-wifi,
manually tested with an angler phone
Change-Id: I870c3ad615a1f9bfb3fb40b149b9ca71dc850cdd
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
637a86ffb3a036a4f26a471378b57d8817f35c25 08-Mar-2016 Glen Kuhne <kuh@google.com> Created WifiInjector, dependency injector for wifi

Created a new class WifiInjector, a lazy singleton for dependency
injection. Initial use case was accessing WifiMetrics from within
WifiScanningService, will allow for easy mocking, and is a potential
candidate to replace the mess that is FrameworkFacade.

BUG=27550630
BUG=25691077

Change-Id: I0b1a99f718912fe6ee9a1453ff275b5dfedce6fd
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
8adb4e72f58e3e25918f33e0b2687e6acc14c47d 04-Nov-2015 Mitchell Wills <mwills@google.com> Refactor WifiScanner support for oneshot scans

Seperate oneshot scans so they are no longer implemented using
background scans and make WifiStateMachine use WifiScanner for single
scans.

This changes requires a few parts:
1. Implement single scan logic in WifiScanningServiceImpl for merging
and executing scan requests using the single scan native interface.
2. Writing tests for the new code in 1
3. Make supplicant start scans by using WifiScanner and when it
recieves callbacks dispatch scan complete/failure messages.
4. Enable HalWifiScannerImpl and SupplicantWifiScannerImpl to listen to
supplicant scan events now that WifiStateMachine does not.

Bug: 26525037
Bug: 26895774
Change-Id: I7d03b43bbd2be396b3c772bc4bae681acce8eb7b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
3d995b8a3a508e957e3dac2e508956020cd9abfe 04-Mar-2016 Roshan Pius <rpius@google.com> Send list of hidden networkID for supplicant scan

Since we disable all the networks in wpa_supplicant (as of b/26984166),
we need to explicitly send the list of hidden ssid's to scan.

1. Use the 'scan_id' override to send a lit of hidden networkId's to
supplicant.
2. Add a new set of hidden networkId's in ConfigurationMap which can be
used as parameter for the above.
3. Add a test to start scan with a hidden network added.

BUG: 27471630
TEST: Verfied that we auto-connect to a hidden ssid.
TEST: `runtest frameworks-wifi`

Change-Id: I8aea09d1ec2f24310959a558e8b12d31a26d179c
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
3fff931f15b78dc75376506d98782393452d4c56 01-Mar-2016 Erik Kline <ek@google.com> Call IpManager's dependency injection constructor

Bug: 27406552
Change-Id: I75e01766829d15f219d72621b654c566189ae989
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
2d65b9aaaa740ecf66bf4734c12aea3df88e352a 24-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigStore: New WifiConfigStore (Part 2)

Integrate the new WifiConfigStore into WifiConfigManager class.
Most of the public methods that have been moved to ConfigStore have been
stubbed out in WifiConfigManager. Some of the methods have been changed
to make it consistent with the other methods.

The end goal of this CL to remove all WifiNative usages in
WifiConfigManager class.

Other related changes:
1. Changes in unit-tests to use mock wifiNative everywhere.
2. Change WifiConfigManager to accept an instance of KeyStore so that it
can be mocked out in unit-tests.

BUG=27299172
TEST:`mmma -j32 frameworks/opt/net/wifi/service/ && runtest
frameworks-wif`

Change-Id: I1656d81aec0ae3337bd794541b5a0bde9cddd48e
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
8f852de7a8f081aff36bc9896781b270ca88d0e8 25-Feb-2016 Glen Kuhne <kuh@google.com> Add makeWifiConfigManager() to FacadeFramework

Added a function to FacadeFramework to make WifiConfigManager, replaced
the constructor in WifiConfigManager unit tests with this function.

BUG=27359698

Change-Id: Id9c0e6757244527e7f5fe7143687a32dd8d96c58
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
ac90154934c0daf4e69a6d38344b82eea8dee91b 25-Feb-2016 Peter Qiu <zqiu@google.com> Merge "Use a wrapper for BackupManager" into mm-wireless-dev
750c6962838af6ab7ba034c80f2d325df7e74cbe 23-Feb-2016 Peter Qiu <zqiu@google.com> Use a wrapper for BackupManager

This avoids invoking calls to BackupManager/BackupManagerService during
unit test.

Bug:27296824
TEST=runtest frameworks-wifi

Change-Id: I3d4fe1b4d2fdabe079e65242099f4dd4ed4ab7f4
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
af8f9541d248f7e1ca8232774de1310838ef4b0a 24-Feb-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Only respond once to multiple EAP-SIM challenges" into mm-wireless-dev
e2dc63bb990eed0f1909f8f38cbfb0d2f4bc2a92 24-Feb-2016 Roshan Pius <rpius@google.com> Merge "Disable all networks in supplicant" into mm-wireless-dev
21501176384e4312dce3a51b8ae8ca132f5d9ab4 23-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Remove use of MockLooper AutoDispatch from non-blocking calls" into mm-wireless-dev
f1819c969c2b9c626c7f5845b48772494c4e0ac5 23-Feb-2016 Peter Qiu <zqiu@google.com> Merge "WifiStateMachineTest: use mock WifiApConfigStore" into mm-wireless-dev
9d7489491984e86915b2cf4fac38a882de1c8cdb 09-Feb-2016 Roshan Pius <rpius@google.com> Disable all networks in supplicant

Temporary changes to test if we can disable all the networks in
supplicant conf file except the one we want to connect to.

Changes:
1. Remove all existing native enableNetwork invocations and replace
it with a single selectNetwork call in |WifiConfigStore.selectNetwork|.
selectNetwork enables the provided network and disables all others in
wpa_supplicant.
2. Enable all networks in wpa_supplicant before enabling PNO. These will
be disabled when we come out of PNO and decide to conneect to one of
them via selectNetwork.
3. Save the network status in networkHistory.txt and ignore the status
stored in wpa_supplicant.conf.
4. Some other cleanups:
a. Remove |enableNetworkWithoutBroadcast| definition/usages and
replace with |selectNetworkWithoutBroadcast|.
b. Add enableAllNetworksNative/disableAllNetworksNative methods to
just enable the network in wpa_supplicant.
c. Move all wpa_supplicant network enable/disable to a common API.
d. Fixed all the unit-test expectations.

BUG:26984166
TEST: `mmma frameworks/opt/net/wifi/tests && runtest frameworks-wifi`

Change-Id: Ib5a089f054557071ece6be25aad03b6458c0217c
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
3116dea7fa16bb41327c4311110d8e21ffe8c794 23-Feb-2016 Peter Qiu <zqiu@google.com> WifiStateMachineTest: use mock WifiApConfigStore

This avoids writing of AP config file during unit tests.

Bug: 27311680
TEST=runtest frameworks-wifi

Change-Id: If6f534f7eeca8a37acf9a43b0c30acee0b5e22b9
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
823af138d63dc96224976b2a5ad6e9b1b224581e 23-Feb-2016 Rebecca Silberstein <silberst@google.com> Remove use of MockLooper AutoDispatch from non-blocking calls

AutoDispatch is not needed with non-blocking sendMessage calls. Remove
two instances of this error.

BUG=27278081

Change-Id: Id346d76e971c361149ae885a8b8056660b61e5f3
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.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/WifiStateMachineTest.java
d0846fa841b604ccb969c54b45367fa2bececf83 16-Feb-2016 Rebecca Silberstein <silberst@google.com> Add Looper param to WifiStateMachine constructor and AutoDispatch

Add Looper to the WifiStateMachine constructor. This allows unittests to
pass a MockLooper and control how messages are dispatched. This change
allows the wait() calls to be removed from the WifiStateMachineTest
tests and will bring stability to test runs. This change will also
reduce test run time.

Due to the blocking calls in WifiStateMachine that are expecting a
response, also implement AutoDispatch functionality for MockLooper.
This functionality is implemented by creating a thread that calls
MockLooper.dispatchAll when messages are available. Once at least one
message is dispatched, the thread will exit. The thread will attempt a
limited number of times and log an error if no messages are dispatched.

BUG=26943243

Change-Id: Ia892303e04d18c56d7f1d896db6098e7c3bd9607
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
be6cb1df0c221f72d09fc0ab6f5c45b0949c9a88 18-Feb-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Only respond once to multiple EAP-SIM challenges

The commit in 5ebc35f19feab2755a13cf7d5acaeff4bbc78994 made an
attempt to fail the EAPOL process due to intermediate failures
with TelephonyManager. It's not clear how well that worked,
but it's clear from inspection that when multiple challenges
are supplied that the code then sent multiple simAuthResponse
messages -- one per challenge. This is clearly wrong.

This CL refactors the code to clearly separate the function
that generates the complete response string so it can be tested,
and leaves the handleGsmAuthRequest() method to interact with
mWifiNative in a hopefully more readable manner.

BUG: 26758602
Change-Id: Ibf8f85893e4c18195eb08114b5169dcff05dc045
TEST: New unit test for the getGsmSimAuthResponse method
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
eed7ed0f235d1124564d567178e485f0a5cda616 17-Feb-2016 Lorenzo Colitti <lorenzo@google.com> Simplify smToString using MessageUtils.

Change-Id: If7355bbf5295c55e97882dce55a07b607309e0f2
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
00cd284ff0b4bbfd4bb39683cd2d37ef402bbc45 11-Feb-2016 Erik Kline <ek@google.com> Use IpManager.ProvisioningRequest for IpManager#startProvisioning.

Bug: 26991160
Change-Id: I929744e9faa3c71170a3e8e1e1bedc3c6cd16d22
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.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/WifiStateMachineTest.java
63539f1283899fbbf83ab90757961b4be51d5034 04-Feb-2016 Mitchell Wills <mwills@google.com> Update scanner onScanStatus callback to include event

This now allows scanner implementations to indicate scan failues as
well.

This change also ensures that anqpLines is set in results from supplicant

Change-Id: Ibe18c9b804bf073b9152800295c40d072a41e641
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.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/WifiStateMachineTest.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/WifiStateMachineTest.java
bfcea7de75875c900de19a8504416492ed96ae21 11-Feb-2016 Roshan Pius <rpius@google.com> Merge "Update network priorities before PNO is triggered" into mm-wireless-dev
d150184a5b28f862b39ad383ab87ee0ac4ca6be8 10-Feb-2016 Erik Kline <ek@google.com> Merge "Split updateLinkProperties() and provisioning change handling" into mm-wireless-dev
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/WifiStateMachineTest.java
8cf2b5c507918a30629b9dc24944422fc0920665 03-Feb-2016 Erik Kline <ek@google.com> Split updateLinkProperties() and provisioning change handling

Bug: 26991160
Change-Id: I20a41e5f1426befc474e923d2763b508f26f1ce4
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
ed6a985c7b63e295248fa7e8292c99b48b7a4283 04-Feb-2016 Mitchell Wills <mwills@google.com> Remove unused supplicant scan with connection setup option

We no longer want supplicant to make connection decisions by itself so
remove the option since it is dead code.

Change-Id: I53a059219e0080e4780d9a131748958049b47df2
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.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/WifiStateMachineTest.java
676d664bf4b5f59279a53a986ce94363e2bc4fd2 09-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Removing Hotspot 2.0 OSU client code from framework." into mm-wireless-dev
68cb8c02b4ad079c54a2ffd4407da921d18c7af9 25-Jan-2016 Wei Wang <weiwa@google.com> Enable Rtt Responder Role(2/4).

Change-Id: Ib18af94fbba21c833c47336f7a92afe918dc9a89
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
3fff4c9bd5db730141e75706a7229814d403b363 05-Feb-2016 Jan Nordqvist <jannq@google.com> Removing Hotspot 2.0 OSU client code from framework.

Change-Id: I1be652aeb60cc3c49b606e4e2f467951cf2d68b5
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
92ce793e9af3faf5d996dd1e592fbc728785058a 03-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "New System APIs for Passpoint r2 app." into mm-wireless-dev
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/WifiStateMachineTest.java
8013a9b65375608d80606780e9e1b313576a0f80 02-Feb-2016 Erik Kline <ek@google.com> Move DHCPv4 mechanics out to IpManager

Bug: 17345682
Change-Id: Iafe64e924b15c60e27e71c625439f3ab3d251c69
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
a51955bb18c047b2d7e4160f75b7e2dc876eb227 02-Feb-2016 Peter Qiu <zqiu@google.com> Merge "WifiApConfigStore refactoring" into mm-wireless-dev
6728555d8e533b3ae2efe7e48f4a0bac3809d959 01-Feb-2016 Erik Kline <ek@google.com> Move static IP configuration into IpManager

Also, stop passing around "reason" for IPv4 provisioning success
or failure.

Bug: 17345682
Change-Id: Ib7f2e1ba7ce5d8c17427e21ad9035b06750d2452
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
bade25ebb7b4137521576ba01e77adbda382ac11 02-Feb-2016 Pankaj Kanwar <pkanwar@google.com> Merge "Add DhcpFailure and BadNetworkEvent tests to WifiStateMachine" into mm-wireless-dev
aed8c07f8dc09da9450eae81f4fa8c63191894e0 01-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Revert "Refactor WifiScanner support for oneshot scans"" into mm-wireless-dev
3fdceeaa74e21c0ca4da52deeeef6571e7e2a6cd 01-Feb-2016 Mitchell Wills <mwills@google.com> Revert "Refactor WifiScanner support for oneshot scans"

This CL does not correctly handle devices that do not support WifiNative.getChannelsForBand

Bug: 26895774

This reverts commit 772124d1f1ddb2b9537de5efc748943808dafe80.

Change-Id: Ie49715fc89750f79c8e5f188cb42094f1076a48b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
c94a64a292925a00c33413c81a46941093495b3e 24-Jan-2016 pkanwar <pkanwar@google.com> Add DhcpFailure and BadNetworkEvent tests to WifiStateMachine

This CL adds 2 tests for WifiStateMachine:

- TestDhcpFailure tests failure in dhcp client.
- TestBadNetworkEvent tests sending the NETWORK_DISCONNECTION_EVENT
during connection to make sure that the state machine does not break.

BUG=26901681

Change-Id: I9e79d8a07d18f397a38816e0a508d13482143937
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
9bd76b7c0afc90d800066397497b5947916b90fa 13-Jan-2016 Erik Kline <ek@google.com> Initial refactoring to migrate IP-related things to IpManager

Bug: 17345682
Change-Id: I2cdd59a4ed405b49dd1e5c4f382f6515705b5261
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
c79666b79e273ceaa2f74090b02ca6cf83c61387 27-Jan-2016 Peter Qiu <zqiu@google.com> WifiApConfigStore refactoring

Here are main changes to WifiApConfigStore:
- add public APIs to get/set AP configurations, instead of doing it
via message passing between state machines.
- remove unnecessary statemachine logics.
- remove the use of a dedicated thread for writing configuration file,
the reason is that the file size is fairly small, seems unnecessary to
create a separate thread just for that (which adds complexity).
- handle setting of "null" ap configuration, by falling back to use
the default configuration.
- add unit tests

With this refactoring, WifiApConfigStore becomes more self-contained,
which can be easily reused by other modules (e.g. upcoming SoftApManager).

Bug: 26727266
TEST=runtest frameworks-wifi
TEST=manual test: update/enable WiFi hotspot

Change-Id: If438d5be7eaf59f0f2d35ed25a899cef93c5a638
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
6788fcec7c1f46563aaf30e8cc1e8e7cb7773c60 30-Jan-2016 Mitchell Wills <mwills@google.com> Merge "Refactor WifiScanner support for oneshot scans" into mm-wireless-dev
772124d1f1ddb2b9537de5efc748943808dafe80 04-Nov-2015 Mitchell Wills <mwills@google.com> Refactor WifiScanner support for oneshot scans

Seperate oneshot scans so they are no longer implemented using
background scans and make WifiStateMachine use WifiScanner for single
scans.

This changes requires a few parts:
1. Implement single scan logic in WifiScanningServiceImpl for merging
and executing scan requests using the single scan native interface.
2. Writing tests for the new code in 1
3. Make supplicant start scans by using WifiScanner and when it
recieves callbacks dispatch scan complete/failure messages.
4. Enable HalWifiScannerImpl and SupplicantWifiScannerImpl to listen to
supplicant scan events now that WifiStateMachine does not.

Bug: 26525037
Change-Id: Iddd6d64b35fed129048e1fd5c79acb6982bfc418
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
f2a63d82102461f1e6dbcef7ba16625bc07940ff 28-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Handle user switch in WifiStateMachine.DefaultState

The WiFiStateMachine should take not of changes to the foreground user
regardless of its current internal state. The handling of the user
switch message should therefore be implemented in the DefaultState,
which all other states are built on top of.

BUG: 26846176

Change-Id: Ie605f4df3625e445d2015797c3e9bf57615c1f4d
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
daf5292779d8a24d02f8ec51f51b061b535ed667 21-Jan-2016 Mitchell Wills <mwills@google.com> Merge "Add some tests for WifiScanningService" into mm-wireless-dev
94bd575cb4766ed0dfbaad0fc7719a9e9e85a260 15-Jan-2016 Mitchell Wills <mwills@google.com> Add some tests for WifiScanningService

Cleanup WifiScanningServiceImpl a little and add a few basic tests
Also cleaned up some tests and added some more utilities

Change-Id: Ic0ac34344de6cf8fa03b741189156916ae35e2a3
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
1b067831bbff14f8e7a99b927b69f714d1b03448 04-Jan-2016 Glen Kuhne <kuh@google.com> Wifi Metrics, Initial Commit

Created WifiMetrics class to log wireless metrics.
Dumps Metrics as Base64 wifi.proto, with dumpsys option 'proto'.
Implements SOME metric collection from wifi service

Bug: 25691077
Change-Id: I28a745b5f66dd1d38868b7eadd79882fd2c5c5a2
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.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/WifiStateMachineTest.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/WifiStateMachineTest.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/WifiStateMachineTest.java
eee1d479d8d402a2e78e2f143e957030cfc77749 29-Dec-2015 Vinit Deshpande <vinitd@google.com> First WifiStateMachine UnitTests

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