History log of /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
877c3bc1d9089708b6e3afad255fc295ad58014e 15-May-2018 Roshan Pius <rpius@google.com> Merge "WifiDiagnostics: Fix alert handling" into pi-dev
d3be501437efd5f176e7541cace20b8db467eb47 04-May-2018 Roshan Pius <rpius@google.com> WifiDiagnostics: Fix alert handling

This is currently broken because |mWifiStateMachine| is always null in
WifiDiagnostics (was broken in a refactor of WifiDiagnostics in early O).

Changes in the CL:
a) Construct WifiDiagnostics directly in WifiInjector's constructor (No need
for makeWifiDiagnostics).
b) Directly handle the alert callback. This is already guaranteed to be
invoked from WifiStateMachine thread. There is no need for the extra hop
through WSM message handling.
c) Don't create 2 instances of WifiDiagnostics in WifiStateMachine &
WifiStateMachinePrime.

Some other related cleanups
1) Removed an unused binder object in WifiInjector.
2) Don't cache JavaRuntime instance in WifiInjector.

Bug: 79222338
Test: Unit tests
Test: Triggered an alert (each disconnect triggers an alert) and
verified that:
i) metrics are incremented, and
ii) dumpsys contains the alert data.

Change-Id: I59b157d57cc7ba234efa2dfe20fc59cc5834df2c
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
f29c56eb230ac7b4148226151e2f4731011d5a43 10-May-2018 Rebecca Silberstein <silberst@google.com> ActiveModeManager: add dump calls

To aid in debugging, add dump calls to active mode managers.

Bug: 79155403
Test: manually verify dumpsys wifi
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Id37bc7e1dc214d3cac057f1645addd4ef162fdea
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
1b60f40a00afc38da4587ae275702d758bf66332 15-Apr-2018 Rebecca Silberstein <silberst@google.com> WifiController: softap mode untethered

Remove SoftAp mode from the state machine in WifiController. In doing
so, also utilize the WSMP shutdownWifi call to disable all active mode
managers in airplane and emergency modes. This also fixes a few
updates from Client mode as it exits and moves them to the default
state.

Bug: 31346104
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually toggled between modes on multiple devices
Test: wifi integration tests
Test: android.net.wifi.cts
Change-Id: I9fb0a47a46e87a923ed82c65ce42d705209414fb
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
1c5f984de5c482992943b7e5a4869f24b5072d27 09-Apr-2018 Rebecca Silberstein <silberst@google.com> ClientModeManager: control WifiStateMachine

Move control of WifiStateMachine from WifiController over to
ClientModeManager.

Note: this CL removes supplicant detection for iface down events.

Bug: 31346104
Test: manually toggled between modes
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: wifi integration tests
Change-Id: Ieed3609af529ab65c19b48999fb7543212be458c
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
6fd370b2d24c78dd830ade5cc849c206889ca630 06-Apr-2018 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: separate softap mode

Split softap mode out from the internal state machine in
WifiStateMachinePrime. This is the initial step for using dynamic
management for mode managers.

Bug: 31346104
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually toggle between modes
Test: wifi integration tests
Change-Id: I0a9a52410d8e9cea58c16b91a2cdd1636ab2f999
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
a7798d5d92a8a324ba8e70148a2601547a138d2e 04-Apr-2018 Rebecca Silberstein <silberst@google.com> ActiveModeManager: add default scan available bcast

Add a default implementation to send the ScanAvailable
broadcast for mode implementations to use - in particular, when they are
entering a mode. This allows modes to signal the proper state to
WifiScanningService without adding ref counting that would complicate
the ScanningService impl when only one STA interface is available. At
the point multiple STA interfaces can be running in parallel, this will
need to be changed.

Note: the scan available update in WSMP for softap mode will be removed
when softap is independent of the other modes.

Bug: 76168955
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually verified WifiScanner state when toggling wifi, location
and softap
Test: wifi integration tests

