From 95e8ce98d9cc386e75b5a310f0829be7657ba3c1 Mon Sep 17 00:00:00 2001 From: Kai Shi Date: Tue, 26 May 2020 15:16:28 -0700 Subject: Add isCellularDataAvailable in sta event Add isCellularDataAvailable in sta event to help wifi scorer performance evaluation. Bug: 157508217 Test: atest com.android.server.wifi Test: manual test with "adb shell cmd wifi | grep StaEventList" to confirm that cellularData is printed correctly. Updated-PDD: TRUE Change-Id: I7f4b84dd3ffbcae2012c533d5b9085998585c4b7 --- tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java index 04730bbe3..e4e58c1df 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java @@ -2285,6 +2285,7 @@ public class WifiMetricsTest extends WifiBaseTest { } mTestLooper.dispatchAll(); wifiMetrics.setScreenState(true); + when(mWifiDataStall.isCellularDataAvailable()).thenReturn(true); for (int i = 0; i < mTestStaLogInts.length; i++) { int[] lia = mTestStaLogInts[i]; wifiMetrics.logStaEvent(lia[0], lia[1], lia[2] == 1 ? mTestWifiConfig : null); @@ -2324,6 +2325,7 @@ public class WifiMetricsTest extends WifiBaseTest { assertConfigInfoEqualsWifiConfig( evs[7] == 1 ? mTestWifiConfig : null, event.configInfo); assertEquals(true, event.screenOn); + assertEquals(true, event.isCellularDataAvailable); j++; } assertEquals(mExpectedValues.length, j); -- cgit v1.2.3