summaryrefslogtreecommitdiffstats
path: root/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
diff options
context:
space:
mode:
authorMingguang Xu <mingguangxu@google.com>2019-03-22 10:40:22 -0700
committerMingguang Xu <mingguangxu@google.com>2019-03-28 13:52:27 -0700
commit7f5c817d30c7a75f61327ed55c977087d78080b0 (patch)
treea62ef77737cb59d3990df7153ad1ced4739c04bf /tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
parentf5545c0fd72dd5984cefdbe859bb8747bd1b9875 (diff)
downloadandroid_frameworks_opt_net_wifi-7f5c817d30c7a75f61327ed55c977087d78080b0.tar.gz
android_frameworks_opt_net_wifi-7f5c817d30c7a75f61327ed55c977087d78080b0.tar.bz2
android_frameworks_opt_net_wifi-7f5c817d30c7a75f61327ed55c977087d78080b0.zip
Wifi usability: Add IP reachability lost into Wifi unusable event
IP reachability is a strong indicator of Wi-Fi network quality. Extend the WifiIsUnusableEvent list to include IP reachability lost. Bug: 129282057 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: Ia759fc506a615e656aa6fa8493e4323d1e754646 Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
index ca60c0dbe..b9ee6af5b 100644
--- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
@@ -3401,4 +3401,21 @@ public class ClientModeImplTest {
assertEquals(OP_PACKAGE_NAME,
mCmi.getWifiInfo().getNetworkSuggestionOrSpecifierPackageName());
}
+
+ /**
+ * Verify that a WifiIsUnusableEvent is logged and the current list of usability stats entries
+ * are labeled and saved when receiving an IP reachability lost message.
+ * @throws Exception
+ */
+ @Test
+ public void verifyIpReachabilityLostMsgUpdatesWifiUsabilityMetrics() throws Exception {
+ connect();
+
+ mCmi.sendMessage(ClientModeImpl.CMD_IP_REACHABILITY_LOST);
+ mLooper.dispatchAll();
+ verify(mWifiMetrics).logWifiIsUnusableEvent(
+ WifiIsUnusableEvent.TYPE_IP_REACHABILITY_LOST);
+ verify(mWifiMetrics).addToWifiUsabilityStatsList(WifiUsabilityStats.LABEL_BAD,
+ WifiUsabilityStats.TYPE_IP_REACHABILITY_LOST);
+ }
}