Change-Id: Ie6857478aa1082e3b9886a2497916225a56296c2
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
82961d68a1c8c87475d40213f9e4dd4060ceea7f 29-Mar-2018 Rebecca Silberstein <silberst@google.com> WifiStateMachine: remove unused states

Now that WSMP is handling all modes besides Connect, we can remove the
placeholders for scan and softap in WifiStateMachine.

Bug: 31346104
Bug: 72850700
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually toggled
Test: wifi integration tests
Change-Id: I5c1e43780d258077d8b2a59a626a5e17620b2a06
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
e6da64a0e691f8c06788ed0a5ab78414095389e2 23-Mar-2018 Rebecca Silberstein <silberst@google.com> WifiController: use callbacks instead of bcasts

Instead of depending on system broadcasts to communicate between
internal wifi system components we now use callbacks. This allows the
modes to communicate back to WifiController about the current state of
the operating mode.

Bug: 31346104
Test: manually verify events are received in WifiController (via logs)
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: will submit for integration tests

Change-Id: I45486c95e094776b429ab7755af264eabd79aa77
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
28646f4ea232bdaef9e1f8a737b37c84f6aac8d5 22-Mar-2018 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: centralize native failure handling

Instead of having each mode listen and react to underlying native daemon
failures, centralize the control in WifiStateMachinePrime. Now all
modes have the benefit of detection and SelfRecovery (when applicable).

Note: Multiple notifications for underlying failures is interfering with
recovery, tested with wifi hal death that only sends one callback.
Supplicant and wificond failures still trigger multiple callbacks and
recovery needs to be verified once those are fixed.

Bug: 75989180
Bug: 31346104
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: triggered wifi hal failures with 'kill' while in all modes, wifi
re-entered scan and client modes as appropriate.

Change-Id: I2b606b25e463b1f5e152cf6a6ff2a188e5c48d6d
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
cfeb6aef73506177bf574cb00850de374ea48d26 29-Jan-2018 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: call noteWifiOn/Off

When wifi changes state between on/off (doesn't matter the mode), we
need to let BatteryStats know that the wifi state has changed. This was
done in WifiStateMachine (inconsistently), but now it is done for each
of the Active modes in WifiStateMachinePrime.

Bug: 35414154
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: wifi integration tests
Change-Id: Ieb4f447034e29bdb9d100335ff6a5522f5ef496f
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
dfed3425d98fb3d09cb2d3d4b9d9ab3d45d5f818 10-Feb-2018 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: add tests and remove individual iface teardown

Before fully switching to dynamic iface management, we must first rely
on the hammer of removing all interfaces when entering a new mode. This
prevents exit from a mode from tearing down the next mode due to a
single iface name.

This CL also adds additional unit tests to boost coverage.

Note: this CL also removes the check for teardownAllInterfaces from WSMP
startup since this is now covered in lower level creation. We will call
this when entering disabled state, but not in the WSMP constructor.

Bug: 72996543
Test: frameworks/opt/net/wifi/tests/wifitests/coverage.sh
Test: verified wifi wake enables
Change-Id: I8abff0d158809fbeba0a35326c84aadb0f85644b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
049fa25059870a438c01c5ca13aac443af7efedb 18-Jan-2018 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: collapse modes to a single state

With the ModeManagers becoming fully disposable, we no longer need the
idle states. Collapse the idle + active states for each mode in to a
single state. Also adds a DefaultModeManager that will handle calls
servicing WifiManager API calls.

In the case of a failure (scan/softap modes currently), we should move
to the disabled state. Calls will be handled by the DefaultModeManager
when wifi is fully off.

Bug: 71784953
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: wifi integration tests
Change-Id: I7fdd8994726616e8b51f3fae6887c73da5da883a
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
7f2a1e30dd5d14320ffc7b185ac25fdb79fe52b0 23-Jan-2018 Etan Cohen <etancohen@google.com> Update SmallTest library

android.test.suitebuilder.annotation.SmallTest is deprecated and
replaced by android.support.test.filters.SmallTest.

Update all test files. No other change (except import order cleaning
up to pass preload format check).

Bug: 72324160
Test: all unit tests pass
Change-Id: Icc4abe3b3b37926d583c0d4ae510a7d7c74c1a03
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
6eb4b08700b5caa33d5bf0a408339140be3d66d5 24-Jan-2018 Roshan Pius <rpius@google.com> WifiStateMachinePrime: Initialize ModeStateMachine in constructor

There is no need for this to be lazily initialized.

Bug: 71784834
Test: Unit tests
Test: Device boots up and connects to wifi network.
Change-Id: I1380f96190398a7379a00e3fd1477ef7111b1ad4
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
ea29477accca1f03e6b49bfd1d134de25c9dd43b 11-Jan-2018 Roshan Pius <rpius@google.com> SoftApManager: Move to new interface mgmt methods

Migration of WifiStateMachinePrime/SoftapManager to use
the new interface management methods in WifiNative.

Changes in the CL:
a) Use WifiNative.setupInterface() & WifiNative.teardownInterface()
to setup an interface in the specific mode. This handles starting
HAL if needed. Also, sets up the interface in wificond, HAL.
b) Removed the hardcoding of interface names in SoftApManager.
c) Removed wificond/HAL death handling and instead will use the new
WifiNative.StatusListener to listen for any daemon's death.

