History log of /frameworks/base/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d985dde8ccfd38a50377a8ab2378b36c92b0d7c7 31-May-2016 Christopher Wiley <wiley@google.com> Fix race conditions between Tethering and TetherInterfaceStateMachine

( cherry-pick of de4819dc82b734036b22416228327d2712e01884 )

Previously, Tethering would answer requests for current tethering state
by calling methods on instances of TetherInterfaceStateMachine to build
up that state. This is incorrect, since state queries can come in on an
arbitrary thread, independent of updates to the state machines
instances.

Fix this by:
- Altering TetherInterfaceStateMachine to push consistent state
snapshots to Tethering via notifyInterfaceStateChange()
- Storing the last state snapshot in Tethering.mTetherStates
- Removing public methods to query TetherInterfaceStateMachine state.
- Consistently synchronizing access to Tethering.mTetherStates

Bug: 29009601
Test: WiFi Tethering continues to work, unittests continue to pass

Change-Id: Ied334f5e8739bc3aff1b08a1079095b9cc2a7958
/frameworks/base/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
5c0b10a4a9eecc5307bb89a271221f2b20448797 31-May-2016 Christopher Wiley <wiley@google.com> Tethering: Own WiFi tethering state and lifetime

( cherry-pick of f1315c3cd6d77e812ae32fe038b4e8bf2e70d5bf )

- Add logic to Tethering to track whether the user has requested
tethering via WiFi.
- Subscribe to intents regarding soft AP state to enable and
disable tethering when the AP comes up or goes down.
- Refactor IP configuration logic to do configuration for WiFi
as well as USB.

Bug: 29054780
Test: WiFi tethering continues to work on angler
Tethering related unittests continue to pass.

Change-Id: I6eff2573ca3fd11fabcf138c468ba517ff2daf65
/frameworks/base/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
e10bfc0ee67ffe72b75969139b738c66eaa1d66a 24-May-2016 Christopher Wiley <wiley@google.com> Consolidate cleanup logic in TetherInterfaceSM.TetheredState

( cherry-pick of f54c5a932a9ac4a491ce775b21ff8288e40b5bad )

This pushes all TetheredState cleanup logic into a single place.
All new unittests fail without the changes to TetherInterfaceSM.

Bug: 28915272
Test: Compiles, unittests pass, WiFi tethering continues to work.

Change-Id: Ia7bf210e00e9a54f2797baebc2e5333ce314c947
/frameworks/base/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
0ab0dd317f6f2f22ed894077c1e4268bbfbdf070 25-May-2016 Christopher Wiley <wiley@google.com> Annotate TetherInterfaceStateMachineTest for APCT

( cherry-pick of d905add4747d6060355c44dac1dce0eccd8014fb )

APCT needs a little additional magic to pick up JUnit4 tests.

Bug: 28958508
Test: Tests continue to pass

Change-Id: Ia45d91bb3b06e60e3a46ffe738d4468356e066b3
/frameworks/base/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
4312a4c433611343e863a5d38497d982ccfc90ae 23-May-2016 Christopher Wiley <wiley@google.com> Rely on Tethering mutex for TetherInterfaceSM

( cherry-pick of 4bc8d6b1ac0cb7d4192c829a44d988516f0adbdb )

Stop passing Tethering's mutex into TetherInterfaceSM, and instead
simply rely on Tethering to acquire its own mutex when accessing
instances of TetherInterfaceSM.

While here, remove some boolean fields (previously guarded by the mutex)
which duplicate state information.

Change-Id: Ie6b2128970981786a5d64fbf700c9f3d0a6721fb
Test: Compiles, unittests pass, WiFi tethering continues to work.
Bug: 28910007
/frameworks/base/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
7040b4ebdfc9d4de5c240db6cde9fc245fb7a696 24-May-2016 Mitchell Wills <mwills@google.com> Rename TetherInterfaceSM to TetherInterfaceStateMachine

( cherry-pick of c5baad02503d17a812ee1b44cc817c7e18935ff1 )

Change-Id: I324690b20f37cef6d58872e21b126a87d16f7ec8
/frameworks/base/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java