diff options
author | Michael Plass <mplass@google.com> | 2020-04-20 12:26:51 -0700 |
---|---|---|
committer | Michael Plass <mplass@google.com> | 2020-04-20 12:30:23 -0700 |
commit | dc03a42f583af38731589078844de40f74c2cc9e (patch) | |
tree | 02b0ebca5ccb99e167f362dc5577a48c3d85c159 /tests | |
parent | bba642c3276f19f5456b61aa8cf400b35f7f0d0f (diff) |
[WifiScoreReport] Forget the NetworkAgent on disconnect
Bug: 122133502
Test: atest WifiScoreCardTest
Change-Id: I540540f51ef5eda1167c7ef2edae634df97b5a75
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java index 5fe8eaac7..674ff8c9d 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java @@ -661,8 +661,12 @@ public class WifiScoreReportTest extends WifiBaseTest { mWifiScoreReport.setWifiConnectedNetworkScorer(mAppBinder, mWifiConnectedNetworkScorer); when(mNetwork.getNetId()).thenReturn(TEST_NETWORK_ID); mWifiScoreReport.startConnectedNetworkScorer(TEST_NETWORK_ID); + verify(mWifiConnectedNetworkScorer).onStart(TEST_SESSION_ID); mWifiScoreReport.stopConnectedNetworkScorer(); verify(mWifiConnectedNetworkScorer).onStop(TEST_SESSION_ID); + // After the session stops, it should not start again (without a new NetworkAgent) + mWifiScoreReport.startConnectedNetworkScorer(TEST_NETWORK_ID); + verify(mWifiConnectedNetworkScorer).onStart(anyInt()); } /** |