Bug: 69426063
Test: Unit tests.
Change-Id: If03e7835545b5f6e05671a09692eb6f396f9d43c
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
3dccabdb965589eecdfc823c559496fe98df0a50 23-Dec-2017 Mehdi Alizadeh <mett@google.com> Unit tests for registering soft AP callbacks

Bug: 68712383
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I455acf93b61012a9fc3f69dd525b0c7c68155328
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
607857f194f017eb5b4fda6ccf57e571c12c94e8 29-Nov-2017 Mehdi Alizadeh <mett@google.com> Registers callbacks for soft AP events

Bug: 68712383
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ic6e402965618a79b4f41a61dcb3fa63ecc66ab36
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
9f82f5e706adffbad03a95cce8399c59898297bb 03-Nov-2017 Rebecca Silberstein <silberst@google.com> ScanOnlyModeManager: add state change listener

Add Listener to update callers about wifi state changes.

Bug: 32659843
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: ran new scanning integration tests
WifiManagerTest:test_scan_with_wifi_off_and_location_scan_on
WifiManagerTest:test_scan_with_wifi_off_and_location_scan_off

Change-Id: I00f100c23661d1ae8ffd1bebb6b7e5db43cd9e17
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
aba32c6808bc33bb9164bdc9bc13461abb0fc9e6 03-Nov-2017 Rebecca Silberstein <silberst@google.com> ScanOnlyModeManager: add NetworkObserver

Add NetworkObserver logic to ScanOnlyMode to detect when the underlying
interface is up/down.

Bug: 32659843
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If3bd7378816c7b8cfdc6de9639cd4b9eea80d91b
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
26db2f08784c3a9b48c63110dded3581d65e4b4e 31-Oct-2017 Rebecca Silberstein <silberst@google.com> ScanOnlyModeManager: handle interface creation

When starting ScanOnlyMode, have the ScanOnlyModeManager create the
ClientInterface for itself. This code is still not actively used
to manage scan mode but is a building block to the implementation.

Bug: 32659843
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I8a17915efbc71dd355507e0c43a98f82afe88498
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
eb5ac1b8b78b5a7cfd6f37f8183a548b0e98df90 26-Oct-2017 Rebecca Silberstein <silberst@google.com> ScanOnlyModeManager: add basic states and controls

Start populating the scan mode manager with basic states and constructs.
This is an initial building block and is not yet functional.

Bug: 32659843
Bug: 32436466
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Id4b05459fecec6d83cee54b95d74d162cf6b7c2a
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
2b394b45c5c77139ef0585a58dbd15d04f9a8911 29-Nov-2017 Rebecca Silberstein <silberst@google.com> SoftApManager: move interface creation

