/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiScoreReportTest.java | 82 WifiInfo mWifiInfo; field in WifiScoreReportTest 138 mWifiInfo = new WifiInfo(); in setUp() 139 mWifiInfo.setFrequency(2412); in setUp() 169 mWifiInfo.setRssi(-77); in calculateAndReportScoreSucceeds() 170 mWifiScoreReport.calculateAndReportScore(mWifiInfo, mNetworkAgent, mWifiMetrics); in calculateAndReportScoreSucceeds() 183 mWifiInfo.setRssi(WifiInfo.INVALID_RSSI); in calculateAndReportScoreDoesNotReportWhenRssiIsNotValid() 184 mWifiScoreReport.calculateAndReportScore(mWifiInfo, mNetworkAgent, mWifiMetrics); in calculateAndReportScoreDoesNotReportWhenRssiIsNotValid() 196 mWifiInfo.setRssi(-33); in networkAgentMayBeNull() 198 mWifiScoreReport.calculateAndReportScore(mWifiInfo, null, mWifiMetrics); in networkAgentMayBeNull() 212 mWifiInfo.setRssi(-80); in allowLowRssiIfDataIsMoving() [all …]
|
D | WifiLinkLayerStatsTest.java | 35 ExtendedWifiInfo mWifiInfo; field in WifiLinkLayerStatsTest 44 mWifiInfo = new ExtendedWifiInfo(); in setUp() 100 mWifiInfo.updatePacketRates(mWifiLinkLayerStats, mWifiLinkLayerStats.timeStampInMs); in checkThatAverageRatesConvergeToTheRightValuesAndTotalsAreRight() 103 assertEquals((double) txg, mWifiInfo.txSuccessRate, txg * 0.02); in checkThatAverageRatesConvergeToTheRightValuesAndTotalsAreRight() 104 assertEquals((double) txr, mWifiInfo.txRetriesRate, txr * 0.02); in checkThatAverageRatesConvergeToTheRightValuesAndTotalsAreRight() 105 assertEquals((double) txb, mWifiInfo.txBadRate, txb * 0.02); in checkThatAverageRatesConvergeToTheRightValuesAndTotalsAreRight() 106 assertEquals((double) rxg, mWifiInfo.rxSuccessRate, rxg * 0.02); in checkThatAverageRatesConvergeToTheRightValuesAndTotalsAreRight() 108 assertEquals(mWifiInfo.txSuccess, n * txg); in checkThatAverageRatesConvergeToTheRightValuesAndTotalsAreRight() 109 assertEquals(mWifiInfo.txRetries, n * txr); in checkThatAverageRatesConvergeToTheRightValuesAndTotalsAreRight() 110 assertEquals(mWifiInfo.txBad, n * txb); in checkThatAverageRatesConvergeToTheRightValuesAndTotalsAreRight() [all …]
|
D | LinkProbeManagerTest.java | 61 private WifiInfo mWifiInfo; field in LinkProbeManagerTest 83 mWifiInfo = new WifiInfo(); in setUp() 84 mWifiInfo.setBSSID(TEST_BSSID); in setUp() 111 mWifiInfo.txSuccess = 50; in testLinkProbeTriggeredAndAcked() 114 mLinkProbeManager.updateConnectionStats(mWifiInfo, TEST_IFACE_NAME); in testLinkProbeTriggeredAndAcked() 120 mWifiInfo.txSuccess = 50; in testLinkProbeTriggeredAndAcked() 123 mWifiInfo.setRssi(rssi); in testLinkProbeTriggeredAndAcked() 126 mWifiInfo.setLinkSpeed(linkSpeed); in testLinkProbeTriggeredAndAcked() 131 mLinkProbeManager.updateConnectionStats(mWifiInfo, TEST_IFACE_NAME); in testLinkProbeTriggeredAndAcked() 155 mWifiInfo.txSuccess = 50; in testLinkProbeTriggeredAndFailed() [all …]
|
D | WifiScoreCardTest.java | 73 ExtendedWifiInfo mWifiInfo; field in WifiScoreCardTest 95 mWifiInfo = new ExtendedWifiInfo(); in setUp() 96 mWifiInfo.setSSID(TEST_SSID_1); in setUp() 97 mWifiInfo.setBSSID(TEST_BSSID_1.toString()); in setUp() 98 mWifiInfo.setNetworkId(TEST_NETWORK_CONFIG_ID); in setUp() 108 mWifiInfo.setSSID(TEST_SSID_1); in testUpdate() 109 mWifiInfo.setBSSID(TEST_BSSID_1.toString()); in testUpdate() 111 mWifiScoreCard.noteIpConfiguration(mWifiInfo); in testUpdate() 118 mWifiInfo.setBSSID(TEST_BSSID_2.toString()); in testUpdate() 120 mWifiScoreCard.noteIpConfiguration(mWifiInfo); in testUpdate() [all …]
|
D | VelocityBasedConnectedScoreTest.java | 58 WifiInfo mWifiInfo; field in VelocityBasedConnectedScoreTest 88 mWifiInfo = new WifiInfo(); in setUp() 89 mWifiInfo.setFrequency(2412); in setUp() 115 mWifiInfo.setRssi(mRssiExitThreshold2GHz - 2); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 116 mWifiInfo.setLinkSpeed(6); // Mbps in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 117 mWifiInfo.txSuccessRate = 2.1; // proportional to pps in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 118 mWifiInfo.txBadRate = .5; in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 119 mWifiInfo.rxSuccessRate = 2.1; in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 121 mVelocityBasedConnectedScore.updateUsingWifiInfo(mWifiInfo, in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() 128 mVelocityBasedConnectedScore.updateUsingWifiInfo(mWifiInfo, mClock.getWallClockMillis()); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving() [all …]
|
D | WifiNetworkSelectorTest.java | 201 @Mock private WifiInfo mWifiInfo; field in WifiNetworkSelectorTest 243 when(mWifiInfo.getSupplicantState()).thenReturn(SupplicantState.DISCONNECTED); in setupWifiInfo() 244 when(mWifiInfo.is24GHz()).thenReturn(true); in setupWifiInfo() 245 when(mWifiInfo.is5GHz()).thenReturn(false); in setupWifiInfo() 246 when(mWifiInfo.getFrequency()).thenReturn(2400); in setupWifiInfo() 247 when(mWifiInfo.getRssi()).thenReturn(-70); in setupWifiInfo() 248 when(mWifiInfo.getNetworkId()).thenReturn(WifiConfiguration.INVALID_NETWORK_ID); in setupWifiInfo() 249 when(mWifiInfo.getBSSID()).thenReturn(null); in setupWifiInfo() 284 blacklist, mWifiInfo, false, true, false); in emptyScanResults() 314 blacklist, mWifiInfo, false, true, false); in verifyMinimumRssiThreshold() [all …]
|
D | WifiDataStallTest.java | 56 @Mock WifiInfo mWifiInfo; field in WifiDataStallTest 87 when(mWifiInfo.getLinkSpeed()).thenReturn(100); in setUp() 88 when(mWifiInfo.getRxLinkSpeedMbps()).thenReturn(100); in setUp() 89 when(mWifiInfo.getFrequency()).thenReturn(5850); in setUp() 90 when(mWifiInfo.getBSSID()).thenReturn("5G_WiFi"); in setUp() 131 mWifiDataStall.checkForDataStall(mOldLlStats, mNewLlStats, mWifiInfo)); in verifyDataStallTxFailure() 136 mWifiDataStall.checkForDataStall(mOldLlStats, mNewLlStats, mWifiInfo)); in verifyDataStallTxFailure() 148 mWifiDataStall.checkForDataStall(mOldLlStats, mNewLlStats, mWifiInfo)); in verifyNoDataStallWhenTxFailureIsNotConsecutive() 154 mWifiDataStall.checkForDataStall(mOldLlStats, mNewLlStats, mWifiInfo)); in verifyNoDataStallWhenTxFailureIsNotConsecutive() 164 when(mWifiInfo.getRxLinkSpeedMbps()).thenReturn(1); in verifyDataStallRxFailure() [all …]
|
D | WifiConnectivityManagerTest.java | 93 mWifiInfo = getWifiInfo(); in setUp() 136 private WifiInfo mWifiInfo; field in WifiConnectivityManagerTest 328 mWifiConfigManager, mWifiInfo, mWifiNS, mWifiConnectivityHelper, in createConnectivityManager() 682 mWifiInfo.setSSID(WifiSsid.createFromAsciiEncoded(CANDIDATE_SSID)); in wifiConnected_openNetworkNotifierHandlesConnection() 825 mWifiInfo.setSSID(WifiSsid.createFromAsciiEncoded(CANDIDATE_SSID)); in wifiConnected_carrierNetworkNotifierHandlesConnection() 1172 mWifiInfo.txSuccessRate = 0; in checkSingleScanSettingsWhenConnectedWithLowDataRate() 1173 mWifiInfo.rxSuccessRate = 0; in checkSingleScanSettingsWhenConnectedWithLowDataRate() 1212 mWifiInfo.txSuccessRate = mFullScanMaxTxPacketRate * 2; in checkPartialScanRequestedWithHighDataRateWithoutFwRoaming() 1213 mWifiInfo.rxSuccessRate = mFullScanMaxRxPacketRate * 2; in checkPartialScanRequestedWithHighDataRateWithoutFwRoaming() 1257 mWifiInfo.txSuccessRate = mFullScanMaxTxPacketRate * 2; in checkPartialScanSkippedWithHighDataRateWithFwRoaming() [all …]
|
D | WifiLastResortWatchdogTest.java | 57 @Mock WifiInfo mWifiInfo; field in WifiLastResortWatchdogTest 85 when(mClientModeImpl.getWifiInfo()).thenReturn(mWifiInfo); in setUp() 86 when(mWifiInfo.getSSID()).thenReturn(TEST_NETWORK_SSID); in setUp() 1524 when(mWifiInfo.getSSID()).thenReturn(ssids[0]); in testMetricsCollection() 1863 when(mWifiInfo.getSSID()).thenReturn(ssids[0]); in testWatchdogAssumesSuccessOnlyIfFirstConnectionAfterRestartSucceeds() 2149 when(mWifiInfo.getSSID()).thenReturn(ssids[0]); in testWatchdogAssumesSuccessOnlyIfConnectedOnSameSsid()
|
/frameworks/base/core/tests/coretests/src/android/net/ |
D | NetworkKeyTest.java | 42 @Mock private WifiInfo mWifiInfo; field in NetworkKeyTest 56 when(mWifiInfo.getBSSID()).thenReturn(VALID_BSSID); in createFromWifi_nullSsid() 57 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_nullSsid() 62 when(mWifiInfo.getSSID()).thenReturn(""); in createFromWifi_emptySsid() 63 when(mWifiInfo.getBSSID()).thenReturn(VALID_BSSID); in createFromWifi_emptySsid() 64 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_emptySsid() 69 when(mWifiInfo.getSSID()).thenReturn(WifiManager.UNKNOWN_SSID); in createFromWifi_noneSsid() 70 when(mWifiInfo.getBSSID()).thenReturn(VALID_BSSID); in createFromWifi_noneSsid() 71 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_noneSsid() 76 when(mWifiInfo.getSSID()).thenReturn(VALID_SSID); in createFromWifi_nullBssid() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/ |
D | WifiStatusTracker.java | 70 private WifiInfo mWifiInfo; field in WifiStatusTracker 117 mWifiInfo = null; in handleBroadcast() 120 mWifiInfo = mWifiManager.getConnectionInfo(); in handleBroadcast() 121 if (mWifiInfo != null) { in handleBroadcast() 122 if (mWifiInfo.isPasspointAp() || mWifiInfo.isOsuAp()) { in handleBroadcast() 123 ssid = mWifiInfo.getPasspointProviderFriendlyName(); in handleBroadcast() 125 ssid = getValidSsid(mWifiInfo); in handleBroadcast() 127 updateRssi(mWifiInfo.getRssi()); in handleBroadcast() 150 NetworkKey networkKey = NetworkKey.createFromWifiInfo(mWifiInfo); in maybeRequestNetworkScore() 179 mWifiNetworkScoreCache.getScoredNetwork(NetworkKey.createFromWifiInfo(mWifiInfo)); in updateStatusLabel()
|
D | TestAccessPointBuilder.java | 58 private WifiInfo mWifiInfo; field in TestAccessPointBuilder 86 bundle.putParcelable(AccessPoint.KEY_WIFIINFO, mWifiInfo); in build() 218 mWifiInfo = info; in setWifiInfo()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | ClientModeImpl.java | 254 mWifiInfo.setRssi(curRssi); in processRssiThreshold() 332 private final ExtendedWifiInfo mWifiInfo; field in ClientModeImpl 823 mWifiInfo = new ExtendedWifiInfo(); in ClientModeImpl() 902 mWifiInfo.setEnableConnectedMacRandomization(mConnectedMacRandomzationSupported); in ClientModeImpl() 1188 if (!forceReconnect && mWifiInfo.getNetworkId() == netId) { in connectToUserSelectNetwork() 1283 mWifiInfo.updatePacketRates(stats, mLastLinkLayerStatsUpdate); in getWifiLinkLayerStats() 1287 mWifiInfo.updatePacketRates(mTxPkts, mRxPkts, mLastLinkLayerStatsUpdate); in getWifiLinkLayerStats() 1427 SupplicantState supplicantState = mWifiInfo.getSupplicantState(); in isSupplicantTransientState() 1452 WifiInfo result = new WifiInfo(mWifiInfo); in syncRequestConnectionInfo() 1462 return mWifiInfo; in getWifiInfo() [all …]
|
D | WifiConnectivityManager.java | 141 private final WifiInfo mWifiInfo; field in WifiConnectivityManager 278 mNetworkSelector.selectNetwork(scanDetails, buildBssidBlacklist(), mWifiInfo, in handleScanResults() 601 mWifiInfo = wifiInfo; in WifiConnectivityManager() 720 || targetBssid.equals(mWifiInfo.getBSSID())) in connectToNetwork() 721 && SupplicantState.isConnecting(mWifiInfo.getSupplicantState())) { in connectToNetwork() 746 .getConfiguredNetwork(mWifiInfo.getNetworkId()); in connectToNetwork() 748 (mWifiInfo.getSSID() + " : " + mWifiInfo.getBSSID()); in connectToNetwork() 807 config.networkId, CHANNEL_LIST_AGE_MS, mWifiInfo.getFrequency()); in setScanChannels() 851 boolean isTrafficOverThreshold = mWifiInfo.txSuccessRate > mFullScanMaxTxRate in startPeriodicSingleScan() 852 || mWifiInfo.rxSuccessRate > mFullScanMaxRxRate; in startPeriodicSingleScan() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | NetworkScoreServiceTest.java | 134 @Mock private WifiInfo mWifiInfo; field in NetworkScoreServiceTest 159 when(mWifiInfo.getSSID()).thenReturn(SCORED_NETWORK.networkKey.wifiKey.ssid); in setUp() 160 when(mWifiInfo.getBSSID()).thenReturn(SCORED_NETWORK.networkKey.wifiKey.bssid); in setUp() 711 when(mWifiInfo.getSSID()).thenReturn(null); in testCurrentNetworkScoreCacheFilter_invalidWifiInfo_nullSsid() 713 new NetworkScoreService.CurrentNetworkScoreCacheFilter(() -> mWifiInfo); in testCurrentNetworkScoreCacheFilter_invalidWifiInfo_nullSsid() 723 when(mWifiInfo.getSSID()).thenReturn(WifiManager.UNKNOWN_SSID); in testCurrentNetworkScoreCacheFilter_invalidWifiInfo_noneSsid() 725 new NetworkScoreService.CurrentNetworkScoreCacheFilter(() -> mWifiInfo); in testCurrentNetworkScoreCacheFilter_invalidWifiInfo_noneSsid() 735 when(mWifiInfo.getSSID()).thenReturn(""); in testCurrentNetworkScoreCacheFilter_invalidWifiInfo_emptySsid() 737 new NetworkScoreService.CurrentNetworkScoreCacheFilter(() -> mWifiInfo); in testCurrentNetworkScoreCacheFilter_invalidWifiInfo_emptySsid() 747 when(mWifiInfo.getBSSID()).thenReturn(INVALID_BSSID); in testCurrentNetworkScoreCacheFilter_invalidWifiInfo_invalidBssid() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ |
D | WifiMacAddressPreferenceControllerTest.java | 58 private WifiInfo mWifiInfo; field in WifiMacAddressPreferenceControllerTest 76 doReturn(mWifiInfo).when(mWifiManager).getConnectionInfo(); in setUp()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | OsuNetworkConnectionTest.java | 83 @Mock WifiInfo mWifiInfo; field in OsuNetworkConnectionTest 96 when(mWifiManager.getConnectionInfo()).thenReturn(mWifiInfo); in setUp() 97 when(mWifiInfo.getNetworkId()).thenReturn(TEST_NETWORK_ID); in setUp()
|
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/ |
D | AccessPointTest.java | 101 private WifiInfo mWifiInfo; field in AccessPointTest 131 mWifiInfo = new WifiInfo(); in setUp() 132 mWifiInfo.setSSID(WifiSsid.createFromAsciiEncoded(TEST_SSID)); in setUp() 133 mWifiInfo.setBSSID(TEST_BSSID); in setUp() 1223 mWifiInfo.setFQDN("fqdn"); in testUpdate_passpointWifiInfo_updatesPasspointAccessPoint() 1224 mWifiInfo.setProviderFriendlyName("providerFriendlyName"); in testUpdate_passpointWifiInfo_updatesPasspointAccessPoint() 1234 assertThat(passpointAp.update(null, mWifiInfo, null)).isTrue(); in testUpdate_passpointWifiInfo_updatesPasspointAccessPoint() 1242 mWifiInfo.setFQDN("fqdn"); in testUpdate_passpointWifiInfo_doesNotUpdateNonPasspointAccessPoint() 1243 mWifiInfo.setProviderFriendlyName("providerFriendlyName"); in testUpdate_passpointWifiInfo_doesNotUpdateNonPasspointAccessPoint() 1251 assertThat(ap.update(null, mWifiInfo, null)).isFalse(); in testUpdate_passpointWifiInfo_doesNotUpdateNonPasspointAccessPoint() [all …]
|