Home
last modified time | relevance | path

Searched refs:wifiInfo (Results 1 – 25 of 29) sorted by relevance

12

/frameworks/opt/net/wifi/libs/WifiTrackerLib/tests/src/com/android/wifitrackerlib/
DPasspointWifiEntryTest.java168 WifiInfo wifiInfo = mock(WifiInfo.class); in testGetSummary_connectedWifiNetwork_showsConnected() local
169 when(wifiInfo.isPasspointAp()).thenReturn(true); in testGetSummary_connectedWifiNetwork_showsConnected()
170 when(wifiInfo.getPasspointFqdn()).thenReturn(FQDN); in testGetSummary_connectedWifiNetwork_showsConnected()
178 entry.updateConnectionInfo(wifiInfo, networkInfo); in testGetSummary_connectedWifiNetwork_showsConnected()
208 WifiInfo wifiInfo = mock(WifiInfo.class); in testGetSummary_providerModelConnectedButNotDefault_doesNotShowConnected() local
209 when(wifiInfo.isPasspointAp()).thenReturn(true); in testGetSummary_providerModelConnectedButNotDefault_doesNotShowConnected()
210 when(wifiInfo.getPasspointFqdn()).thenReturn(FQDN); in testGetSummary_providerModelConnectedButNotDefault_doesNotShowConnected()
218 entry.updateConnectionInfo(wifiInfo, networkInfo); in testGetSummary_providerModelConnectedButNotDefault_doesNotShowConnected()
227 WifiInfo wifiInfo = mock(WifiInfo.class); in testGetSecurityTypes_connectedWifiNetwork_showsCurrentSecurityType() local
228 when(wifiInfo.isPasspointAp()).thenReturn(true); in testGetSecurityTypes_connectedWifiNetwork_showsCurrentSecurityType()
[all …]
DStandardWifiEntryTest.java666 final WifiInfo wifiInfo = new WifiInfo.Builder().setNetworkId(networkId).build(); in testGetSummary_connectedWifiNetwork_showsConnected() local
679 entry.updateConnectionInfo(wifiInfo, networkInfo); in testGetSummary_connectedWifiNetwork_showsConnected()
711 final WifiInfo wifiInfo = new WifiInfo.Builder().setNetworkId(networkId).build(); in testGetSummary_providerModelConnectedButNotDefault_doesNotShowConnected() local
724 entry.updateConnectionInfo(wifiInfo, networkInfo); in testGetSummary_providerModelConnectedButNotDefault_doesNotShowConnected()
738 final WifiInfo wifiInfo = new WifiInfo.Builder().setNetworkId(networkId).build(); in testShouldShowXLevelIcon_unvalidatedOrNotDefault_returnsTrue() local
755 entry.updateConnectionInfo(wifiInfo, networkInfo); in testShouldShowXLevelIcon_unvalidatedOrNotDefault_returnsTrue()
/frameworks/base/core/java/android/net/vcn/
DVcnTransportInfo.java53 public VcnTransportInfo(@NonNull WifiInfo wifiInfo) { in VcnTransportInfo() argument
54 this(wifiInfo, INVALID_SUBSCRIPTION_ID); in VcnTransportInfo()
61 private VcnTransportInfo(@Nullable WifiInfo wifiInfo, int subId) { in VcnTransportInfo() argument
62 mWifiInfo = wifiInfo; in VcnTransportInfo()
149 final WifiInfo wifiInfo = in.readParcelable(null);
154 if (wifiInfo == null && subId == INVALID_SUBSCRIPTION_ID) {
158 return new VcnTransportInfo(wifiInfo, subId);
/frameworks/opt/net/wifi/libs/WifiTrackerLib/src/com/android/wifitrackerlib/
DWifiPickerTracker.java210 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in handleOnStart() local
213 updateConnectionInfo(wifiInfo, mCurrentNetworkInfo); in handleOnStart()
281 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in handleRssiChangedAction() local
283 mConnectedWifiEntry.updateConnectionInfo(wifiInfo, mCurrentNetworkInfo); in handleRssiChangedAction()
286 mMergedCarrierEntry.updateConnectionInfo(wifiInfo, mCurrentNetworkInfo); in handleRssiChangedAction()
765 private void updateConnectionInfo(@Nullable WifiInfo wifiInfo, in updateConnectionInfo() argument
768 entry.updateConnectionInfo(wifiInfo, networkInfo); in updateConnectionInfo()
771 entry.updateConnectionInfo(wifiInfo, networkInfo); in updateConnectionInfo()
774 entry.updateConnectionInfo(wifiInfo, networkInfo); in updateConnectionInfo()
777 entry.updateConnectionInfo(wifiInfo, networkInfo); in updateConnectionInfo()
[all …]
DWifiEntry.java818 protected boolean connectionInfoMatches(@NonNull WifiInfo wifiInfo, in connectionInfoMatches() argument
830 @Nullable WifiInfo wifiInfo, @Nullable NetworkInfo networkInfo) { in updateConnectionInfo()
831 if (wifiInfo != null && networkInfo != null in updateConnectionInfo()
832 && connectionInfoMatches(wifiInfo, networkInfo)) { in updateConnectionInfo()
835 mWifiInfo = wifiInfo; in updateConnectionInfo()
837 final int wifiInfoRssi = wifiInfo.getRssi(); in updateConnectionInfo()
840 mSpeed = getSpeedFromWifiInfo(mScoreCache, wifiInfo); in updateConnectionInfo()
857 mConnectedInfo.frequencyMhz = wifiInfo.getFrequency(); in updateConnectionInfo()
858 mConnectedInfo.linkSpeedMbps = wifiInfo.getLinkSpeed(); in updateConnectionInfo()
859 mConnectedInfo.wifiStandard = wifiInfo.getWifiStandard(); in updateConnectionInfo()
DMergedCarrierEntry.java143 protected boolean connectionInfoMatches(@NonNull WifiInfo wifiInfo, in connectionInfoMatches() argument
145 return wifiInfo.isCarrierMerged() && mSubscriptionId == wifiInfo.getSubscriptionId(); in connectionInfoMatches()
DOsuWifiEntry.java171 protected boolean connectionInfoMatches(@NonNull WifiInfo wifiInfo, in connectionInfoMatches() argument
173 return wifiInfo.isOsuAp() && TextUtils.equals( in connectionInfoMatches()
174 wifiInfo.getPasspointProviderFriendlyName(), mOsuProvider.getFriendlyName()); in connectionInfoMatches()
DStandardNetworkDetailsTracker.java129 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in updateStartInfo() local
132 mChosenEntry.updateConnectionInfo(wifiInfo, mCurrentNetworkInfo); in updateStartInfo()
DPasspointNetworkDetailsTracker.java146 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in updateStartInfo() local
149 mChosenEntry.updateConnectionInfo(wifiInfo, mCurrentNetworkInfo); in updateStartInfo()
DPasspointWifiEntry.java546 protected boolean connectionInfoMatches(@NonNull WifiInfo wifiInfo, in connectionInfoMatches() argument
548 if (!wifiInfo.isPasspointAp()) { in connectionInfoMatches()
553 return TextUtils.equals(wifiInfo.getPasspointFqdn(), mFqdn); in connectionInfoMatches()
DUtils.java265 @NonNull WifiInfo wifiInfo) { in getSpeedFromWifiInfo() argument
268 wifiKey = new WifiKey(wifiInfo.getSSID(), wifiInfo.getBSSID()); in getSpeedFromWifiInfo()
277 return roundToClosestSpeedEnum(scoredNetwork.calculateBadge(wifiInfo.getRssi())); in getSpeedFromWifiInfo()
DStandardWifiEntry.java839 protected synchronized boolean connectionInfoMatches(@NonNull WifiInfo wifiInfo, in connectionInfoMatches() argument
841 if (wifiInfo.isPasspointAp() || wifiInfo.isOsuAp()) { in connectionInfoMatches()
845 if (config.networkId == wifiInfo.getNetworkId()) { in connectionInfoMatches()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/
DAccessPointTest.java320 WifiInfo wifiInfo = new WifiInfo();
321 wifiInfo.setSSID(WifiSsid.createFromAsciiEncoded(configuration.SSID));
322 wifiInfo.setBSSID(configuration.BSSID);
323 wifiInfo.setNetworkId(configuration.networkId);
324 accessPoint.update(configuration, wifiInfo, networkInfo);
336 WifiInfo wifiInfo = new WifiInfo();
337 wifiInfo.setSSID(WifiSsid.createFromAsciiEncoded(configuration.SSID));
338 wifiInfo.setBSSID(configuration.BSSID);
339 wifiInfo.setNetworkId(configuration.networkId);
340 wifiInfo.setMeteredHint(true);
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
DWifiStatusTracker.java84 WifiInfo wifiInfo = null;
86 wifiInfo = Utils.tryGetWifiInfoForVcn(networkCapabilities);
87 isVcnOverWifi = (wifiInfo != null);
89 wifiInfo = (WifiInfo) networkCapabilities.getTransportInfo();
104 if (wifiInfo == null || !wifiInfo.isPrimary()) {
114 updateWifiInfo(wifiInfo);
247 private void updateWifiInfo(WifiInfo wifiInfo) { in updateWifiInfo() argument
249 connected = wifiInfo != null; in updateWifiInfo()
250 mWifiInfo = wifiInfo; in updateWifiInfo()
DAccessPoint.java824 private boolean matches(WifiConfiguration config, WifiInfo wifiInfo) { in matches() argument
825 if (config == null || wifiInfo == null) { in matches()
828 if (!config.isPasspoint() && !isSameSsidOrBssid(wifiInfo)) { in matches()
2040 private boolean isSameSsidOrBssid(WifiInfo wifiInfo) { in isSameSsidOrBssid() argument
2041 if (wifiInfo == null) { in isSameSsidOrBssid()
2045 if (TextUtils.equals(ssid, removeDoubleQuotes(wifiInfo.getSSID()))) { in isSameSsidOrBssid()
2047 } else if (wifiInfo.getBSSID() != null && TextUtils.equals(bssid, wifiInfo.getBSSID())) { in isSameSsidOrBssid()
/frameworks/base/media/tests/MediaRouter/src/com/android/mediaroutertest/
DMediaRouteInfoTest.java48 final DisplayInfo wifiInfo = new DisplayInfo(); in setUpOnce() local
49 wifiInfo.flags = Display.FLAG_PRESENTATION; in setUpOnce()
50 wifiInfo.type = Display.TYPE_WIFI; in setUpOnce()
51 wifiInfo.address = DisplayAddress.fromMacAddress(FAKE_MAC_ADDRESS); in setUpOnce()
52 sWifiDisplay = new Display(global, 2, wifiInfo, new DisplayAdjustments()); in setUpOnce()
/frameworks/base/core/java/android/net/
DNetworkKey.java110 public static NetworkKey createFromWifiInfo(@Nullable WifiInfo wifiInfo) { in createFromWifiInfo() argument
111 if (wifiInfo != null) { in createFromWifiInfo()
112 final String ssid = wifiInfo.getSSID(); in createFromWifiInfo()
113 final String bssid = wifiInfo.getBSSID(); in createFromWifiInfo()
/frameworks/base/packages/SystemUI/src/com/android/systemui/wifi/
DWifiDebuggingSecondaryUserActivity.java82 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in onReceive() local
83 if (wifiInfo == null || wifiInfo.getNetworkId() == -1) { in onReceive()
DWifiDebuggingActivity.java153 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in onReceive() local
154 if (wifiInfo == null || wifiInfo.getNetworkId() == -1) { in onReceive()
158 String bssid = wifiInfo.getBSSID(); in onReceive()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DNetworkControllerBaseTest.java346 int networkType, boolean validated, boolean isConnected, WifiInfo wifiInfo) { in setConnectivityViaCallbackInNetworkController() argument
350 builder.setTransportInfo(wifiInfo); in setConnectivityViaCallbackInNetworkController()
358 int networkType, boolean validated, boolean isConnected, WifiInfo wifiInfo) { in setConnectivityViaCallbackInWifiTracker() argument
362 builder.setTransportInfo(wifiInfo); in setConnectivityViaCallbackInWifiTracker()
395 int networkType, boolean validated, boolean isConnected, WifiInfo wifiInfo) { in setConnectivityViaDefaultCallbackInWifiTracker() argument
399 builder.setTransportInfo(wifiInfo); in setConnectivityViaDefaultCallbackInWifiTracker()
DNetworkControllerWifiTest.java221 WifiInfo wifiInfo = mock(WifiInfo.class); in testFetchInitialData_correctValues() local
222 when(wifiInfo.getSSID()).thenReturn(testSsid); in testFetchInitialData_correctValues()
223 when(mMockWm.getConnectionInfo()).thenReturn(wifiInfo); in testFetchInitialData_correctValues()
/frameworks/base/services/core/java/com/android/server/adb/
DAdbDebuggingManager.java626 WifiInfo wifiInfo = wifiManager.getConnectionInfo();
627 if (wifiInfo == null || wifiInfo.getNetworkId() == -1) {
635 String bssid = wifiInfo.getBSSID();
1303 WifiInfo wifiInfo = wifiManager.getConnectionInfo(); in getCurrentWifiApInfo() local
1304 if (wifiInfo == null || wifiInfo.getNetworkId() == -1) { in getCurrentWifiApInfo()
1310 if (wifiInfo.isPasspointAp() || wifiInfo.isOsuAp()) { in getCurrentWifiApInfo()
1311 ssid = wifiInfo.getPasspointProviderFriendlyName(); in getCurrentWifiApInfo()
1313 ssid = wifiInfo.getSSID(); in getCurrentWifiApInfo()
1319 if (networks.get(i).networkId == wifiInfo.getNetworkId()) { in getCurrentWifiApInfo()
1330 String bssid = wifiInfo.getBSSID(); in getCurrentWifiApInfo()
/frameworks/base/services/core/java/com/android/server/am/
DBatteryExternalStatsWorker.java587 final WifiActivityEnergyInfo wifiInfo = awaitControllerInfo(wifiReceiver); in updateExternalStatsLocked() local
701 if (wifiInfo != null) { in updateExternalStatsLocked()
702 if (wifiInfo.isValid()) { in updateExternalStatsLocked()
706 extractDeltaLocked(wifiInfo), wifiChargeUC, elapsedRealtime, uptime); in updateExternalStatsLocked()
708 Slog.w(TAG, "wifi info is invalid: " + wifiInfo); in updateExternalStatsLocked()
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DCarrierTextManagerTest.java391 WifiInfo wifiInfo = mock(WifiInfo.class); in mockWifi() local
392 when(wifiInfo.getBSSID()).thenReturn(""); in mockWifi()
393 when(mWifiManager.getConnectionInfo()).thenReturn(wifiInfo); in mockWifi()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/
DVoiceCallSessionStats.java594 WifiInfo wifiInfo = wifiManager.getConnectionInfo(); in getSignalStrengthWifi() local
596 if (wifiInfo != null) { in getSignalStrengthWifi()
597 int level = wifiManager.calculateSignalLevel(wifiInfo.getRssi()); in getSignalStrengthWifi()

12