Move softap interface creation from WifiStateMachine to SoftApManager.
This allows SoftApManager to take full control of the mode and report
errors when attempting to initialize components for the mode.

Bug: 69888789
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual verification from Settings and QuickSettings
Test: wifi integration tests
Test: wifi CTS tests
Change-Id: Ib6526debdb9b5f376c064b54ca07c3559ffc0d92
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
cc68b3621657ec91c400355ec2c2b763efb52b4d 16-Nov-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: update interface management

Interface management moved from wificond to WifiNative. Update
interface creation and cleanup to the new calls available via the
WifiNative methods.

Bug: 68159269
Bug: 69421434
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I82ad04091336acbd1544478bae2a772e43c15cc6
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
83e4dc2d8127a45cb1bea825276aff1de9eaa6e6 07-Oct-2017 Rebecca Silberstein <silberst@google.com> SoftApManager: plumb softap mode in to SoftAPModeManager

Plumb the softap mode in to SoftApManager so the softap state change
broadcasts can also be moved.

Bug: 67511200
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: integration tests
Test: manually tested tethering
Test: verified LocalOnlyHotspot updates
Change-Id: I690598f39bef5dfdcbcb2a9668fcf06b34d68b46
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
8d959c98aa64a18526571896ef908227d4097df0 07-Oct-2017 Rebecca Silberstein <silberst@google.com> SoftApManager: track iface name

Move handling of the ap interface name in to SoftApManager. This is
needed to move the ap state change broadcasts in to SApM from
WifiStateMachine.

Bug: 67511330
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: integration tests
Test: manual verification of LocalOnlyHotspot functionality
Change-Id: Ief069ca4411aa42645fc68fe7dc9d4155fe3efa6
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
c7685b40d77b12820c5b04013592834025086cef 06-Oct-2017 Roshan Pius <rpius@google.com> WificondControl: Use iface name for interface objects

Bug: 67365651
Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Will send for regression tests.
Change-Id: Id5cd28439a2458832b9a2a6893fa289f919845ba
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
11528d03ae12c726ee7e918b3d521247bf8207b1 30-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrimeTest: update any matcher

Passing a null WifiConfiguration to start softap mode is a valid option.
The tests need to be updated to reflect this since mockito was updated.

Bug: 36658081
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ia1633375b57703edcad3d34954b636c475c8a8e6
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
da7d73da44a47933cfc99660c2d247c24fd72544 24-Mar-2017 mukesh agrawal <quiche@google.com> disable failing tests

Disable failing unit tests, except for the ones where
a) we already have fixes up for review, or
b) the test was failing before the Mockito update

The tests are disabled via a new annotation, so that
we can more easily track progress on updating the
tests to work with the new version of Mockito.

Bug: 36407367
Test: runtests.sh -e notClass com.android.server.wifi.WifiVendorHalTest,com.android.server.wifi.hotspot2.PasspointManagerTest,com.android.server.wifi.WifiConfigManagerTest,com.android.server.wifi.p2p.SupplicantP2pIfaceHalTest#testCancelServiceDiscovery_exception

Change-Id: Idca42fe735821a29a6dc0ca975bf5d39909ec508
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
fa528234cf518fda63435cf9c4956576d64e8860 30-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: allow for configs in softap

WifiConfigurations need to be passed to SoftApManager. Add this path to
SoftApMode and SoftApModeActiveState along with tests.

Bug: 31846822
Test: runtests.sh
Change-Id: Ied383499f699619e55d4b05ba93260bf7a8440f5
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachinePrimeTest.java
bfc30bd4c2ff0c62d6cfff22088a935878966a46 22-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: Implement SoftApMode path

Implement the logic to start, stop and maintain softap mode in
WifiStateMachinePrime. This CL covers the implementation and tests, but
does not include the call from WifiController to start softap with the
new code.

Bug: 31831721
Test: runtests.sh

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